{
	"openapi": "3.0.0",
	"components": {
		"examples": {},
		"headers": {},
		"parameters": {},
		"requestBodies": {},
		"responses": {},
		"schemas": {
			"AccountecProfileConfig": {
				"description": "Settings for the Accountec delivery profile. Preliminary: not yet\nconfirmed with Accountec.",
				"properties": {
					"agencyId": {
						"type": "string",
						"description": "The agency's id in Accountec, when it is not already in the URL."
					},
					"headerName": {
						"type": "string",
						"description": "The header that carries the shared secret. Defaults to Authorization."
					},
					"serviceName": {
						"type": "string",
						"description": "The service name Accountec assigned to Senseworks."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"WebhookSubscriptionCreated": {
				"description": "A new subscription, with its signing secret. The secret is only in the\ncreation response, and a same-key retry within 24 hours returns that\nresponse again. Subscription reads never return it; rotate it if it is lost.",
				"properties": {
					"id": {
						"type": "string"
					},
					"url": {
						"type": "string",
						"description": "Where deliveries are POSTed. https only."
					},
					"eventTypes": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "The event types delivered. Empty means every type."
					},
					"companyDurableKey": {
						"type": "string",
						"description": "Only events for this company. Absent means every company."
					},
					"profile": {
						"type": "string",
						"enum": [
							"senseworks",
							"accountec"
						],
						"description": "How deliveries are shaped. \"senseworks\" unless a portal needs its own."
					},
					"profileConfig": {
						"$ref": "#/components/schemas/AccountecProfileConfig"
					},
					"status": {
						"type": "string",
						"enum": [
							"active",
							"disabled",
							"failing"
						],
						"description": "\"failing\" means the last 20 deliveries failed. It still delivers."
					},
					"description": {
						"type": "string"
					},
					"createdAt": {
						"type": "string"
					},
					"updatedAt": {
						"type": "string"
					},
					"secretRotatedAt": {
						"type": "string",
						"description": "When the secret was last rotated. The previous one signs for 24 hours after."
					},
					"secret": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"url",
					"eventTypes",
					"profile",
					"status",
					"createdAt",
					"updatedAt",
					"secret"
				],
				"type": "object",
				"additionalProperties": false
			},
			"Record_string.string_": {
				"properties": {},
				"additionalProperties": {
					"type": "string"
				},
				"type": "object",
				"description": "Construct a type with a set of properties K of type T"
			},
			"Problem": {
				"description": "An error in the /v2 surface, served as application/problem+json.",
				"properties": {
					"type": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"status": {
						"type": "number",
						"format": "double"
					},
					"errorCode": {
						"type": "string",
						"description": "Stable code to branch on."
					},
					"detail": {
						"type": "string"
					},
					"candidates": {
						"items": {
							"$ref": "#/components/schemas/Record_string.string_"
						},
						"type": "array",
						"description": "Present on 409 placement_ambiguous and assignment_ambiguous."
					}
				},
				"required": [
					"type",
					"title",
					"status",
					"errorCode"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CreateWebhookSubscription": {
				"properties": {
					"url": {
						"type": "string"
					},
					"eventTypes": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Event types to deliver. Leave out for every type."
					},
					"companyDurableKey": {
						"type": "string"
					},
					"profile": {
						"type": "string",
						"enum": [
							"senseworks",
							"accountec"
						]
					},
					"profileConfig": {
						"$ref": "#/components/schemas/AccountecProfileConfig"
					},
					"description": {
						"type": "string"
					}
				},
				"required": [
					"url"
				],
				"type": "object",
				"additionalProperties": false
			},
			"WebhookSubscription": {
				"description": "A webhook subscription: where events for this organisation are delivered.",
				"properties": {
					"id": {
						"type": "string"
					},
					"url": {
						"type": "string",
						"description": "Where deliveries are POSTed. https only."
					},
					"eventTypes": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "The event types delivered. Empty means every type."
					},
					"companyDurableKey": {
						"type": "string",
						"description": "Only events for this company. Absent means every company."
					},
					"profile": {
						"type": "string",
						"enum": [
							"senseworks",
							"accountec"
						],
						"description": "How deliveries are shaped. \"senseworks\" unless a portal needs its own."
					},
					"profileConfig": {
						"$ref": "#/components/schemas/AccountecProfileConfig"
					},
					"status": {
						"type": "string",
						"enum": [
							"active",
							"disabled",
							"failing"
						],
						"description": "\"failing\" means the last 20 deliveries failed. It still delivers."
					},
					"description": {
						"type": "string"
					},
					"createdAt": {
						"type": "string"
					},
					"updatedAt": {
						"type": "string"
					},
					"secretRotatedAt": {
						"type": "string",
						"description": "When the secret was last rotated. The previous one signs for 24 hours after."
					}
				},
				"required": [
					"id",
					"url",
					"eventTypes",
					"profile",
					"status",
					"createdAt",
					"updatedAt"
				],
				"type": "object",
				"additionalProperties": false
			},
			"WebhookSubscriptionPage": {
				"properties": {
					"items": {
						"items": {
							"$ref": "#/components/schemas/WebhookSubscription"
						},
						"type": "array"
					},
					"nextCursor": {
						"type": "string",
						"description": "Pass as `cursor` for the next page. Absent on the last page."
					}
				},
				"required": [
					"items"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UpdateWebhookSubscription": {
				"properties": {
					"url": {
						"type": "string"
					},
					"eventTypes": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"description": {
						"type": "string"
					},
					"status": {
						"type": "string",
						"enum": [
							"active",
							"disabled"
						]
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"WebhookSecretRotated": {
				"properties": {
					"secret": {
						"type": "string",
						"description": "The new secret. Shown once."
					},
					"previousSecretValidUntil": {
						"type": "string",
						"description": "Until then deliveries are signed with the previous secret too."
					}
				},
				"required": [
					"secret",
					"previousSecretValidUntil"
				],
				"type": "object",
				"additionalProperties": false
			},
			"WebhookPing": {
				"properties": {
					"eventId": {
						"type": "string",
						"description": "The id of the webhook.ping event, as it appears in the delivery log."
					}
				},
				"required": [
					"eventId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"WebhookDelivery": {
				"description": "One delivery of one event to one subscription, with its latest attempt.",
				"properties": {
					"id": {
						"type": "string",
						"description": "Stable delivery-log id; each HTTP attempt has its own Senseworks-Delivery-Id."
					},
					"subscriptionId": {
						"type": "string"
					},
					"eventId": {
						"type": "string"
					},
					"eventType": {
						"type": "string"
					},
					"status": {
						"type": "string",
						"enum": [
							"pending",
							"delivering",
							"succeeded",
							"failed",
							"dead"
						]
					},
					"attempt": {
						"type": "number",
						"format": "double",
						"description": "Attempts made so far. At most six before the delivery is dead."
					},
					"nextAttemptAt": {
						"type": "string"
					},
					"lastAttemptAt": {
						"type": "string"
					},
					"lastStatus": {
						"type": "number",
						"format": "double",
						"description": "The HTTP status the receiver answered with."
					},
					"lastError": {
						"type": "string"
					},
					"responseExcerpt": {
						"type": "string",
						"description": "The start of the receiver's answer, at most 512 characters."
					},
					"replayOf": {
						"type": "string",
						"description": "The delivery this one replays."
					},
					"createdAt": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"subscriptionId",
					"eventId",
					"eventType",
					"status",
					"attempt",
					"createdAt"
				],
				"type": "object",
				"additionalProperties": false
			},
			"WebhookDeliveryPage": {
				"properties": {
					"items": {
						"items": {
							"$ref": "#/components/schemas/WebhookDelivery"
						},
						"type": "array"
					},
					"nextCursor": {
						"type": "string"
					}
				},
				"required": [
					"items"
				],
				"type": "object",
				"additionalProperties": false
			},
			"User": {
				"description": "A user in the organisation.",
				"properties": {
					"id": {
						"type": "string"
					},
					"email": {
						"type": "string"
					},
					"firstName": {
						"type": "string"
					},
					"lastName": {
						"type": "string"
					},
					"createdAt": {
						"type": "string",
						"description": "When the user was created, RFC 3339."
					}
				},
				"required": [
					"id",
					"email",
					"firstName",
					"lastName"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UserPage": {
				"properties": {
					"items": {
						"items": {
							"$ref": "#/components/schemas/User"
						},
						"type": "array"
					},
					"nextCursor": {
						"type": "string"
					}
				},
				"required": [
					"items"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UserPermissionGroup": {
				"description": "A permission group the user is a member of.",
				"properties": {
					"id": {
						"type": "string"
					},
					"name": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"name"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UserPermissionGroupPage": {
				"properties": {
					"items": {
						"items": {
							"$ref": "#/components/schemas/UserPermissionGroup"
						},
						"type": "array"
					},
					"nextCursor": {
						"type": "string"
					}
				},
				"required": [
					"items"
				],
				"type": "object",
				"additionalProperties": false
			},
			"Invitation": {
				"description": "A user who has been invited and has not yet accepted.",
				"properties": {
					"id": {
						"type": "string",
						"description": "The id of the invited user. Use it to resend or delete the invitation."
					},
					"email": {
						"type": "string"
					},
					"firstName": {
						"type": "string"
					},
					"lastName": {
						"type": "string"
					},
					"createdAt": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"email"
				],
				"type": "object",
				"additionalProperties": false
			},
			"InvitationPage": {
				"properties": {
					"items": {
						"items": {
							"$ref": "#/components/schemas/Invitation"
						},
						"type": "array"
					},
					"nextCursor": {
						"type": "string"
					}
				},
				"required": [
					"items"
				],
				"type": "object",
				"additionalProperties": false
			},
			"InvitationResult": {
				"description": "One invited address and the user created for it.",
				"properties": {
					"id": {
						"type": "string",
						"description": "The id of the invited user. Use it to resend or delete the invitation."
					},
					"email": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"email"
				],
				"type": "object",
				"additionalProperties": false
			},
			"InvitationResults": {
				"properties": {
					"items": {
						"items": {
							"$ref": "#/components/schemas/InvitationResult"
						},
						"type": "array"
					}
				},
				"required": [
					"items"
				],
				"type": "object",
				"additionalProperties": false
			},
			"InvitationModule": {
				"type": "string",
				"enum": [
					"AUDIT",
					"ANALYTICS"
				]
			},
			"CreateInvitations": {
				"properties": {
					"emails": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "E-mail addresses to invite. Each gets an invitation mail."
					},
					"permissionGroupIds": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Permission groups to add the invited users to."
					},
					"modules": {
						"items": {
							"$ref": "#/components/schemas/InvitationModule"
						},
						"type": "array",
						"description": "Modules the invited users get. Default `ANALYTICS`."
					}
				},
				"required": [
					"emails"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PermissionGroup": {
				"description": "A group of users that is given access to companies as one.",
				"properties": {
					"id": {
						"type": "string",
						"description": "The id of the group."
					},
					"name": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"name"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PermissionGroupPage": {
				"properties": {
					"items": {
						"items": {
							"$ref": "#/components/schemas/PermissionGroup"
						},
						"type": "array"
					},
					"nextCursor": {
						"type": "string",
						"description": "Absent on the last page."
					}
				},
				"required": [
					"items"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CreatePermissionGroup": {
				"properties": {
					"name": {
						"type": "string",
						"minLength": 1,
						"maxLength": 255
					}
				},
				"required": [
					"name"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PermissionGroupMember": {
				"properties": {
					"id": {
						"type": "string",
						"description": "The id of the user."
					},
					"email": {
						"type": "string"
					},
					"firstName": {
						"type": "string"
					},
					"lastName": {
						"type": "string"
					},
					"isActive": {
						"type": "boolean"
					}
				},
				"required": [
					"id",
					"email",
					"firstName",
					"lastName",
					"isActive"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PermissionGroupMemberPage": {
				"properties": {
					"items": {
						"items": {
							"$ref": "#/components/schemas/PermissionGroupMember"
						},
						"type": "array"
					},
					"nextCursor": {
						"type": "string",
						"description": "Absent on the last page."
					}
				},
				"required": [
					"items"
				],
				"type": "object",
				"additionalProperties": false
			},
			"LocalizedText": {
				"properties": {
					"sv": {
						"type": "string"
					},
					"en": {
						"type": "string"
					}
				},
				"required": [
					"sv",
					"en"
				],
				"type": "object",
				"additionalProperties": false
			},
			"Notification": {
				"description": "A notification about something that happened in Senseworks, written for\na person to read. Both languages are always present.",
				"properties": {
					"id": {
						"type": "string"
					},
					"eventId": {
						"type": "string",
						"description": "The event the notification is about, the same id as in webhook deliveries."
					},
					"eventType": {
						"type": "string",
						"description": "For example evidence.attached."
					},
					"level": {
						"type": "string",
						"enum": [
							"info",
							"warning",
							"action"
						],
						"description": "\"action\" means someone needs to do something."
					},
					"audience": {
						"type": "string",
						"enum": [
							"agency",
							"consumer"
						],
						"description": "The agency's staff, or the agency's client."
					},
					"companyDurableKey": {
						"type": "string"
					},
					"subject": {
						"$ref": "#/components/schemas/LocalizedText"
					},
					"body": {
						"$ref": "#/components/schemas/LocalizedText"
					},
					"link": {
						"type": "string",
						"description": "A link to the place in Senseworks the notification is about."
					},
					"createdAt": {
						"type": "string",
						"description": "When the notification was created, RFC 3339 UTC."
					},
					"readAt": {
						"type": "string",
						"description": "When it was marked as read, or absent while unread."
					}
				},
				"required": [
					"id",
					"eventType",
					"level",
					"audience",
					"subject",
					"body",
					"createdAt"
				],
				"type": "object",
				"additionalProperties": false
			},
			"NotificationPage": {
				"description": "One page of notifications, newest first.",
				"properties": {
					"items": {
						"items": {
							"$ref": "#/components/schemas/Notification"
						},
						"type": "array"
					},
					"nextCursor": {
						"type": "string",
						"description": "Pass as `cursor` to get the next page. Absent on the last page."
					}
				},
				"required": [
					"items"
				],
				"type": "object",
				"additionalProperties": false
			},
			"MarkReadResult": {
				"properties": {
					"updated": {
						"type": "number",
						"format": "double",
						"description": "How many notifications changed from unread to read."
					}
				},
				"required": [
					"updated"
				],
				"type": "object",
				"additionalProperties": false
			},
			"MarkReadRequest": {
				"description": "Which notifications to mark as read: exactly one of `ids` or `before`.",
				"properties": {
					"ids": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "At most 200 notification ids."
					},
					"before": {
						"type": "string",
						"description": "Everything created before this time, RFC 3339."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"GeneralLedgerImportStatus": {
				"type": "string",
				"enum": [
					"uploaded",
					"pending",
					"parsed",
					"verified",
					"corrupt",
					"failed"
				],
				"description": "Where an import is in its life. A new import is `pending`."
			},
			"GeneralLedgerImport": {
				"description": "A general ledger file that has been handed over for import.",
				"properties": {
					"id": {
						"type": "string",
						"description": "The id of the import."
					},
					"name": {
						"type": "string",
						"description": "The name of the uploaded file."
					},
					"status": {
						"$ref": "#/components/schemas/GeneralLedgerImportStatus"
					}
				},
				"required": [
					"id",
					"name",
					"status"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UUIDmd5": {
				"type": "string",
				"format": "uuid",
				"description": "Stringified UUID-like-MD5 hash",
				"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
			},
			"CompanyDurableKey": {
				"$ref": "#/components/schemas/UUIDmd5"
			},
			"FinancialYear": {
				"description": "A financial year (räkenskapsår) of a company.",
				"properties": {
					"id": {
						"type": "string",
						"description": "The id to use in the financial year's other endpoints."
					},
					"companyDurableKey": {
						"type": "string"
					},
					"startDate": {
						"type": "string",
						"example": "2021-01-01",
						"format": "date"
					},
					"endDate": {
						"type": "string",
						"example": "2021-12-31",
						"format": "date"
					}
				},
				"required": [
					"id",
					"companyDurableKey",
					"startDate",
					"endDate"
				],
				"type": "object",
				"additionalProperties": false,
				"example": {
					"id": "37c5c155-1699-46a1-b8b0-c806b9a198fe",
					"companyDurableKey": "9e2a5409-1dbb-4eba-90fd-8d47d8d7f950",
					"startDate": "2021-01-01",
					"endDate": "2021-12-31"
				}
			},
			"FinancialYearPage": {
				"properties": {
					"items": {
						"items": {
							"$ref": "#/components/schemas/FinancialYear"
						},
						"type": "array",
						"description": "Newest financial year first."
					},
					"nextCursor": {
						"type": "string",
						"description": "Pass as `cursor` to get the next page. Absent on the last page."
					}
				},
				"required": [
					"items"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CreateFinancialYear": {
				"properties": {
					"startDate": {
						"type": "string",
						"example": "2022-01-01",
						"format": "date"
					},
					"endDate": {
						"type": "string",
						"example": "2022-12-31",
						"format": "date"
					}
				},
				"required": [
					"startDate",
					"endDate"
				],
				"type": "object",
				"additionalProperties": false
			},
			"FinancialYearId": {
				"$ref": "#/components/schemas/UUIDmd5"
			},
			"EvidenceTargetProcedure": {
				"properties": {
					"procedureId": {
						"type": "string"
					},
					"name": {
						"type": "string"
					}
				},
				"required": [
					"procedureId",
					"name"
				],
				"type": "object",
				"additionalProperties": false
			},
			"EvidenceTarget": {
				"properties": {
					"checklistId": {
						"type": "string",
						"description": "Pass as checklistId when placing evidence."
					},
					"name": {
						"type": "string"
					},
					"kind": {
						"type": "string",
						"enum": [
							"accountGroup",
							"checklist"
						],
						"description": "\"accountGroup\" for an account group's checklist under Granskning."
					},
					"accountGroupReference": {
						"type": "string"
					},
					"accountNumbers": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "The accounts whose accountNumber resolves to this checklist."
					},
					"procedures": {
						"items": {
							"$ref": "#/components/schemas/EvidenceTargetProcedure"
						},
						"type": "array",
						"description": "Active procedures in the checklist. Pass as procedureId."
					}
				},
				"required": [
					"checklistId",
					"name",
					"kind",
					"procedures"
				],
				"type": "object",
				"additionalProperties": false
			},
			"EvidenceTargets": {
				"description": "The places evidence can be put in an engagement's audit file.",
				"properties": {
					"auditAssignmentId": {
						"type": "string"
					},
					"financialYearId": {
						"type": "string"
					},
					"targets": {
						"items": {
							"$ref": "#/components/schemas/EvidenceTarget"
						},
						"type": "array"
					}
				},
				"required": [
					"auditAssignmentId",
					"financialYearId",
					"targets"
				],
				"type": "object",
				"additionalProperties": false
			},
			"EvidencePlacement": {
				"description": "Where in the audit file the document was placed, and how it was resolved.",
				"properties": {
					"resolvedBy": {
						"type": "string",
						"enum": [
							"accountNumber",
							"checklistId",
							"procedureId"
						]
					},
					"checklistId": {
						"type": "string",
						"description": "The checklist the document sits in or under."
					},
					"procedureId": {
						"type": "string",
						"description": "The procedure the document sits under, when one was targeted."
					},
					"accountGroupReference": {
						"type": "string",
						"description": "The account group the account number resolved to."
					}
				},
				"required": [
					"resolvedBy"
				],
				"type": "object",
				"additionalProperties": false
			},
			"Evidence": {
				"description": "Evidence placed in an audit file (revisionsakten) through the API.",
				"properties": {
					"documentId": {
						"type": "string",
						"description": "The document created in the engagement."
					},
					"fileName": {
						"type": "string"
					},
					"auditAssignmentId": {
						"type": "string"
					},
					"financialYearId": {
						"type": "string"
					},
					"placement": {
						"$ref": "#/components/schemas/EvidencePlacement"
					},
					"sourceSystem": {
						"type": "string",
						"description": "The partner's system, echoed back."
					},
					"sourceReference": {
						"type": "string",
						"description": "The partner's own reference for the file, echoed back."
					}
				},
				"required": [
					"documentId",
					"fileName",
					"auditAssignmentId",
					"financialYearId",
					"placement"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CompanyDocument": {
				"description": "A document that came into a company's audit files from outside, through the\nAPI. It does not include the auditor's own working papers.",
				"properties": {
					"id": {
						"type": "string",
						"description": "The id to use in the document's other endpoints."
					},
					"name": {
						"type": "string",
						"description": "The file name."
					},
					"sizeKilobytes": {
						"type": "integer",
						"format": "int32",
						"description": "Size in whole kilobytes (1024 bytes), rounded down, so a file under 1 KB\nis 0. Absent until the file has been uploaded."
					},
					"contentType": {
						"type": "string"
					},
					"createdAt": {
						"type": "string",
						"description": "When the document was created, RFC 3339 UTC."
					},
					"status": {
						"type": "string",
						"enum": [
							"PREPARED",
							"UPLOADING",
							"UPLOADED",
							"FAILED"
						],
						"description": "`UPLOADED` is a complete document. `PREPARED` and `UPLOADING` are on the\nway, and `FAILED` never got its file."
					},
					"auditAssignmentId": {
						"type": "string",
						"description": "The engagement whose audit file holds the document."
					}
				},
				"required": [
					"id",
					"name",
					"contentType",
					"createdAt",
					"status"
				],
				"type": "object",
				"additionalProperties": false,
				"example": {
					"id": "b6a3a2ce-8b6c-4d3f-9b3b-7a0f4a0f9c11",
					"name": "Bankbesked december.pdf",
					"sizeKilobytes": 47,
					"contentType": "application/pdf",
					"createdAt": "2027-01-12T08:30:00.000Z",
					"status": "UPLOADED",
					"auditAssignmentId": "1f2a4c7e-3b6b-4d0a-9a9b-1b2c3d4e5f6a"
				}
			},
			"CompanyDocumentPage": {
				"description": "One page of documents, newest first.",
				"properties": {
					"items": {
						"items": {
							"$ref": "#/components/schemas/CompanyDocument"
						},
						"type": "array"
					},
					"nextCursor": {
						"type": "string",
						"description": "Pass as `cursor` to get the next page. Absent on the last page."
					}
				},
				"required": [
					"items"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UUIDv4": {
				"type": "string",
				"format": "uuid",
				"description": "Stringified UUIDv4\nSee [RFC 4122](https://tools.ietf.org/html/rfc4122)",
				"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
			},
			"AuditAssignmentId": {
				"$ref": "#/components/schemas/UUIDv4"
			},
			"DocumentId": {
				"$ref": "#/components/schemas/UUIDv4"
			},
			"DocumentContent": {
				"type": "string",
				"format": "binary",
				"description": "The bytes of a document, as sent in the body of the download."
			},
			"DataSourceType": {
				"type": "string",
				"enum": [
					"fortnox",
					"visma",
					"bjornlunden",
					"bank",
					"skatteverket",
					"businessdata",
					"other"
				],
				"description": "Where a company's data comes from. Without any credentials or connection\ndetails."
			},
			"DataSource": {
				"description": "A connection from which Senseworks reads a company's data.",
				"properties": {
					"id": {
						"type": "string"
					},
					"type": {
						"$ref": "#/components/schemas/DataSourceType"
					},
					"status": {
						"type": "string",
						"enum": [
							"healthy",
							"unhealthy",
							"running",
							"inactive",
							"renewed"
						],
						"description": "`healthy` and `renewed` work. `running` is reading right now,\n`unhealthy` needs attention from the company and `inactive` is switched\noff."
					},
					"validTo": {
						"type": "string",
						"description": "When the connection stops working unless it is renewed, RFC 3339 UTC.\nAbsent when it does not expire."
					},
					"renewedAt": {
						"type": "string",
						"description": "When the connection was last renewed, RFC 3339 UTC, for the sources that are."
					}
				},
				"required": [
					"id",
					"type",
					"status"
				],
				"type": "object",
				"additionalProperties": false,
				"example": {
					"id": "3f1c2d7a-0b6e-4a53-8d0e-6a2d9b7c5e10",
					"type": "fortnox",
					"status": "healthy",
					"validTo": "2027-06-30T00:00:00.000Z"
				}
			},
			"DataSourcePage": {
				"description": "One page of data sources, ordered by id.",
				"properties": {
					"items": {
						"items": {
							"$ref": "#/components/schemas/DataSource"
						},
						"type": "array"
					},
					"nextCursor": {
						"type": "string",
						"description": "Pass as `cursor` to get the next page. Absent on the last page."
					}
				},
				"required": [
					"items"
				],
				"type": "object",
				"additionalProperties": false
			},
			"DataSyncDataType": {
				"type": "string",
				"enum": [
					"vat",
					"aga",
					"gl",
					"payments",
					"documents",
					"bankaccount",
					"companyinformation",
					"taxaccount",
					"incometaxdeclaration"
				],
				"description": "What a sync reads."
			},
			"DataSync": {
				"description": "One reading of data from a data source.",
				"properties": {
					"id": {
						"type": "string"
					},
					"dataSourceId": {
						"type": "string"
					},
					"dataSourceType": {
						"$ref": "#/components/schemas/DataSourceType"
					},
					"dataType": {
						"$ref": "#/components/schemas/DataSyncDataType"
					},
					"financialYearId": {
						"type": "string"
					},
					"status": {
						"type": "string",
						"enum": [
							"running",
							"finished",
							"failed"
						]
					},
					"failureCode": {
						"type": "number",
						"format": "double",
						"description": "A code for why the sync failed, when it did and the source gave one."
					},
					"startedAt": {
						"type": "string",
						"description": "When the sync started, RFC 3339 UTC."
					},
					"finishedAt": {
						"type": "string",
						"description": "When it ended, RFC 3339 UTC. Absent while it runs."
					}
				},
				"required": [
					"id",
					"dataSourceId",
					"dataSourceType",
					"dataType",
					"financialYearId",
					"status",
					"startedAt"
				],
				"type": "object",
				"additionalProperties": false,
				"example": {
					"id": "8b0b6c5e-3e57-4b5c-9a52-0c9a2c3b7d44",
					"dataSourceId": "3f1c2d7a-0b6e-4a53-8d0e-6a2d9b7c5e10",
					"dataSourceType": "fortnox",
					"dataType": "gl",
					"financialYearId": "a5c2e4ed-8765-4f9b-bb4a-74da77ebe6dd",
					"status": "finished",
					"startedAt": "2027-01-12T03:00:00.000Z",
					"finishedAt": "2027-01-12T03:02:41.000Z"
				}
			},
			"DataSyncPage": {
				"description": "One page of data syncs, newest first.",
				"properties": {
					"items": {
						"items": {
							"$ref": "#/components/schemas/DataSync"
						},
						"type": "array"
					},
					"nextCursor": {
						"type": "string",
						"description": "Pass as `cursor` to get the next page. Absent on the last page."
					}
				},
				"required": [
					"items"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CompanyAccessUser": {
				"description": "A user who has access to a company.",
				"properties": {
					"id": {
						"type": "string"
					},
					"email": {
						"type": "string"
					},
					"firstName": {
						"type": "string"
					},
					"lastName": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"email",
					"firstName",
					"lastName"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CompanyAccessPermissionGroup": {
				"description": "A permission group that has access to a company.",
				"properties": {
					"id": {
						"type": "string"
					},
					"name": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"name"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CompanyPermissions": {
				"description": "Who has access to a company: users, and permission groups.",
				"properties": {
					"users": {
						"items": {
							"$ref": "#/components/schemas/CompanyAccessUser"
						},
						"type": "array"
					},
					"permissionGroups": {
						"items": {
							"$ref": "#/components/schemas/CompanyAccessPermissionGroup"
						},
						"type": "array"
					}
				},
				"required": [
					"users",
					"permissionGroups"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CompanyCountry": {
				"type": "string",
				"enum": [
					"OTHER",
					"SWEDEN"
				]
			},
			"CompanyLegalForm": {
				"type": "string",
				"enum": [
					"LIMITED_LIABILITY_COMPANY",
					"LIMITED_LIABILITY_BANK",
					"LIMITED_LIABILITY_INSURANCE",
					"SOLE_TRADER",
					"TRADING_PARTNERSHIP",
					"LIMITED_PARTNERSHIP",
					"ECONOMIC_ASSOCIATION",
					"CONDOMINIUM_ASSOCIATIONS",
					"COOPERATIVE_RENTED_APARTMENT_ASSOCIATION",
					"JOINED_OWNED_FIRM",
					"NON_PROFIT_ASSOCIATION",
					"COMMUNITY_ASSOCIATION",
					"REGISTERED_RELIGIOUS_COMMUNITY",
					"FOUNDATION",
					"MUNICIPALITY",
					"MUNICIPALITIES_FEDERATION",
					"COUNTY_COUNCIL",
					"SAVINGS_BANK",
					"FOREIGN_JURIDICAL_PERSON"
				]
			},
			"CompanyAnnualReportFramework": {
				"type": "string",
				"enum": [
					"K1",
					"K2",
					"K3",
					"RedR"
				]
			},
			"Company": {
				"description": "A company in the organisation. `durableKey` is the key every other\n`/v2/companies/{companyDurableKey}/...` route takes.",
				"properties": {
					"durableKey": {
						"type": "string"
					},
					"organizationNumber": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"address": {
						"type": "string"
					},
					"defaultAccountPlan": {
						"type": "string"
					},
					"country": {
						"$ref": "#/components/schemas/CompanyCountry"
					},
					"legalForm": {
						"$ref": "#/components/schemas/CompanyLegalForm"
					},
					"annualReportFramework": {
						"$ref": "#/components/schemas/CompanyAnnualReportFramework"
					},
					"sniCode": {
						"type": "string",
						"nullable": true,
						"description": "The company's SNI code (industry classification), or null when none is\nset. Returned by get, create and update. The list leaves it out."
					}
				},
				"required": [
					"durableKey",
					"organizationNumber",
					"name",
					"defaultAccountPlan"
				],
				"type": "object",
				"additionalProperties": false,
				"example": {
					"durableKey": "9e2a5409-1dbb-4eba-90fd-8d47d8d7f950",
					"organizationNumber": "556677-8899",
					"name": "Restaurant XY AB",
					"defaultAccountPlan": "e72841a7-22c3-4c92-a0c2-394332562dcb",
					"country": "SWEDEN",
					"legalForm": "LIMITED_LIABILITY_COMPANY",
					"annualReportFramework": "K3",
					"sniCode": "56100"
				}
			},
			"CompanyPage": {
				"description": "One page of companies, ordered by `durableKey`.",
				"properties": {
					"items": {
						"items": {
							"$ref": "#/components/schemas/Company"
						},
						"type": "array"
					},
					"nextCursor": {
						"type": "string",
						"description": "Pass as `cursor` to get the next page. Absent on the last page."
					}
				},
				"required": [
					"items"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CompanyAuthorization": {
				"description": "Who can see the new company: 1, 2 or 4 is the permission type, 3 is the\nextended type. `userIds` and `groupIds` name the users and groups the\npermission is given to.",
				"properties": {
					"type": {
						"type": "number",
						"enum": [
							1,
							2,
							3,
							4
						]
					},
					"userIds": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"groupIds": {
						"items": {
							"type": "string"
						},
						"type": "array"
					}
				},
				"required": [
					"type",
					"userIds",
					"groupIds"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CreateCompany": {
				"properties": {
					"name": {
						"type": "string"
					},
					"organizationNumber": {
						"type": "string"
					},
					"address": {
						"type": "string"
					},
					"country": {
						"$ref": "#/components/schemas/CompanyCountry"
					},
					"legalForm": {
						"$ref": "#/components/schemas/CompanyLegalForm"
					},
					"annualReportFramework": {
						"$ref": "#/components/schemas/CompanyAnnualReportFramework"
					},
					"authorization": {
						"$ref": "#/components/schemas/CompanyAuthorization"
					}
				},
				"required": [
					"name",
					"organizationNumber",
					"annualReportFramework",
					"authorization"
				],
				"type": "object",
				"additionalProperties": false,
				"example": {
					"name": "Restaurant XY AB",
					"organizationNumber": "556677-8899",
					"annualReportFramework": "K3",
					"legalForm": "LIMITED_LIABILITY_COMPANY",
					"authorization": {
						"type": 4,
						"userIds": [],
						"groupIds": []
					}
				}
			},
			"UpdateCompany": {
				"description": "Fields that are left out are not changed.",
				"properties": {
					"name": {
						"type": "string"
					},
					"organizationNumber": {
						"type": "string"
					},
					"address": {
						"type": "string"
					},
					"country": {
						"$ref": "#/components/schemas/CompanyCountry"
					},
					"legalForm": {
						"$ref": "#/components/schemas/CompanyLegalForm"
					},
					"annualReportFramework": {
						"$ref": "#/components/schemas/CompanyAnnualReportFramework"
					},
					"sniCode": {
						"type": "string",
						"description": "The SNI code, 1 to 5 digits.",
						"pattern": "^[0-9]{1,5}$"
					}
				},
				"type": "object",
				"additionalProperties": false,
				"example": {
					"name": "Restaurant XY Holding AB",
					"sniCode": "56100"
				}
			},
			"AuditAssignment": {
				"description": "An audit engagement for a company and a financial year. Only these five\nfields are exposed: no materiality or risk data.",
				"properties": {
					"id": {
						"type": "string"
					},
					"type": {
						"type": "string",
						"description": "For example AE."
					},
					"subType": {
						"type": "string",
						"description": "For example SA."
					},
					"financialYearId": {
						"type": "string"
					},
					"status": {
						"type": "string",
						"enum": [
							"OPEN",
							"LOCKED",
							"ARCHIVED"
						]
					}
				},
				"required": [
					"id",
					"type",
					"subType",
					"financialYearId",
					"status"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AuditAssignmentPage": {
				"description": "One page of audit assignments, ordered by id.",
				"properties": {
					"items": {
						"items": {
							"$ref": "#/components/schemas/AuditAssignment"
						},
						"type": "array"
					},
					"nextCursor": {
						"type": "string",
						"description": "Pass as `cursor` to get the next page. Absent on the last page."
					}
				},
				"required": [
					"items"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AuditAssignmentStatus": {
				"type": "string",
				"enum": [
					"OPEN",
					"LOCKED",
					"ARCHIVED"
				]
			},
			"AuditAssignmentProgressStatus": {
				"type": "string",
				"enum": [
					"NOT_STARTED",
					"OPEN",
					"FINALIZING",
					"LOCKED",
					"ARCHIVED",
					"EXPORTING",
					"ERROR"
				],
				"description": "Where the engagement is in its life. `NOT_STARTED` and `OPEN` are before and\nduring the work, `FINALIZING` is the lock in progress, `EXPORTING` and\n`ERROR` come from the export of the audit file."
			},
			"AuditAssignmentPhaseProgress": {
				"description": "How far one phase of the work has come.",
				"properties": {
					"completedPercentage": {
						"type": "number",
						"format": "double",
						"description": "Share of the phase's checklists that are completed."
					},
					"reviewedPercentage": {
						"type": "number",
						"format": "double",
						"description": "Share of the phase's checklists that are reviewed."
					}
				},
				"required": [
					"completedPercentage",
					"reviewedPercentage"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AuditAssignmentProgress": {
				"description": "Progress per phase. A phase the engagement does not have is absent.",
				"properties": {
					"planning": {
						"$ref": "#/components/schemas/AuditAssignmentPhaseProgress"
					},
					"review": {
						"$ref": "#/components/schemas/AuditAssignmentPhaseProgress"
					},
					"conclusion": {
						"$ref": "#/components/schemas/AuditAssignmentPhaseProgress"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"AuditAssignmentTeamRole": {
				"type": "string",
				"enum": [
					"responsible",
					"attesting",
					"quality",
					"coworker",
					"specialist"
				]
			},
			"AuditAssignmentTeamMember": {
				"properties": {
					"userId": {
						"type": "string",
						"description": "The user's id, as in `/v2/users`."
					},
					"displayName": {
						"type": "string",
						"nullable": true,
						"description": "The user's first and last name, from the organisation's users. Null when\nthe name is unknown or could not be read.",
						"example": "Anna Andersson"
					},
					"role": {
						"$ref": "#/components/schemas/AuditAssignmentTeamRole"
					},
					"signed": {
						"type": "boolean",
						"description": "Whether the member has signed the independence declaration."
					}
				},
				"required": [
					"userId",
					"role",
					"signed"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AuditAssignmentExportStatus": {
				"type": "string",
				"enum": [
					"NOT_EXPORTED",
					"EXPORTING",
					"EXPORTED",
					"EXPORT_ERROR"
				]
			},
			"AuditAssignmentOverview": {
				"description": "An audit engagement with its status and progress, for a portfolio overview.\nIt holds how far the work has come and who is on it, and nothing about what\nthe work found: no risks, notes, materiality or conclusions. `progressStatus`\nis absent when it has not been worked out yet.",
				"properties": {
					"id": {
						"type": "string"
					},
					"type": {
						"type": "string",
						"description": "For example AE."
					},
					"subType": {
						"type": "string",
						"description": "For example SA."
					},
					"companyDurableKey": {
						"type": "string"
					},
					"companyName": {
						"type": "string"
					},
					"organizationNumber": {
						"type": "string"
					},
					"legalForm": {
						"type": "string"
					},
					"financialYearEndDate": {
						"type": "string",
						"example": "2026-12-31",
						"format": "date"
					},
					"status": {
						"$ref": "#/components/schemas/AuditAssignmentStatus"
					},
					"progressStatus": {
						"$ref": "#/components/schemas/AuditAssignmentProgressStatus"
					},
					"progress": {
						"$ref": "#/components/schemas/AuditAssignmentProgress"
					},
					"team": {
						"items": {
							"$ref": "#/components/schemas/AuditAssignmentTeamMember"
						},
						"type": "array"
					},
					"assignmentTemplateId": {
						"type": "string"
					},
					"assignmentTemplateName": {
						"type": "string"
					},
					"lockDate": {
						"type": "string",
						"description": "The date the engagement was locked. Absent while it is open.",
						"format": "date-time"
					},
					"exportStatus": {
						"$ref": "#/components/schemas/AuditAssignmentExportStatus"
					},
					"lastModified": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"id",
					"type",
					"subType",
					"companyDurableKey",
					"companyName",
					"organizationNumber",
					"financialYearEndDate",
					"status",
					"progress",
					"team",
					"assignmentTemplateId",
					"assignmentTemplateName",
					"lastModified"
				],
				"type": "object",
				"additionalProperties": false,
				"example": {
					"id": "1f2a4c7e-3b6b-4d0a-9a9b-1b2c3d4e5f6a",
					"type": "AE",
					"subType": "SA",
					"companyDurableKey": "9e2a5409-1dbb-4eba-90fd-8d47d8d7f950",
					"companyName": "Restaurant XY AB",
					"organizationNumber": "556677-8899",
					"legalForm": "LIMITED_LIABILITY_COMPANY",
					"financialYearEndDate": "2026-12-31",
					"status": "OPEN",
					"progressStatus": "OPEN",
					"progress": {
						"planning": {
							"completedPercentage": 100,
							"reviewedPercentage": 100
						},
						"review": {
							"completedPercentage": 40,
							"reviewedPercentage": 10
						},
						"conclusion": {
							"completedPercentage": 0,
							"reviewedPercentage": 0
						}
					},
					"team": [
						{
							"userId": "6c1e9f55-0d4c-4d57-8f5e-0e1b6f3c9a21",
							"displayName": "Anna Andersson",
							"role": "responsible",
							"signed": true
						}
					],
					"assignmentTemplateId": "22e55052-b8b4-4983-ba41-dbeb87c00b7a",
					"assignmentTemplateName": "Revisionsuppdrag",
					"lastModified": "2027-02-03T09:15:00.000Z"
				}
			},
			"CreateAuditAssignment": {
				"description": "The audit engagement to create. The company's legal form and annual report\nframework, and the template's audit framework, set the rest. The team is\nempty: add people in Senseworks.",
				"properties": {
					"type": {
						"type": "string",
						"enum": [
							"AE"
						],
						"nullable": false,
						"description": "Only AE, an audit engagement."
					},
					"subType": {
						"type": "string",
						"enum": [
							"SA"
						],
						"nullable": false,
						"description": "Only SA, a statutory audit."
					},
					"financialYearId": {
						"$ref": "#/components/schemas/FinancialYearId"
					},
					"assignmentTemplateId": {
						"type": "string",
						"description": "The id of an audit assignment template, from\n`GET /v2/audit-assignment-templates`.",
						"format": "uuid",
						"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
					}
				},
				"required": [
					"type",
					"subType",
					"financialYearId",
					"assignmentTemplateId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AuditAssignmentOverviewPage": {
				"description": "One page of audit engagements, newest closing date first.",
				"properties": {
					"items": {
						"items": {
							"$ref": "#/components/schemas/AuditAssignmentOverview"
						},
						"type": "array"
					},
					"nextCursor": {
						"type": "string",
						"description": "Pass as `cursor` to get the next page. Absent on the last page."
					}
				},
				"required": [
					"items"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AuditAssignmentProgressStatusCount": {
				"properties": {
					"progressStatus": {
						"$ref": "#/components/schemas/AuditAssignmentProgressStatus"
					},
					"count": {
						"type": "number",
						"format": "double"
					}
				},
				"required": [
					"progressStatus",
					"count"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AuditAssignmentSummary": {
				"description": "How many engagements there are in each progress status.",
				"properties": {
					"total": {
						"type": "number",
						"format": "double",
						"description": "Engagements without a progress status are in the total only."
					},
					"byProgressStatus": {
						"items": {
							"$ref": "#/components/schemas/AuditAssignmentProgressStatusCount"
						},
						"type": "array",
						"description": "Every progress status is listed, with 0 when there is none."
					}
				},
				"required": [
					"total",
					"byProgressStatus"
				],
				"type": "object",
				"additionalProperties": false,
				"example": {
					"total": 3,
					"byProgressStatus": [
						{
							"progressStatus": "NOT_STARTED",
							"count": 0
						},
						{
							"progressStatus": "OPEN",
							"count": 2
						},
						{
							"progressStatus": "FINALIZING",
							"count": 0
						},
						{
							"progressStatus": "LOCKED",
							"count": 1
						},
						{
							"progressStatus": "ARCHIVED",
							"count": 0
						},
						{
							"progressStatus": "EXPORTING",
							"count": 0
						},
						{
							"progressStatus": "ERROR",
							"count": 0
						}
					]
				}
			},
			"AuditAssignmentTemplate": {
				"description": "A template an audit engagement can be created from.",
				"properties": {
					"id": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"type": {
						"type": "string",
						"description": "Always AE: only audit engagement templates are listed."
					},
					"subType": {
						"type": "string",
						"description": "For example SA."
					},
					"auditFramework": {
						"type": "string",
						"description": "For example ISALCE."
					},
					"global": {
						"type": "boolean",
						"description": "Senseworks' own templates are global; the others belong to your organisation."
					}
				},
				"required": [
					"id",
					"name",
					"type",
					"subType",
					"global"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AuditAssignmentTemplatePage": {
				"description": "One page of audit assignment templates, ordered by id.",
				"properties": {
					"items": {
						"items": {
							"$ref": "#/components/schemas/AuditAssignmentTemplate"
						},
						"type": "array"
					},
					"nextCursor": {
						"type": "string",
						"description": "Pass as `cursor` to get the next page. Absent on the last page."
					}
				},
				"required": [
					"items"
				],
				"type": "object",
				"additionalProperties": false
			}
		},
		"securitySchemes": {
			"bearer": {
				"type": "http",
				"scheme": "bearer",
				"bearerFormat": "JWT",
				"description": "An access token from the token endpoint, sent as Authorization: Bearer <token>."
			}
		}
	},
	"info": {
		"title": "Senseworks-API",
		"version": "v2",
		"x-logo": {
			"url": "https://cdn.prod.website-files.com/652053ce99309414b4371553/67d3f80b311995427a0831f0_Api_Black.png",
			"altText": "S-API logo"
		},
		"description": "Version 2 of the Senseworks API. It sits next to version 1, which does not change. Everything here is under `https://api.senseworks.app/v2`.\n\n# Authentication\n\nGet an access token from the version 1 token endpoint with your client credentials, and send it on every call:\n\n```bash\nTOKEN=$(curl --fail-with-body --silent --show-error https://api.senseworks.app/v1/token \\\n  -H \"Content-Type: application/x-www-form-urlencoded\" \\\n  --data-urlencode \"client_id=$CLIENT_ID\" \\\n  --data-urlencode \"client_secret=$CLIENT_SECRET\" | jq -er .access_token)\n\ncurl -H \"Authorization: Bearer $TOKEN\" https://api.senseworks.app/v2/...\n```\n\nThe client's default organisation is used unless you send `X-Tenant-Id` or the `tenantId` query parameter. The header takes precedence. Access must be granted for both the organisation and the endpoint's scope:\n\n| Resource | Scope |\n|---|---|\n| Evidence | `auditdocuments` |\n| Webhooks | `webhooks` |\n| Notifications | `notifications` |\n| Audit assignments | `auditdocuments` |\n| Documents | `auditdocuments` |\n| Companies | `companyinformation` |\n| Financial years | `companyinformation` |\n| Data sources | `companyinformation` |\n| Users and invitations | `authentication` |\n| Permission groups | `authorization` |\n| Company access | `authorization` |\n| General ledger imports | `files` |\n\nEach resource added to this API adds its row.\n\n# Errors\n\nEvery error is `application/problem+json` with a stable `errorCode` to branch on. `title` and `detail` are for people and may change. The table covers authentication, evidence-placement, rate-limit and availability errors. Treat one you do not know by its status.\n\n```json\n{\n  \"type\": \"https://api.senseworks.app/problems/placement_ambiguous\",\n  \"title\": \"The account resolves to more than one checklist\",\n  \"status\": 409,\n  \"errorCode\": \"placement_ambiguous\",\n  \"detail\": \"Account 1630 belongs to 2 account groups with a checklist. Retry with checklistId.\",\n  \"candidates\": [{ \"checklistId\": \"…\", \"name\": \"15. Kundfordringar\", \"accountGroupReference\": \"…\" }]\n}\n```\n\n| errorCode | Status | What to do |\n|---|---|---|\n| `placement_missing`, `placement_conflicting` | 400 | Send exactly one of `accountNumber` and `checklistId`, optionally with `procedureId`, or `procedureId` alone |\n| `idempotency_key_missing`, `file_missing` | 400 | Send the header or the file |\n| `multipart_invalid` | 400 | The multipart body could not be read. Check the encoding and the field names |\n| `invalid_authentication` | 400 | Check the authentication configuration and retry with valid credentials |\n| `invalid_token` | 401 | Get a new token |\n| `insufficient_scope` | 403 | Your client has no access to that organisation or scope. Ask the organisation's administrator |\n| `evidence_direct_placement_disabled` | 403 | The organisation has not allowed evidence from the API into its audit files |\n| `endpoint_not_found` | 404 | Check the URL and the API version; this route does not exist |\n| `not_found` | 404 | The company, financial year, engagement, template or document does not exist, or your client cannot see it |\n| `endpoint_sunset` | 410 | The endpoint has been removed. The `Link` header points to the migration guide |\n| `placement_ambiguous` | 409 | Pick one of `candidates` and retry with its `checklistId` |\n| `assignment_ambiguous` | 409 | Retry with `auditAssignmentId` from `candidates` |\n| `assignment_not_open` | 409 | The engagement is locked or archived. Nothing can be added |\n| `document_name_taken` | 409 | The engagement already has a document with that name. Rename the file |\n| `idempotency_request_in_progress` | 409 | A request with that key is still running. Retry shortly |\n| `document_not_ready` | 409 | The document has no file yet. Download it when its `status` is `UPLOADED` |\n| `placement_not_found` | 422 | The account has no available checklist target in this engagement. Choose a target from evidence-targets or ask the organisation's administrator |\n| `account_not_found`, `checklist_not_found`, `procedure_not_found`, `procedure_not_in_checklist` | 422 | The account, checklist or procedure is not in this engagement |\n| `assignment_not_found`, `assignment_has_no_akt` | 422 | There is no audit engagement with an audit file for that financial year |\n| `assignment_financial_year_mismatch` | 422 | The `auditAssignmentId` belongs to another financial year |\n| `placement_not_in_akt` | 422 | The checklist or procedure exists but has no folder in the audit file |\n| `audit_account_plan_missing` | 422 | The company has no audit account plan, so account numbers cannot be resolved. Use `checklistId` |\n| `company_incomplete` | 422 | The company has no legal form or no annual report framework, which an audit engagement needs. Set them on the company, then retry |\n| `validation_failed` | 422 | A field has the wrong type or format. `fields` says which |\n| `idempotency_key_reused` | 422 | The key was used for other content. Use a new key for a new document |\n| `payload_too_large` | 413 | Files up to 100 MB, to place and to download |\n| `rate_limited` | 429 | Too many requests from your IP address in the current window, or, for a person using an AI assistant, from that person. Wait the number of seconds in `Retry-After`, then retry. `RateLimit` and `RateLimit-Policy` show the quota |\n| `request_failed` | 4xx or 5xx | Use the HTTP status to distinguish an invalid request from a server failure. `detail` says why |\n| `internal_error` | 500 | Retry later. If it persists, contact support with the time of the request |\n| `upstream_failed` | 502 | Retry, and for a POST with the same `Idempotency-Key` |\n| `evidence_placement_setting_unavailable` | 502 | Retry later. The organisation's direct-placement setting could not be verified |\n| `partner_platform_disabled` | 503 | Evidence, webhooks and notifications are not enabled in this environment. Retrying does not help; contact Senseworks support |\n| `period_conflicting`, `period_incomplete` | 400 | Send either `financialYearId` or `startDate` together with `endDate` |\n\n# Placing evidence\n\nAn organisation admin must enable direct API evidence placement for the organisation before a partner can write. Until then a write gets `403` with `evidence_direct_placement_disabled`.\n\nAn audit file (revisionsakt) is a tree of folders: one per checklist and one per procedure. Use the evidence-targets endpoint to discover available checklists and procedures for a financial year. An account number resolves only to a target that exists in that audit file.\n\n**1. See where things can go.** `GET /v2/companies/{companyDurableKey}/financial-years/{financialYearId}/evidence-targets` lists every checklist and procedure you can place evidence in. Account group checklists list the account numbers that land there.\n\n**2. Place the document.** `POST /v2/companies/{companyDurableKey}/evidence`, multipart, with the file and one of:\n\n- `accountNumber`: the account the evidence supports. It lands in that account group's checklist.\n- `checklistId`: the checklist, taken from the targets.\n- `procedureId`: a procedure, alone or together with one of the two above.\n\n```bash\ncurl -X POST \"https://api.senseworks.app/v2/companies/$COMPANY/evidence\" \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Idempotency-Key: example-2026-12-bank-statement\" \\\n  -F \"file=@Bankbesked december.pdf\" \\\n  -F \"financialYearId=$FINANCIAL_YEAR\" \\\n  -F \"accountNumber=1930\" \\\n  -F \"sourceSystem=example-erp\" \\\n  -F \"sourceReference=client-1001/2026-12/bank-statement.pdf\"\n```\n\nThe answer is `201` with the document id and where it was placed. The server never guesses: an account that belongs to two groups with a checklist gives `409` with both as candidates, and an account with no available checklist gives `422`.\n\n# Idempotency\n\nEvery request that creates a resource needs an `Idempotency-Key` header, unique per thing you create and at most 255 characters: evidence, webhook subscriptions, and the create endpoints for companies, financial years, audit assignments, permission groups, invitations and general ledger imports. The endpoint descriptions say when a key is required. Webhook ping and delivery replay take no key: each call sends again. A stable value derived from your own reference works well. A missing or longer key is refused with `400` `idempotency_key_missing`.\n\n- Retry with the same key and the same content: you get the first answer back and nothing is added twice. If the first attempt failed half way, the retry finishes it.\n- The same key with different content is refused (`idempotency_key_reused`).\n- Keys belong to your API client: another client in the same organisation can use the same key value without affecting yours.\n- Keys are kept for 24 hours.\n- Keys are stored persistently and shared across API instances. Retrying after a restart uses the stored result or resumes recorded progress. Keep the same key and request content when retrying. After the 24-hour retention window, the request is treated as new.\n- One narrow case remains for creates that are a single step on our side (for example companies, financial years, audit assignments, permission groups and invitations): if the API loses the answer at the exact moment the resource is created, before it has recorded the result, a retry with the same key can create the resource a second time. If a retry returns a different id than you expected, list the resources and remove the extra one.\n\n# Events\n\nCreate a subscription with `POST /v2/webhooks/subscriptions` (scope `webhooks`), and events of the types it names are delivered to its URL. The create takes an `Idempotency-Key` like evidence does: for 24 hours, a retry with the same key and body returns the original subscription and its signing secret (or `409` `idempotency_receipt_unavailable` if Senseworks replaced the key that protects it). After 24 hours the key is forgotten and the same request creates another subscription. `GET /v2/webhooks/deliveries` is the delivery log. A delivery is tried six times over about 23 hours before it is dead, and can be replayed. In an environment where the partner platform is not enabled, the webhook endpoints answer `503` with `partner_platform_disabled`.\n\nEvery event has the same envelope, `https://api.senseworks.app/v2/schemas/event-envelope-v1.json`, and each type's `data` has its own schema under `/v2/schemas/events/`, starting with `evidence.attached-v1.json`. Deduplicate on `id`, which is the same across redeliveries. `notification` carries a Swedish and an English text you can show to people.\n\nEach delivery is signed:\n\n```\nSenseworks-Signature: t=1790000000,v1=5257a869e7ecebeda32affa62cdca3fa…\n```\n\n`v1` is HMAC-SHA256 of `t`, a full stop and the raw request body, with your webhook secret. During a key rotation there are two `v1` values; accept the request if either matches. Reject a `t` more than five minutes old. Compare in constant time, and verify before you parse the body.\n\n```js\nconst crypto = require(\"crypto\");\n\nfunction verify(header, rawBody, secret, now = Date.now() / 1000) {\n  const t = Number(header.match(/(?:^|,)\\s*t=(\\d+)\\s*(?:,|$)/)?.[1]);\n  if (!t || Math.abs(now - t) > 300) return false;\n  const expected = crypto.createHmac(\"sha256\", secret).update(`${t}.`).update(rawBody).digest();\n  return header\n    .split(\",\")\n    .map((p) => p.trim())\n    .filter((p) => /^v1=[0-9a-f]{64}$/i.test(p))\n    .some((p) => {\n      const given = Buffer.from(p.slice(3), \"hex\");\n      return given.length === expected.length && crypto.timingSafeEqual(given, expected);\n    });\n}\n```\n\n```python\nimport hashlib, hmac, re, time\n\ndef verify(header: str, raw_body: bytes, secret: str) -> bool:\n    parts = [p.strip() for p in header.split(\",\")]\n    t = next((p[2:] for p in parts if p.startswith(\"t=\")), \"\")\n    if not (t.isascii() and t.isdigit()) or abs(time.time() - int(t)) > 300:\n        return False\n    expected = hmac.new(secret.encode(), f\"{t}.\".encode() + raw_body, hashlib.sha256).hexdigest()\n    return any(hmac.compare_digest(p[3:], expected) for p in parts if re.fullmatch(r\"v1=[0-9a-f]{64}\", p))\n```\n\nVerify the signature and persist or queue the event before returning `2xx`. Respond promptly and process the queued event asynchronously."
	},
	"paths": {
		"/webhooks/subscriptions": {
			"post": {
				"operationId": "CreateSubscription",
				"responses": {
					"201": {
						"description": "Created",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/WebhookSubscriptionCreated"
								}
							}
						}
					},
					"400": {
						"description": "The Idempotency-Key is invalid",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"409": {
						"description": "The Idempotency-Key already created a subscription, but the original response can no longer be returned",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"422": {
						"description": "The Idempotency-Key was reused with another body, or the URL, event type or profile cannot be used",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"503": {
						"description": "The partner platform is not enabled in this environment (partner_platform_disabled)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Creates a subscription. The signing secret is only in the creation\nresponse; subscription reads never return it.\n\nThe URL must be https and resolve to public addresses only.\nSend an Idempotency-Key with every request. For 24 hours, a retry with\nthe same key and body returns the original response, including the\nsigning secret. After that the key is forgotten and the same request\ncreates another subscription.\nThe stored response is encrypted with a server-side key. If Senseworks\nreplaces that key within the 24 hours, the retry gets 409\n`idempotency_receipt_unavailable`. Rotating the subscription's signing\nsecret does not affect the retry.",
				"summary": "Create a webhook subscription",
				"tags": [
					"Webhooks"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "Idempotency-Key",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/CreateWebhookSubscription"
							}
						}
					}
				}
			},
			"get": {
				"operationId": "ListSubscriptions",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/WebhookSubscriptionPage"
								}
							}
						}
					},
					"400": {
						"description": "limit or cursor is not valid (limit_invalid, cursor_invalid)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"503": {
						"description": "The partner platform is not enabled in this environment (partner_platform_disabled)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Lists this client's subscriptions in the organisation, newest first.\nSecrets are never included.",
				"summary": "List webhook subscriptions",
				"tags": [
					"Webhooks"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"description": "Page size, 1 to 100. Default 50.",
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"description": "nextCursor from the previous page.",
						"in": "query",
						"name": "cursor",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/webhooks/subscriptions/{subscriptionId}": {
			"get": {
				"operationId": "GetSubscription",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/WebhookSubscription"
								}
							}
						}
					},
					"404": {
						"description": "No such subscription",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"503": {
						"description": "The partner platform is not enabled in this environment (partner_platform_disabled)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Returns one of this client's subscriptions, without its secret.",
				"summary": "Get a webhook subscription",
				"tags": [
					"Webhooks"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "subscriptionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"patch": {
				"operationId": "UpdateSubscription",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/WebhookSubscription"
								}
							}
						}
					},
					"404": {
						"description": "No such subscription",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"422": {
						"description": "The URL or an event type cannot be used",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"503": {
						"description": "The partner platform is not enabled in this environment (partner_platform_disabled)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Changes the URL, the event types, the description, or turns the\nsubscription off and on.",
				"summary": "Update a webhook subscription",
				"tags": [
					"Webhooks"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "subscriptionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/UpdateWebhookSubscription"
							}
						}
					}
				}
			},
			"delete": {
				"operationId": "DeleteSubscription",
				"responses": {
					"204": {
						"description": "Deleted"
					},
					"404": {
						"description": "No such subscription",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"503": {
						"description": "The partner platform is not enabled in this environment (partner_platform_disabled)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Deletes the subscription and its delivery log.",
				"summary": "Delete a webhook subscription",
				"tags": [
					"Webhooks"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "subscriptionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/webhooks/subscriptions/{subscriptionId}/rotate-secret": {
			"post": {
				"operationId": "RotateSecret",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/WebhookSecretRotated"
								}
							}
						}
					},
					"404": {
						"description": "No such subscription",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"409": {
						"description": "The previous rotation is still in its 24-hour grace period",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"503": {
						"description": "The partner platform is not enabled in this environment (partner_platform_disabled)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Replaces the signing secret. For 24 hours deliveries carry a signature\nwith each secret, so the receiver can switch when it is ready.\n\nOnly one previous secret is kept. While it is still in its 24 hours,\nanother rotation is refused with 409 `secret_rotation_in_progress`;\nthe problem detail says when rotating is possible again.",
				"summary": "Rotate the signing secret",
				"tags": [
					"Webhooks"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "subscriptionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/webhooks/subscriptions/{subscriptionId}/ping": {
			"post": {
				"operationId": "PingSubscription",
				"responses": {
					"202": {
						"description": "Queued",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/WebhookPing"
								}
							}
						}
					},
					"404": {
						"description": "No such subscription",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"409": {
						"description": "The subscription is disabled",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"503": {
						"description": "The partner platform is not enabled in this environment (partner_platform_disabled)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Sends a `webhook.ping` event to this subscription only. Its delivery\nshows in the delivery log like any other.",
				"summary": "Send a test event",
				"tags": [
					"Webhooks"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "subscriptionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/webhooks/deliveries": {
			"get": {
				"operationId": "ListDeliveries",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/WebhookDeliveryPage"
								}
							}
						}
					},
					"400": {
						"description": "limit or cursor is not valid (limit_invalid, cursor_invalid)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"422": {
						"description": "status is not a delivery status (validation_failed)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"503": {
						"description": "The partner platform is not enabled in this environment (partner_platform_disabled)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "The delivery log, newest first. A delivery is tried six times over\nabout 23 hours before it is dead.",
				"summary": "List deliveries",
				"tags": [
					"Webhooks"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"description": "Only this subscription's deliveries.",
						"in": "query",
						"name": "subscriptionId",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "pending, delivering, succeeded, failed or dead.",
						"in": "query",
						"name": "status",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "Only deliveries of this event type.",
						"in": "query",
						"name": "eventType",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "Page size, 1 to 100. Default 50.",
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"description": "nextCursor from the previous page.",
						"in": "query",
						"name": "cursor",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/webhooks/deliveries/{deliveryId}/replay": {
			"post": {
				"operationId": "ReplayDelivery",
				"responses": {
					"202": {
						"description": "Queued",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/WebhookDelivery"
								}
							}
						}
					},
					"404": {
						"description": "No such delivery",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"409": {
						"description": "The delivery cannot be replayed",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"503": {
						"description": "The partner platform is not enabled in this environment (partner_platform_disabled)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Sends a failed or dead delivery again, as a new delivery of the same\nevent. The event id is the same, so a receiver that already has it can\nignore it.",
				"summary": "Replay a delivery",
				"tags": [
					"Webhooks"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "deliveryId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/users": {
			"get": {
				"operationId": "ListUsers",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/UserPage"
								},
								"examples": {
									"Example 1": {
										"value": {
											"items": [
												{
													"id": "6aac2823-ad07-4ffd-acb4-80eb92e0f822",
													"email": "anna.example@example.invalid",
													"firstName": "Anna",
													"lastName": "Example",
													"createdAt": "2026-03-14T09:21:04.584Z"
												}
											]
										}
									}
								}
							}
						}
					},
					"400": {
						"description": "limit or cursor is not valid",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation is denied",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"500": {
						"description": "An unexpected error occurred",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"502": {
						"description": "An upstream service failed",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Lists the organisation's users, ordered by `id`, one page at a time.\nPass the returned `nextCursor` as `cursor` for the next page.",
				"summary": "List users",
				"tags": [
					"Users"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"description": "Page size, 1 to 100. Default 50.",
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "int32",
							"type": "integer"
						}
					},
					{
						"description": "The nextCursor from the previous page.",
						"in": "query",
						"name": "cursor",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/users/{userId}": {
			"get": {
				"operationId": "GetUser",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/User"
								},
								"examples": {
									"Example 1": {
										"value": {
											"id": "6aac2823-ad07-4ffd-acb4-80eb92e0f822",
											"email": "anna.example@example.invalid",
											"firstName": "Anna",
											"lastName": "Example",
											"createdAt": "2026-03-14T09:21:04.584Z"
										}
									}
								}
							}
						}
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation is denied",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"404": {
						"description": "No such user in this organisation",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"500": {
						"description": "An unexpected error occurred",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"502": {
						"description": "An upstream service failed",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Returns one user in the organisation.",
				"summary": "Get a user",
				"tags": [
					"Users"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "userId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"delete": {
				"operationId": "DeleteUser",
				"responses": {
					"204": {
						"description": "Deleted"
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation is denied",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"404": {
						"description": "No such user in this organisation",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"500": {
						"description": "An unexpected error occurred",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"502": {
						"description": "An upstream service failed",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Deletes a user from the organisation.",
				"summary": "Delete a user",
				"tags": [
					"Users"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "userId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/users/{userId}/permission-groups": {
			"get": {
				"operationId": "ListUserPermissionGroups",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/UserPermissionGroupPage"
								},
								"examples": {
									"Example 1": {
										"value": {
											"items": [
												{
													"id": "1",
													"name": "Umeå office"
												}
											]
										}
									}
								}
							}
						}
					},
					"400": {
						"description": "limit or cursor is not valid",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation is denied",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"404": {
						"description": "No such user in this organisation",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"500": {
						"description": "An unexpected error occurred",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"502": {
						"description": "An upstream service failed",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Lists the permission groups a user is a member of, ordered by `id`, one\npage at a time.",
				"summary": "List a user's permission groups",
				"tags": [
					"Users"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "userId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "Page size, 1 to 100. Default 50.",
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "int32",
							"type": "integer"
						}
					},
					{
						"description": "The nextCursor from the previous page.",
						"in": "query",
						"name": "cursor",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/invitations": {
			"get": {
				"operationId": "ListInvitations",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/InvitationPage"
								},
								"examples": {
									"Example 1": {
										"value": {
											"items": [
												{
													"id": "638d11a8-6302-43b4-94b0-4db7231e39d8",
													"email": "new.colleague@example.invalid",
													"firstName": "New",
													"lastName": "Colleague",
													"createdAt": "2026-03-14T09:21:04.584Z"
												}
											]
										}
									}
								}
							}
						}
					},
					"400": {
						"description": "limit or cursor is not valid",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation is denied",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"500": {
						"description": "An unexpected error occurred",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"502": {
						"description": "An upstream service failed",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Lists pending invitations, ordered by `id`, one page at a time. Pass the\nreturned `nextCursor` as `cursor` for the next page.",
				"summary": "List pending invitations",
				"tags": [
					"Invitations"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"description": "Page size, 1 to 100. Default 50.",
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "int32",
							"type": "integer"
						}
					},
					{
						"description": "The nextCursor from the previous page.",
						"in": "query",
						"name": "cursor",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"post": {
				"operationId": "CreateInvitations",
				"responses": {
					"201": {
						"description": "Created",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/InvitationResults"
								},
								"examples": {
									"Example 1": {
										"value": {
											"items": [
												{
													"email": "new.colleague@example.invalid",
													"id": "638d11a8-6302-43b4-94b0-4db7231e39d8"
												}
											]
										}
									}
								}
							}
						}
					},
					"400": {
						"description": "The Idempotency-Key is missing, or a field is not valid (validation_failed)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation is denied",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"409": {
						"description": "A request with that Idempotency-Key is still running",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"422": {
						"description": "The Idempotency-Key was used for another body, or a field is not valid",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"500": {
						"description": "An unexpected error occurred",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"502": {
						"description": "An upstream service failed",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"503": {
						"description": "The partner platform is not enabled in this environment (partner_platform_disabled)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Invites one or more e-mail addresses. Each address gets an invitation\nmail and is added to the permission groups in `permissionGroupIds`.\n`items` has one entry per address with the new user's `id`. If any\naddress cannot be invited the whole request fails and no user is created\nfor it, so retry with the same key once the cause is fixed.\n\nSend an `Idempotency-Key`, unique per request and at most 255\ncharacters. A retry with the same key and the same body within 24 hours\nreturns the first answer and sends no mail twice. If the connection to\nSenseworks drops after the users were created but before the answer was\nstored, a retry sends the request again and the addresses that now exist\nare refused; list `GET /v2/invitations` to see which were created. The same key with\nanother body is refused (`idempotency_key_reused`).",
				"summary": "Invite users",
				"tags": [
					"Invitations"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "Idempotency-Key",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/CreateInvitations"
							}
						}
					}
				}
			}
		},
		"/invitations/{userId}": {
			"delete": {
				"operationId": "DeleteInvitation",
				"responses": {
					"204": {
						"description": "Deleted"
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation is denied",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"404": {
						"description": "No such pending invitation in this organisation",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"500": {
						"description": "An unexpected error occurred",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"502": {
						"description": "An upstream service failed",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Deletes a pending invitation. The user is removed and the invitation\nmail's link stops working.",
				"summary": "Delete an invitation",
				"tags": [
					"Invitations"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "userId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/invitations/{userId}/resend": {
			"post": {
				"operationId": "ResendInvitation",
				"responses": {
					"202": {
						"description": "Accepted"
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation is denied",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"404": {
						"description": "No such pending invitation in this organisation",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"500": {
						"description": "An unexpected error occurred",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"502": {
						"description": "An upstream service failed",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Sends the invitation mail again. The answer is 202 once the mail is\nhanded over for sending. There is no `Idempotency-Key`: each call sends\nthe mail again, so a retry after a lost 202 may send a second mail.",
				"summary": "Resend an invitation",
				"tags": [
					"Invitations"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "userId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/permission-groups": {
			"get": {
				"operationId": "ListPermissionGroups",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/PermissionGroupPage"
								}
							}
						}
					},
					"400": {
						"description": "The limit or cursor is not valid (limit_invalid, cursor_invalid)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation or scope is denied",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"502": {
						"description": "An upstream service failed (upstream_failed)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Lists the organisation's permission groups, ordered by id.",
				"summary": "List permission groups",
				"tags": [
					"Permission groups"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"description": "Page size, 1 to 100. Default 50.",
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"description": "nextCursor from the previous page.",
						"in": "query",
						"name": "cursor",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"post": {
				"operationId": "CreatePermissionGroup",
				"responses": {
					"201": {
						"description": "Created",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/PermissionGroup"
								}
							}
						}
					},
					"400": {
						"description": "The Idempotency-Key is missing or invalid (idempotency_key_missing)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation or scope is denied",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"409": {
						"description": "A request with that key is still running (idempotency_request_in_progress)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"422": {
						"description": "The Idempotency-Key was reused with another body, or a field is not valid",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"502": {
						"description": "An upstream service failed (upstream_failed)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"503": {
						"description": "The partner platform is not enabled in this environment (partner_platform_disabled)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Creates a permission group. Send an Idempotency-Key of 1 to 255\ncharacters. For 24 hours, a retry with the same key and body returns the\ngroup of the first request that succeeded. The same key with another\nbody is refused (`idempotency_key_reused`). If the answer is 502\n`upstream_failed`, the outcome is unknown: the group may have been\ncreated, and a retry with the same key can create another one. List the\ngroups to check before retrying.",
				"summary": "Create a permission group",
				"tags": [
					"Permission groups"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "Idempotency-Key",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/CreatePermissionGroup"
							}
						}
					}
				}
			}
		},
		"/permission-groups/{groupId}": {
			"get": {
				"operationId": "GetPermissionGroup",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/PermissionGroup"
								}
							}
						}
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation or scope is denied",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"404": {
						"description": "The permission group does not exist, or you cannot see it (not_found)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"502": {
						"description": "An upstream service failed (upstream_failed)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Gets one permission group by id.",
				"summary": "Get a permission group",
				"tags": [
					"Permission groups"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"description": "The id of the group.",
						"in": "path",
						"name": "groupId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"delete": {
				"operationId": "DeletePermissionGroup",
				"responses": {
					"204": {
						"description": "Deleted"
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation or scope is denied",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"404": {
						"description": "The permission group does not exist, or you cannot see it (not_found)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"502": {
						"description": "An upstream service failed (upstream_failed)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Deletes a permission group.",
				"summary": "Delete a permission group",
				"tags": [
					"Permission groups"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"description": "The id of the group.",
						"in": "path",
						"name": "groupId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/permission-groups/{groupId}/members": {
			"get": {
				"operationId": "ListPermissionGroupMembers",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/PermissionGroupMemberPage"
								}
							}
						}
					},
					"400": {
						"description": "The limit or cursor is not valid (limit_invalid, cursor_invalid)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation or scope is denied",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"404": {
						"description": "The permission group does not exist, or you cannot see it (not_found)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"502": {
						"description": "An upstream service failed (upstream_failed)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Lists the users in a permission group, ordered by user id.",
				"summary": "List permission group members",
				"tags": [
					"Permission groups"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"description": "The id of the group.",
						"in": "path",
						"name": "groupId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "Page size, 1 to 100. Default 50.",
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"description": "nextCursor from the previous page.",
						"in": "query",
						"name": "cursor",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/permission-groups/{groupId}/members/{userId}": {
			"put": {
				"operationId": "AddPermissionGroupMember",
				"responses": {
					"204": {
						"description": "Added"
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation or scope is denied",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"404": {
						"description": "The permission group does not exist, or you cannot see it (not_found)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"502": {
						"description": "An upstream service failed (upstream_failed)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Adds a user to a permission group. Adding a user who is already a\nmember succeeds with 204 as well.",
				"summary": "Add a permission group member",
				"tags": [
					"Permission groups"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"description": "The id of the group.",
						"in": "path",
						"name": "groupId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "The id of the user.",
						"in": "path",
						"name": "userId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"delete": {
				"operationId": "RemovePermissionGroupMember",
				"responses": {
					"204": {
						"description": "Removed"
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation or scope is denied",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"404": {
						"description": "The permission group does not exist, or you cannot see it (not_found)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"502": {
						"description": "An upstream service failed (upstream_failed)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Removes a user from a permission group. Removing a user who is not a\nmember succeeds with 204 as well.",
				"summary": "Remove a permission group member",
				"tags": [
					"Permission groups"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"description": "The id of the group.",
						"in": "path",
						"name": "groupId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "The id of the user.",
						"in": "path",
						"name": "userId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/notifications": {
			"get": {
				"operationId": "ListNotifications",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/NotificationPage"
								},
								"examples": {
									"Example 1": {
										"value": {
											"items": [
												{
													"id": "3f0c8b52-1d7e-4a9b-8c21-5e6f7a8b9c0d",
													"eventId": "01JG7Z3K2M8Q4V6X9YB0C1D2E3",
													"eventType": "evidence.attached",
													"level": "info",
													"audience": "agency",
													"companyDurableKey": "d7387ff0-5031-45cd-9488-380f966792a6",
													"subject": {
														"sv": "Bevis placerat: Bankbesked.pdf",
														"en": "Evidence placed: Bankbesked.pdf"
													},
													"body": {
														"sv": "Bankbesked.pdf ligger nu under 19. Kassa och bank.",
														"en": "Bankbesked.pdf is now under 19. Kassa och bank."
													},
													"createdAt": "2026-12-14T08:31:07.412Z"
												}
											],
											"nextCursor": "WyIyMDI2LTEyLTE0VDA4OjMxOjA3LjQxMjAwMCIsIjNmMGM4YjUyLTFkN2UtNGE5Yi04YzIxLTVlNmY3YThiOWMwZCJd"
										}
									}
								}
							}
						}
					},
					"400": {
						"description": "limit, cursor, companyDurableKey or since is not valid",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"503": {
						"description": "The partner platform is not enabled in this environment (partner_platform_disabled)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Lists the organisation's notifications, newest first, one page at a\ntime. Pass the returned `nextCursor` as `cursor` for the next page.\nNotifications created while you page appear at the top and do not\nshift the pages after the one you are on.",
				"summary": "List notifications",
				"tags": [
					"Notifications"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"description": "Page size, 1 to 200. Default 50.",
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "int32",
							"type": "integer"
						}
					},
					{
						"description": "The nextCursor from the previous page.",
						"in": "query",
						"name": "cursor",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "Only notifications about this company.",
						"in": "query",
						"name": "companyDurableKey",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "Only notifications nobody has marked as read.",
						"in": "query",
						"name": "unread",
						"required": false,
						"schema": {
							"type": "boolean"
						}
					},
					{
						"description": "Only notifications created at or after this time, RFC 3339.",
						"in": "query",
						"name": "since",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/notifications/{notificationId}": {
			"get": {
				"operationId": "GetNotification",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Notification"
								},
								"examples": {
									"Example 1": {
										"value": {
											"id": "3f0c8b52-1d7e-4a9b-8c21-5e6f7a8b9c0d",
											"eventId": "01JG7Z3K2M8Q4V6X9YB0C1D2E3",
											"eventType": "evidence.attached",
											"level": "info",
											"audience": "agency",
											"companyDurableKey": "d7387ff0-5031-45cd-9488-380f966792a6",
											"subject": {
												"sv": "Bevis placerat: Bankbesked.pdf",
												"en": "Evidence placed: Bankbesked.pdf"
											},
											"body": {
												"sv": "Bankbesked.pdf ligger nu under 19. Kassa och bank.",
												"en": "Bankbesked.pdf is now under 19. Kassa och bank."
											},
											"createdAt": "2026-12-14T08:31:07.412Z"
										}
									}
								}
							}
						}
					},
					"404": {
						"description": "No such notification in this organisation",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"503": {
						"description": "The partner platform is not enabled in this environment (partner_platform_disabled)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Returns one notification in the organisation. A notification in another\norganisation answers 404, as if it did not exist.",
				"summary": "Get a notification",
				"tags": [
					"Notifications"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "notificationId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/notifications/{notificationId}/read": {
			"post": {
				"operationId": "MarkNotificationRead",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Notification"
								}
							}
						}
					},
					"404": {
						"description": "No such notification in this organisation",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"503": {
						"description": "The partner platform is not enabled in this environment (partner_platform_disabled)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Marks one notification as read. Marking one that is already read\nchanges nothing.",
				"summary": "Mark a notification as read",
				"tags": [
					"Notifications"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "notificationId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/notifications/read": {
			"post": {
				"operationId": "MarkNotificationsRead",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/MarkReadResult"
								}
							}
						}
					},
					"400": {
						"description": "Neither or both of ids and before, or too many ids",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"503": {
						"description": "The partner platform is not enabled in this environment (partner_platform_disabled)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Marks several notifications as read: up to 200 `ids`, or everything\ncreated `before` a time. Ids that are not the organisation's are\nignored.",
				"summary": "Mark notifications as read",
				"tags": [
					"Notifications"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/MarkReadRequest"
							}
						}
					}
				}
			}
		},
		"/companies/{companyDurableKey}/general-ledger-imports": {
			"post": {
				"operationId": "PostGeneralLedgerImport",
				"responses": {
					"202": {
						"description": "Accepted",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/GeneralLedgerImport"
								},
								"examples": {
									"Example 1": {
										"value": {
											"id": "2683c647-51e1-454a-9c48-84b719274be3",
											"name": "20180101-20181231.se",
											"status": "pending"
										}
									}
								}
							}
						}
					},
					"400": {
						"description": "The file, period, Idempotency-Key or multipart body is missing or invalid (file_missing, period_conflicting, period_incomplete, idempotency_key_missing, multipart_invalid), or the access check could not be completed (invalid_authentication)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation is denied",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"404": {
						"description": "The company or financial year was not found",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"409": {
						"description": "A request with this Idempotency-Key is still running",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"413": {
						"description": "The uploaded file exceeds 100 MB",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"422": {
						"description": "The Idempotency-Key was used for other content, or the file or period is not valid",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"500": {
						"description": "An unexpected error occurred",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"502": {
						"description": "An upstream service failed",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"503": {
						"description": "The partner platform is not enabled in this environment (partner_platform_disabled)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Hands over a general ledger file (SIE) for import.\n\nThe import runs asynchronously, so the answer is `202 Accepted` with the\nid of the import and its status, normally `pending`. Give the period\neither as `financialYearId` or as `startDate` and `endDate`, not both.\nWith neither, the period is taken from the file.\n\nEvery request needs an `Idempotency-Key`. A repeat with the same key and\nthe same content returns the first response and imports nothing more.",
				"summary": "Import a general ledger file",
				"tags": [
					"General ledger imports"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"description": "Required. Unique per file, chosen by the caller.",
						"in": "header",
						"name": "Idempotency-Key",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"multipart/form-data": {
							"schema": {
								"type": "object",
								"properties": {
									"file": {
										"type": "string",
										"format": "binary"
									},
									"financialYearId": {
										"type": "string",
										"description": "The financial year the file is for."
									},
									"startDate": {
										"type": "string",
										"description": "First day of the period, for example 2018-01-01. Send with endDate."
									},
									"endDate": {
										"type": "string",
										"description": "Last day of the period, for example 2018-12-31. Send with startDate."
									}
								},
								"required": [
									"file"
								]
							}
						}
					}
				}
			}
		},
		"/companies/{companyDurableKey}/financial-years": {
			"get": {
				"operationId": "ListFinancialYears",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/FinancialYearPage"
								}
							}
						}
					},
					"400": {
						"description": "limit or cursor is not valid (limit_invalid, cursor_invalid)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation or scope is denied (insufficient_scope)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"404": {
						"description": "The company does not exist, or your client cannot see it (not_found)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"500": {
						"description": "An unexpected error occurred",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"502": {
						"description": "An upstream service failed (upstream_failed)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Lists the company's financial years, newest first.",
				"summary": "List financial years",
				"tags": [
					"Financial years"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"description": "Page size, 1 to 100. Default 50.",
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"description": "nextCursor from the previous page.",
						"in": "query",
						"name": "cursor",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"post": {
				"operationId": "CreateFinancialYear",
				"responses": {
					"201": {
						"description": "Created",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/FinancialYear"
								}
							}
						}
					},
					"400": {
						"description": "The Idempotency-Key is missing or invalid (idempotency_key_missing)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation or scope is denied (insufficient_scope)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"404": {
						"description": "The company does not exist, or your client cannot see it (not_found)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"409": {
						"description": "The financial year overlaps one the company already has (conflict), or a request with the Idempotency-Key is still running",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"422": {
						"description": "A date is not valid, or the Idempotency-Key was reused with another body (validation_failed, idempotency_key_reused)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"500": {
						"description": "An unexpected error occurred",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"502": {
						"description": "An upstream service failed (upstream_failed)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"503": {
						"description": "The partner platform is not enabled in this environment (partner_platform_disabled)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Creates a financial year. The dates must not overlap a year the company\nalready has, and `endDate` must not be before `startDate`.\n\nSend an Idempotency-Key with every request. For 24 hours, a retry with\nthe same key and body returns the original response and creates nothing\nmore. config-api has no idempotency of its own: if the response to the\nfirst attempt is lost after the year was created, a retry gets 409\n`conflict` for the year it just created. List the years to find it.",
				"summary": "Create a financial year",
				"tags": [
					"Financial years"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"in": "header",
						"name": "Idempotency-Key",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/CreateFinancialYear"
							}
						}
					}
				}
			}
		},
		"/companies/{companyDurableKey}/financial-years/{financialYearId}": {
			"delete": {
				"operationId": "DeleteFinancialYear",
				"responses": {
					"204": {
						"description": "Deleted"
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation or scope is denied (insufficient_scope)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"404": {
						"description": "The company or the financial year does not exist, or your client cannot see it (not_found)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"500": {
						"description": "An unexpected error occurred",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"502": {
						"description": "An upstream service failed (upstream_failed)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Deletes a financial year.",
				"summary": "Delete a financial year",
				"tags": [
					"Financial years"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"in": "path",
						"name": "financialYearId",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/FinancialYearId"
						}
					}
				]
			}
		},
		"/companies/{companyDurableKey}/financial-years/{financialYearId}/evidence-targets": {
			"get": {
				"operationId": "GetEvidenceTargets",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/EvidenceTargets"
								},
								"examples": {
									"Example 1": {
										"value": {
											"auditAssignmentId": "a1b2c3d4-0028-4000-8000-0000000028a1",
											"financialYearId": "a1b2c3d4-0028-4000-8000-0000000028f1",
											"targets": [
												{
													"checklistId": "a1b2c3d4-0028-4000-8000-0000000028c6",
													"name": "19. Kassa och bank",
													"kind": "accountGroup",
													"accountGroupReference": "63c1f7eb-7f57-4abe-9323-c96bab702367",
													"accountNumbers": [
														"1930"
													],
													"procedures": [
														{
															"procedureId": "a1b2c3d4-0028-4000-8000-0000000028b2",
															"name": "Bankavstämning"
														}
													]
												}
											]
										}
									}
								}
							}
						}
					},
					"400": {
						"description": "The access check for the organisation could not be completed (invalid_authentication)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation is denied",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"404": {
						"description": "The requested resource was not found",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"409": {
						"description": "More than one engagement for the year",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"422": {
						"description": "No engagement or audit file for the year",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"500": {
						"description": "An unexpected error occurred",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"502": {
						"description": "An upstream service failed",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Lists the places evidence can go in the audit file for a financial year.\n\nEvery checklist and active procedure that has a folder in the audit file\nis listed. Account group checklists under Granskning also carry the\naccount group and the account numbers that resolve to them, so a caller\ncan see in advance where an `accountNumber` lands, and choose a\n`checklistId` when an account belongs to more than one group.",
				"summary": "List evidence placement targets",
				"tags": [
					"Evidence"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"in": "path",
						"name": "financialYearId",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/FinancialYearId"
						}
					},
					{
						"description": "Only needed when the company has more than one engagement for the year.",
						"in": "query",
						"name": "auditAssignmentId",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/companies/{companyDurableKey}/evidence": {
			"post": {
				"operationId": "PostEvidence",
				"responses": {
					"201": {
						"description": "Created",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Evidence"
								},
								"examples": {
									"Example 1": {
										"value": {
											"documentId": "5b1c9e2a-7f3d-4c21-9a0e-1f2d3c4b5a69",
											"fileName": "Bankbesked december.pdf",
											"auditAssignmentId": "a1b2c3d4-0028-4000-8000-0000000028a1",
											"financialYearId": "a1b2c3d4-0028-4000-8000-0000000028f1",
											"placement": {
												"resolvedBy": "accountNumber",
												"checklistId": "a1b2c3d4-0028-4000-8000-0000000028c6",
												"accountGroupReference": "63c1f7eb-7f57-4abe-9323-c96bab702367"
											},
											"sourceSystem": "example-erp",
											"sourceReference": "client-1001/2026-12/bank-statement.pdf"
										}
									}
								}
							}
						}
					},
					"400": {
						"description": "The placement, Idempotency-Key, file or multipart body is missing or invalid, or the access check could not be completed (invalid_authentication)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"401": {
						"description": "Authentication is missing or invalid",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Evidence cannot be placed directly in this organisation's audit files",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"404": {
						"description": "The requested resource was not found",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"409": {
						"description": "The placement is ambiguous, or the Idempotency-Key is in use",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"413": {
						"description": "The uploaded file exceeds 100 MB",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"422": {
						"description": "The placement has no target",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"500": {
						"description": "An unexpected error occurred",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"502": {
						"description": "An upstream service could not verify the direct-placement setting or complete the evidence placement",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"503": {
						"description": "The partner platform is not enabled in this environment (partner_platform_disabled)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Places a document as evidence in the audit file for a financial year.\n\nThe place is given in one of three ways. `accountNumber` resolves to the\navailable checklist of the account's group under Granskning.\n`checklistId` names the checklist directly. `procedureId` names a\nprocedure, and can be combined\nwith either of the other two to place the document under a procedure in\nthat checklist.\n\nThe server never guesses. An account that belongs to more than one\ngroup with a checklist gives 409 with the candidates, and an account\nwith no available checklist gives 422.\n\nEvery request needs an `Idempotency-Key`. A repeat with the same key and\nthe same content returns the first response and adds nothing.",
				"summary": "Place evidence in the audit file",
				"tags": [
					"Evidence"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"description": "Unique per document, chosen by the caller.",
						"in": "header",
						"name": "Idempotency-Key",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"multipart/form-data": {
							"schema": {
								"type": "object",
								"properties": {
									"file": {
										"type": "string",
										"format": "binary"
									},
									"financialYearId": {
										"type": "string",
										"description": "The financial year the engagement is for."
									},
									"auditAssignmentId": {
										"type": "string",
										"description": "Only needed when the company has more than one engagement for the year."
									},
									"accountNumber": {
										"type": "string",
										"description": "The account the evidence supports, for example 1930."
									},
									"checklistId": {
										"type": "string",
										"description": "The checklist to place the evidence in."
									},
									"procedureId": {
										"type": "string",
										"description": "The procedure to place the evidence under."
									},
									"sourceSystem": {
										"type": "string",
										"description": "The caller's system, for example \"example-erp\"."
									},
									"sourceReference": {
										"type": "string",
										"description": "The caller's own reference for the file."
									}
								},
								"required": [
									"file",
									"financialYearId"
								]
							}
						}
					}
				}
			}
		},
		"/companies/{companyDurableKey}/documents": {
			"get": {
				"operationId": "ListDocuments",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/CompanyDocumentPage"
								}
							}
						}
					},
					"400": {
						"description": "limit or cursor is not valid (limit_invalid, cursor_invalid)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation or scope is denied (insufficient_scope)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"404": {
						"description": "The company does not exist, or your client cannot see it (not_found)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"500": {
						"description": "An unexpected error occurred",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"502": {
						"description": "An upstream service failed (upstream_failed)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Lists the documents that came into the company's audit files through the\nAPI, newest first: the evidence a client has placed. Use it to check what\nwas placed. It holds the file's name, size and type and where it is\nfiled, and not the auditor's own working papers, which are not shown.",
				"summary": "List documents",
				"tags": [
					"Documents"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"description": "Only the documents in this engagement's audit file.",
						"in": "query",
						"name": "auditAssignmentId",
						"required": false,
						"schema": {
							"$ref": "#/components/schemas/AuditAssignmentId"
						}
					},
					{
						"description": "Page size, 1 to 100. Default 50.",
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"description": "nextCursor from the previous page, with the same auditAssignmentId.",
						"in": "query",
						"name": "cursor",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/companies/{companyDurableKey}/documents/{documentId}": {
			"get": {
				"operationId": "GetDocument",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/CompanyDocument"
								}
							}
						}
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation or scope is denied (insufficient_scope)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"404": {
						"description": "The company or the document does not exist, is not a document from outside, or your client cannot see it (not_found)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"500": {
						"description": "An unexpected error occurred",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"502": {
						"description": "An upstream service failed (upstream_failed)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Reads the metadata of one document.",
				"summary": "Get a document",
				"tags": [
					"Documents"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"description": "The document's id, from the list.",
						"in": "path",
						"name": "documentId",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/DocumentId"
						}
					}
				]
			}
		},
		"/companies/{companyDurableKey}/documents/{documentId}/content": {
			"get": {
				"operationId": "DownloadDocument",
				"responses": {
					"200": {
						"description": "The file",
						"content": {
							"application/octet-stream": {
								"schema": {
									"$ref": "#/components/schemas/DocumentContent"
								}
							}
						}
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation or scope is denied (insufficient_scope)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"404": {
						"description": "The company or the document does not exist, is not a document from outside, or your client cannot see it (not_found)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"409": {
						"description": "The document has no file yet (document_not_ready)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"413": {
						"description": "The document is larger than 100 MB (payload_too_large)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"500": {
						"description": "An unexpected error occurred",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"502": {
						"description": "An upstream service failed (upstream_failed)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Downloads the file. The answer is the file itself, with its name in\n`Content-Disposition` and its type in `Content-Type`. Files up to 100 MB\ncan be downloaded.",
				"summary": "Download a document",
				"tags": [
					"Documents"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"description": "The document's id, from the list.",
						"in": "path",
						"name": "documentId",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/DocumentId"
						}
					}
				]
			}
		},
		"/companies/{companyDurableKey}/data-sources": {
			"get": {
				"operationId": "ListDataSources",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/DataSourcePage"
								}
							}
						}
					},
					"400": {
						"description": "limit or cursor is not valid (limit_invalid, cursor_invalid)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation or scope is denied (insufficient_scope)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"404": {
						"description": "The company does not exist, or your client cannot see it (not_found)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"500": {
						"description": "An unexpected error occurred",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"502": {
						"description": "An upstream service failed (upstream_failed)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Lists the data sources connected to the company: an ERP, a bank, the\ntax agency. It holds the type, the status and the dates, and no\ncredentials or connection details.",
				"summary": "List data sources",
				"tags": [
					"Data sources"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"description": "Page size, 1 to 100. Default 50.",
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"description": "nextCursor from the previous page.",
						"in": "query",
						"name": "cursor",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/companies/{companyDurableKey}/data-syncs": {
			"get": {
				"operationId": "ListDataSyncs",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/DataSyncPage"
								}
							}
						}
					},
					"400": {
						"description": "limit or cursor is not valid (limit_invalid, cursor_invalid)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation or scope is denied (insufficient_scope)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"404": {
						"description": "The company does not exist, or your client cannot see it (not_found)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"500": {
						"description": "An unexpected error occurred",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"502": {
						"description": "An upstream service failed (upstream_failed)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Lists the latest readings of data from the company's data sources, newest\nfirst, with when each started and ended, whether it worked and a failure\ncode when it did not. It covers the latest 1000 syncs of the company. It\nis the pull complement to the `integration.data.synced` event: ask for the\nstate instead of waiting for the event.",
				"summary": "List data syncs",
				"tags": [
					"Data sources"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"description": "Only the syncs of this data source.",
						"in": "query",
						"name": "dataSourceId",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "Page size, 1 to 100. Default 50.",
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"description": "nextCursor from the previous page, with the same dataSourceId.",
						"in": "query",
						"name": "cursor",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/companies/{companyDurableKey}/permissions": {
			"get": {
				"operationId": "GetCompanyPermissions",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/CompanyPermissions"
								},
								"examples": {
									"Example 1": {
										"value": {
											"users": [
												{
													"id": "6aac2823-ad07-4ffd-acb4-80eb92e0f822",
													"email": "hedvig@example.invalid",
													"firstName": "Hedvig",
													"lastName": "Bjorklund"
												}
											],
											"permissionGroups": [
												{
													"id": "31ed289f-36d3-411a-80a0-4b24fd110820",
													"name": "Stockholm"
												}
											]
										}
									}
								}
							}
						}
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation or scope is denied",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"404": {
						"description": "The company does not exist, or your client cannot see it",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"502": {
						"description": "An upstream service failed",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Lists the users and the permission groups that have access to the\ncompany. The answer is one object with both lists, and is not paginated.",
				"summary": "List who has access to a company",
				"tags": [
					"Company access"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					}
				]
			}
		},
		"/companies/{companyDurableKey}/permissions/users/{userId}": {
			"put": {
				"operationId": "GrantUser",
				"responses": {
					"204": {
						"description": "No content"
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation or scope is denied",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"404": {
						"description": "The company does not exist, or your client cannot see it",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"502": {
						"description": "An upstream service failed",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Gives a user access to the company. Giving access that already exists\nchanges nothing and answers 204 again.",
				"summary": "Give a user access to a company",
				"tags": [
					"Company access"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"in": "path",
						"name": "userId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"delete": {
				"operationId": "RevokeUser",
				"responses": {
					"204": {
						"description": "No content"
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation or scope is denied",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"404": {
						"description": "The company does not exist, or your client cannot see it",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"502": {
						"description": "An upstream service failed",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Takes a user's direct access to the company away. A user who reaches the\ncompany through a permission group keeps that access.",
				"summary": "Remove a user's access to a company",
				"tags": [
					"Company access"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"in": "path",
						"name": "userId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/companies/{companyDurableKey}/permissions/permission-groups/{groupId}": {
			"put": {
				"operationId": "GrantPermissionGroup",
				"responses": {
					"204": {
						"description": "No content"
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation or scope is denied",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"404": {
						"description": "The company does not exist, or your client cannot see it",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"502": {
						"description": "An upstream service failed",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Gives a permission group access to the company. Giving access that\nalready exists changes nothing and answers 204 again.",
				"summary": "Give a permission group access to a company",
				"tags": [
					"Company access"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"in": "path",
						"name": "groupId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"delete": {
				"operationId": "RevokePermissionGroup",
				"responses": {
					"204": {
						"description": "No content"
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation or scope is denied",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"404": {
						"description": "The company does not exist, or your client cannot see it",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"502": {
						"description": "An upstream service failed",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Takes a permission group's access to the company away.",
				"summary": "Remove a permission group's access to a company",
				"tags": [
					"Company access"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"in": "path",
						"name": "groupId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/companies": {
			"get": {
				"operationId": "ListCompanies",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/CompanyPage"
								}
							}
						}
					},
					"400": {
						"description": "limit or cursor is not valid (limit_invalid, cursor_invalid)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Your client has no access to this organisation or scope (insufficient_scope)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"502": {
						"description": "An upstream service failed (upstream_failed)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Lists the organisation's companies, ordered by `durableKey`. The list\nis read whole and cut into pages, so a company added or removed between\ntwo page requests can move a page boundary: deduplicate on `durableKey`.",
				"summary": "List companies",
				"tags": [
					"Companies"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"description": "Page size, 1 to 100. Default 50.",
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"description": "nextCursor from the previous page.",
						"in": "query",
						"name": "cursor",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"post": {
				"operationId": "CreateCompany",
				"responses": {
					"201": {
						"description": "Created",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Company"
								}
							}
						}
					},
					"400": {
						"description": "The Idempotency-Key is missing or invalid",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Your client has no access to this organisation or scope (insufficient_scope)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"409": {
						"description": "A request with this Idempotency-Key is still running (idempotency_request_in_progress), or the company conflicts with an existing one (conflict)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"422": {
						"description": "The Idempotency-Key was reused with another body (idempotency_key_reused), or a field is not valid (validation_failed)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"502": {
						"description": "An upstream service failed (upstream_failed)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"503": {
						"description": "The partner platform is not enabled in this environment (partner_platform_disabled)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Creates a company.\n\nSend an Idempotency-Key with every request. For 24 hours, a retry with\nthe same key and body returns the original response and creates no\nsecond company. The same key with another body is refused with\n`idempotency_key_reused`. After 24 hours the key is forgotten.",
				"summary": "Create a company",
				"tags": [
					"Companies"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "Idempotency-Key",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/CreateCompany"
							}
						}
					}
				}
			}
		},
		"/companies/{companyDurableKey}": {
			"get": {
				"operationId": "GetCompany",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Company"
								}
							}
						}
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Your client has no access to this organisation or scope (insufficient_scope)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"404": {
						"description": "No such company, or your client cannot see it (not_found)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"502": {
						"description": "An upstream service failed (upstream_failed)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Returns one company, with its SNI code.",
				"summary": "Get a company",
				"tags": [
					"Companies"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					}
				]
			},
			"put": {
				"operationId": "UpdateCompany",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Company"
								}
							}
						}
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Your client has no access to this organisation or scope (insufficient_scope)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"404": {
						"description": "No such company, or your client cannot see it (not_found)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"422": {
						"description": "A field is not valid (validation_failed)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"502": {
						"description": "An upstream service failed (upstream_failed)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Changes a company. Fields that are left out are not changed. `sniCode`\nsets the company's SNI code.",
				"summary": "Update a company",
				"tags": [
					"Companies"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/UpdateCompany"
							}
						}
					}
				}
			},
			"delete": {
				"operationId": "DeleteCompany",
				"responses": {
					"204": {
						"description": "Deleted"
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Your client has no access to this organisation or scope (insufficient_scope)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"404": {
						"description": "No such company, or your client cannot see it (not_found)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"502": {
						"description": "An upstream service failed (upstream_failed)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Deletes a company.",
				"summary": "Delete a company",
				"tags": [
					"Companies"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					}
				]
			}
		},
		"/companies/{companyDurableKey}/audit-assignments": {
			"get": {
				"operationId": "ListAuditAssignments",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/AuditAssignmentPage"
								},
								"examples": {
									"Example 1": {
										"value": {
											"items": [
												{
													"id": "1f2a4c7e-3b6b-4d0a-9a9b-1b2c3d4e5f6a",
													"type": "AE",
													"subType": "SA",
													"financialYearId": "a5c2e4ed-8765-4f9b-bb4a-74da77ebe6dd",
													"status": "OPEN"
												}
											]
										}
									}
								}
							}
						}
					},
					"400": {
						"description": "limit or cursor is not valid (limit_invalid, cursor_invalid), or the access check could not be completed (invalid_authentication)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation is denied",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"404": {
						"description": "The company was not found",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"500": {
						"description": "An unexpected error occurred",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"502": {
						"description": "An upstream service failed",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Lists the company's audit engagements, one page at a time, ordered by\nid. Pass the returned `nextCursor` as `cursor` for the next page, with\nthe same `financialYearId`. Use an engagement's `id` as\n`auditAssignmentId` when placing evidence.",
				"summary": "List audit assignments",
				"tags": [
					"Audit assignments"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"description": "Only the engagements for this financial year.",
						"in": "query",
						"name": "financialYearId",
						"required": false,
						"schema": {
							"$ref": "#/components/schemas/FinancialYearId"
						}
					},
					{
						"description": "Page size, 1 to 100. Default 50.",
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"description": "The nextCursor from the previous page.",
						"in": "query",
						"name": "cursor",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"post": {
				"operationId": "CreateAuditAssignment",
				"responses": {
					"201": {
						"description": "Created",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/AuditAssignment"
								}
							}
						}
					},
					"400": {
						"description": "The Idempotency-Key is missing or invalid (idempotency_key_missing)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation or scope is denied (insufficient_scope)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"404": {
						"description": "The company, the financial year or the template does not exist, or your client cannot see it (not_found)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"409": {
						"description": "A request with the Idempotency-Key is still running (idempotency_request_in_progress), or the request conflicts with the engagement's state (conflict)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"422": {
						"description": "A field is not valid, the template is not an audit engagement template, the company lacks a legal form or an annual report framework, or the Idempotency-Key was reused with another body (validation_failed, company_incomplete, idempotency_key_reused)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"500": {
						"description": "An unexpected error occurred",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"502": {
						"description": "An upstream service failed (upstream_failed)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"503": {
						"description": "The partner platform is not enabled in this environment (partner_platform_disabled)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Creates an audit engagement for a financial year of the company, from an\nassignment template.\n\nThe company's legal form and annual report framework are the company's\nown, so the company must have both, and the audit framework is the\ntemplate's. The engagement starts with an empty team, open and unlocked:\nadd the team in Senseworks. Locking, archiving and deleting an\nengagement are not part of the API.\n\nSend an Idempotency-Key with every request. For 24 hours, a retry with\nthe same key and body returns the original response and creates nothing\nmore. config-api has no idempotency of its own: if the response to the\nfirst attempt is lost after the engagement was created, a retry with the\nsame key can create a second one. List the company's engagements to find\nout.",
				"summary": "Create an audit assignment",
				"tags": [
					"Audit assignments"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"description": "Unique per engagement, chosen by the caller.",
						"in": "header",
						"name": "Idempotency-Key",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/CreateAuditAssignment"
							}
						}
					}
				}
			}
		},
		"/companies/{companyDurableKey}/audit-assignments/{auditAssignmentId}": {
			"get": {
				"operationId": "GetAuditAssignment",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/AuditAssignmentOverview"
								}
							}
						}
					},
					"400": {
						"description": "The access check could not be completed (invalid_authentication)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation or scope is denied (insufficient_scope)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"404": {
						"description": "The company or the engagement does not exist, or your client cannot see it (not_found)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"500": {
						"description": "An unexpected error occurred",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"502": {
						"description": "An upstream service failed (upstream_failed)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Reads one audit engagement with its status, progress per phase and team.\nThe fields are the ones in the organisation-wide list, plus the lock date\nand the export status of the audit file.",
				"summary": "Get an audit assignment",
				"tags": [
					"Audit assignments"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"description": "The engagement's id, from the list.",
						"in": "path",
						"name": "auditAssignmentId",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/AuditAssignmentId"
						}
					}
				]
			}
		},
		"/audit-assignments": {
			"get": {
				"operationId": "ListAuditAssignmentOverviews",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/AuditAssignmentOverviewPage"
								}
							}
						}
					},
					"400": {
						"description": "limit or cursor is not valid (limit_invalid, cursor_invalid), or the access check could not be completed (invalid_authentication)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation or scope is denied (insufficient_scope)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"422": {
						"description": "A filter is not valid (validation_failed)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"500": {
						"description": "An unexpected error occurred",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"502": {
						"description": "An upstream service failed (upstream_failed)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Lists the organisation's audit engagements with their status, progress\nper phase and team, newest closing date first. It is the overview for an\nagency: filter on a team member to see how each consultant's engagements\nare going.\n\nIt holds how far the work has come and who is on it. It does not hold\nwhat the work found: no risks, notes, materiality or conclusions.\n\nArchived engagements are left out unless `includeArchived` is true or\n`status` or `progressStatus` is `ARCHIVED`. Pass the returned\n`nextCursor` as `cursor` for the next page, with the same filters.",
				"summary": "List audit assignments across the organisation",
				"tags": [
					"Audit assignments"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"description": "The engagement's status.",
						"in": "query",
						"name": "status",
						"required": false,
						"schema": {
							"$ref": "#/components/schemas/AuditAssignmentStatus"
						}
					},
					{
						"description": "Where the engagement is in its life.",
						"in": "query",
						"name": "progressStatus",
						"required": false,
						"schema": {
							"$ref": "#/components/schemas/AuditAssignmentProgressStatus"
						}
					},
					{
						"description": "Only engagements this user is on the team of, see `/v2/users`.",
						"in": "query",
						"name": "userId",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "Only engagements with a team member in this role. With `userId`, that user in this role.",
						"in": "query",
						"name": "role",
						"required": false,
						"schema": {
							"$ref": "#/components/schemas/AuditAssignmentTeamRole"
						}
					},
					{
						"description": "Only engagements whose financial year ends on or after this date, as YYYY-MM-DD.",
						"in": "query",
						"name": "financialYearEndFrom",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "Only engagements whose financial year ends on or before this date, as YYYY-MM-DD.",
						"in": "query",
						"name": "financialYearEndTo",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "Only engagements made from this template.",
						"in": "query",
						"name": "assignmentTemplateId",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "Only this company's engagements.",
						"in": "query",
						"name": "companyDurableKey",
						"required": false,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"description": "Also list archived engagements. Default false.",
						"in": "query",
						"name": "includeArchived",
						"required": false,
						"schema": {
							"type": "boolean"
						}
					},
					{
						"description": "Page size, 1 to 100. Default 50.",
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"description": "The nextCursor from the previous page.",
						"in": "query",
						"name": "cursor",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/audit-assignments/summary": {
			"get": {
				"operationId": "SummarizeAuditAssignments",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/AuditAssignmentSummary"
								}
							}
						}
					},
					"400": {
						"description": "The access check could not be completed (invalid_authentication)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation or scope is denied (insufficient_scope)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"422": {
						"description": "A filter is not valid (validation_failed)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"500": {
						"description": "An unexpected error occurred",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"502": {
						"description": "An upstream service failed (upstream_failed)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Counts the organisation's audit engagements per progress status, for an\noverview tile. It takes the same filters as the list.",
				"summary": "Count audit assignments per progress status",
				"tags": [
					"Audit assignments"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"description": "The engagement's status.",
						"in": "query",
						"name": "status",
						"required": false,
						"schema": {
							"$ref": "#/components/schemas/AuditAssignmentStatus"
						}
					},
					{
						"description": "Where the engagement is in its life.",
						"in": "query",
						"name": "progressStatus",
						"required": false,
						"schema": {
							"$ref": "#/components/schemas/AuditAssignmentProgressStatus"
						}
					},
					{
						"description": "Only engagements this user is on the team of, see `/v2/users`.",
						"in": "query",
						"name": "userId",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "Only engagements with a team member in this role. With `userId`, that user in this role.",
						"in": "query",
						"name": "role",
						"required": false,
						"schema": {
							"$ref": "#/components/schemas/AuditAssignmentTeamRole"
						}
					},
					{
						"description": "Only engagements whose financial year ends on or after this date, as YYYY-MM-DD.",
						"in": "query",
						"name": "financialYearEndFrom",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "Only engagements whose financial year ends on or before this date, as YYYY-MM-DD.",
						"in": "query",
						"name": "financialYearEndTo",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "Only engagements made from this template.",
						"in": "query",
						"name": "assignmentTemplateId",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "Only this company's engagements.",
						"in": "query",
						"name": "companyDurableKey",
						"required": false,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"description": "Also count archived engagements. Default false.",
						"in": "query",
						"name": "includeArchived",
						"required": false,
						"schema": {
							"type": "boolean"
						}
					}
				]
			}
		},
		"/audit-assignment-templates": {
			"get": {
				"operationId": "ListAuditAssignmentTemplates",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/AuditAssignmentTemplatePage"
								}
							}
						}
					},
					"400": {
						"description": "limit or cursor is not valid (limit_invalid, cursor_invalid)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"401": {
						"description": "The bearer token is missing, invalid or expired",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"403": {
						"description": "Access to this organisation or scope is denied (insufficient_scope)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"429": {
						"description": "Too many requests from this IP address, or from this person for an AI assistant (rate_limited). Retry after the seconds in Retry-After",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						},
						"headers": {
							"RateLimit-Policy": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"RateLimit": {
								"schema": {
									"type": "string"
								},
								"required": true
							},
							"Retry-After": {
								"schema": {
									"type": "string"
								},
								"required": true
							}
						}
					},
					"500": {
						"description": "An unexpected error occurred",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					},
					"502": {
						"description": "An upstream service failed (upstream_failed)",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				},
				"description": "Lists the active audit engagement templates your organisation can use:\nits own and Senseworks' global ones. Pass a template's `id` as\n`assignmentTemplateId` when you create an audit assignment.",
				"summary": "List audit assignment templates",
				"tags": [
					"Audit assignments"
				],
				"security": [
					{
						"bearer": []
					}
				],
				"parameters": [
					{
						"description": "Page size, 1 to 100. Default 50.",
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"description": "nextCursor from the previous page.",
						"in": "query",
						"name": "cursor",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		}
	},
	"servers": [
		{
			"url": "https://api.senseworks.app/v2"
		}
	],
	"tags": [
		{
			"name": "Evidence",
			"description": "Place documents as evidence in an audit file. Errors are application/problem+json with a stable errorCode."
		},
		{
			"name": "Webhooks",
			"description": "Subscribe to events and read the delivery log. Deliveries are signed with Senseworks-Signature. Errors are application/problem+json with a stable errorCode."
		},
		{
			"name": "Notifications",
			"description": "Integration notifications for the agency, in Swedish and English, to show in a portal. The pull complement to webhooks."
		},
		{
			"name": "Audit assignments",
			"description": "The audit engagements (revisionsuppdrag) of the organisation and of a company: status, progress per phase and team, create, and the templates to create from. Use an id as auditAssignmentId when placing evidence. Errors are application/problem+json with a stable errorCode."
		},
		{
			"name": "Documents",
			"description": "Read the documents that came into a company's audit files through the API: list, metadata and download. The auditor's own working papers are not shown. Errors are application/problem+json with a stable errorCode."
		},
		{
			"name": "Companies",
			"description": "The organisation's companies: list, read, create, update and delete. Errors are application/problem+json with a stable errorCode."
		},
		{
			"name": "Financial years",
			"description": "A company's financial years (räkenskapsår): list, create and delete. Errors are application/problem+json with a stable errorCode."
		},
		{
			"name": "Users",
			"description": "The users of the organisation, and the permission groups each belongs to."
		},
		{
			"name": "Invitations",
			"description": "Invite users by e-mail, and list, resend or delete pending invitations."
		},
		{
			"name": "Permission groups",
			"description": "Groups of users that are given access to companies as one, and their members. Errors are application/problem+json with a stable errorCode."
		},
		{
			"name": "Company access",
			"description": "Who has access to a company: users and permission groups. Give and remove access. Errors are application/problem+json with a stable errorCode."
		},
		{
			"name": "Data sources",
			"description": "Read the connections a company's data comes from, and when the data was last read. Read only. Errors are application/problem+json with a stable errorCode."
		},
		{
			"name": "General ledger imports",
			"description": "Hand over a general ledger file (SIE) for import. The import runs asynchronously. Errors are application/problem+json with a stable errorCode."
		}
	],
	"x-tagGroups": [
		{
			"name": "API",
			"tags": [
				"Evidence",
				"Webhooks",
				"Notifications"
			]
		},
		{
			"name": "Organisation and companies",
			"tags": [
				"Audit assignments",
				"Documents",
				"Companies",
				"Financial years",
				"Data sources",
				"Users",
				"Invitations",
				"Permission groups",
				"Company access",
				"General ledger imports"
			]
		}
	]
}