{"openapi":"3.0.0","paths":{"/v1/auth":{"post":{"description":"Authentication with the GetAccept API can be made using JWT tokens (JSON Web Tokens) or the OAuth 2.0 Authorization Framework. All requests must be made via HTTPS, and all configuration URLs such as webhooks should begin with `https://` as well.\n\nToken based authentication is recommended for server-based access, or for access from clients where OAuth is not suitable. Access tokens are requested with a user's login credentials, and the token carries that user's role.\n\nRequests should include the header `Content-Type` with the value `application/json`.","operationId":"authenticate","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthBody"},"examples":{"credentials":{"summary":"Email and password","value":{"email":"jane.doe@example.com","password":"YOUR_PASSWORD","entity_id":"e2x4mp1e"}}}}}},"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthDto"},"example":{"access_token":"ACCESS_TOKEN","expires_in":5184000}}}},"400":{"description":"The request is invalid, for example a missing email or password or a `Content-Type` other than `application/json`. Also returned for wrong credentials, and while the login is locked after repeated failed attempts, even with the correct password.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The user is not active, or the user or entity does not have access to the API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The user account could not be loaded, so no access token can be issued. Contact support.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"423":{"description":"The entity selected with `entity_id` is marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Token requests were sent too close together. Wait a moment, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Authenticate with API credentials and get an access token","tags":["Auth"]}},"/v1/refresh":{"get":{"description":"Request a refresh of the access token before the original token has expired.","operationId":"refreshToken","parameters":[],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthDto"},"example":{"access_token":"ACCESS_TOKEN","expires_in":5184000}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The user of the access token no longer has a profile in the entity of the token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Refresh a token","tags":["Auth"]}},"/v1/refresh/{entity}":{"get":{"description":"Change entity using the same refresh method with an additional parameter for the entity. The entities available to a user are listed in the response of Get the authenticated user.\n\nThe response includes a new access token that should be used when accessing the new entity. A token is also issued for an entity where the profile of the user is still pending, but every other request with it answers 403 until that profile is active.","operationId":"refreshTokenForEntity","parameters":[{"name":"entity","required":true,"in":"path","description":"Id of the entity the new token is issued for.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthDto"},"example":{"access_token":"ACCESS_TOKEN","expires_in":5184000}}}},"400":{"description":"`entity` is not a valid entity id, the authenticated user is not a member of that entity, or the switch breaks the SAML rule: when the parent of the current entity, or the current entity itself if it has no parent, has a SAML integration, only that entity or one of its child entities can be selected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The authenticated user is inactive in the entity selected with `entity`, that entity has no API access, or it is quarantined. Also returned when the user or entity of the access token may not use the API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"423":{"description":"The entity selected with `entity` is marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Refresh a token for an entity","tags":["Auth"]}},"/v1/test":{"get":{"description":"Test authentication and get the current entity and user, both the ids and the names.","operationId":"testToken","parameters":[],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestResponse"},"example":{"user_id":"32abc9d","entity_id":"8nj6hvkn","first_name":"Jane","last_name":"Doe","entity_name":"GetAccept"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Test the authorization token","tags":["Auth"]}},"/v1/documents":{"get":{"description":"Get a list of available documents.","operationId":"getDocuments","parameters":[{"name":"sort_by","required":false,"in":"query","description":"Sort the results by `name`, `value`, `created`, `status` or `owner`. With `filter=signed`, `created` sorts by sign date. Any other value leaves the default order.","schema":{"type":"string"}},{"name":"sort_order","required":false,"in":"query","description":"Sort order when `sort_by` is set: `asc` or `desc`. Defaults to `asc`.","schema":{"type":"string"}},{"name":"showteam","required":false,"in":"query","description":"Set to `true` to include documents from team members.","schema":{"type":"string"}},{"name":"showall","required":false,"in":"query","description":"Set to `true` to include all documents in the entity, including documents owned by other users. Combine with `external_id` to find a document the caller does not own. This filter applies to this list endpoint; it does not change document-detail access checks. Takes precedence over `showteam`.","schema":{"type":"string"}},{"name":"external_id","required":false,"in":"query","description":"Return documents whose external id, set when the document was created, matches. Pass several comma-separated external ids to match any of them. A value that is an email address instead returns documents that have a recipient with that email.","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","description":"Start the list from this record. Defaults to 0.","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Number of records to list. Defaults to 100, which is also used for a value of 0 or less.","schema":{"type":"number"}},{"name":"external_client_id","required":false,"in":"query","description":"External client id set when the document was created.","schema":{"type":"string"}},{"name":"filter","required":false,"in":"query","description":"Narrow the list with one named filter: `archive`, `won`, `active`, `expired`, `expiring`, `hot`, `vod`, `lost`, `signed` or `recalled`. Otherwise pass one or more comma-separated statuses, such as `sent,viewed`, from `draft`, `archived`, `expired`, `hardbounced`, `importing`, `lost`, `processing`, `recalled`, `rejected`, `reviewed`, `scheduled`, `sealed`, `sent`, `signed`, `signedwithoutverification` and `viewed`. A value that matches no named filter or status returns an empty list. With `archive`, documents come without `recipients` and with a `thumb_url`.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentListItemDto"}},"example":[{"id":"qnerhxyp","name":"The big proposal","status":"sent","value":90000,"sender_name":"John Doe","created_at":"2015-10-21T14:42:00+00:00","updated_at":"2015-10-22T09:15:30+00:00","recipients":[{"first_name":"Jane","last_name":"Doe","email":"jane.doe@example.com","thumb_url":"https://media.getaccept.com/contact/b3221e55cd0d1c7e6bdf45fa4aa0a259.png","role":"signer","company_name":"Customer A","company_number":"5566778","status":"sent","note":"","recipient_status":"sent"}],"type":"sales","external_id":"doc_19953","is_private":false,"is_signing":true,"company_name":"Customer A","user_id":"x7yzabc","sender_thumb":"https://media.getaccept.com/thumb_url/x7yzabc.png","tags":"","sign_date":null,"expiration_date":"2015-12-01T23:59:59+00:00"}]}}},"400":{"description":"The request is invalid, for example a missing or malformed parameter or body field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get documents","tags":["Documents"]},"post":{"description":"You must create a document to be able to send it to a recipient. When creating a document you can refer to previously uploaded files with `file_ids`, or create the document and upload the file in the same request; only one file can be uploaded in the create document POST. Use `file_ids` for existing uploads, `file_content` to send the file as a base64 encoded string, `file_url` for a publicly downloadable file, or a multipart post with a `file` parameter. Pass `template_id` to create the document from a template.\n\nWhile a file is processed the document has status `importing`, and it moves to `draft` when processing finishes. A create that includes a file (`file_ids`, `file_content`, `file_url` or `file`) therefore returns status `importing`, as does a create from a Word template with `custom_fields`. A document can only be sent in status `draft`: unless you set `is_automatic_sending`, poll get document status until it reports `draft` before you send the document. A file that cannot be imported, for example an expired upload or a PDF that needs a password to open, also ends in `draft`, and the document owner is emailed. Files are imported in order and the import stops at that file, so the document has no pages from it or from any file after it: check the pages with list document pages before you send. A `.docx` file id is imported while the request runs instead: an expired or unknown `.docx` upload answers 404 and leaves the created document behind as a draft without pages.\n\nThe response is the created document, except that only its `id` and `status` are returned in the cases listed on that shorter response.\n\nIn `multipart/form-data` and `application/x-www-form-urlencoded` bodies every field is text. Send booleans as `1` or `0`: the text `false` counts as true, so `is_automatic_sending=false` turns automatic sending on. Array and object fields, such as `recipients` and `custom_fields`, are only read from a `multipart/form-data` part sent with `Content-Type: application/json`, and cannot be sent form-encoded.\n\nAll recipients must have either a valid email or a mobile number. If `is_signing` is omitted it is set automatically from recipient roles: no recipients enables signing, recipients with no signers disables it, at least one signer enables it.\n\nMost parameters are optional; start with the basics and add parameters as needed.","operationId":"createDocument","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/CreateDocumentBody"},{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"File to create the document from, sent as a `multipart/form-data` part. Only one file can be uploaded."}}}]},"examples":{"fromTemplate":{"summary":"From a template","value":{"name":"Service agreement","template_id":"t3mp1at3","external_id":"crm-deal-1042","value":12000,"recipients":[{"first_name":"Jane","last_name":"Doe","email":"jane.doe@example.com","role_name":"Customer"}],"custom_fields":[{"name":"contract_length","value":"12 months"}],"is_automatic_sending":true}},"fromFileIds":{"summary":"From uploaded file ids","value":{"name":"Partnership proposal","file_ids":"pvmhqx9n.pdf,k2r7tw4d.pdf","company_name":"Example Corp","recipients":[{"first_name":"Jane","last_name":"Doe","email":"jane.doe@example.com","role":"signer"}]}}}},"application/x-www-form-urlencoded":{"schema":{"allOf":[{"$ref":"#/components/schemas/CreateDocumentBody"},{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"File to create the document from, sent as a `multipart/form-data` part. Only one file can be uploaded."}}}]}},"multipart/form-data":{"schema":{"allOf":[{"$ref":"#/components/schemas/CreateDocumentBody"},{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"File to create the document from, sent as a `multipart/form-data` part. Only one file can be uploaded."}}}]}}}},"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CreateDocumentResponseDto"},{"$ref":"#/components/schemas/CreateDocumentAsyncResponseDto"}]},"examples":{"fromTemplate":{"summary":"From a template","value":{"id":"xy45za9","name":"Service agreement","external_id":"crm-deal-1042","value":12000,"type":"sales","tags":"","company_name":"GetAccept","company_id":"8nj6hvkn","company_logo_url":"","is_selfsign":false,"is_signing_biometric":false,"is_signing_initials":false,"is_private":false,"status":"draft","send_date":null,"sign_date":null,"updated_at":"2015-10-22T09:15:30+00:00","user_id":"p5wz2nkd","email_send_template_id":"d18nabcx","email_send_subject":"Sending you the proposal","email_send_message":"","is_signing":true,"is_signing_order":false,"is_video":false,"expiration_date":"2015-12-29T23:59:59+00:00","is_scheduled_sending":false,"scheduled_sending_time":null,"is_reminder_sending":true,"video_id":null,"thumb_url":"https://media.getaccept.com/preview/aw8nkenx/n24uxxwn.png","preview_url":"https://app.getaccept.com/v/preview/a64uqvwn?token=PREVIEW_TOKEN&","app_url":"https://app.getaccept.com/document/view/a64uqvwn","recipients":[{"id":"b7cd8ef3","fullname":"Jane Doe","first_name":"Jane","last_name":"Doe","email":"jane.doe@example.com","role":"signer","status":"added","company_name":"","company_number":"","title":"","role_name":"Customer","note":"","mobile":"","phone":"","thumb_url":"https://media.getaccept.com/contact/b3221e55cd0d1c7e6bdf45fa4aa0a259.png","order_num":"1","document_url":"","contact_id":"abc58129f"}],"external_client_id":"api","external_editor_type":"","external_editor_id":"","company_number":"556677-8890","unique_id":15243,"is_signing_forward":false,"is_identify_recipient":false,"created_at":"2015-10-19T09:16:53+00:00","download_url":"","sender_name":"John Doe","sender_thumb_url":"https://media.getaccept.com/thumb_url/x7yzabc.png","sender_email":"john.doe@example.com","parent_id":"","is_signed":false,"is_auto_comment":false,"auto_comment_text":"","is_auto_comment_email":false,"auto_comment_email":"","entity_auto_comment_text":"","entity_auto_comment_email":"","field_count":0,"contract_start_date":null,"contract_end_date":null,"settings":{"expirationDays":30,"blockRecipientInvite":false}}},"fromFileIds":{"summary":"From uploaded file ids","value":{"id":"xy45za9","name":"Partnership proposal","external_id":"","value":0,"type":"sales","tags":"","company_name":"Example Corp","company_id":"8nj6hvkn","company_logo_url":"","is_selfsign":false,"is_signing_biometric":false,"is_signing_initials":false,"is_private":false,"status":"importing","send_date":null,"sign_date":null,"updated_at":"2015-10-22T09:15:30+00:00","user_id":"p5wz2nkd","email_send_template_id":"d18nabcx","email_send_subject":"Sending you the proposal","email_send_message":"","is_signing":true,"is_signing_order":false,"is_video":false,"expiration_date":"2015-12-29T23:59:59+00:00","is_scheduled_sending":false,"scheduled_sending_time":null,"is_reminder_sending":true,"video_id":null,"thumb_url":"https://media.getaccept.com/preview/aw8nkenx/n24uxxwn.png","preview_url":"https://app.getaccept.com/v/preview/a64uqvwn?token=PREVIEW_TOKEN&","app_url":"https://app.getaccept.com/document/view/a64uqvwn","recipients":[{"id":"b7cd8ef3","fullname":"Jane Doe","first_name":"Jane","last_name":"Doe","email":"jane.doe@example.com","role":"signer","status":"added","company_name":"","company_number":"","title":"","role_name":"","note":"","mobile":"","phone":"","thumb_url":"https://media.getaccept.com/contact/b3221e55cd0d1c7e6bdf45fa4aa0a259.png","order_num":"1","document_url":"","contact_id":"abc58129f"}],"external_client_id":"api","external_editor_type":"","external_editor_id":"","company_number":"556677-8890","unique_id":15243,"is_signing_forward":false,"is_identify_recipient":false,"created_at":"2015-10-19T09:16:53+00:00","download_url":"","sender_name":"John Doe","sender_thumb_url":"https://media.getaccept.com/thumb_url/x7yzabc.png","sender_email":"john.doe@example.com","parent_id":"","is_signed":false,"is_auto_comment":false,"auto_comment_text":"","is_auto_comment_email":false,"auto_comment_email":"","entity_auto_comment_text":"","entity_auto_comment_email":"","field_count":0,"contract_start_date":null,"contract_end_date":null,"settings":{"expirationDays":30,"blockRecipientInvite":false}}}}}}},"400":{"description":"The request is invalid, for example a missing or malformed parameter or body field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`template_id` names no template of the authenticated entity, the template is in the trash, a `custom_images` entry names a `file_id` that was not uploaded to the entity, or a `.docx` entry in `file_ids` names an upload that has expired or does not exist. In that last case the document has already been created and is left behind as a draft without pages.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The template cannot be applied to the document: an attachment on the template is restricted to a recipient who is no longer on the template, or a `custom_fields` value is not valid for its field in the template content, for example a dropdown value that is not one of its options or a number outside its range. The document is created before the template is applied, so a draft document exists even when this is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service this endpoint depends on is temporarily unavailable. The document was not created; the request can be retried.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Create a document","tags":["Documents"]}},"/v1/documents/{id}":{"get":{"description":"Get document details by specifying a document id in the request URL. To find a document by external id when you are not its owner, first use `GET /v1/documents?external_id={externalId}&showall=true`, then pass the returned id here. `showall` affects the list lookup only; this endpoint still checks your access to the document. `rejection_reason` is the reason the recipient gave when rejecting the document, as in get document status; it is `null` when the document is not rejected or no reason was given.","operationId":"getDocument","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}},{"name":"with_pages","required":false,"in":"query","description":"Include document pages. Any non-empty value other than `0` turns it on, including `false`.","schema":{"type":"string"}},{"name":"with_small_pages","required":false,"in":"query","description":"Include document pages with small thumbnails. Any non-empty value other than `0` turns it on, including `false`.","schema":{"type":"string"}},{"name":"with_stats","required":false,"in":"query","description":"Include document statistics. Any non-empty value other than `0` turns it on, including `false`.","schema":{"type":"string"}},{"name":"with_attachments","required":false,"in":"query","description":"Include document attachments. Any non-empty value other than `0` turns it on, including `false`.","schema":{"type":"string"}},{"name":"in_object","required":false,"in":"query","description":"Return a one-element array instead of the document. Its item holds the document together with the entity, the first recipient and the custom fields. Any non-empty value other than `0` turns it on, including `false`.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/DocumentDetailsDto"},{"type":"array","items":{"$ref":"#/components/schemas/LatestDocumentInObjectDto"}}]},"example":{"id":"xy45za9","name":"The big proposal","external_id":"p_1552","value":8400,"type":"sales","tags":"","company_name":"GetAccept","company_id":"8nj6hvkn","company_logo_url":"","is_selfsign":false,"is_signing_biometric":false,"is_signing_initials":false,"is_private":false,"status":"viewed","rejection_reason":null,"send_date":"2015-10-21T14:42:00+00:00","sign_date":null,"updated_at":"2015-10-22T09:15:30+00:00","user_id":"p5wz2nkd","email_send_template_id":"d18nabcx","email_send_subject":"Sending you the proposal","email_send_message":"","is_signing":true,"is_signing_order":false,"is_video":false,"expiration_date":"2015-12-29T23:59:59+00:00","is_scheduled_sending":false,"scheduled_sending_time":null,"is_reminder_sending":true,"video_id":null,"thumb_url":"https://media.getaccept.com/preview/aw8nkenx/n24uxxwn.png","preview_url":"https://app.getaccept.com/v/preview/a64uqvwn?token=PREVIEW_TOKEN&","app_url":"https://app.getaccept.com/document/view/a64uqvwn","recipients":[{"fullname":"Sam Tester","first_name":"Sam","last_name":"Tester","email":"sam.tester@example.com","mobile":"+46701740609","thumb_url":"","role":"signer","company_name":"GetAccept","company_number":"556677-8890","order_num":"1","note":"","title":"CEO","status":"viewed"}],"external_client_id":"","external_editor_type":"","external_editor_id":"","company_number":"556677-8890","unique_id":15243,"is_signing_forward":false,"is_identify_recipient":false,"created_at":"2015-10-19T09:16:53+00:00","download_url":"","sender_name":"John Doe","sender_thumb_url":"https://media.getaccept.com/thumb_url/x7yzabc.png","sender_email":"john.doe@example.com","parent_id":"","is_signed":false,"is_auto_comment":false,"auto_comment_text":"","is_auto_comment_email":false,"auto_comment_email":"","entity_auto_comment_text":"","entity_auto_comment_email":"","field_count":0,"contract_start_date":null,"contract_end_date":null,"settings":{"expirationDays":30,"blockRecipientInvite":false}}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get a document","tags":["Documents"]},"put":{"description":"Update document properties during the lifecycle of the document, from draft to signed. Which properties can be updated depends on the current document status, and a request with any other property is rejected with 400.\n\nA draft document accepts `external_id`, `external_client_id`, `is_private`, `value`, `comment_settings`, `sign_redirect`, `block_recipient_invite` and `sign_copy_emails`. Any later status accepts `value`, `contract_start_date`, `contract_end_date`, `tags`, `is_private`, `comment_settings`, `sign_redirect`, `block_recipient_invite` and `sign_copy_emails`.","operationId":"updateDocument","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocumentBody"}}}},"responses":{"204":{"description":"The request succeeded. The response has no body."},"400":{"description":"The request is invalid, for example a missing or malformed parameter or body field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Update a document","tags":["Documents"]},"delete":{"description":"Recall a sent document, or permanently delete one that was never sent or is already recalled. Which of the two happens depends on the document's state:\n\n- **Sent and not recalled:** the document is recalled, not deleted. Its status becomes `recalled`, a `recalled` event is added to its log, and the `document.recalled` webhook fires. The document and its data are kept. Call this endpoint again to delete it.\n- **Never sent, or already recalled:** the document is permanently deleted, and the rest of its data is erased in the background. This cannot be undone.\n\nDeleting a sent document therefore takes two calls. Both answer `204 No Content`. To tell them apart, read the document afterwards: a recalled document still returns its status, and a deleted one returns 404.\n\nWhen deletion is unrestricted, only the document's owner or an admin can permanently delete it. For anyone else, the delete step answers 404 and the document is kept. If the account restricts document deletion to admins, non-admins receive 403 before either recall or deletion.","operationId":"deleteDocument","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}}],"responses":{"204":{"description":"The request succeeded. The response has no body."},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Recall or delete a document","tags":["Documents"]}},"/v1/documents/latest":{"get":{"description":"Returns the single most recent document for the authenticated entity, of any status unless `filter` narrows it. Use `in_object` when you also need the entity, the first recipient and the custom fields alongside the document.","operationId":"getLatestDocument","parameters":[{"name":"filter","required":false,"in":"query","description":"Pass signed to return the latest signed document instead of the latest document of any status.","schema":{"type":"string"}},{"name":"in_object","required":false,"in":"query","description":"Return a one-element array instead of the document. Its item holds the document together with the entity, the first recipient and the custom fields. Any non-empty value other than `0` turns it on, including `false`.","schema":{"type":"string"}},{"name":"with_pages","required":false,"in":"query","description":"Include document pages. Any non-empty value other than `0` turns it on, including `false`.","schema":{"type":"string"}},{"name":"with_small_pages","required":false,"in":"query","description":"Include document pages with small thumbnails. Any non-empty value other than `0` turns it on, including `false`.","schema":{"type":"string"}},{"name":"with_stats","required":false,"in":"query","description":"Include document statistics. Any non-empty value other than `0` turns it on, including `false`.","schema":{"type":"string"}},{"name":"with_attachments","required":false,"in":"query","description":"Include document attachments. Any non-empty value other than `0` turns it on, including `false`.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/DocumentDetailsDto"},{"type":"array","items":{"$ref":"#/components/schemas/LatestDocumentInObjectDto"}}]},"example":{"id":"xy45za9","name":"The big proposal","external_id":"p_1552","value":8400,"type":"sales","tags":"","company_name":"GetAccept","company_id":"8nj6hvkn","company_logo_url":"","is_selfsign":false,"is_signing_biometric":false,"is_signing_initials":false,"is_private":false,"status":"viewed","rejection_reason":null,"send_date":"2015-10-21T14:42:00+00:00","sign_date":null,"updated_at":"2015-10-22T09:15:30+00:00","user_id":"p5wz2nkd","email_send_template_id":"d18nabcx","email_send_subject":"Sending you the proposal","email_send_message":"","is_signing":true,"is_signing_order":false,"is_video":false,"expiration_date":"2015-12-29T23:59:59+00:00","is_scheduled_sending":false,"scheduled_sending_time":null,"is_reminder_sending":true,"video_id":null,"thumb_url":"https://media.getaccept.com/preview/aw8nkenx/n24uxxwn.png","preview_url":"https://app.getaccept.com/v/preview/a64uqvwn?token=PREVIEW_TOKEN&","app_url":"https://app.getaccept.com/document/view/a64uqvwn","recipients":[{"fullname":"Sam Tester","first_name":"Sam","last_name":"Tester","email":"sam.tester@example.com","mobile":"+46701740609","thumb_url":"","role":"signer","company_name":"GetAccept","company_number":"556677-8890","order_num":"1","note":"","title":"CEO","status":"viewed"}],"external_client_id":"","external_editor_type":"","external_editor_id":"","company_number":"556677-8890","unique_id":15243,"is_signing_forward":false,"is_identify_recipient":false,"created_at":"2015-10-19T09:16:53+00:00","download_url":"","sender_name":"John Doe","sender_thumb_url":"https://media.getaccept.com/thumb_url/x7yzabc.png","sender_email":"john.doe@example.com","parent_id":"","is_signed":false,"is_auto_comment":false,"auto_comment_text":"","is_auto_comment_email":false,"auto_comment_email":"","entity_auto_comment_text":"","entity_auto_comment_email":"","field_count":0,"contract_start_date":null,"contract_end_date":null,"settings":{"expirationDays":30,"blockRecipientInvite":false}}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get the latest document","tags":["Documents"]}},"/v1/documents/external/{externalId}":{"get":{"description":"Get a document by the external id specified when the document was created. This lookup does not accept the `showall` filter. To find a document owned by another user, use `GET /v1/documents?external_id={externalId}&showall=true` and use the returned document id with get a document. For a known external id it returns the document shaped like get a document without query options, with two differences: `rejection_reason` is left out, and `tags` holds the `tags` text last sent to create or update the document through the API, so tags added in the app are not listed. When several documents share the external id, the most recently created one is returned.","operationId":"getDocumentByExternalId","parameters":[{"name":"externalId","required":true,"in":"path","description":"External id the document was created with.","schema":{"type":"string"}}],"responses":{"200":{"description":"The document without `rejection_reason`, and with `tags` as last sent through the API. An unknown external id returns an empty array.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/DocumentDetailsDto"},{"type":"array","maxItems":0,"items":{}}]},"example":{"id":"xy45za9","name":"The big proposal","external_id":"p_1552","value":8400,"type":"sales","tags":"","company_name":"GetAccept","company_id":"8nj6hvkn","company_logo_url":"","is_selfsign":false,"is_signing_biometric":false,"is_signing_initials":false,"is_private":false,"status":"viewed","send_date":"2015-10-21T14:42:00+00:00","sign_date":null,"updated_at":"2015-10-22T09:15:30+00:00","user_id":"p5wz2nkd","email_send_template_id":"d18nabcx","email_send_subject":"Sending you the proposal","email_send_message":"","is_signing":true,"is_signing_order":false,"is_video":false,"expiration_date":"2015-12-29T23:59:59+00:00","is_scheduled_sending":false,"scheduled_sending_time":null,"is_reminder_sending":true,"video_id":null,"thumb_url":"https://media.getaccept.com/preview/aw8nkenx/n24uxxwn.png","preview_url":"https://app.getaccept.com/v/a64uqvwn/x8gea49p/a/12f87050ec8f3d8a2e12b4569","app_url":"https://app.getaccept.com/document/view/a64uqvwn","recipients":[{"fullname":"Sam Tester","first_name":"Sam","last_name":"Tester","email":"sam.tester@example.com","mobile":"+46701740609","thumb_url":"","role":"signer","company_name":"GetAccept","company_number":"556677-8890","order_num":"1","note":"","title":"CEO","status":"viewed"}],"external_client_id":"","external_editor_type":"","external_editor_id":"","company_number":"556677-8890","unique_id":15243,"is_signing_forward":false,"is_identify_recipient":false,"created_at":"2015-10-19T09:16:53+00:00","download_url":"","sender_name":"John Doe","sender_thumb_url":"https://media.getaccept.com/thumb_url/x7yzabc.png","sender_email":"john.doe@example.com","parent_id":"","is_signed":false,"is_auto_comment":false,"auto_comment_text":"","is_auto_comment_email":false,"auto_comment_email":"","entity_auto_comment_text":"","entity_auto_comment_email":"","field_count":0,"contract_start_date":null,"contract_end_date":null,"settings":{"expirationDays":30,"blockRecipientInvite":false}}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get a document by external id","tags":["Documents"]}},"/v1/documents/{id}/status":{"get":{"description":"Get the current status of a document. `rejection_reason` is the reason the recipient gave when rejecting the document; it is `null` when the document is not rejected or no reason was given.","operationId":"getDocumentStatus","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentStatusDto"},"example":{"status":"rejected","rejection_reason":"Pricing is above the approved budget"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get a document status","tags":["Documents"]}},"/v1/documents/{id}/seal":{"post":{"description":"If you prefer to send the document manually, use this method to seal it. Do not use it if you send the document automatically or use send document. Sealing can only be performed on documents with status draft; a document created from a file has status `importing` until the file is processed, and sealing it before then returns 400, so poll get document status until it reports `draft`. Sealing returns individual access and signing links for each recipient; use send to recipients to release the document to recipients in batches. If the document was created with the self-sign option it is also self-signed by the authenticated or specified user before sealing.\n\nSealing finishes in the background once the document PDF has been generated, and the document stays in `draft` until then: poll get document status until it reports `sealed` before you send to recipients or create a reminder.\n\nThe optional `User-Agent` and `CLIENT_IP` headers specify the client device information and IP address recorded for the seal.","operationId":"sealDocument","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealDocumentBody"}}}},"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealDocumentResponse"},"example":{"recipients":[{"id":"b7cd8ef3","fullname":"","first_name":"","last_name":"","email":"","role":"signer","status":"added","company_name":"The Test Company, Inc.","company_number":"55-664899","title":"CEO","role_name":"role name","note":"","mobile":"+46701740609","phone":"","thumb_url":"https://media.getaccept.com/contact/b3221e55cd0d1c7e6bdf45fa4aa0a259.png","order_num":"1","document_url":"https://app.getaccept.com/v/abc123/8asd72dd/a/xyz8asd98asd8hibhweaasd","contact_id":"abc58129f"}]}}}},"400":{"description":"The document is not a draft or is already sealed, it has unresolved internal suggestions, its recipients do not fit its signing settings (for example signing without a signer), or `sender_id` or `sender_email` does not identify a user of the entity who may send documents.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Seal a document","tags":["Documents"]}},"/v1/documents/{id}/send":{"post":{"description":"When you send a document via GetAccept, an email with a unique, secured link is delivered to every recipient. Sending can only be performed on documents with status draft, and the document is sent to the recipients provided when it was created. A document created from a file has status `importing` until the file is processed, and sending it before then returns 400; poll get document status until it reports `draft`. If the document was created with the self-sign option it is also self-signed by the authenticated or specified user before sending.\n\nSending is asynchronous. The response is the document as it was when the send was accepted: status `draft`, or `processing` when `sender_id` or `sender_email` names another user, with `send_date` null. The document is sent once its PDF has been generated; poll get document status or subscribe to the `document.sent` event to know when.\n\nThe optional `User-Agent` and `CLIENT_IP` headers specify the client device information and IP address recorded for the send.","operationId":"sendDocument","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealDocumentBody"}}}},"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDetailsDto"},"example":{"id":"xy45za9","name":"The big proposal","external_id":"p_1552","value":8400,"type":"sales","tags":"","company_name":"GetAccept","company_id":"8nj6hvkn","company_logo_url":"","is_selfsign":false,"is_signing_biometric":false,"is_signing_initials":false,"is_private":false,"status":"draft","send_date":null,"sign_date":null,"updated_at":"2015-10-22T09:15:30+00:00","user_id":"p5wz2nkd","email_send_template_id":"d18nabcx","email_send_subject":"Sending you the proposal","email_send_message":"","is_signing":true,"is_signing_order":false,"is_video":false,"expiration_date":"2015-12-29T23:59:59+00:00","is_scheduled_sending":false,"scheduled_sending_time":null,"is_reminder_sending":true,"video_id":null,"thumb_url":"https://media.getaccept.com/preview/aw8nkenx/n24uxxwn.png","preview_url":"https://app.getaccept.com/v/a64uqvwn/x8gea49p/a/12f87050ec8f3d8a2e12b4569","app_url":"https://app.getaccept.com/document/view/a64uqvwn","recipients":[{"fullname":"Sam Tester","first_name":"Sam","last_name":"Tester","email":"sam.tester@example.com","mobile":"+46701740609","thumb_url":"","role":"signer","company_name":"GetAccept","company_number":"556677-8890","order_num":"1","note":"","title":"CEO","status":"added"}],"external_client_id":"","external_editor_type":"","external_editor_id":"","company_number":"556677-8890","unique_id":15243,"is_signing_forward":false,"is_identify_recipient":false,"created_at":"2015-10-19T09:16:53+00:00","download_url":"","sender_name":"John Doe","sender_thumb_url":"https://media.getaccept.com/thumb_url/x7yzabc.png","sender_email":"john.doe@example.com","parent_id":"","is_signed":false,"is_auto_comment":false,"auto_comment_text":"","is_auto_comment_email":false,"auto_comment_email":"","entity_auto_comment_text":"","entity_auto_comment_email":"","field_count":0,"contract_start_date":null,"contract_end_date":null,"settings":{"expirationDays":30,"blockRecipientInvite":false}}}}},"400":{"description":"The document is not a draft (for example it is still `importing`), it has unresolved internal suggestions or invalid signing groups, its recipients do not fit its signing settings (for example signing without a signer), an attachment with restricted access is not connected to any recipient, or `sender_id` or `sender_email` does not identify a user of the entity who may send documents.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"An unexpected error occurred. Include the trace_id when contacting support.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Send a document","tags":["Documents"]}},"/v1/documents/{id}/recipients/send":{"post":{"description":"After a document has been sealed you can release it to a chosen subset of its recipients, one batch at a time. Recipients not listed are left untouched. This method can only be performed on documents with status sealed, sent, reviewed, viewed or hardbounced, and cannot be used on documents that have signing order enabled. Sending to a sealed document sets the status to sent; later batches leave the document status unchanged. No `document.sent` webhook is posted for any batch, not even the first one that sets the status to sent.\n\nRecipient ids are returned by list document recipients. A recipient can only be sent to once, so ids belonging to recipients with status sent, viewed, reviewed, approved, signed, signedwithoutverification, rejected, skipped or notrequired are rejected. A recipient whose email hard bounced can be sent to again once the address has been corrected. If any id in the request is invalid the whole request is rejected.","operationId":"sendDocumentToRecipients","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendDocumentToRecipientsBody"}}}},"responses":{"204":{"description":"The request succeeded. The response has no body."},"400":{"description":"The request is invalid, for example a missing or malformed parameter or body field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Send document to recipients","tags":["Documents"]}},"/v1/documents/{id}/forward":{"post":{"description":"Forward a document to a new recipient. `email` or `mobile` is required.\n\nBy default the new recipient is added to the document as a CC recipient, and no signature rights move. To transfer the signature rights of a signer to the new recipient, set `transfer` to true and pass that signer's id as `recipient_id`. Rights cannot be transferred on a signed document or to a recipient who has already signed.","operationId":"forwardDocument","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForwardDocumentBody"}}}},"responses":{"204":{"description":"The request succeeded. The response has no body."},"400":{"description":"The request is invalid, for example a missing or malformed parameter or body field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Forward a document","tags":["Documents"]}},"/v1/documents/{id}/expiration":{"post":{"description":"Update the expiration date for a document.","operationId":"updateDocumentExpiration","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocumentExpirationBody"}}}},"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocumentExpirationResponse"},"example":{"status":1}}}},"400":{"description":"The request is invalid, for example a missing or malformed parameter or body field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"An unexpected error occurred. Include the trace_id when contacting support.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Update a document expiration","tags":["Documents"]}},"/v1/documents/{id}/manually-sign":{"post":{"description":"Mark a document as signed by uploading a previously signed document, or mark it as signed without verification. Only possible on documents that are not in draft, signed, or signed without verification status, and only for the document owner or an admin.","operationId":"manuallySignDocument","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManuallySignDocumentBody"}}}},"responses":{"200":{"description":"The request succeeded."},"400":{"description":"The request is invalid, for example a missing or malformed parameter or body field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The document does not exist or is not accessible to the authenticated entity, or `file_id` names no file uploaded to the entity. The document is left unchanged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Manually sign document","tags":["Documents"]}},"/v1/documents/{id}/lost":{"post":{"description":"Mark a document as lost. This sets the document status to lost and triggers the `document.lost` webhook event. Calling the endpoint on a document that is already lost has no effect and does not trigger the event again. No request body is required.","operationId":"markDocumentAsLost","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}}],"responses":{"204":{"description":"The request succeeded. The response has no body."},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Mark a document as lost","tags":["Documents"]}},"/v1/documents/{id}/revisions":{"post":{"description":"Publish the current content of a document as a new revision. The document must already have been sealed, or sent without signing. The PDF is regenerated from the content and sealed again in the background, and the request answers 204 as soon as the revision is created. Set `send_document` to true to send the document to its recipients once the new revision is sealed.\n\nOnly one revision can be processing at a time, and a document that a recipient has already signed or approved cannot be revised.","operationId":"createDocumentRevision","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocumentRevisionBody"}}}},"responses":{"204":{"description":"The request succeeded. The response has no body."},"400":{"description":"Another revision of the document is still processing, a recipient has already signed or approved the document, the document is a draft with unresolved internal suggestions, a draft document has signing groups that are not valid, a sent document has a colleague suggestion that is undecided or accepted but not applied, or `message` is not a string.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The document has not been sealed or sent yet, it does not meet the signing requirements (signing needs at least one signer, a document with an approver needs signers, and a signing order needs signing enabled), an attachment with restricted access is not connected to any recipient, or the access token does not grant access to the document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"An internal review of the document is pending or blocked, or the editor content has not changed since the last sealed revision, which is always the case for a document without editor content once it has a sealed revision. Resolve the review or change the content before creating a revision.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"An unexpected error occurred. Include the trace_id when contacting support.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Create a document revision","tags":["Documents"]}},"/v1/documents/{id}/versions":{"post":{"description":"A document that has been sent should not be edited in place. To change it, create a new version: a new document is created as a copy of the original, linked to it through `parent_id`, and optionally the original is recalled at the same time. The new version is created as a draft; send it with send document when it is ready.","operationId":"createNewDocumentVersion","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNewDocumentVersionBody"}}}},"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNewDocumentVersionResponseDto"},"example":{"id":"kp3rd8vn","parent_id":"7xa9bq2m"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"`recall_original` is true and the id is a template, which cannot be recalled. The new version has already been created when this is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Create a new version of a document","tags":["Documents"]}},"/v1/documents/{id}/recipients":{"get":{"description":"Get a list of recipients for a document.","operationId":"listDocumentRecipients","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRecipientsResponse"},"example":{"recipients":[{"id":"b7cd8ef3","fullname":"","first_name":"","last_name":"","email":"","role":"signer","status":"viewed","company_name":"The Test Company, Inc.","company_number":"55-664899","title":"CEO","role_name":"role name","note":"","mobile":"+46701740609","phone":"","thumb_url":"https://media.getaccept.com/contact/b3221e55cd0d1c7e6bdf45fa4aa0a259.png","order_num":"1","document_url":"https://app.getaccept.com/v/abc123/8asd72dd/a/xyz8asd98asd8hibhweaasd","contact_id":"abc58129f","signing_methods":[{"type":"eid","verified_name":"John Doe","verified_birthdate":"1976-05-02","signed_at":"2024-01-01T12:00:00.000Z"},{"type":"external_eid_signature","verified_name":"Jane Doe","verified_birthdate":"1982-11-14","signed_at":"2024-01-01T11:58:00.000Z"},{"type":"sms","verified_phone":"+46701740607","signed_at":"2024-01-01T11:55:00.000Z"},{"type":"initials","signed_at":"2024-01-01T12:01:00.000Z"}]}]}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"List document recipients","tags":["Documents"]}},"/v1/documents/{id}/recipients/{recipientId}":{"delete":{"description":"Recall a signer for a document by changing the role of the recipient to `cc`, so the recalled recipient can only view the document. A signer with status `signed` cannot be recalled. When every other signer has signed or no longer needs to sign, recalling the last one completes the document: it is signed and finalized as when the last signature is collected.","operationId":"deleteDocumentRecipient","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}},{"name":"recipientId","required":true,"in":"path","description":"Id of the recipient.","schema":{"type":"string"}}],"responses":{"204":{"description":"The request succeeded. The response has no body."},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The authenticated user has no access to the document, a recipient has rejected the document, or the recipient is the only signer of the document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The document does not exist, or it has no signer with this `recipientId` whose status is not `signed`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Recalling the signer would leave a signing group unable to reach its required number of signatures. Transfer the signing rights instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Recall a document signer","tags":["Documents"]}},"/v1/documents/{documentId}/fields":{"get":{"description":"Get a list of fields for a document or template. Can be used both before and after a document has been signed.","operationId":"getDocumentFields","parameters":[{"name":"documentId","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}},{"name":"resolveEditorFields","required":false,"in":"query","description":"Resolve editor fields to their values when they reference another field.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDocumentFieldsResponse"},"example":{"fields":[{"field_id":"uvx456yz","page_id":"abc123de","field_type":"text","field_label":"Speaker name","field_value":"Jane Doe","field_options":null,"is_collectable":false,"is_editable":false,"is_required":false,"recipient_id":"","recipient_name":"","company_name":"","company_number":"","role_name":"","field_top":214,"field_left":212,"field_width":216,"field_height":22,"validation_regex":"","validation_warning":""},{"field_id":"mno789pq","page_id":"abc123de","field_type":"merge","field_label":"Acme Inc.","field_value":"Customer company","field_options":null,"is_collectable":null,"is_editable":null,"is_required":null,"recipient_id":"abc123de","recipient_name":null,"company_name":null,"company_number":null,"role_name":null,"field_top":null,"field_left":null,"field_width":null,"field_height":null,"validation_regex":null,"validation_warning":null}],"editor_fields":[{"id":"Q8hTkW2_mNa5jdHi6B-pLx","type":"Markdown","category":null,"merge_key":null,"recipient_id":null,"user_id":null,"custom_name":null,"value":"{\"type\":\"doc\",\"content\":[{\"type\":\"paragraph\",\"content\":[{\"type\":\"text\",\"marks\":[{\"type\":\"bold\"}],\"text\":\"Delivery terms\"},{\"type\":\"text\",\"text\":\" apply from the signing date.\"}]}]}","markdown_formatting_options":["bold","italic"],"input_settings":{"type":"Text","required":true,"label":"Delivery terms","placeholder":"Describe the delivery terms","helpText":"Shown to the recipient under the field.","minChars":10,"maxChars":500,"regex":{"enabled":false,"pattern":"","description":""}}},{"id":"V1StGXR8_Z5jdHi6B-myT","type":"Input","recipient_id":"abc123de","user_id":null,"value":"My Email {{A2etGXR8_Z5jdHi6B-myT}}","input_settings":{"type":"Text","required":true,"label":"email","options":["optionA","optionB"],"min_value":"1","max_value":"3","help_text":null}}]}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get document fields","tags":["Documents"]}},"/v1/documents/{id}/fields":{"post":{"description":"Create a new field in a document. Either `page_id` or `page_num` has to be specified. Field position and size are in page units: every page is 900 units wide and its height follows the page aspect ratio.\n\nA successful request returns the id of the created field.","operationId":"createDocumentField","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocumentField"},"examples":{"textField":{"summary":"Text field filled in by a recipient","value":{"page_num":1,"field_type":"text","field_label":"Purchase order number","is_collectable":true,"is_required":true,"recipient_id":"r3c1p13n","field_top":520,"field_left":72,"field_width":180,"field_height":24}},"dropdownField":{"summary":"Dropdown field","value":{"page_num":2,"field_type":"dropdown","field_label":"Payment terms","field_options":["Net 30","Net 60"],"is_collectable":true,"recipient_id":"r3c1p13n","field_top":340,"field_left":72,"field_width":160,"field_height":24}}}}}},"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocumentFieldResponse"},"example":{"field_id":"ex4mp31"}}}},"400":{"description":"The request is invalid, for example a missing or malformed parameter or body field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Create a document field","tags":["Documents"]},"put":{"description":"Update fields in a document. Each field is identified by either `id` or `name`, and the two cannot be mixed in the same request. Fields can no longer be populated once a recipient has signed or approved the document.","operationId":"populateDocumentFields","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PopulateFields"}}}},"responses":{"204":{"description":"The request succeeded. The response has no body."},"400":{"description":"`editor_fields` is missing or not an array, a field has neither `id` nor `name`, `id` and `name` are mixed in one request, or the same `name` is sent more than once.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to the document, or a recipient has already signed or approved it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"An Input field value does not suit its input type, or a Text or Email Input field value contains a `{{field_id}}` reference that the current value of that field does not contain.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Populate document fields","tags":["Documents"]}},"/v1/documents/{documentId}/field_values":{"get":{"description":"Get the values of a document's fields, merged into a single object wrapped in an array. Each key is the field label, or `<field_type>_<field_top>_<field_left>` when the field has no label. Signature and initials fields are left out. Responds with `204 No Content` when the document has no fields other than signature and initials fields.","operationId":"getDocumentFieldValues","parameters":[{"name":"documentId","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"type":"array","minItems":1,"maxItems":1,"items":{"type":"object","description":"Values of the form fields placed on PDF pages, keyed by field label, or by `<field_type>_<field_top>_<field_left>` when the field has no label. Editor fields are not included. When two fields share a key, only one value is kept. A check field value is a number.","additionalProperties":{"oneOf":[{"type":"string"},{"type":"number"}]}}},"example":[{"Speaker name":"Jane Doe","Agreement start":"2026-10-03","text_320_180":"Filled in by the recipient"}]}}},"204":{"description":"The request succeeded. The response has no body."},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get document field values","tags":["Documents"]}},"/v1/documents/{id}/pricing-tables":{"get":{"description":"Get all pricing tables for a document.","operationId":"listDocumentPricingTables","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}},{"name":"exclude_media","required":false,"in":"query","description":"Leave the image URLs (`src_url`) out of the row images; image ids are always returned. Defaults to true. Any value other than 1, true, on or yes turns it off, for example false.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDocumentPricingTablesResponse"},"example":{"pricing_tables":[{"table_id":"table_id","parent_id":null,"external_id":"external_id","name":"name","display_name":"display_name","summary_settings":{"summary_enabled":true},"pre_calculated":false,"currency_settings":{"currency":"USD","locale":"en-US","price_unit_fraction_digits":2},"sections":[{"section_id":"section_id","name":"name","display_name":"display_name","section_summary_settings":{"summary_enabled":true},"columns":[{"column_id":"column_id_1","name":"name","display_name":"Name","enabled":true,"type":"text"},{"column_id":"column_id_2","name":"description","display_name":"Description","enabled":true,"type":"text"},{"column_id":"column_id_3","name":"price","display_name":"Price","enabled":true,"type":"number","unit":"currency"}],"rows":[{"row_id":"row_id","external_id":"external_row_id","optional_product_field_id":"optional_product_field_id","variable_quantity_field_id":"variable_quantity_field_id","discount_flat_fee":true,"tax_flat_fee":false,"discount_calculated_from":"price","values":[{"column_id":"column_id_1","value":"value_1","images":[{"image_id":"image_id_1"}]},{"column_id":"column_id_2","value":"value_2","images":[]},{"column_id":"column_id_3","value":"30","images":[]}]}],"show_discount_in_price_column":false,"display_mode":{"image_display_mode":null},"section_summary":{"extended_summaries":[]}}],"summary":{"base_subtotal":{"value":"99.9","enabled":true,"display_name":"Subtotal before tax"},"tax_breakdown":{"value":"14.3","enabled":true,"display_name":"Total tax for pricing groups","rates":[{"value":"0.1","enabled":true,"display_name":"Tax 1%"},{"value":"5.6","enabled":true,"display_name":"Tax 14%"},{"value":"8.6","enabled":true,"display_name":"Tax 18%"}]},"combined_subtotal":{"value":"114.2","enabled":true,"display_name":"Subtotal"},"discount":{"value":"10","enabled":true,"display_name":"Discount","flat_fee":true},"tax":{"value":"15","enabled":true,"display_name":"Tax","flat_fee":false}}}]}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"An unexpected error occurred. Include the trace_id when contacting support.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"List document pricing tables","tags":["Documents"]},"put":{"description":"Update pricing tables in a document. Prices containing a delimiter have to be separated by a period, for example 12.90. Only a document that no recipient has signed or approved can be updated. A document without editor content has no pricing tables to update, and the request still answers 204.","operationId":"updateDocumentPricingTables","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocumentPricingTablesBody"}}}},"responses":{"204":{"description":"The request succeeded. The response has no body."},"400":{"description":"The request is invalid, for example a missing or malformed parameter or body field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The document cannot be edited: its status is `signed`, `signedwithoutverification`, `lost`, `recalled` or `rejected`, or a recipient has already signed or approved it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The pricing tables cannot be applied: a cost value is null or uses a comma as decimal separator, the tables hold more than 100 image values, an image value names no image the user can access, a row sets `optional_product` or `variable_quantity` in a `pre_calculated` table, or the editor rejects the tables.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"An image value with a file extension names no uploaded file, or the pricing tables could not be applied for another reason.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Update document pricing tables","tags":["Documents"]}},"/v1/documents/{documentId}/pages":{"get":{"description":"Get a list of pages for a document. Can be used both before and after a document has been sent or signed.","operationId":"listDocumentPages","parameters":[{"name":"documentId","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDocumentPagesResponse"},"example":{"pages":[{"page_id":"p4ge001a","page_type":2,"page_width":595,"page_height":842,"page_num":1,"page_time":96.3,"order_num":0,"page_type_name":"document_page","thumb_url":"https://example-bucket.s3.eu-west-1.amazonaws.com/x7yzabc1/document/z3abdef1/thumb/small/p4ge001a.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=EXAMPLEKEYID%2F20240101%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20240101T000000Z&X-Amz-Expires=600&X-Amz-Signature=0123456789abcdef&X-Amz-SignedHeaders=host&x-id=GetObject","block_hash":0,"video_hash":0,"cropBoxW":595,"cropBoxH":842},{"page_id":"p4ge002b","page_type":5,"page_width":0,"page_height":0,"page_num":2,"page_time":456.4,"order_num":0,"page_type_name":"editor_block","thumb_url":"https://example-bucket.s3.eu-west-1.amazonaws.com/x7yzabc1/content/c0nt3nt1.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=EXAMPLEKEYID%2F20240101%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20240101T000000Z&X-Amz-Expires=300&X-Amz-Signature=0123456789abcdef&X-Amz-SignedHeaders=host&x-id=GetObject","block_hash":"r7kd2pqm","video_hash":0,"cropBoxW":0,"cropBoxH":0},{"page_id":"p4ge003c","page_type":4,"page_width":0,"page_height":0,"page_num":3,"page_time":31.2,"order_num":0,"view_duration_seconds":10.5,"video_hash":"q2vx8kd3","page_type_name":"video","title":"My video","thumb_url":"https://video.example.com/x7yzabc1/q2vx8kd3/intro_completed.0000000.png","block_hash":0,"cropBoxW":0,"cropBoxH":0},{"page_id":"p4ge004d","page_type":3,"clicks":2,"page_width":0,"page_height":0,"page_num":4,"page_time":12.8,"order_num":0,"page_type_name":"content_link_block","title":"My content link","description":"My content link description","thumb_url":"https://www.example.com/content-link-thumbnail.png","block_hash":"m3xq8vtb","video_hash":0,"cropBoxW":0,"cropBoxH":0}],"page_count":4}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"List document pages","tags":["Documents"]}},"/v1/documents/{documentId}/pages/tracking":{"get":{"description":"Get the time each recipient has spent on every page of a document, in seconds. The page level `page_time` is the total across all recipients, and `recipients` breaks it down per recipient. Pass the optional `recipient_id` query parameter to limit the recipients list to a single recipient.","operationId":"listDocumentPageTracking","parameters":[{"name":"documentId","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}},{"name":"recipient_id","required":false,"in":"query","description":"Limit the recipients breakdown of every page to a single recipient.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDocumentPageTrackingResponse"},"example":{"pages":[{"page_id":"a4bc5def2","page_num":1,"page_time":132,"recipients":[{"recipient_id":"b7cd8ef31","page_time":97},{"recipient_id":"c9de0fa42","page_time":35}]}],"page_count":1}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"List per-recipient page tracking","tags":["Documents"]}},"/v1/documents/{id}/attachments":{"get":{"description":"Get a list of attachments for a document or template. Can be used both before and after a document has been signed. To link to a specific attachment for a recipient, append `/attachment/{attachment_id}` to the recipient's unique document URL.","operationId":"getDocumentAttachments","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDocumentAttachmentResponse"},"example":{"attachments":[{"document_attachment_id":"abc123","attachment_id":"abc123","attachment_description":"","attachment_type":"external","attachment_title":"Terms","attachment_url":"https://www.getaccept.com/terms.html","attachment_extension":"home","attachment_filename":"","access_recipient_names":[],"restrict_access":false,"preview_url":"","last_attachment_view":"2022-10-28 08:00:41","require_view":false,"download_url":"https://www.getaccept.com/terms.html"},{"document_attachment_id":"ghi789","attachment_id":"def456","attachment_description":"","attachment_type":"file","attachment_title":"Form-Example","attachment_url":"","attachment_extension":"pdf","attachment_filename":"Form-Example.pdf","access_recipient_names":[],"restrict_access":false,"last_attachment_view":"2022-10-28 08:00:41","preview_url":"/view/a64uqvwn/x8gea49p/5d41402abc4b2a76b9719d911017c592/attachment/def456","require_view":false,"download_url":"https://example-bucket.s3.eu-west-1.amazonaws.com/xyz123/attachments/def456.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=EXAMPLEACCESSKEYID%2F20240101%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20240101T000000Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=13ab79bca5bfad9feaf1299756d10c38a492d6db16f39f67f250b5be2180691a"}]}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get document attachments","tags":["Documents"]}},"/v1/documents/{documentId}/attachments/{documentAttachmentId}/upload":{"post":{"description":"Upload a file for a specific attachment on a document. This can be used when an attachment is of type `file`. You upload one file at a time via a multipart POST, and the file is associated with the given document and attachment id.\n\nThis can be used on documents that are in draft or have been sent, as long as they have not yet been signed or approved. Attachments can have restricted access or require a view or click before the signing can proceed.","operationId":"uploadDocumentAttachment","parameters":[{"name":"documentId","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}},{"name":"documentAttachmentId","required":true,"in":"path","description":"Id of the attachment on the document.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"The file to upload as multipart/form-data."}}}}}},"responses":{"204":{"description":"The request succeeded. The response has no body."},"400":{"description":"The request is not `multipart/form-data` or has no `file` field, the file type is not allowed, the attachment is not of type `file`, or the document is not in a status that accepts uploads or has been signed or approved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"An unexpected error occurred. Include the trace_id when contacting support.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Upload a document attachment","tags":["Documents"]}},"/v1/documents/{id}/preview":{"post":{"description":"Generates a preview of an existing document or template. POST recipient and `custom_fields` data to populate merge fields, recipient fields and template content. The response is a hosted PDF document that expires after 10 minutes. This method is strictly for previewing and should not be used to generate the actual document.","operationId":"previewDocument","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentPreviewBody"}}}},"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentPreviewResponse"},"example":{"preview_url":"https://example-bucket.s3.eu-west-1.amazonaws.com/uploads/x7yzabc1/document-preview/1b4e28ba-2fa1-4d3b-9b5c-2c7e1f0a9d3e.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=EXAMPLEKEYID%2F20240101%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20240101T000000Z&X-Amz-Expires=600&X-Amz-Signature=0123456789abcdef&X-Amz-SignedHeaders=host&response-content-disposition=inline%3B%20filename%3D%22pr2hedqw.pdf%22&response-content-type=application%2Fpdf&x-id=GetObject"}}}},"204":{"description":"Preview generation failed"},"400":{"description":"The request is invalid, for example a missing or malformed parameter or body field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"408":{"description":"The request timed out before the operation completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"An unexpected error occurred. Include the trace_id when contacting support.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Generate a document preview","tags":["Documents"]}},"/v1/documents/{id}/download":{"get":{"description":"The document file can always be downloaded, but most likely you want to download it once it has status signed. Choose between receiving a download URL and receiving the binary file. The download URL of a signed document, or of a document past draft that uses a qualified electronic signature or an external eID, expires 1 hour after it is generated. For any other document it expires 5 minutes after it is generated.","operationId":"downloadDocument","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}},{"name":"direct","required":false,"in":"query","description":"Send `true` or `1` to return the binary file directly; any other value is ignored. Falls back to document_url for files larger than 100MB.","schema":{"type":"string"}},{"name":"with_file_content","required":false,"in":"query","description":"Send `true` or `1` to return the file content base64 encoded; any other value is ignored. Falls back to document_url for files larger than 100MB.","schema":{"type":"string"}}],"responses":{"200":{"description":"JSON with a download link or base64 content, or the binary PDF when a direct download is requested","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDownloadResponse"},"example":{"document_url":"https://ga-us-west-2.s3-us-west-2.amazonaws.com/x7yzabc/document/xy45za9/signed/xy45za9.pdf?Expires=1500000000","file":"https://ga-us-west-2.s3-us-west-2.amazonaws.com/x7yzabc/document/xy45za9/signed/xy45za9.pdf?Expires=1500000000"}},"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"408":{"description":"The request timed out before the operation completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"An unexpected error occurred. Include the trace_id when contacting support.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Download a document","tags":["Documents"]},"post":{"description":"Behaves exactly like the GET variant, for clients that cannot send the download flags as query parameters: `direct` and `with_file_content` are read from the request body instead. Choose between receiving a download URL and receiving the binary file. The download URL of a signed document, or of a document past draft that uses a qualified electronic signature or an external eID, expires 1 hour after it is generated. For any other document it expires 5 minutes after it is generated.","operationId":"downloadDocumentPost","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadDocumentBody"}}}},"responses":{"200":{"description":"JSON with a download link or base64 content, or the binary PDF when a direct download is requested","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDownloadResponse"},"example":{"document_url":"https://ga-us-west-2.s3-us-west-2.amazonaws.com/x7yzabc/document/xy45za9/signed/xy45za9.pdf?Expires=1500000000","file":"https://ga-us-west-2.s3-us-west-2.amazonaws.com/x7yzabc/document/xy45za9/signed/xy45za9.pdf?Expires=1500000000"}},"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"408":{"description":"The request timed out before the operation completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"An unexpected error occurred. Include the trace_id when contacting support.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Download a document via POST","tags":["Documents"]}},"/v1/documents/{documentId}/events":{"get":{"description":"Get a list of document events for a document. On a rejected event, `event_meta_data` is the reason the recipient gave when rejecting the document, or an empty string when no reason was given. A document with no events returns 204 with no body.","operationId":"getDocumentEvents","parameters":[{"name":"documentId","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentEventDto"}},"example":[{"first_name":"John","last_name":"Doe","email":"john@example.com","thumb_url":null,"company_name":"The Big Company","event_name":"viewed","document_name":"10 pages with video","document_status":"viewed","event_meta_data":"u6m43w","created_at":"2019-01-01T01:01:00+00:00","document_id":"a2bcrkgm"}]}}},"204":{"description":"The document has no events."},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get document events","tags":["Documents"]}},"/v1/documents/{documentId}/log":{"get":{"description":"Get a detailed log of events for a document. On a rejected row, `event_meta_data` is the reason the recipient gave when rejecting the document, or an empty string when no reason was given.","operationId":"getDocumentLogs","parameters":[{"name":"documentId","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentLogDto"}},"example":[{"first_name":"Jane","last_name":"Doe","email":"jane@example.com","event_name":"signed","event_meta_data":"desktop","geo_ip":"","geo_city":"","geo_country_name":"","created_at":"2019-01-01T01:02:03+00:00","document_id":"abc123"}]}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get document logs","tags":["Documents"]}},"/v1/documents/{documentId}/comments":{"get":{"description":"Get a list of chat comments for a document, with information about the sender of each comment.","operationId":"getDocumentComments","parameters":[{"name":"documentId","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentCommentDto"}},"example":[{"id":"a1b3cdef","self":1,"full_name":"Jane Doe","email":"jane@example.com","thumb_url":"https://media.getaccept.com/thumb_url/a1b3cdef.png","text":"Hi {{recipient.first_name}}. Feel free to reach out to me here if you have any questions.","created_at":"2019-01-01T01:02:03+00:00","depth":0,"position":""}]}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get document comments","tags":["Documents"]}},"/v1/documents/{id}/comments":{"post":{"description":"Creates a new comment in a document, sent from the authenticated user. Returns the id of the created comment.","operationId":"createDocumentComment","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocumentCommentBody"}}}},"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentCommentCreatedDto"},"example":{"comment_id":"ex4mp31"}}}},"400":{"description":"The request is invalid, for example a missing or malformed parameter or body field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Create a document comment","tags":["Documents"]}},"/v1/documents/{documentId}/reminders":{"get":{"description":"Returns the data needed to send a manual SMS reminder for a document, not a list of reminders already sent. POST to the same path to send one.","operationId":"getDocumentReminders","parameters":[{"name":"documentId","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentReminderDto"},"example":{"entity":{"sms_reminder_text":"Hi, a friendly reminder that a document is waiting for your signature."},"recipients":[{"first_name":"Sam","last_name":"Tester","fullname":"Sam Tester","mobile":"+46701740609"}]}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get document reminders","tags":["Documents"]},"post":{"description":"Send a manual reminder to the recipients of a sealed document. `type` is required and selects how the reminder is sent:\n\n- `email` sends a reminder email. `text` and `subject` are optional, and `recipient_ids`, `not_signed` and `not_opened` select the recipients.\n- `sms` sends `text` as an SMS to the recipients in `recipient_ids`, or to the recipients that have not signed when it is omitted. Without `text` nothing is sent.\n- `video` sends the video in `video_id`, which is required. `recipient_ids` and the filters are ignored.\n\nThe response is `{ \"status\": 1 }` when the reminder was accepted for sending and an empty array `[]` when nothing was sent. A document that is not sealed yet (status `draft`, `importing`, `processing` or `scheduled`) answers 400.","operationId":"createDocumentReminder","parameters":[{"name":"documentId","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocumentReminderBody"}}}},"responses":{"200":{"description":"The reminder was accepted for sending, or an empty array when nothing was sent.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CreateDocumentReminderResponse"},{"type":"array","maxItems":0,"items":{}}]},"example":{"status":1}}}},"400":{"description":"The document is not sealed yet, `type` is missing or invalid, a `video` reminder has no valid `video_id`, or `recipient_ids` is not a list of valid recipient ids.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Create a document reminder","tags":["Documents"]}},"/v1/documents/{documentId}/custom-data":{"get":{"description":"Get all custom data properties for a document.\n\nProperties inherited from the template when the document was created are included; properties added to the template afterwards do not appear on documents that already exist.","operationId":"listDocumentCustomDataProperties","parameters":[{"name":"documentId","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of properties to return, from 1 to 20. Defaults to 20.","schema":{"type":"number"}},{"name":"offset","required":false,"in":"query","description":"Number of properties to skip before the first returned one, 0 or more. Defaults to 0.","schema":{"type":"number"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDocumentCustomDataPropertiesResponse"},"example":{"custom_data":[{"id":"cde3hg1n","document_id":"a64uqvwn","property":{"key":"customPropertyKey","label":"Custom Property Label","translations":[{"language":"en","name":"Custom Property Label"}],"value":"Custom Property Value","value_type":"string"}},{"id":"8nj6hvkn","document_id":"a64uqvwn","property":{"key":"{{account.name}}","label":"Account Name","translations":[{"language":"en","name":"Account Name"}],"value":"GetAccept Inc.","value_type":"string"}}],"total_count":2}}}},"400":{"description":"`limit` is not a number from 1 to 20, or `offset` is not a number of 0 or more.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"List document custom data properties","tags":["Documents"]},"post":{"description":"Add a custom data property to a document. The property must already be defined in the entity custom data settings.\n\nCustom data properties capture information that the default document properties do not cover. A property added to a template is inherited by every document created from that template, and properties can be added to documents that are already signed.\n\nThe returned `label` is deprecated, use the `translations` array instead. Both `label` and `translations` are resolved from the entity custom data settings.","operationId":"createDocumentCustomDataProperty","parameters":[{"name":"documentId","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocumentCustomDataBody"}}}},"responses":{"201":{"description":"The resource was created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentCustomDataPropertyDto"},"example":{"id":"8nj6hvkn","document_id":"a64uqvwn","property":{"key":"{{account.name}}","label":"Account Name","translations":[{"language":"en","name":"Account Name"}],"value":"GetAccept Inc.","value_type":"string"}}}}},"400":{"description":"The body is invalid, the `key` is not defined in the entity custom data settings, or `value_type` does not match the type defined there.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The document already has a property with this `key`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Create a document custom data property","tags":["Documents"]}},"/v1/documents/{documentId}/custom-data/{customDataId}":{"get":{"description":"Get a specific custom data property for a document.","operationId":"getDocumentCustomDataProperty","parameters":[{"name":"documentId","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}},{"name":"customDataId","required":true,"in":"path","description":"Id of the custom data property.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentCustomDataPropertyDto"},"example":{"id":"cde3hg1n","document_id":"a64uqvwn","property":{"key":"customPropertyKey","label":"Custom Property Label","translations":[{"language":"en","name":"Custom Property Label"}],"value":"Custom Property Value","value_type":"string"}}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get a document custom data property","tags":["Documents"]},"put":{"description":"Update a custom data property for a document.","operationId":"updateDocumentCustomDataProperty","parameters":[{"name":"documentId","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}},{"name":"customDataId","required":true,"in":"path","description":"Id of the custom data property.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocumentCustomDataBody"}}}},"responses":{"204":{"description":"The request succeeded. The response has no body."},"400":{"description":"The request is invalid, for example a missing or malformed parameter or body field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Update a document custom data property","tags":["Documents"]},"delete":{"description":"Delete a custom data property from a document. The property is no longer available for the document. A `customDataId` that names no custom data property of the document also returns 204.","operationId":"deleteDocumentCustomDataProperty","parameters":[{"name":"documentId","required":true,"in":"path","description":"Id of the document.","schema":{"type":"string"}},{"name":"customDataId","required":true,"in":"path","description":"Id of the custom data property.","schema":{"type":"string"}}],"responses":{"204":{"description":"The request succeeded. The response has no body."},"400":{"description":"The request is invalid, for example a missing or malformed parameter or body field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Delete a document custom data property","tags":["Documents"]}},"/v1/comments/latest":{"get":{"description":"List the most recent comment on each document in the entity, newest first. By default only documents owned by the authenticated user are included; set `showall` to `true` to widen the list to the whole entity, which for users who are not an admin or manager is limited to their own documents when the entity has security restrictions enabled.\n\nEach entry carries the commenter's name, email and thumbnail, resolved from the document's recipients or from the entity's users. `offset` defaults to 0 and `limit` to 50; a negative `offset` or a `limit` of 0 or less returns an empty list.","operationId":"getLatestComments","parameters":[{"name":"showall","required":false,"in":"query","description":"Include the comments of every document in the entity.","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","description":"Start the list from record x until limit. Defaults to 0.","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of comments to return. Defaults to 50.","schema":{"type":"number"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LatestCommentDto"}},"example":[{"id":"c7kd2m9q","document_id":"xy45za9","document_name":"The big proposal","depth":0,"self":0,"full_name":"Sam Tester","email":"sam.tester@example.com","thumb_url":null,"text":"Could you add the extended warranty to the offer?","position":"","created_at":"2024-05-14T09:31:07+00:00"},{"id":"f3pw8n2h","document_id":"a2bcrkgm","document_name":"Service agreement 2024","depth":1,"self":1,"full_name":"John Doe","email":"john.doe@example.com","thumb_url":"https://media.getaccept.com/thumb/ab1cde9x.png","text":"Yes, the start date is the first of June.","position":"","created_at":"2024-05-13T14:02:45+00:00"}]}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"List the latest comment per document","tags":["Documents"]}},"/v1/tags":{"get":{"description":"Get every tag defined for the entity of the authenticated user. Responds with `204 No Content` when the entity has no tags.","operationId":"getTags","parameters":[],"responses":{"200":{"description":"List of tags","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagsResponse"},"example":{"tags":[{"id":"k2m9x7qd","title":"Enterprise","status":"active"},{"id":"p4n8w3zt","title":"Renewal","status":"active"},{"id":"r7c2v5hb","title":"Q3 campaign","status":"inactive"}]}}}},"204":{"description":"When no tags found"},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get tags","tags":["Documents"]}},"/v1/document-types":{"get":{"description":"Get every document type, also called contract type, configured for the entity of the authenticated user, active and inactive. Pass an active type's `type` when you create a document. Responds with `204 No Content` when the entity has no configured document types.","operationId":"getDocumentTypes","parameters":[],"responses":{"200":{"description":"List of document types","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTypesResponse"},"example":{"document_types":[{"type":"sales","status":"active","translations":[{"language":"en","name":"Sales"},{"language":"sv","name":"Försäljning"}]},{"type":"nda","status":"active","translations":[{"language":"en","name":"NDA","description":"Mutual non-disclosure agreement"}]},{"type":"partner-agreement","status":"inactive","translations":[{"language":"en","name":"Partner agreement"}]}]}}}},"204":{"description":"When no document types are configured"},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get document types","tags":["Documents"]}},"/v1/templates":{"get":{"description":"Receive a list of available document templates. You can add new templates under Templates in GetAccept. Without a `folder_id` the templates in the root folder are returned, unless `showall` is true; `folder_id` takes precedence over `showall`. Up to 1000 templates are returned, and private templates owned by other users are excluded.\n\nThe `communication_template_id` field is only included when `with_communication_template=true` is set, and is omitted for templates with no linked communication template.\n\nThe `name_template` field is only included when the template has a contract name configured. It is the raw template and may contain the merge tags `{{entity.company_name}}`, `{{document.company_name}}`, `{{document.id}}`, `{{document.unique_id}}` and `{{date}}`. When you pass it as `name` to Create a document, `{{document.company_name}}` is replaced with the top-level `company_name` you send, `{{document.id}}` with the new document id and `{{document.unique_id}}` with its unique ID, or removed when the company has no unique ID counter; replace the remaining tags yourself before sending.","operationId":"getTemplates","parameters":[{"name":"folder_id","required":false,"in":"query","description":"Get the templates of a specific folder. Takes precedence over showall; without either, the templates in the root folder are returned.","schema":{"type":"string"}},{"name":"showall","required":false,"in":"query","description":"Get all templates, in every folder: true or false.","schema":{"type":"string"}},{"name":"with_communication_template","required":false,"in":"query","description":"Include the linked communication template id for each template in the response. Templates without a linked communication template omit the field. Values: true or false.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTemplatesResponse"},"example":{"templates":[{"id":"ab1c23de","name":"Sales proposal w/o products","type":"template","external_editor_type":"","is_private":false,"is_editable":true,"page_count":3,"field_count":8,"role_count":2,"thumb_url":"https://ga-us-west-2.s3.us-west-2.amazonaws.com/aa88bb5c/document/ab1c23de/thumb/small/k3n8q2zx.png?X-Amz-Expires=600","sender_name":"Jane Doe","sender_thumb_url":"https://media.getaccept.com/thumb/ab1cde9x.png","tags":"","video_id":"","video_thumb_url":"","user_id":"32abc9d","created_at":"2017-01-01 00:00:00","communication_template_id":"xy45za67","name_template":"Proposal for {{document.company_name}}"}]}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"List templates","tags":["Templates"]}},"/v1/templates/{templateId}":{"get":{"description":"Get template details by specifying a template id in the request URL. The response holds the same properties as Get a document, without the `recipients` list and without the `pages`, `page_count`, `stats`, `attachments` and `rejection_reason` that Get a document can include.","operationId":"getTemplate","parameters":[{"name":"templateId","required":true,"in":"path","description":"Id of the template.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateDetailsDto"},"example":{"id":"ab1c23de","name":"Sales proposal w/o products","value":0,"type":"template","tags":"","thumb_url":"https://media.getaccept.com/preview/8nj6hvkn/ab1c23de.png","external_id":"","external_client_id":"","external_editor_type":"","external_editor_id":"","company_name":"","company_number":"","company_id":"","company_logo_url":"","unique_id":0,"is_selfsign":false,"is_signing_biometric":false,"is_signing_initials":false,"is_signing_forward":true,"is_identify_recipient":false,"is_private":false,"status":"draft","send_date":null,"sign_date":null,"created_at":"2017-01-01T00:00:00+00:00","updated_at":"2017-03-14T10:22:05+00:00","download_url":"https://ga-us-west-2.s3-us-west-2.amazonaws.com/8nj6hvkn/original/ab1c23de.pdf?Expires=1500000000","app_url":"https://app.getaccept.com/document/view/ab1c23de","user_id":"32abc9d","sender_name":"Jane Doe","sender_thumb_url":"https://media.getaccept.com/thumb/ab1cde9x.png","sender_email":"jane.doe@example.com","email_send_template_id":"0","parent_id":"","email_send_subject":"","email_send_message":"","is_signing":false,"is_signing_order":false,"is_signed":false,"expiration_date":null,"is_scheduled_sending":false,"scheduled_sending_time":null,"is_reminder_sending":true,"is_video":false,"video_id":null,"is_auto_comment":false,"auto_comment_text":"","is_auto_comment_email":false,"auto_comment_email":"","entity_auto_comment_text":"","entity_auto_comment_email":"","field_count":8,"contract_start_date":null,"contract_end_date":null,"settings":{"nameTemplate":"Proposal for {{document.company_name}}"},"name_template":"Proposal for {{document.company_name}}","preview_url":"https://app.getaccept.com/v/ab1c23de/k3n8q2zx/a/5f4dcc3b5aa765d61d8327deb882cf99"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get template","tags":["Templates"]}},"/v1/templates/{templateId}/roles":{"get":{"description":"Receive a list of roles for a specific template.","operationId":"getTemplateRoles","parameters":[{"name":"templateId","required":true,"in":"path","description":"Id of the template.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTemplateRolesResponse"},"example":{"roles":[{"role_id":"ab1c23de","role":"signer","role_name":"Customer Signer","first_name":"Jane","last_name":"Doe","email":"jane.doe@example.com","mobile":"+46701740607","verify_eid":false,"verify_sms_sign":false,"verify_sms_open":true,"order_num":1}]}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get template roles","tags":["Templates"]}},"/v1/templates/{templateId}/fields":{"get":{"description":"Get a list of fields for a template. `fields` holds the fields placed on the template pages, plus each custom editor field mapped to its page with `field_type` merge; `editor_fields` holds the merge, custom, input and markdown fields of editor based templates, with their input settings.","operationId":"getTemplateFields","parameters":[{"name":"templateId","required":true,"in":"path","description":"Id of the template.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTemplateFieldsResponse"},"example":{"fields":[{"field_id":"uvx456yz","page_id":"abc123de","field_type":"text","field_label":"Speaker name","field_value":"Jane Doe","field_options":null,"is_collectable":false,"is_editable":false,"is_required":false,"recipient_id":"ab1c23de","recipient_name":"Jane Doe","company_name":"GetAccept","company_number":"55-664899","role_name":"Customer Signer","field_top":214,"field_left":212,"field_width":216,"field_height":22,"validation_regex":"","validation_warning":""},{"field_id":"rst234uv","page_id":"abc123de","field_type":"dropdown","field_label":"Package size","field_value":"Medium","field_options":[{"value":"Small"},{"value":"Medium"},{"value":"Large"}],"is_collectable":true,"is_editable":true,"is_required":true,"recipient_id":"ab1c23de","recipient_name":"Jane Doe","company_name":"GetAccept","company_number":"55-664899","role_name":"Customer Signer","field_top":320,"field_left":212,"field_width":180,"field_height":22,"validation_regex":"","validation_warning":""},{"field_id":"mno789pq","page_id":"abc123de","field_type":"merge","field_label":"Customer company","field_value":null,"field_options":null,"is_collectable":null,"is_editable":null,"is_required":null,"recipient_id":"ab1c23de","recipient_name":null,"company_name":null,"company_number":null,"role_name":null,"field_top":null,"field_left":null,"field_width":null,"field_height":null,"validation_regex":null,"validation_warning":null}],"editor_fields":[{"id":"Q8hTkW2_mNa5jdHi6B-pLx","type":"Markdown","category":null,"merge_key":null,"recipient_id":null,"user_id":null,"custom_name":null,"value":"{\"type\":\"doc\",\"content\":[{\"type\":\"paragraph\",\"content\":[{\"type\":\"text\",\"marks\":[{\"type\":\"bold\"}],\"text\":\"Delivery terms\"},{\"type\":\"text\",\"text\":\" apply from the signing date.\"}]}]}","markdown_formatting_options":null,"input_settings":null},{"id":"V1StGXR8_Z5jdHi6B-myT","type":"Input","recipient_id":"ab1c23de","value":"My Email {{A2etGXR8_Z5jdHi6B-myT}}","input_settings":{"type":"Text","required":true,"label":"email","options":["optionA","optionB"],"min_value":"1","max_value":"3"}}]}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get template fields","tags":["Templates"]}},"/v1/templates/{templateId}/fields_roles":{"get":{"description":"Receive a list of fields and the associated role for a specific template.","operationId":"getTemplateFieldsRoles","parameters":[{"name":"templateId","required":true,"in":"path","description":"Id of the template.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTemplateFieldsRolesResponse"},"example":{"roles":[{"role_id":"ab1c23de","role":"signer","role_name":"Customer Signer","first_name":"Jane","last_name":"Doe","email":"jane.doe@example.com","mobile":"+46701740607","verify_eid":false,"verify_sms_sign":false,"verify_sms_open":true,"order_num":1}],"fields":[{"field_id":"uvx456yz","page_id":"abc123de","field_type":"text","field_label":"Speaker name","field_value":"Jane Doe","field_options":null,"is_collectable":false,"is_editable":false,"is_required":false,"recipient_id":"ab1c23de","recipient_name":"Jane Doe","company_name":"GetAccept","company_number":"55-664899","role_name":"Customer Signer","field_top":214,"field_left":212,"field_width":216,"field_height":22,"validation_regex":"","validation_warning":""},{"field_id":"rst234uv","page_id":"abc123de","field_type":"dropdown","field_label":"Package size","field_value":"Medium","field_options":[{"value":"Small"},{"value":"Medium"},{"value":"Large"}],"is_collectable":true,"is_editable":true,"is_required":true,"recipient_id":"ab1c23de","recipient_name":"Jane Doe","company_name":"GetAccept","company_number":"55-664899","role_name":"Customer Signer","field_top":320,"field_left":212,"field_width":180,"field_height":22,"validation_regex":"","validation_warning":""}]}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get template fields and roles","tags":["Templates"]}},"/v1/templates/{templateId}/pricing-tables":{"get":{"description":"Get all pricing tables for a template. The table structure is returned without its rows.","operationId":"getTemplatePricingTables","parameters":[{"name":"templateId","required":true,"in":"path","description":"Id of the template.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTemplatePricingTablesResponse"},"example":{"pricing_tables":[{"table_id":"table_id","external_id":"external_id","name":"name","display_name":"display_name","summary_settings":{"summary_enabled":true},"pre_calculated":false,"currency_settings":{"currency":"USD","locale":"en-US","price_unit_fraction_digits":2},"sections":[{"section_id":"section_id","name":"name","display_name":"display_name","show_discount_in_price_column":false,"display_mode":{"image_display_mode":null},"section_summary_settings":{"summary_enabled":true},"section_summary":{"extended_summaries":[{"column_id":"column_id_3","display_name":"Price summary","enabled":true,"name":"price","unit":"currency","value":"30"}]},"columns":[{"column_id":"column_id_1","name":"name","display_name":"Name","enabled":true,"type":"text","unit":null},{"column_id":"column_id_2","name":"description","display_name":"Description","enabled":true,"type":"text","unit":null},{"column_id":"column_id_3","name":"price","display_name":"Price","enabled":true,"type":"number","unit":"currency"}]}],"parent_id":null}]}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get template pricing tables","tags":["Templates"]}},"/v1/templates/{templateId}/custom-images":{"get":{"description":"Get a list of custom images on a template.","operationId":"getTemplateCustomImages","parameters":[{"name":"templateId","required":true,"in":"path","description":"Id of the template.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTemplateCustomImagesResponse"},"example":{"custom_images":[{"id":"V1StGXR8_Z5jdHi6B-myT","name":"My custom image"}]}}}},"400":{"description":"The request is invalid, for example a missing or malformed parameter or body field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get template custom images","tags":["Templates"]}},"/v1/templates/{templateId}/editor":{"post":{"description":"Get a link for editing a template that is backed by a Google Docs file. `external_editor` is required in the request body. Pass `external_editor_id` to get a link to an already created Google Drive file; without it a copy of the template file is created in Google Drive and the link to the copy is returned. Templates that are not backed by a Google Docs file return no content.","operationId":"getTemplateEditor","parameters":[{"name":"templateId","required":true,"in":"path","description":"Id of the template.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTemplateEditorBody"}}}},"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTemplateEditorResponse"},"example":{"external_editor_type":"docs","external_editor_id":"1aBcD2eFgH3iJkL4mNoP5qRsT6uVwX7yZ8aBcD9eFgH0","editor_url":"https://docs.google.com/document/d/1aBcD2eFgH3iJkL4mNoP5qRsT6uVwX7yZ8aBcD9eFgH0/edit?usp=drivesdk"}}}},"204":{"description":"The request succeeded. The response has no body."},"400":{"description":"The request is invalid, for example a missing or malformed parameter or body field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get an editable Google Drive template","tags":["Templates"]}},"/v1/upload":{"post":{"description":"Upload a file either with a URL, base64 encoded, or with a multipart POST. You upload one file at a time and get a file id in return, which is then used to add the file to a GetAccept document. To upload several files, make several requests. We only accept documents with a total file size of 20 MB.\n\nThe uploaded file expires after 48 hours, so add it to a GetAccept document before the expiry time. The file is deleted once you add it to a document, so to use the same file for several documents you have to upload it again.\n\nWe recommend uploading PDF files to guarantee the same look when sent. Other file types can be converted, such as:\n\n- Microsoft Office: `doc`, `docx`, `xl`, `xls`, `xlsx`, `ppt`, `pptx`\n- Mac: `numbers`, `key`\n- Images: `jpg`, `jpeg`, `png`\n- Other: `html`, `tex`, `csv`","operationId":"uploadFile","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/UploadBody"},{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}]}},"application/x-www-form-urlencoded":{"schema":{"allOf":[{"$ref":"#/components/schemas/UploadBody"},{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}]}},"multipart/form-data":{"schema":{"allOf":[{"$ref":"#/components/schemas/UploadBody"},{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}]}}}},"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadResponse"},"example":{"file_id":"pvmhqx9n.pdf","file_status":"file.uploaded"}}}},"400":{"description":"The request is invalid, for example a missing or malformed parameter or body field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Upload a file","tags":["Uploads"]}},"/v1/upload/attachment":{"post":{"description":"Upload an attachment file to include with the documents you send. An uploaded attachment can be reused in many documents, and attachments can have restricted access or require a view or click before the recipient proceeds with the signing.\n\nUse the returned `id` to assign the attachment to a document.","operationId":"uploadAttachmentFile","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/UploadAttachmentBody"},{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}]}},"application/x-www-form-urlencoded":{"schema":{"allOf":[{"$ref":"#/components/schemas/UploadAttachmentBody"},{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}]}},"multipart/form-data":{"schema":{"allOf":[{"$ref":"#/components/schemas/UploadAttachmentBody"},{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}]}}}},"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadAttachmentResponse"},"example":{"status":1,"id":"pvmhqx9n","file_id":"3f9c1ab77de42","filename":"toc2018.pdf","extension":"pdf","type":"file"}}}},"400":{"description":"The request is invalid, for example a missing or malformed parameter or body field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Upload an attachment file","tags":["Uploads"]}},"/v1/upload/video":{"post":{"description":"Upload one video at a time and get a video id back. The video id is used to connect a video with a document or template. We accept files up to 120 MB and recommend compressing videos before uploading to save bandwidth. All uploaded videos are automatically downsized to 720p and compressed using the mpeg4 H.264 codec. We recommend uploading the video file as a `multipart/form-data` post to minimize transfer time.\n\nUse `video_id` to assign the video to a document, template or reminder, and `job_id` to poll Retrieve video job status.\n\nA video can be used as an introduction to a document, or sent as a video reminder.","operationId":"uploadVideo","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/UploadVideoBody"},{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}]}},"application/x-www-form-urlencoded":{"schema":{"allOf":[{"$ref":"#/components/schemas/UploadVideoBody"},{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}]}},"multipart/form-data":{"schema":{"allOf":[{"$ref":"#/components/schemas/UploadVideoBody"},{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}]}}}},"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadVideoResponse"},"example":{"status":1,"id":"pvmhqx9n","file_id":"3f9c1ab77de42","filename":"mobileupload.mp4","job_id":"pvmhqx9n","video_id":"pvmhqx9n","file_status":"file.uploaded"}}}},"400":{"description":"The request is invalid, for example a missing or malformed parameter or body field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Upload a video for conversion","tags":["Uploads"]}},"/v1/upload/archive":{"post":{"description":"Upload an already signed file to the document archive / contract management to make it searchable and to use it in your contract management process.\n\nUse either `file_ids` to reference a file from Upload a file, `file_content` to send the document as a base64 encoded string, or a multipart post with the `file` parameter. Only one file source can be provided per request.\n\nA successful request returns the archived document details in `document`, as in Get a document but without `recipients`, together with `entity`.","operationId":"uploadArchive","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/UploadArchiveBody"},{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}]}},"application/x-www-form-urlencoded":{"schema":{"allOf":[{"$ref":"#/components/schemas/UploadArchiveBody"},{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}]}},"multipart/form-data":{"schema":{"allOf":[{"$ref":"#/components/schemas/UploadArchiveBody"},{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}]}}}},"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadArchiveResponse"},"example":{"document":{"id":"xy45za9","name":"The big proposal","external_id":"","value":8400,"type":"sales","tags":"","company_name":"GetAccept","company_id":"8nj6hvkn","company_logo_url":"","is_selfsign":false,"is_signing_biometric":false,"is_signing_initials":false,"is_private":false,"status":"draft","send_date":null,"sign_date":"2015-10-21T14:42:00+00:00","updated_at":"2015-10-22T09:15:30+00:00","user_id":"p5wz2nkd","email_send_template_id":"d18nabcx","email_send_subject":"","email_send_message":"","is_signing":true,"is_signing_order":false,"is_video":false,"expiration_date":"2015-12-29T23:59:59+00:00","is_scheduled_sending":false,"scheduled_sending_time":null,"is_reminder_sending":true,"video_id":null,"thumb_url":"https://media.getaccept.com/preview/aw8nkenx/n24uxxwn.png","preview_url":"https://app.getaccept.com/v/a64uqvwn/x8gea49p/a/12f87050ec8f3d8a2e12b4569","app_url":"https://app.getaccept.com/document/view/a64uqvwn","external_client_id":"","external_editor_type":"","external_editor_id":"","company_number":"556677-8890","unique_id":15243,"is_signing_forward":false,"is_identify_recipient":false,"created_at":"2015-10-19T09:16:53+00:00","download_url":"","sender_name":"John Doe","sender_thumb_url":"https://media.getaccept.com/thumb_url/x7yzabc.png","sender_email":"john.doe@example.com","parent_id":"","is_signed":true,"is_auto_comment":false,"auto_comment_text":"","is_auto_comment_email":false,"auto_comment_email":"","entity_auto_comment_text":"","entity_auto_comment_email":"","field_count":0,"contract_start_date":null,"contract_end_date":null,"settings":{"expirationDays":30,"blockRecipientInvite":false}},"entity":{"email_send_subject":"A document from GetAccept","email_send_message":"Hi, please review the attached document.","sub_domain":"getaccept","custom_domain":"docs.getaccept.com"}}}}},"400":{"description":"The request is invalid, for example a missing or malformed parameter or body field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Upload and archive a document","tags":["Uploads"]}},"/v1/attachments":{"get":{"description":"This call will return a list of attachments on the entity.\n\nAttachments can be added to a document when you create a document, either by passing the attachment information or the `attachment_id` from this list as the `id` of an entry in `attachments`. Upload an attachment file once and reuse it in many documents. Attachments can have restricted access or require a view or click before the recipient can proceed with the signing.\n\n`editable` is `true` for the attachments uploaded by the authenticated user.","operationId":"listAttachments","parameters":[],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAttachmentResponse"},"example":{"attachments":[{"attachment_id":"32abc9d","attachment_description":"Our standard terms and conditions","attachment_type":"file","attachment_title":"Terms and conditions","attachment_url":"","attachment_extension":"pdf","attachment_size":84213,"published":true,"library":true,"access_recipient_list":"","editable":true,"restrict_access":false,"require_view":false},{"attachment_id":"cab88d3","attachment_description":"","attachment_type":"external","attachment_title":"Google","attachment_url":"https://www.google.com","attachment_extension":"","attachment_size":0,"published":true,"library":false,"access_recipient_list":"","editable":false,"restrict_access":false,"require_view":false}]}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"List attachments","tags":["Uploads"]}},"/v1/subscriptions":{"get":{"description":"Return the subscriptions visible to the authenticated user: their own and the entity's global ones. `status` is 1 for active and -1 for disabled. The list can be narrowed with the `id`, `event` and `host` query parameters.","operationId":"getSubscriptions","parameters":[{"name":"id","required":false,"in":"query","description":"Return only the subscription with this id.","schema":{"type":"string"}},{"name":"event","required":false,"in":"query","description":"Return only the subscriptions for this event.","schema":{"$ref":"#/components/schemas/EventSubscriptionEvent"}},{"name":"host","required":false,"in":"query","description":"Return only the subscriptions whose `host` label is exactly this value.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionResponse"}},"example":[{"id":"y3p4mhqn","subscription_id":"y3p4mhqn","status":1,"event":"document.signed","host":"example.com","target_url":"https://webhooks.example.com/getaccept/signed","payload":"action=dosomething","global":false,"notification_email":"","created_at":"2019-05-05 17:53:53"},{"id":"8nj6hvkn","subscription_id":"8nj6hvkn","status":1,"event":"document.sent","host":"example.com","target_url":"https://hooks.example.com/getaccept","payload":"","global":true,"notification_email":"jane.doe@example.com","created_at":"2019-05-06 09:12:41"}]}}},"400":{"description":"`id` is not a valid subscription id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Retrieve event subscriptions for the authenticated user","tags":["Subscriptions"]},"post":{"description":"Create a new subscription. The response is wrapped in an array even for a single object, according to REST hook standards, and is the same result as Retrieve an event subscription for the authenticated user. Only admin users may create a global subscription; for other users `global` set to true answers 403.\n\nMultiple subscriptions can be posted as an array in one request. The items are handled in order and the request is not atomic: when an item fails, the items before it stay created and only the error is returned. An item with a `target_url` and no `event` is handled as the delete described below and ends the request with an empty body, so the items after it are not processed.\n\nPosting a body that carries a `target_url` and no `event` deletes the global subscription with that `target_url` instead of creating one, and answers with an empty body. Only admin users may delete a global subscription, and an unmatched `target_url` returns 400.\n\nEvents are POSTed to `target_url` and must be answered with a 2xx response. Anything else counts as a failure and the event is retried up to three times: 60 minutes, 12 hours and 24 hours after the previous attempt. An email notification is sent to the sender, or to `notification_email`, when the second attempt fails, and the webhook is disabled when the fourth attempt fails. Respond within 15 seconds; a slower response can time out and count as a failure. A 410 Gone response disables the subscription immediately. Some targets and events are exceptions, such as a `force.com` target that is not retried: see Failures and retries in the webhook guide.","operationId":"createSubscription","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CreateSubscriptionBody"},{"type":"array","items":{"$ref":"#/components/schemas/CreateSubscriptionBody"}}]},"examples":{"single":{"summary":"One subscription","value":{"event":"document.signed","target_url":"https://hooks.example.com/getaccept","notification_email":"webhooks@example.com"}},"multiple":{"summary":"Several subscriptions in one request","value":[{"event":"document.signed","target_url":"https://hooks.example.com/getaccept"},{"event":"document.viewed","target_url":"https://hooks.example.com/getaccept","global":true}]}}}}},"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionResponse"}},"example":[{"id":"y3p4mhqn","subscription_id":"y3p4mhqn","status":1,"event":"document.signed","host":"example.com","target_url":"https://webhooks.example.com/getaccept/signed","payload":"action=dosomething","global":false,"notification_email":"","created_at":"2019-05-05 17:53:53"}]}}},"400":{"description":"`target_url` is missing or fails validation, `event` is not a valid event, a subscription with the same `event` and `target_url` already exists (a duplicate returns 400, not 409), or a body without `event` names a `target_url` that no global subscription uses.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Create one or more event subscriptions","tags":["Subscriptions"]}},"/v1/subscriptions/{id}":{"get":{"description":"Return details of a single subscription. The response is wrapped in an array even for a single subscription. An id that names no subscription visible to the authenticated user returns 200 with an empty array.","operationId":"getSubscription","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the event subscription.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionResponse"}},"example":[{"id":"y3p4mhqn","subscription_id":"y3p4mhqn","status":1,"event":"document.signed","host":"example.com","target_url":"https://webhooks.example.com/getaccept/signed","payload":"action=dosomething","global":false,"notification_email":"","created_at":"2019-05-05 17:53:53"}]}}},"400":{"description":"The id is not a valid subscription id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Retrieve an event subscription for the authenticated user","tags":["Subscriptions"]},"put":{"description":"Update an existing subscription. Both `event` and `target_url` are required, and `target_url` is validated before the subscription is saved. Only admin users may update a global subscription.\n\nThe subscription is replaced, not patched. An omitted `global` makes it a personal subscription of the caller, so an admin must send `global: true` to keep a global subscription global. An omitted `host` is derived from `target_url`, an omitted `payload` or `notification_email` is cleared, and the subscription is set back to active.","operationId":"updateSubscription","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the event subscription.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriptionBody"}}}},"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionResponse"}},"example":[{"id":"y3p4mhqn","subscription_id":"y3p4mhqn","status":1,"event":"document.signed","host":"example.com","target_url":"https://webhooks.example.com/getaccept/signed","payload":"action=dosomething","global":false,"notification_email":"","created_at":"2019-05-05 17:53:53"}]}}},"400":{"description":"`event` or `target_url` is missing, `event` is not a valid event, `target_url` fails validation, the id is not a valid subscription id, another subscription already has the same `event` and `target_url` (a duplicate returns 400, not 409), or the id names no subscription (an unknown id returns 400 with the message `Subscription Id could not be found`, not 404).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Replace an event subscription","tags":["Subscriptions"]},"patch":{"description":"Update an existing subscription. This route runs the same handling as `PUT /v1/subscriptions/{id}` and is not a partial update: `event` and `target_url` are required here too. Only admin users may update a global subscription.\n\nThe subscription is replaced, not patched. An omitted `global` makes it a personal subscription of the caller, so an admin must send `global: true` to keep a global subscription global. An omitted `host` is derived from `target_url`, an omitted `payload` or `notification_email` is cleared, and the subscription is set back to active.","operationId":"patchSubscription","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the event subscription.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriptionBody"}}}},"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionResponse"}},"example":[{"id":"y3p4mhqn","subscription_id":"y3p4mhqn","status":1,"event":"document.signed","host":"example.com","target_url":"https://webhooks.example.com/getaccept/signed","payload":"action=dosomething","global":false,"notification_email":"","created_at":"2019-05-05 17:53:53"}]}}},"400":{"description":"`event` or `target_url` is missing, `event` is not a valid event, `target_url` fails validation, the id is not a valid subscription id, another subscription already has the same `event` and `target_url` (a duplicate returns 400, not 409), or the id names no subscription (an unknown id returns 400 with the message `Subscription Id could not be found`, not 404).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Replace an event subscription with PATCH","tags":["Subscriptions"]},"delete":{"description":"Delete a single subscription. Only admin users may delete a global subscription.","operationId":"deleteSubscription","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the event subscription.","schema":{"type":"string"}}],"responses":{"204":{"description":"The request succeeded. The response has no body."},"400":{"description":"The id is not a valid subscription id, or it names no subscription visible to the authenticated user. An unknown id returns 400 with the message `Subscription Id could not be found`, not 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Delete an event subscription for the authenticated user","tags":["Subscriptions"]}},"/v1/subscriptions/events":{"get":{"description":"Retrieve every `document.*` event that can be subscribed to. Each entry carries the `value` to pass as `event` when creating a subscription and a human-readable `name`. The `comment.*` events are also valid `event` values but are not listed here.","operationId":"getSubscriptionEvents","parameters":[],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionEventResponse"}},"example":[{"value":"document.created","name":"Created"},{"value":"document.sent","name":"Sent"},{"value":"document.viewed","name":"Viewed"},{"value":"document.reviewed","name":"Reviewed"},{"value":"document.opened","name":"Opened"},{"value":"document.signed","name":"Signed"},{"value":"document.approved","name":"Approved"},{"value":"document.expired","name":"Expired"},{"value":"document.rejected","name":"Rejected"},{"value":"document.partially_rejected","name":"Partially rejected"},{"value":"document.downloaded","name":"Downloaded"},{"value":"document.printed","name":"Printed"},{"value":"document.forwarded","name":"Forwarded"},{"value":"document.partially_signed","name":"Partially signed"},{"value":"document.recalled","name":"Recalled"},{"value":"document.lost","name":"Lost"},{"value":"document.page_tracked","name":"Page tracked"},{"value":"document.commented","name":"Commented"},{"value":"document.hardbounced","name":"Hard-bounced"}]}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Retrieve available subscription events","tags":["Subscriptions"]}},"/v1/subscriptions/events/{event}":{"post":{"description":"Alias of `POST /v1/subscriptions` kept for callers that address the event in the path. The `event` path parameter is not read: the event is taken from the request body, and the body is handled exactly as it is on `POST /v1/subscriptions`.","operationId":"createSubscriptionByEventPath","parameters":[{"name":"event","required":true,"in":"path","description":"Event the subscription listens to.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CreateSubscriptionBody"},{"type":"array","items":{"$ref":"#/components/schemas/CreateSubscriptionBody"}}]},"examples":{"single":{"summary":"One subscription","value":{"event":"document.signed","target_url":"https://hooks.example.com/getaccept","notification_email":"webhooks@example.com"}},"multiple":{"summary":"Several subscriptions in one request","value":[{"event":"document.signed","target_url":"https://hooks.example.com/getaccept"},{"event":"document.viewed","target_url":"https://hooks.example.com/getaccept","global":true}]}}}}},"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionResponse"}},"example":[{"id":"y3p4mhqn","subscription_id":"y3p4mhqn","status":1,"event":"document.signed","host":"example.com","target_url":"https://webhooks.example.com/getaccept/signed","payload":"action=dosomething","global":false,"notification_email":"","created_at":"2019-05-05 17:53:53"}]}}},"400":{"description":"`target_url` is missing or fails validation, `event` is not a valid event, a subscription with the same `event` and `target_url` already exists (a duplicate returns 400, not 409), or a body without `event` names a `target_url` that no global subscription uses.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Create one or more event subscriptions with the event in the path","tags":["Subscriptions"]}},"/v1/subscriptions/errors":{"get":{"description":"Return the latest failed deliveries, newest first. A delivery counts as failed when the callback answers with a status outside 2xx, or does not answer at all, for example on a timeout, which is recorded as `status` `0`. Admin users get errors for every subscription in the entity, including those of other users that the subscription list does not show; other users get errors for their own and the entity's global subscriptions.","operationId":"getSubscriptionErrors","parameters":[{"name":"offset","required":false,"in":"query","description":"Number of errors to skip before the first returned one.","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of errors to return. Defaults to 100, and values above 200 return 200.","schema":{"type":"number"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionErrorResponse"}},"example":[{"event":"document.signed","status":"401","target_url":"https://crm.example.com/services/callback/","result":"[{\"message\":\"Session expired or invalid\",\"errorCode\":\"INVALID_SESSION_ID\"}]","retry":"0","payload":"{\"document\":{\"id\":\"xy45za9\",\"name\":\"The big proposal\",\"status\":\"signed\"},\"event\":\"document.signed\"}","created_at":"2019-09-01T13:56:28+00:00"}]}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Retrieve the latest delivery errors for event subscriptions","tags":["Subscriptions"]}},"/v1/subscriptions/test":{"post":{"description":"Send a test delivery of a subscription event for an existing document. Every active subscription for the event that belongs to you, to the document owner or to the whole entity receives it, and nothing is sent when there is none.\n\nThe body is built from the current state of the document and carries no `event_meta`, so it is not a replay of an earlier or failed delivery.","operationId":"testSubscription","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestSubscriptionBody"}}}},"responses":{"200":{"description":"The request succeeded."},"400":{"description":"`event` is not one of the events that can be tested, `document_id` is missing or not a valid document id, or `recipient_id` is not a valid recipient id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Trigger a test event subscription delivery","tags":["Subscriptions"]}},"/v1/contacts":{"get":{"description":"This call will return a list of contacts for the current authenticated entity.\n\nContacts are used only as a lookup reference when adding recipients to a new document.","operationId":"listContacts","parameters":[{"name":"filter","required":false,"in":"query","description":"Filter the list on status.","schema":{"$ref":"#/components/schemas/ContactStatus"}},{"name":"sort_by","required":false,"in":"query","description":"How to sort the results. Without it, or with an unknown value, contacts are sorted on first name, descending, and `sort_order` is ignored.","schema":{"$ref":"#/components/schemas/ContactSortBy"}},{"name":"sort_order","required":false,"in":"query","description":"Sort order when `sort_by` is set, case-insensitive. Defaults to ASC.","schema":{"$ref":"#/components/schemas/SortOrder"}},{"name":"showteam","required":false,"in":"query","description":"Include contacts from team members. Any non-empty value other than `0` turns it on, including `false`.","schema":{"type":"string"}},{"name":"showall","required":false,"in":"query","description":"Include all contacts from the entity. Any non-empty value other than `0` turns it on, including `false`. Ignored when the entity restricts data visibility and the authenticated user has the user role.","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","description":"Start the list from record x until limit. Defaults to 0.","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Number of records to list. Defaults to 100.","schema":{"type":"number"}},{"name":"search","required":false,"in":"query","description":"Return only contacts whose first name, last name, email, company name or mobile number contains this text, ignoring case. The text is matched against these fields joined with spaces, so `John Doe` matches a contact named John Doe.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ListContactsResponse"},{"type":"array","items":{},"maxItems":0}]},"example":{"contacts":[{"contact_id":"32abc9d","fullname":"John","first_name":"John","last_name":"Doe","title":"CEO","mobile":"+46701740606","phone":"+46701740608","email":"john.doe@example.com","thumb_url":"","note":"","document_count":1,"company_id":"abch9jeq","company_name":"Test Company Inc","company_logo_url":"","created_at":"2020-12-02T22:02:11+00:00"}]}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"List contacts","tags":["Contacts"]},"post":{"description":"This call will create a new contact in the database for the current entity. Either `email` or `mobile` must be supplied.","operationId":"createContact","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContactBody"}}}},"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContactResponse"},"example":{"contact_id":"abc58129f"}}}},"400":{"description":"The request is invalid, for example a missing or malformed parameter or body field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Create a contact","tags":["Contacts"]}},"/v1/contacts/{id}":{"delete":{"description":"Delete a contact.","operationId":"deleteContact","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the contact.","schema":{"type":"string"}}],"responses":{"204":{"description":"The contact was deleted. An unknown id also returns 204 and changes nothing, except in the case described under 404."},"400":{"description":"The id is not a valid contact id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The entity restricts data visibility, the authenticated user has the user role, and the contact is not one of the contacts of that user or has neither email nor mobile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No contact with this id exists. Only returned when the entity restricts data visibility and the authenticated user has the user role.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Delete a contact","tags":["Contacts"]}},"/v1/custom-data/entity":{"get":{"description":"Custom data lets you define and use your own document properties as a complement to the default properties that all documents have, such as company name, document title and creation date. Instead of being limited to the standard document fields you can create properties like Project ID, Purchase Order Number, Department or Industry Type.\n\nThis call will return the custom data settings for the current entity. The default properties are always prefixed with a plus sign (`+`) and are not editable.\n\nThe `label` field is deprecated, use the `translations` array instead. `label` continues to be returned for backward compatibility and is resolved from the translations.\n\nThe `options` array is only returned for properties with `value_type` `setValues` and lists the allowed values that can be assigned on a document.","operationId":"getEntityCustomDataSettings","parameters":[],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityCustomDataSettingsDto"},"example":{"entity_id":"8nj6hvkn","allowed_properties":[{"key":"{{account.name}}","value_type":"string","property_type":"custom","label":"Account Name","translations":[{"language":"en","name":"Account Name"}],"status":"active"},{"key":"priority","value_type":"setValues","property_type":"custom","label":"Priority","translations":[{"language":"en","name":"Priority"}],"status":"active","options":[{"key":"high","translations":[{"language":"en","name":"High"}],"status":"active"},{"key":"low","translations":[{"language":"en","name":"Low"}],"status":"active"}]},{"key":"+crmUrl","value_type":"string","property_type":"default","label":"CRM URL","translations":[{"language":"en","name":"CRM URL"},{"language":"sv","name":"CRM-URL"},{"language":"da","name":"CRM-URL"},{"language":"no","name":"CRM-URL"},{"language":"fr","name":"URL CRM"},{"language":"es","name":"URL del CRM"},{"language":"de","name":"CRM-URL"},{"language":"nl","name":"CRM-URL"},{"language":"pt","name":"URL do CRM"},{"language":"fi","name":"CRM-URL"}],"status":"active"},{"key":"+crmType","value_type":"string","property_type":"default","label":"CRM integration type","translations":[{"language":"en","name":"CRM integration type"},{"language":"sv","name":"CRM-integrationstyp"},{"language":"da","name":"CRM-integrationstype"},{"language":"no","name":"CRM-integrasjonstype"},{"language":"fr","name":"Type d'intégration CRM"},{"language":"es","name":"Tipo de integración CRM"},{"language":"de","name":"CRM-Integrationstyp"},{"language":"nl","name":"CRM-integratietype"},{"language":"pt","name":"Tipo de integração CRM"},{"language":"fi","name":"CRM-integraatiotyyppi"}],"status":"active"},{"key":"+crmAccountName","value_type":"string","property_type":"default","label":"CRM Account Name","translations":[{"language":"en","name":"CRM Account Name"},{"language":"sv","name":"CRM-kontonamn"},{"language":"da","name":"CRM-kontonavn"},{"language":"no","name":"CRM-kontonavn"},{"language":"fr","name":"Nom du compte CRM"},{"language":"es","name":"Nombre de cuenta CRM"},{"language":"de","name":"CRM-Kontoname"},{"language":"nl","name":"CRM-accountnaam"},{"language":"pt","name":"Nome da conta CRM"},{"language":"fi","name":"CRM-tilin nimi"}],"status":"active"},{"key":"+crmAccountUrl","value_type":"string","property_type":"default","label":"CRM Account URL","translations":[{"language":"en","name":"CRM Account URL"},{"language":"sv","name":"CRM-konto-URL"},{"language":"da","name":"CRM-konto-URL"},{"language":"no","name":"CRM-konto-URL"},{"language":"fr","name":"URL du compte CRM"},{"language":"es","name":"URL de cuenta CRM"},{"language":"de","name":"CRM-Konto-URL"},{"language":"nl","name":"CRM-account-URL"},{"language":"pt","name":"URL da conta CRM"},{"language":"fi","name":"CRM-tilin URL"}],"status":"active"},{"key":"+slackUrl","value_type":"string","property_type":"default","label":"Slack URL","translations":[{"language":"en","name":"Slack URL"},{"language":"sv","name":"Slack-URL"},{"language":"da","name":"Slack-URL"},{"language":"no","name":"Slack-URL"},{"language":"fr","name":"URL Slack"},{"language":"es","name":"URL de Slack"},{"language":"de","name":"Slack-URL"},{"language":"nl","name":"Slack-URL"},{"language":"pt","name":"URL do Slack"},{"language":"fi","name":"Slack-URL"}],"status":"active"}]}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get entity custom data settings","tags":["Custom Data"]},"post":{"description":"This call will add a new custom data property to the current entity. The property will be available for all documents created in the entity.\n\n`key` is 1 to 100 characters long and may contain only letters, numbers, curly brackets, dots, dashes and underscores (`^[-a-zA-Z0-9._{}]{1,100}$`). A `setValues` property takes 1 to 10 `options`, each with a unique `key` that follows the same rules.","operationId":"addEntityCustomAllowedProperty","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddCustomDataPropertyBody"}}}},"responses":{"201":{"description":"The resource was created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityCustomDataSettingsDto"},"example":{"entity_id":"8nj6hvkn","allowed_properties":[{"key":"project_code","value_type":"string","property_type":"custom","label":"Project code","translations":[{"language":"en","name":"Project code"},{"language":"sv","name":"Projektkod"}],"status":"active"},{"key":"+crmUrl","value_type":"string","property_type":"default","label":"CRM URL","translations":[{"language":"en","name":"CRM URL"},{"language":"sv","name":"CRM-URL"},{"language":"da","name":"CRM-URL"},{"language":"no","name":"CRM-URL"},{"language":"fr","name":"URL CRM"},{"language":"es","name":"URL del CRM"},{"language":"de","name":"CRM-URL"},{"language":"nl","name":"CRM-URL"},{"language":"pt","name":"URL do CRM"},{"language":"fi","name":"CRM-URL"}],"status":"active"},{"key":"+crmType","value_type":"string","property_type":"default","label":"CRM integration type","translations":[{"language":"en","name":"CRM integration type"},{"language":"sv","name":"CRM-integrationstyp"},{"language":"da","name":"CRM-integrationstype"},{"language":"no","name":"CRM-integrasjonstype"},{"language":"fr","name":"Type d'intégration CRM"},{"language":"es","name":"Tipo de integración CRM"},{"language":"de","name":"CRM-Integrationstyp"},{"language":"nl","name":"CRM-integratietype"},{"language":"pt","name":"Tipo de integração CRM"},{"language":"fi","name":"CRM-integraatiotyyppi"}],"status":"active"},{"key":"+crmAccountName","value_type":"string","property_type":"default","label":"CRM Account Name","translations":[{"language":"en","name":"CRM Account Name"},{"language":"sv","name":"CRM-kontonamn"},{"language":"da","name":"CRM-kontonavn"},{"language":"no","name":"CRM-kontonavn"},{"language":"fr","name":"Nom du compte CRM"},{"language":"es","name":"Nombre de cuenta CRM"},{"language":"de","name":"CRM-Kontoname"},{"language":"nl","name":"CRM-accountnaam"},{"language":"pt","name":"Nome da conta CRM"},{"language":"fi","name":"CRM-tilin nimi"}],"status":"active"},{"key":"+crmAccountUrl","value_type":"string","property_type":"default","label":"CRM Account URL","translations":[{"language":"en","name":"CRM Account URL"},{"language":"sv","name":"CRM-konto-URL"},{"language":"da","name":"CRM-konto-URL"},{"language":"no","name":"CRM-konto-URL"},{"language":"fr","name":"URL du compte CRM"},{"language":"es","name":"URL de cuenta CRM"},{"language":"de","name":"CRM-Konto-URL"},{"language":"nl","name":"CRM-account-URL"},{"language":"pt","name":"URL da conta CRM"},{"language":"fi","name":"CRM-tilin URL"}],"status":"active"},{"key":"+slackUrl","value_type":"string","property_type":"default","label":"Slack URL","translations":[{"language":"en","name":"Slack URL"},{"language":"sv","name":"Slack-URL"},{"language":"da","name":"Slack-URL"},{"language":"no","name":"Slack-URL"},{"language":"fr","name":"URL Slack"},{"language":"es","name":"URL de Slack"},{"language":"de","name":"Slack-URL"},{"language":"nl","name":"Slack-URL"},{"language":"pt","name":"URL do Slack"},{"language":"fi","name":"Slack-URL"}],"status":"active"}]}}}},"400":{"description":"The body is invalid, for example a `key` with characters other than letters, numbers, curly brackets, dots, dashes and underscores, or `options` missing for a `setValues` property or sent with any other `value_type`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The entity already has a property with this `key`. Keys are compared case-insensitively.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Add an entity custom allowed property","tags":["Custom Data"]}},"/v1/custom-data/entity/{key}":{"put":{"description":"Update an existing custom data property of the current entity, identified by its property key. The deprecated `label`, the `translations` array, the `status` and, for `setValues` properties, the `options` array can be updated.","operationId":"updateEntityCustomAllowedProperty","parameters":[{"name":"key","required":true,"in":"path","description":"Key of the custom data property.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEntityCustomDataPropertyBody"}}}},"responses":{"204":{"description":"The property was updated. An unknown `key` also returns 204 and changes nothing, unless `options` is sent."},"400":{"description":"The body is invalid, or `options` is sent for a `key` that does not exist or is not a `setValues` property.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The `key` names a default property, prefixed with `+`. Default properties cannot be updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Update an entity custom allowed property","tags":["Custom Data"]},"delete":{"description":"This call will delete a custom data property from the current entity. The property will no longer be available for new documents created in the entity. It will not delete the property from existing documents.","operationId":"deleteEntityCustomAllowedProperty","parameters":[{"name":"key","required":true,"in":"path","description":"Key of the custom data property.","schema":{"type":"string"}}],"responses":{"204":{"description":"The property was deleted. An unknown `key` also returns 204 and changes nothing."},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The `key` names a default property, prefixed with `+`. Default properties cannot be deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Delete an entity custom allowed property","tags":["Custom Data"]}},"/v1/products":{"get":{"description":"This call will return a list of products for your entity. You can filter, sort, and paginate the results using query parameters.\n\nThe `description` field and text-type `product_property_fields` values are returned as markdown.","operationId":"getProducts","parameters":[{"name":"search_terms","required":false,"in":"query","description":"Search products by name or SKU.","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Number of products to return. Default and maximum is 100.","schema":{"example":100,"type":"number"}},{"name":"offset","required":false,"in":"query","description":"Number of products to skip. Default is 0.","schema":{"example":0,"type":"number"}},{"name":"sort_by","required":false,"in":"query","description":"Field to sort by. Available options: `name`, `sku`, `price`, `currency`, `createdAt`, `updatedAt`. Default is `createdAt`.","schema":{"type":"string"}},{"name":"sort","required":false,"in":"query","description":"Sort order. Available options: `asc`, `desc`. Default is `asc`.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductListDto"},"example":{"products":[{"id":"65f1a2b3c4d5e6f7a8b9c0d1","entity_id":"8nj6hvkn","name":"Premium Widget","description":"High-quality widget with **advanced** features","sku":"WIDGET-001","price":"199.99","tax":"25","meta_data":{"locale":"en-US","currency":"USD","optional_product":false,"quantity":{"variable":true,"default_min_value":"1","default_max_value":"10"}},"created_at":"2024-01-01T00:00:00+00:00","updated_at":"2024-01-01T00:00:00+00:00","created_by":"32abc9d","updated_by":"32abc9d","product_property_fields":[{"product_property_id":"65f1a2b3c4d5e6f7a8b9c0e2","value":"Blue"}],"images":[{"id":"65f1a2b3c4d5e6f7a8b9c0f3","transforms":{"scale":1.5,"translate_x":10,"translate_y":20}}]}],"total_count":1}}}},"400":{"description":"`limit` is not a number from 1 to 100, `offset` is negative or not a number, or `sort_by` or `sort` is not one of the listed values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get products","tags":["Products"]},"post":{"description":"This call will create a new product in your product library.","operationId":"createProduct","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductDto"}}}},"responses":{"201":{"description":"The resource was created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductDto"},"example":{"id":"65f1a2b3c4d5e6f7a8b9c0d1","entity_id":"8nj6hvkn","name":"Premium Widget","description":"High-quality widget with **advanced** features","sku":"WIDGET-001","price":"199.99","tax":"25","meta_data":{"locale":"en-US","currency":"USD","optional_product":false,"quantity":{"variable":true,"default_min_value":"1","default_max_value":"10"}},"created_at":"2024-01-01T00:00:00+00:00","updated_at":"2024-01-01T00:00:00+00:00","created_by":"32abc9d","updated_by":"32abc9d","product_property_fields":[{"product_property_id":"65f1a2b3c4d5e6f7a8b9c0e2","value":"Blue"}]}}}},"400":{"description":"The request is invalid, for example a missing or malformed parameter or body field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The product library already holds as many products as the plan of the entity allows.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Create a product","tags":["Products"]}},"/v1/products/{productId}":{"put":{"description":"This call will update an existing product. All fields are optional, so only provide the fields you want to update.","operationId":"updateProduct","parameters":[{"name":"productId","required":true,"in":"path","description":"Id of the product.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductDto"}}}},"responses":{"204":{"description":"The request succeeded. The response has no body."},"400":{"description":"A body field has the wrong type or is out of range, `meta_data` is sent without `locale` or `currency`, or `productId` is not a valid product id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The product library holds more products than the plan of the entity allows.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The entity has no product with this `productId`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Update a product","tags":["Products"]},"delete":{"description":"This call will delete an existing product from your product library.\n\nDeleted products are permanently removed from the product library and can no longer be used in pricing tables.\n\nThe product still remains in templates, drafts and sent documents, and has to be removed from those manually.","operationId":"deleteProduct","parameters":[{"name":"productId","required":true,"in":"path","description":"Id of the product.","schema":{"type":"string"}}],"responses":{"204":{"description":"The request succeeded. The response has no body."},"400":{"description":"The request is invalid, for example a missing or malformed parameter or body field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Delete a product","tags":["Products"]}},"/v1/products/properties":{"get":{"description":"This call will return a list of product properties for your entity. Product properties are custom fields that can be assigned to products.","operationId":"getProductProperties","parameters":[{"name":"limit","required":false,"in":"query","description":"Number of product properties to return. Default is 15, maximum is 150.","schema":{"example":15,"type":"number"}},{"name":"offset","required":false,"in":"query","description":"Number of product properties to skip. Default is 0.","schema":{"example":0,"type":"number"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductPropertyListDto"},"example":{"product_properties":[{"id":"65f1a2b3c4d5e6f7a8b9c0e2","entity_id":"8nj6hvkn","name":"color","display_name":"Color","type":"text","created_at":"2024-01-01T00:00:00+00:00","created_by":"32abc9d","updated_at":"2024-01-01T00:00:00+00:00","updated_by":"32abc9d","usages":[{"resource_id":"7kp2mq9z","type":"contract","number_of_times":2,"updated_at":"2024-01-01T00:00:00+00:00"}]},{"id":"65f1a2b3c4d5e6f7a8b9c0e3","entity_id":"8nj6hvkn","name":"setup_fee","display_name":"Setup fee","type":"number","unit":"currency","created_at":"2024-01-01T00:00:00+00:00","created_by":"32abc9d","updated_at":"2024-01-01T00:00:00+00:00","updated_by":"32abc9d","usages":[]}],"total_count":2}}}},"400":{"description":"`limit` is not a number from 1 to 150, or `offset` is negative or not a number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get product properties","tags":["Products"]}},"/v1/email/templates":{"get":{"description":"This call will return a list of email templates on the entity.\n\nThe templates shipped with GetAccept are returned under `Default templates`, and the templates created by the entity are returned under a key named after the entity.","operationId":"getEmailTemplates","parameters":[],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"type":"object","required":["Default templates"],"properties":{"Default templates":{"type":"array","items":{"$ref":"#/components/schemas/ListEmailTemplateDto"},"description":"Email templates shipped with GetAccept."}},"additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/ListEmailTemplateDto"},"description":"Email templates created by the entity, under a key named after the entity."}},"example":{"Default templates":[{"id":"9n4kd2xq","name":"Fallback Template","type":"Default templates"}],"GetAccept":[{"id":"32abc9d","name":"My nice template","type":"Customer templates"}]}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get email templates","tags":["Email Templates"]},"post":{"description":"Create a new email template. Returns the details of the created email template.","operationId":"createEmailTemplate","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmailTemplateBody"}}}},"responses":{"201":{"description":"The resource was created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedEmailTemplateDto"},"example":{"id":"32abc9d","name":"My nice template","code":"<html><body>{{email.message}}{{#if document.url}}<p><a href=\"{{document.url}}\">Open the document</a></p>{{/if}}</body></html>","entity_id":"8nj6hvkn"}}}},"400":{"description":"`name` or `code` is missing, empty or not a string, or `code` is longer than 204800 characters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Create an email template","tags":["Email Templates"]}},"/v1/email/templates/{emailTemplateId}":{"get":{"description":"Get detailed information about an email template, including its HTML `code`.","operationId":"getEmailTemplate","parameters":[{"name":"emailTemplateId","required":true,"in":"path","description":"Id of the email template.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetEmailTemplateResponse"},"example":{"email_template":{"id":"32abc9d","name":"My nice template","code":"<html><body>{{email.message}}{{#if document.url}}<p><a href=\"{{document.url}}\">Open the document</a></p>{{/if}}</body></html>"}}}}},"400":{"description":"`emailTemplateId` is not a valid email template id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No email template with this id exists on the entity, and it is not one of the `Default templates`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get an email template","tags":["Email Templates"]},"put":{"description":"Update an existing email template. `name` and/or `code` need to be supplied to update.","operationId":"updateEmailTemplate","parameters":[{"name":"emailTemplateId","required":true,"in":"path","description":"Id of the email template.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEmailTemplateBody"}}}},"responses":{"204":{"description":"The template was updated. An id that names no email template of the authenticated entity also returns 204, and nothing changes."},"400":{"description":"The body supplies neither `name` nor `code`, a supplied value is not a string, `code` is longer than 204800 characters, or `emailTemplateId` is not a valid email template id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Update an email template","tags":["Email Templates"]}},"/v1/communication-templates":{"get":{"description":"Receive a list of available communication templates. Message, subject, button text, footer and SMS fields that are empty on a template are returned filled with the default text in the template's language.","operationId":"getCommunicationTemplates","parameters":[{"name":"limit","required":false,"in":"query","description":"Number of records to list, from 1 to 20. Defaults to 20.","schema":{"type":"number"}},{"name":"offset","required":false,"in":"query","description":"Start the list from record x until limit, 0 or more. Defaults to 0.","schema":{"type":"number"}},{"name":"statuses","required":false,"in":"query","description":"Filter the list on status: `published`, `draft` or `deleted`. Pass several as a comma-separated list, for example `published,draft`. Defaults to `published,draft`, so deleted templates are listed only when `deleted` is included. The list is ordered by creation time, oldest first.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCommunicationTemplatesResponse"},"example":{"communication_templates":[{"id":"6401a056a5c6548dd5402f6c","entity_id":"8nj6hvkn","name":"Default Communication Template","language":"en","email_sendout_template":{"email_subject":"email subject","message":"email message","button_text":"button text","footer":"email footer","sms_message":"sms message","automatic_message":false},"email_sendout_reminder_template":{"email_subject":"email subject","message":"email message","button_text":"button text","footer":"email footer","sms_message":"sms message","automatic_message":false},"signed_sendout_template":{"email_subject":"email subject","message":"email message","button_text":"button text","footer":"footer"},"conversation_sendout_template":{"conversation_starter":"conversation starter","automatic_message":true,"reminder_message":"reminder message","automatic_reminder_message":true},"created_by":"32abc9d","updated_by":"32abc9d","tags":[],"created_at":"2023-06-08T09:33:10+00:00","updated_at":"2023-09-01T05:49:24+00:00","status":"published","type":"default"}]}}}},"400":{"description":"`limit` is not a number from 1 to 20, `offset` is not a number of 0 or more, or `statuses` holds a value other than `published`, `draft` or `deleted`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"List communication templates","tags":["Communication Templates"]},"post":{"description":"Create a communication template.","operationId":"createCommunicationTemplate","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommunicationTemplateBody"}}}},"responses":{"201":{"description":"The resource was created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunicationTemplateDto"},"example":{"id":"6401a056a5c6548dd5402f6c","entity_id":"8nj6hvkn","name":"New Communication Template","language":"en","email_sendout_template":{"email_subject":"email subject","message":"email message","button_text":"button text","footer":"email footer","sms_message":"sms message","automatic_message":false},"email_sendout_reminder_template":{"email_subject":"email subject","message":"email message","button_text":"button text","footer":"email footer","sms_message":"sms message","automatic_message":false},"signed_sendout_template":{"email_subject":"email subject","message":"email message","button_text":"button text","footer":"footer"},"conversation_sendout_template":{"conversation_starter":"conversation starter","automatic_message":true,"reminder_message":"reminder message","automatic_reminder_message":true},"created_by":"32abc9d","updated_by":"32abc9d","tags":[],"created_at":"2023-10-03T19:47:24+00:00","updated_at":"2023-10-03T19:47:24+00:00","status":"published","type":"none"}}}},"400":{"description":"`name` or `language` is missing or not a string, `status` or `type` is not a valid value, a body field has the wrong type, or a template field holds invalid Handlebars syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"When the entity has reached its limit of active communication templates, the 403 has no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"`type` is `default` and the entity already has a default communication template.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Create a communication template","tags":["Communication Templates"]}},"/v1/communication-templates/{communicationTemplateId}":{"get":{"description":"Receive a specific communication template. A deleted template is returned too, with `status` `deleted` and `deleted_at` and `deleted_by` set.\n\nMessage, subject, button text, footer and SMS fields that are empty on the template are returned filled with the default text in the template's language. Sending the response back with Update a communication template therefore saves that default text on the template.","operationId":"getCommunicationTemplate","parameters":[{"name":"communicationTemplateId","required":true,"in":"path","description":"Id of the communication template.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunicationTemplateDto"},"example":{"id":"6401a056a5c6548dd5402f6c","entity_id":"8nj6hvkn","name":"Default Communication Template","language":"en","email_sendout_template":{"email_subject":"email subject","message":"email message","button_text":"button text","footer":"email footer","sms_message":"sms message","automatic_message":false},"email_sendout_reminder_template":{"email_subject":"email subject","message":"email message","button_text":"button text","footer":"email footer","sms_message":"sms message","automatic_message":false},"signed_sendout_template":{"email_subject":"email subject","message":"email message","button_text":"button text","footer":"footer"},"conversation_sendout_template":{"conversation_starter":"conversation starter","automatic_message":true,"reminder_message":"reminder message","automatic_reminder_message":true},"created_by":"32abc9d","updated_by":"32abc9d","tags":[],"created_at":"2023-06-08T09:33:10+00:00","updated_at":"2023-09-01T05:49:24+00:00","status":"published","type":"default"}}}},"400":{"description":"The request is invalid, for example a missing or malformed parameter or body field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get a communication template","tags":["Communication Templates"]},"put":{"description":"Update a specific communication template. The parameters are those of Create a communication template except `type`, and all of them are optional.","operationId":"updateCommunicationTemplate","parameters":[{"name":"communicationTemplateId","required":true,"in":"path","description":"Id of the communication template.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCommunicationTemplateBody"}}}},"responses":{"204":{"description":"The request succeeded. The response has no body."},"400":{"description":"The request is invalid, for example a missing or malformed parameter or body field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Update a communication template","tags":["Communication Templates"]}},"/v1/folders":{"get":{"description":"You can list and get details of existing folders in GetAccept. Folders are used to structure archived documents and templates.\n\nThis call returns only top-level folders: the top-level folders of the template library and the root archive folder. Use Retrieve a folder by ID to list the subfolders of a template folder; for an archive folder it returns only the folder and its path, so archive subfolders cannot be listed. Without `type`, or with `type=template`, an empty result is a 200 with an empty `folders` list; only `type=archive` answers 204 when there is no archive folder.","operationId":"getFolders","parameters":[{"name":"type","required":false,"in":"query","description":"Show folders of a specific type, for example `template` or `archive`.","schema":{"$ref":"#/components/schemas/FolderType"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetFolderResponse"},"example":{"current":null,"folders":[{"id":"L015IHRlbXBsYXRlIGZvbGRlci8=","type":"template","name":"My template folder"},{"id":"q7m2kd9x","type":"archive","name":"Archive"}]}}}},"204":{"description":"`type` is `archive` and the entity has no archive folder."},"400":{"description":"Invalid folder type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Retrieve folders","tags":["Folders"]}},"/v1/folders/{id}":{"get":{"description":"Use a folder id to show the current path and, for a template folder, its subfolders. An archive folder returns only its path.","operationId":"getFolder","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the folder.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetFolderResponse"},"example":{"current":{"id":"32abc9d","type":"archive","name":"My old contracts","path":[{"id":"q7m2kd9x","name":"Archive"}]}}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`id` names no folder of the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Retrieve a folder by ID","tags":["Folders"]}},"/v1/videos":{"get":{"description":"Get the videos of the entity that the authenticated user owns or that are published, newest first.","operationId":"getVideos","parameters":[{"name":"offset","required":false,"in":"query","description":"Start the list from record x until the limit. Defaults to 0","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Number of records to list. Omit it, or send 0, to list every video.","schema":{"type":"string"}},{"name":"include_video_url","required":false,"in":"query","description":"Include a presigned url for the video. Any value other than empty or 0 includes it, false included; omit the parameter or send 0 to leave it out.","schema":{"type":"string"}},{"name":"include_thumb_url","required":false,"in":"query","description":"Include a url for the thumbnail. Depending on the age of the thumbnail it is either a presigned url or a public url. Any value other than empty or 0 includes it, false included; omit the parameter or send 0 to leave it out.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetVideosResponse"},"example":{"videos":[{"video_id":"q2vx8kd3","video_type":"file","video_title":"intro.mp4","video_url":"https://example-video-bucket.s3.eu-west-1.amazonaws.com/x7yzabc1/video/q2vx8kd3/intro_completed.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=EXAMPLEKEYID%2F20240101%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20240101T000000Z&X-Amz-Expires=1800&X-Amz-Signature=0123456789abcdef&X-Amz-SignedHeaders=host&x-id=GetObject","thumb_url":"https://video.example.com/x7yzabc1/q2vx8kd3/intro_completed.0000000.png","saved":false,"published":false,"editable":true,"created_at":"2022-01-16T10:21:55+00:00"},{"video_id":"cab88d3","video_type":"file","video_title":"blob","video_url":"","thumb_url":"","saved":false,"published":false,"editable":true,"created_at":"2022-02-03T11:02:23+00:00"}]}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user profile on the entity is not active, the user or the entity is quarantined, the entity is marked for deletion, neither the entity nor its parent entity has an active subscription, or the access token is a preview token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Retrieve videos","tags":["Videos"]}},"/v1/videos/{id}":{"get":{"description":"Get a specific video based on its video id.","operationId":"getVideo","parameters":[{"name":"id","required":true,"in":"path","description":"The hashed video ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetVideoResponse"},"example":{"video_id":"q2vx8kd3","video_type":"file","video_title":"intro.mp4","video_url":"https://example-video-bucket.s3.eu-west-1.amazonaws.com/x7yzabc1/video/q2vx8kd3/intro_completed.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=EXAMPLEKEYID%2F20240101%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20240101T000000Z&X-Amz-Expires=1800&X-Amz-Signature=0123456789abcdef&X-Amz-SignedHeaders=host&x-id=GetObject","thumb_url":"https://video.example.com/x7yzabc1/q2vx8kd3/intro_completed.0000000.png","saved":false,"published":false,"editable":true,"created_at":"2022-01-16T10:21:55+00:00"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user profile on the entity is not active, the user or the entity is quarantined, the entity is marked for deletion, neither the entity nor its parent entity has an active subscription, or the access token is a preview token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Video not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Retrieve a single video by ID","tags":["Videos"]}},"/v1/video/job/{id}":{"get":{"description":"Get the current processing status of an uploaded video. Poll this endpoint with the `job_id` returned by Upload a video for conversion. `video_url` and `thumb_url` are returned once the status is `Complete`.","operationId":"getVideoJobStatus","parameters":[{"name":"id","required":true,"in":"path","description":"The hashed video ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetVideoJobResponse"},"example":{"Status":"Complete","video_url":"https://example-video-bucket.s3.eu-west-1.amazonaws.com/x7yzabc1/video/q2vx8kd3/intro_completed.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=EXAMPLEKEYID%2F20240101%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20240101T000000Z&X-Amz-Expires=900&X-Amz-Signature=0123456789abcdef&X-Amz-SignedHeaders=host&x-id=GetObject","thumb_url":"https://video.example.com/x7yzabc1/q2vx8kd3/intro_completed.0000000.png"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user profile on the entity is not active, the user or the entity is quarantined, the entity is marked for deletion, neither the entity nor its parent entity has an active subscription, or the access token is a preview token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No video has this id. Any error from the video service, including a temporary one, is also returned as this 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Retrieve video job status","tags":["Videos"]}},"/v1/knowledge-bases":{"get":{"description":"List the knowledge base entries of the authenticated entity. A knowledge base entry is a piece of text, or an uploaded file, that is embedded so the AI features can use it as context. The response is paged with `limit` and `offset` and carries the total number of entries in `total_count`.","operationId":"getKnowledgeBases","parameters":[{"name":"limit","required":false,"in":"query","description":"Max entries to return, between 1 and 20. Defaults to 20. Values outside the range are rejected with 400","schema":{"type":"number"}},{"name":"offset","required":false,"in":"query","description":"Number of entries to skip. Defaults to 0. Negative values are rejected with 400","schema":{"type":"number"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseListResponse"},"example":{"knowledge_bases":[{"id":"65f1a2b3c4d5e6f7a8b9c0d1","title":"Security and compliance FAQ","description":"The security questions buyers ask most often, with answers.","content_type":"text","status":"ready","total_chunks":12,"user_id":"32abc9d","created_at":1704067200000,"updated_at":1704153600000,"content_updated_at":1704153600000,"content":"Where is customer data stored? All documents are stored in the region of the entity."},{"id":"65f1a2b3c4d5e6f7a8b9c0d2","title":"Master services agreement","description":"The template legal signs off on.","content_type":"file","status":"processing","user_id":"32abc9d","created_at":1704067200000,"content_updated_at":1704067200000,"file_name":"master-services-agreement.pdf"}],"total_count":2}}}},"400":{"description":"`limit` is not a number from 1 to 20, or `offset` is negative or not a number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"List knowledge base entries for the authenticated entity","tags":["Knowledge Bases"]},"post":{"description":"Create a knowledge base entry for the authenticated entity.\n\nSend `content_type` `text` together with `content` to create a text entry, which starts embedding right away. Send `content_type` `file` together with `file_name` to create a file entry: the response then carries a `presigned_link` that the file has to be posted to before the entry is embedded.","operationId":"createKnowledgeBase","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CreateKnowledgeBaseTextBody"},{"$ref":"#/components/schemas/CreateKnowledgeBaseFileBody"}]},"examples":{"text":{"summary":"Text entry","value":{"content_type":"text","title":"Security and compliance FAQ","description":"The security questions buyers ask most often, with answers.","content":"Where is customer data stored? All documents are stored in the region of the entity."}},"file":{"summary":"File entry","value":{"content_type":"file","title":"Master services agreement","file_name":"master-services-agreement.pdf"}}}}}},"responses":{"201":{"description":"The resource was created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKnowledgeBaseResponse"},"example":{"knowledge_base":{"id":"65f1a2b3c4d5e6f7a8b9c0d2","title":"Master services agreement","description":"The template legal signs off on.","content_type":"file","status":"processing","user_id":"32abc9d","created_at":1704067200000,"content_updated_at":1704067200000,"file_name":"master-services-agreement.pdf"},"presigned_link":{"url":"https://example-bucket.s3.eu-west-1.amazonaws.com/","headers":"bucket:example-bucket,X-Amz-Algorithm:AWS4-HMAC-SHA256,X-Amz-Credential:EXAMPLEACCESSKEYID/20240101/eu-west-1/s3/aws4_request,X-Amz-Date:20240101T000000Z,X-Amz-Security-Token:EXAMPLESESSIONTOKEN,key:8nj6hvkn/65f1a2b3c4d5e6f7a8b9c0d2.pdf,Policy:eyJleHBpcmF0aW9uIjoiMjAyNC0wMS0wMVQwMTowMDowMFoiLCJjb25kaXRpb25zIjpbeyJidWNrZXQiOiJleGFtcGxlLWJ1Y2tldCJ9LHsiWC1BbXotQWxnb3JpdGhtIjoiQVdTNC1ITUFDLVNIQTI1NiJ9LHsiWC1BbXotQ3JlZGVudGlhbCI6IkVYQU1QTEVBQ0NFU1NLRVlJRC8yMDI0MDEwMS9ldS13ZXN0LTEvczMvYXdzNF9yZXF1ZXN0In0seyJYLUFtei1EYXRlIjoiMjAyNDAxMDFUMDAwMDAwWiJ9LHsiWC1BbXotU2VjdXJpdHktVG9rZW4iOiJFWEFNUExFU0VTU0lPTlRPS0VOIn0seyJrZXkiOiI4bmo2aHZrbi82NWYxYTJiM2M0ZDVlNmY3YThiOWMwZDIucGRmIn1dfQ==,X-Amz-Signature:13ab79bca5bfad9feaf1299756d10c38a492d6db16f39f67f250b5be2180691a"}}}}},"400":{"description":"Invalid content_type, missing fields, or bad file extension","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The knowledge base of the entity is synced from Notion and is read-only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Create a knowledge base entry","tags":["Knowledge Bases"]}},"/v1/knowledge-bases/{knowledgeBaseId}":{"get":{"description":"Get a single knowledge base entry of the authenticated entity by id. Text entries carry `content` and file entries carry `file_name`; `status` tells whether the entry has finished embedding.","operationId":"getKnowledgeBase","parameters":[{"name":"knowledgeBaseId","required":true,"in":"path","description":"Id of the knowledge base entry.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"title":"KnowledgeBaseResponse","oneOf":[{"$ref":"#/components/schemas/KnowledgeBaseTextResponse"},{"$ref":"#/components/schemas/KnowledgeBaseFileResponse"}]},"example":{"id":"65f1a2b3c4d5e6f7a8b9c0d1","title":"Security and compliance FAQ","description":"The security questions buyers ask most often, with answers.","content_type":"text","status":"ready","total_chunks":12,"user_id":"32abc9d","created_at":1704067200000,"updated_at":1704153600000,"content_updated_at":1704153600000,"content":"Where is customer data stored? All documents are stored in the region of the entity."}}}},"400":{"description":"`knowledgeBaseId` is not a 24-character hexadecimal id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No entry with that id exists for the entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Retrieve a knowledge base entry by id","tags":["Knowledge Bases"]},"put":{"description":"Update the `title`, `description` or `content` of a knowledge base entry. Sending `content` replaces the text of the entry and returns it to processing while it is embedded again.","operationId":"updateKnowledgeBase","parameters":[{"name":"knowledgeBaseId","required":true,"in":"path","description":"Id of the knowledge base entry.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateKnowledgeBaseBody"}}}},"responses":{"204":{"description":"The request succeeded. The response has no body."},"400":{"description":"`knowledgeBaseId` is not a 24-character hexadecimal id, or `title`, `description` or `content` is not a string.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No entry with that id exists for the entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The knowledge base of the entity is synced from Notion and is read-only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Update a knowledge base entry","tags":["Knowledge Bases"]},"delete":{"description":"Delete a knowledge base entry of the authenticated entity. The embeddings of the entry and any uploaded file are removed with it, so the AI features stop using the entry as context.","operationId":"deleteKnowledgeBase","parameters":[{"name":"knowledgeBaseId","required":true,"in":"path","description":"Id of the knowledge base entry.","schema":{"type":"string"}}],"responses":{"204":{"description":"The request succeeded. The response has no body."},"400":{"description":"`knowledgeBaseId` is not a 24-character hexadecimal id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The entry is synced from Notion and is read-only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Delete a knowledge base entry along with its embeddings and any uploaded file","tags":["Knowledge Bases"]}},"/v1/knowledge-bases/{knowledgeBaseId}/download-link":{"get":{"description":"Get a presigned link for downloading the file of a file knowledge base entry. The link is valid for one hour. Entries that hold text rather than a file have nothing to download and return 404.","operationId":"getKnowledgeBaseDownloadLink","parameters":[{"name":"knowledgeBaseId","required":true,"in":"path","description":"Id of the knowledge base entry.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseDownloadLinkResponse"},"example":{"presigned_link":"https://uploads.getaccept.com/knowledge-bases/65f1a2b3c4d5e6f7a8b9c0d2?signature=9f8e7d6c5b4a3210"}}}},"400":{"description":"`knowledgeBaseId` is not a 24-character hexadecimal id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No file entry with that id exists for the entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get a download link for a knowledge base file","tags":["Knowledge Bases"]}},"/v1/users":{"get":{"description":"Get a list of users for the authenticated entity, including pending and inactive users. Inactive users are listed after users with other statuses.","operationId":"getUsers","parameters":[],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUsersResponse"},"example":{"users":[{"user_id":"32abc9d","name":"John Doe","first_name":"John","last_name":"Doe","email":"john.doe@example.com","status":"active","role":"admin","team_name":"Sales","team_ids":["b7k21ma","x4td99c"],"team_names":["Sales","Marketing"],"last_login":"2019-01-02 03:04:05"},{"user_id":"cab88d3","name":"Jane Doe","first_name":"Jane","last_name":"Doe","email":"jane@example.com","status":"active","role":"user","team_name":"Sales","team_ids":["b7k21ma"],"team_names":["Sales"],"last_login":"2019-02-03 04:05:06"}]}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get users","tags":["Users"]},"post":{"description":"Create a new user in the authenticated entity. Only administrators can create users. A successful request returns the same fields as Get a user, without `access`.","operationId":"createUser","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserBody"}}}},"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserResponse"},"example":{"user":{"id":"32abc9d","first_name":"John","last_name":"Doe","email":"john.doe@example.com","phone":"+46701740608","mobile":"+46701740606","title":"Sales Manager","note":"","thumb_url":"https://media.getaccept.com/thumb/ab1cde9x.png","entity_id":"8nj6hvkn","entity_name":"GetAccept","language":"en","timezone":"+01:00","app_mode":"sales","role":"admin","disallow_create":false,"status":"active","team_id":"cde3hg1n","team_ids":["cde3hg1n","fgh4ij2k"]}}}}},"400":{"description":"`email` is missing or not a string, `role` is not a valid user role, `skip_invitation` is not a boolean, another body field is not a string, `team_ids` holds more than 50 entries or an empty one, or `team_id` or an entry of `team_ids` is not a valid team id. Team ids are checked after the user is added to the entity, so the user exists even when an invalid team id returns 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`team_id` or an entry of `team_ids` names no team in the entity. Teams are assigned after the user is added to the entity, so the user exists even when this is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The user with this `email` already has a profile in the entity, whether active, pending or inactive.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many users have registered from the IP address of the request in the last few days. The user account is created before this check, so a user with this `email` exists even when this is returned, but it is not added to the entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Create a user","tags":["Users"]}},"/v1/users/{id}":{"get":{"description":"Get the details of a single user.\n\n`status` has three values:\n- `inactive`: the user is inactive\n- `pending`: the user has been added and is awaiting email verification\n- `active`: the user is active\n\nThe `access` property shows which modules the user has access to: `contractroom_access` for the Contract room module and `dealroom_access` for the Dealroom module.","operationId":"getUser","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the user.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUserResponse"},"example":{"user":{"id":"32abc9d","first_name":"John","last_name":"Doe","email":"john.doe@example.com","phone":"+46701740608","mobile":"+46701740606","title":"Sales Manager","note":"","thumb_url":"https://media.getaccept.com/thumb/ab1cde9x.png","entity_id":"8nj6hvkn","entity_name":"GetAccept","language":"en","timezone":"+01:00","app_mode":"sales","role":"admin","disallow_create":false,"status":"active","team_id":"cde3hg1n","team_ids":["cde3hg1n","fgh4ij2k"],"access":{"dealroom_access":true,"contractroom_access":true}}}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get a user","tags":["Users"]},"delete":{"description":"Remove a user's profile from the authenticated entity, remove its team assignments, and start cleanup of related resources. To suspend access while keeping the entity profile, use Mark a user as inactive instead.","operationId":"deleteUser","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the user.","schema":{"type":"string"}}],"responses":{"204":{"description":"The request succeeded. The response has no body."},"400":{"description":"`id` is not a valid user id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"Only admin users can delete users.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The user is the only active admin of the entity. An entity must keep at least one active admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Delete a user","tags":["Users"]}},"/v1/users/{id}/inactive":{"put":{"description":"Set a user's status to inactive for the authenticated entity. Only administrators can deactivate users, a pending user cannot be deactivated, and the request has no body.\n\nDeactivation suspends the user's access while preserving their entity profile and related resources. The user remains in Get users with status `inactive`, and Get a user shows the status.\n\nDeactivate a user when you need to suspend access without removing the entity profile. Delete a user removes the entity profile and team assignments and starts cleanup of related resources.","operationId":"setUserInactive","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the user.","schema":{"type":"string"}}],"responses":{"204":{"description":"The request succeeded. The response has no body."},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The user is the only active admin of the entity. An entity must keep at least one active admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Mark a user as inactive","tags":["Users"]}},"/v1/users/{id}/statistics":{"get":{"description":"Get statistics for the user `{id}`. Every figure except `performers`, which ranks the top users of the whole entity, covers only documents owned by `{id}`. Without `showall` they also count only the authenticated user's own documents, so they are zero for any other user. Admins can request any user and managers the users in their teams; other roles get 403. `signed`, `won`, `hit`, `dealtime`, `estimated` and `performers` cover the current calendar month, the `_last` figures and `daterange.previous` cover the previous month, and the remaining figures are totals per current document status.","operationId":"getUserStatistics","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the user.","schema":{"type":"string"}},{"name":"showall","required":false,"in":"query","description":"Set to true to include documents from every user in the entity. When the data visibility mode of the entity is restricted, only admins get this; for every other role, managers included, it is ignored. Defaults to false.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserStatisticsDto"},"example":{"statistics":{"vod":{"count":6,"value":5134},"expired":{"count":93,"value":5431401},"hot":{"count":4,"value":128000},"sent":{"count":18,"value":402500},"active":{"count":11,"value":265000},"signed":{"count":7,"value":154200},"won":{"count":5,"value":121000},"won_last":{"count":8,"value":189500},"hit_total":{"count":42,"value":75},"estimated":{"count":3,"value":76000},"hit":{"count":9,"value":14},"hit_last":{"count":12,"value":20},"dealtime":{"count_days":6,"count_hours":149},"dealtime_last":{"count_days":8,"count_hours":197},"performers":[{"first_name":"John","last_name":"Doe","thumb_url":"https://media.getaccept.com/thumb/ab1cde9x.png","count":5,"value":121000,"total":18}]},"daterange":{"current":{"start":"2019-02-01","end":"2019-02-28"},"previous":{"start":"2019-01-01","end":"2019-01-31"}}}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get user statistics","tags":["Users"]}},"/v1/users/{id}/session":{"get":{"description":"Get the session details of a single user. Only administrators can read another user's session.","operationId":"getUserSession","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the user.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSessionDto"},"example":{"session":{"entity_hash":"8nj6hvkn","entity_name":"GetAccept","first_name":"Jane","last_name":"Doe","full_name":"Jane Doe","thumb_url":"https://media.getaccept.com/thumb/cd2efg7y.png","email":"jane@example.com","mobile":"+46701740607","user_hash":"cab88d3","user_role":"user","currency":"SEK","language":"en","timezone":"+01:00","app_mode":"sales","user_created_at":"2019-02-03 04:05:06","registration_source":"signup","registration_campaign":"","registration_device":"","achievements_level":"","entity_created_at":"2018-11-05 09:12:44","plan":"pro","is_sub_entity":false,"entity_count":1,"team_count":1,"login_count":37,"device_count":0,"instant_phone":false,"salesnavigator":false,"externaleditor":false,"show_team":false,"show_all":false,"security_attachment":false,"security_restrict":false,"data_visibility_mode":"teams","security_social":false,"security_sms":true,"security_share":true,"security_obfuscate":false,"team_id":"b7k21ma","team_ids":["b7k21ma"],"team_names":["Sales"],"disallow_create":false,"iio_hash":"d20c0be2d135cba19df6ec8c85b67883e86d3f9d6af7bb5759fbc4577990cb68","iio_hash_ios":"72b59fbf75befd3d812fe0429c0a5d9357a47f6ce7c52e919993800dcdb42c78","iio_hash_android":"657cae30b576778c644415cc5950a45f5511d1bf7f186aa0b009f28bc7cbdd82"}}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get a user session","tags":["Users"]}},"/v1/users/me":{"get":{"description":"Get the details of the authenticated user, including the entities the user has access to.","operationId":"getMe","parameters":[],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMeResponse"},"example":{"user":{"id":"32abc9d","first_name":"John","last_name":"Doe","email":"john.doe@example.com","phone":"+46701740608","mobile":"+46701740606","title":"Sales Manager","note":"","thumb_url":"https://media.getaccept.com/thumb/ab1cde9x.png","entity_id":"8nj6hvkn","entity_name":"GetAccept","language":"en","timezone":"+01:00","app_mode":"sales","role":"admin","disallow_create":false,"status":"active","team_id":"cde3hg1n","team_ids":["cde3hg1n","fgh4ij2k"],"access":{"dealroom_access":true,"contractroom_access":true}},"entities":[{"id":"8nj6hvkn","name":"GetAccept","role":"admin","plan":"pro","plan_title":"pro-plan","auth":null}]}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get the authenticated user","tags":["Users"]},"put":{"description":"Update the profile of the authenticated user. Accepts the same fields as Update a user.","operationId":"updateMe","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserBody"}}}},"responses":{"204":{"description":"The request succeeded. The response has no body."},"400":{"description":"A body field is not a string.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Update the authenticated user","tags":["Users"]}},"/v1/users/me/statistics":{"get":{"description":"Get statistics for the authenticated user. Every user role can call it. Every figure except `performers`, which ranks the top users of the whole entity, covers the authenticated user's own documents, or with `showall` the documents of every user in the entity. `signed`, `won`, `hit`, `dealtime`, `estimated` and `performers` cover the current calendar month, the `_last` figures and `daterange.previous` cover the previous month, and the remaining figures are totals per current document status.","operationId":"getMyStatistics","parameters":[{"name":"showall","required":false,"in":"query","description":"Set to true to include documents from every user in the entity. When the data visibility mode of the entity is restricted, only admins get this; for every other role, managers included, it is ignored. Defaults to false.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserStatisticsDto"},"example":{"statistics":{"vod":{"count":6,"value":5134},"expired":{"count":93,"value":5431401},"hot":{"count":4,"value":128000},"sent":{"count":18,"value":402500},"active":{"count":11,"value":265000},"signed":{"count":7,"value":154200},"won":{"count":5,"value":121000},"won_last":{"count":8,"value":189500},"hit_total":{"count":42,"value":75},"estimated":{"count":3,"value":76000},"hit":{"count":9,"value":14},"hit_last":{"count":12,"value":20},"dealtime":{"count_days":6,"count_hours":149},"dealtime_last":{"count_days":8,"count_hours":197},"performers":[{"first_name":"John","last_name":"Doe","thumb_url":"https://media.getaccept.com/thumb/ab1cde9x.png","count":5,"value":121000,"total":18}]},"daterange":{"current":{"start":"2019-02-01","end":"2019-02-28"},"previous":{"start":"2019-01-01","end":"2019-01-31"}}}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get statistics for the authenticated user","tags":["Users"]}},"/v1/users/me/session":{"get":{"description":"Get the session details of the authenticated user: entity, profile, plan, security settings and team membership.","operationId":"getMySession","parameters":[],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSessionDto"},"example":{"session":{"entity_hash":"8nj6hvkn","entity_name":"GetAccept","first_name":"John","last_name":"Doe","full_name":"John Doe","thumb_url":"https://media.getaccept.com/thumb/ab1cde9x.png","email":"john.doe@example.com","mobile":"+46701740606","user_hash":"32abc9d","user_role":"admin","currency":"SEK","language":"en","timezone":"+01:00","app_mode":"sales","user_created_at":"2019-01-02 03:04:05","registration_source":"signup","registration_campaign":"","registration_device":"","achievements_level":"","entity_created_at":"2018-11-05 09:12:44","plan":"pro","is_sub_entity":false,"entity_count":1,"team_count":2,"login_count":148,"device_count":2,"instant_phone":false,"salesnavigator":false,"externaleditor":false,"show_team":true,"show_all":true,"security_attachment":false,"security_restrict":false,"data_visibility_mode":"teams","security_social":false,"security_sms":true,"security_share":true,"security_obfuscate":false,"team_id":"cde3hg1n","team_ids":["cde3hg1n","fgh4ij2k"],"team_names":["Sales","Marketing"],"disallow_create":false,"iio_hash":"cc2077da24e7fa2c255eaed76ca7dfec52a00e6c53714bfb402c1567ce998271","iio_hash_ios":"7dbcc305fb00e267e0c3aee4578c38ac80ff095746289f186bcefe8f4346446c","iio_hash_android":"ec486607ce5e3183b4296948e00a41e83bc8773e38b5b3bec81edd72142cb2a7"}}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get the session of the authenticated user","tags":["Users"]}},"/v1/users/request-account-deletion":{"post":{"description":"Ask GetAccept to delete the authenticated user's account. The request is emailed to GetAccept's policy team; this call removes no data itself.","operationId":"requestAccountDeletion","parameters":[],"responses":{"204":{"description":"The request succeeded. The response has no body."},"400":{"description":"The deletion request email could not be created or sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Request account deletion","tags":["Users"]}},"/v1/notifications":{"get":{"description":"List notifications for the current user. Returns an empty array when the user has no documents or no notifications match the request.\n\nRequesting notifications also resets the badge count of the user's registered devices that carry more than five pending notifications.","operationId":"getEventNotifications","parameters":[{"name":"showall","required":false,"in":"query","description":"Set to `true` to include notifications for documents owned by other users in the entity. Admins and managers always get them; other roles only when the entity is not security restricted.","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","description":"Number of notifications to skip. Defaults to 0. Notifications only come from the 200 most recently created documents the request covers, leaving out private and recalled documents.","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Number of notifications to return, at most 200. Defaults to 20. A value that is not a number returns an empty list.","schema":{"type":"number"}},{"name":"since","required":false,"in":"query","description":"Only include notifications from the last x minutes.","schema":{"type":"number"}}],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GetNotificationsResponse"},{"type":"array","items":{},"maxItems":0}]},"example":{"notifications":[{"document_id":"a2bcrkgm","first_name":"Jane","last_name":"Smith","thumb_url":null,"company_name":"The Big Company","event_name":"signed","document_name":"Service agreement 2024","document_status":"signed","external_id":"CRM-10023","event_meta_data":"","created_at":"2024-05-14T09:31:07+00:00"},{"document_id":"a2bcrkgm","first_name":"Jane","last_name":"Smith","thumb_url":null,"company_name":"The Big Company","event_name":"commented","document_name":"Service agreement 2024","document_status":"signed","external_id":"CRM-10023","event_meta_data":"Could you confirm the start date?","created_at":"2024-05-13T14:02:45+00:00"}]}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Retrieve notifications","tags":["Users"]}},"/v1/teams":{"get":{"description":"Get a list of the current teams for the entity. Teams with no members are not listed, so an entity whose teams are all empty returns 204 with no body. Admins, and all callers when data visibility is off, get all non-empty teams with `team_user_count`. In restricted mode, users, content managers, and managers get only the teams they belong to. In teams mode, every non-admin gets only the teams they belong to. Lists limited to the caller's teams omit `team_user_count` and return 204 when the caller belongs to no team.","operationId":"getTeams","parameters":[],"responses":{"200":{"description":"List of teams","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamsResponse"},"example":{"teams":[{"team_id":"32abc9d","name":"Sales","status":"active","team_user_count":6},{"team_id":"cab88d3","name":"HR","status":"active","team_user_count":3}]}}}},"204":{"description":"When no teams found"},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get teams","tags":["Teams"]},"post":{"description":"Create a new team for the entity. Only admin users can create teams.","operationId":"createTeam","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTeamBody"}}}},"responses":{"201":{"description":"Team created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTeamResponse"},"example":{"team":{"team_id":"32abc9d","name":"Sales Team","status":"active"}}}}},"400":{"description":"`name` is missing or not a string, `status` is missing or not a valid team status, or `settings.notification_email` is not a valid email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Another team in the entity already has this `name`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Create a team","tags":["Teams"]}},"/v1/teams/{teamId}":{"put":{"description":"Update an existing team. Only admin users can update teams.","operationId":"updateTeam","parameters":[{"name":"teamId","required":true,"in":"path","description":"Id of the team.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTeamBody"}}}},"responses":{"204":{"description":"Team updated successfully"},"400":{"description":"`teamId` is not a valid team id, `name` is not a string, `status` is not a valid team status, or `settings.notification_email` is not a valid email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Team not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Another team in the entity already has this `name`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Update a team","tags":["Teams"]},"delete":{"description":"Delete a team. Only admin users can delete teams.","operationId":"deleteTeam","parameters":[{"name":"teamId","required":true,"in":"path","description":"Id of the team.","schema":{"type":"string"}}],"responses":{"204":{"description":"Team deleted successfully"},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Delete a team","tags":["Teams"]}},"/v1/teams/{teamId}/users":{"get":{"description":"Get a list of the users in a specific team. Only admin users can view team users.","operationId":"getTeamUsers","parameters":[{"name":"teamId","required":true,"in":"path","description":"Id of the team.","schema":{"type":"string"}}],"responses":{"200":{"description":"List of users in the team","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamUsersResponse"},"example":{"users":[{"team_id":"32abc9d","entity_id":"8nj6hvkn","user_id":"abc123def"},{"team_id":"32abc9d","entity_id":"8nj6hvkn","user_id":"def456ghi"}]}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get team users","tags":["Teams"]},"post":{"description":"Add a user to a team. Only admin users can add users to teams.","operationId":"addUserToTeam","parameters":[{"name":"teamId","required":true,"in":"path","description":"Id of the team.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddUserToTeamBody"}}}},"responses":{"201":{"description":"User added to team successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamUserDto"},"example":{"team_id":"32abc9d","entity_id":"8nj6hvkn","user_id":"abc123def"}}}},"400":{"description":"`user_id` is missing or not a valid user id, or `teamId` is not a valid team id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Team or user not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"User is already in this team","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Add a user to team","tags":["Teams"]}},"/v1/teams/{teamId}/users/{userId}":{"delete":{"description":"Remove a user from a team. Only admin users can remove users from teams. Removing a user who is not in the team, or from a team that does not exist, also returns 204, so the call can be retried safely.","operationId":"deleteTeamUser","parameters":[{"name":"teamId","required":true,"in":"path","description":"Id of the team.","schema":{"type":"string"}},{"name":"userId","required":true,"in":"path","description":"Id of the user.","schema":{"type":"string"}}],"responses":{"204":{"description":"The user is not in the team any more, whether or not they were before."},"400":{"description":"`userId` is not a valid user id, or `teamId` is not a valid team id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No user has this `userId`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Delete a team user","tags":["Teams"]}},"/v1/entity":{"get":{"description":"Get the settings of the entity the access token belongs to, together with the entity's default communication template.","operationId":"getEntity","parameters":[],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityResponse"},"example":{"entity":{"id":"8nj6hvkn","name":"GetAccept","company_name":"GetAccept AB","country_code":"SE","timezone":"+01:00","currency":"SEK","language":"en","datacenter_id":"1","app_mode":"sales","theme_id":"q7m2kd9x","address":"","zip":"","state":"","city":"","country":"Sweden","phone":"+46701740605","fax":"","website":"https://www.getaccept.com","email":"info@example.com","registered_number":"","logo_url":"https://media.getaccept.com/logo/8nj6hvkn.png","sub_domain":"getaccept","custom_domain":"","default_expiration_days":30,"document_reject_reason":true,"document_download":true,"document_unique_id":0,"is_selfsign":true,"is_signing_biometric":true,"is_signing_initials":false,"is_signing_forward":true,"is_signing_write":true,"is_signing_linkedin":false,"is_signing_eid":false,"is_esign_consent":false,"verify_sms_sign":false,"verify_sms_open":false,"custom_fingerprint":0,"sign_copy_email":"","sign_redirect":"","email_send_template_id":"z4k8qp2m","email_send_subject":"A document from GetAccept","email_send_message":"Hi, please review the document and let me know if you have any questions.","email_notification_template_id":"w3n7xr5b","email_reminder_subject":"Reminder: a document from GetAccept","email_reminder_message":"Hi, a friendly reminder that the document is waiting for you.","email_signed_subject":"The document has been signed","email_signed_message":"Thank you for signing. A copy of the signed document is attached.","email_footer_text":"","email_sender_name":"GetAccept","email_sender_address":"","sms_reminder_text":"","sms_sending_text":"","sms_sender":"GetAccept","auto_comment_text":"Let me know if you have any questions.","auto_comment_email":"","is_auto_comment_email":false,"is_disable_comment":false,"is_auto_comment":true,"is_sms_sending":false,"is_sms_reminder":false,"is_reminder_sending":true,"is_identify_recipient":false,"reminder_opened":true,"reminder_opened_days":2,"reminder_signed":true,"reminder_signed_days":3,"reminder_repeat":false,"reminder_repeat_days":0,"reminder_expiration":true,"reminder_expiration_days":2,"reminder_weekend":false,"notification_email":true,"notification_opened":true,"notification_viewed":true,"notification_reviewed":true,"notification_commented":true,"notification_signed":true,"notification_rejected":true,"notification_bounced":true,"notification_downloaded":false,"notification_printed":false,"notification_expired":true,"notification_attachment":false,"notification_forwarded":true,"security_encryption":false,"security_password":false,"security_restrict":false,"data_visibility_mode":"teams","security_twofactor":0,"security_sso":false,"security_attachment":false,"security_certificate":true,"security_social":false,"security_sms":true,"security_signedattachment":false,"security_share":true,"security_obfuscate":false,"remove_inactive":false,"remove_inactive_months":0,"remove_signed":false,"remove_signed_months":0,"remove_notification_email":"","remove_consent":false,"remove_consent_text":"","tracking_consent":false,"tracking_consent_text":"","plan":"pro","billing_currency":"SEK","billing_frequency":"monthly","billing_company":"GetAccept AB","billing_address":"","billing_zip":"","billing_state":"","billing_city":"","billing_country":"SE","billing_reference":"","billing_email":"billing@example.com","billing_vat":"","marked_for_delete":false,"parent_entity_id":"0","settings":{"contextual_commenting":true,"immutable_settings":{"verify_sms_open":false},"organization_wide_saml":false,"lobby_branding_settings":{"mode":"textAndMedia"},"notifications":{"notification_document_signed_email":true},"redlining":{"recipient_suggestions":false,"internal_suggestions":false},"data_visibility_mode":"teams"},"default_email_send_subject":"{{sender.first_name}} sent you {{document.name}} to review","default_email_send_message":"Hi {{recipient.first_name}}, \n\nYou have been sent a document to review. \n\nClick the link below to review the document. \n\nBest regards, \n{{sender.fullname}}"}}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The access token does not grant access to this resource or action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Get entity settings","tags":["Entity"]}},"/v1/features":{"get":{"description":"Returns the list of subscription features for the authenticated entity. Features represent the subscription capabilities available to an entity, such as feature flags and quantity limits. They come from the most recently created subscription that is active, future or non-renewing, so a future subscription created after the current one supplies its features.","operationId":"getFeatures","parameters":[],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetFeaturesResponse"},"example":{"features":[{"name":"Webhooks","id":"webhooks","type":"Switch","active":true},{"name":"Document limit","id":"document-limit","type":"Quantity","active":true,"quantity_settings":{"max_quantity":100,"unlimited":false}},{"name":"AI Usage","id":"ai-usage","type":"Quantity","active":true,"quantity_settings":{"unlimited":true}}]}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user profile on the entity is not active, the user or the entity is quarantined, the entity is marked for deletion, neither the entity nor its parent entity has an active subscription, or the access token is a preview token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Retrieve subscription features for the authenticated entity","tags":["Entity"]}},"/v1/devices":{"get":{"description":"List the push devices registered for the authenticated user. At most one device is returned.","operationId":"getDevices","parameters":[],"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDevicesResponse"},"example":{"devices":[{"deviceId":"a1b2c3d","type":"ios","token":"fcm-8d7a6b5c4e3f2a1b0c9d8e7f6a5b4c3d","createdAt":"2024-01-01 00:00:00","updatedAt":"2024-01-02 00:00:00"}]}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"List devices","tags":["Devices"]},"post":{"description":"Register a push device for the authenticated user, or update the device that already holds the same `token`. Both `type` and `token` are required; a request missing either is rejected with 400. The response carries the id of the stored device.","operationId":"createDevice","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDeviceBody"}}}},"responses":{"200":{"description":"The request succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDeviceResponse"},"example":{"device_id":"a1b2c3d"}}}},"400":{"description":"`type` or `token` is missing, or either is not a string.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Create or update a device","tags":["Devices"]}},"/v1/devices/{id}":{"delete":{"description":"Delete a push device of the authenticated user. Pass the device id, or the push token of the device when it is 14 characters or longer. A device that does not belong to the authenticated user is reported as not found.","operationId":"deleteDevice","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the device.","schema":{"type":"string"}}],"responses":{"204":{"description":"The request succeeded. The response has no body."},"401":{"description":"The access token is missing, invalid or expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/InvalidTokenResponse"}]}}}},"403":{"description":"The user or entity of the access token may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The resource does not exist or is not accessible to the authenticated entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"authorization":[]}],"summary":"Delete device","tags":["Devices"]}}},"info":{"title":"GetAccept API","description":"## Introduction\n\nWelcome to the GetAccept API. The API is organized around REST. All requests are made over HTTPS, and request and response bodies, including errors, are encoded as JSON, except where an endpoint lists another content type: the create document and `/v1/upload` endpoints also accept `multipart/form-data` and `application/x-www-form-urlencoded`, the document attachment upload takes `multipart/form-data`, the document download can return the PDF file itself, and the OAuth token endpoint takes a form-encoded body. TLS 1.2 or later is required for every connection.\n\nTo authenticate you need a valid and active GetAccept account. We welcome the study and testing of the API by all GetAccept users, but commercial usage is subject to the purchase of a GetAccept API package. Reach out to support if you need help during an integration or want to learn more about pricing.\n\n### Change history\n\nAll changes are published in the [changelog](https://www.getaccept.com/whats-new?tags=api_contracts,api_deal_room), filtered to API Contracts and API Deal Room updates.\n\n## Basics\n\nGetAccept consists of a few concepts you should know before using the API.\n\n**Entity.** The top node. All users and their documents belong to an entity. An entity is often the same as a company, a country, or a department in a large organization.\n\n**User.** Defined by an email address and connected to one or many entities.\n\n**User roles**\n\n- *Administrator*: view and edit all documents, change entity settings, info and billing, add new users, assign entity roles.\n- *Manager*: view team documents, edit all documents.\n- *User*: view, edit and send own documents.\n\n**Team.** A group of users with no policies attached.\n\n**Document.** One or more uploaded files sent to one or many recipients by a user.\n\n**Recipients.** Every unique email address or mobile number connected to a document is a recipient.\n\n**Contacts.** Every recipient is saved as a contact on the entity and can be reused later.\n\n## Authentication\n\nAuthenticate with a JSON Web Token from the token endpoint or with the OAuth 2.0 authorization code flow. All requests must use HTTPS. We strongly recommend `https://` for every URL you give us as well. A webhook target, for example, also accepts `http://`, but events posted to it are then not encrypted.\n\nSend the token on every request as a bearer token:\n\n```\nAuthorization: Bearer ACCESS_TOKEN\n```\n\n### Authentication by token\n\nToken based authentication is recommended for server-side access, or from clients where OAuth is not suitable. Access tokens are requested with a user's login credentials, and the token carries that user's role. Send `Content-Type: application/json`. Repeated failed attempts lock the login for up to an hour, and while it is locked requests are rejected with `400`, even with the correct password.\n\n`POST /v1/auth`\n\n```json\n{\n  \"email\": \"user@example.com\",\n  \"password\": \"**********\"\n}\n```\n\n| Parameter | Description |\n| --- | --- |\n| `email` | The email of the user |\n| `password` | The password of the user |\n| `client_id` (optional) | The client id of your app, if you received one from API support |\n| `entity_id` (optional) | Which entity to select when the user belongs to several. When omitted, the entity of the user's oldest active membership is used, skipping entities that are marked for deletion or quarantined |\n| `user_id` (optional) | Id of the user to authenticate, used together with `email` to select one specific user. It must be the id of a user with that email, otherwise the request fails like wrong credentials. Ignored when `email` itself carries the `@user.id` suffix |\n\n```json\n{\n  \"access_token\": \"ACCESS_TOKEN\",\n  \"expires_in\": 1209600\n}\n```\n\n| Field | Description |\n| --- | --- |\n| `access_token` | Token to send on every request |\n| `expires_in` | Seconds until the access token expires |\n\n### Refresh an access token\n\nRequest a new access token before the current one expires with `GET /v1/refresh`.\n\n### Switch entity\n\nSwitch entity with the same refresh endpoint and the entity id as a path parameter: `GET /v1/refresh/{entity}`. The entities available to the user are listed in the response of `GET /v1/users/me`. The response contains a new access token to use for the new entity. Switching answers `400` when the entity id is not valid or the user is not a member of that entity, or when SAML single sign-on is set up for the current entity's parent entity, or for the current entity itself when it has no parent, and the target is neither that entity nor one of its sub-entities. It answers `403` when the user is inactive in that entity or the entity has no API access or is quarantined, and `423` when the entity is marked for deletion.\n\n### Authentication by OAuth 2.0\n\nStart by sending the user to the authorization page:\n\n```\nhttps://app.getaccept.com/oauth2/authorize?response_type=code&client_id=CLIENT_ID&redirect_uri=REDIRECT_URI&scope=basic&state=STATE\n```\n\n| Parameter | Description |\n| --- | --- |\n| `response_type` | `code`, requesting an authorization code grant |\n| `client_id` | The client id of your app |\n| `redirect_uri` | Where the user is redirected after granting or denying access |\n| `scope` | The level of access requested. Use `basic` unless told otherwise; `read+write` for the Google playground. Every scope currently grants the same access |\n| `state` (optional) | A value of your choice, such as a CSRF token, returned unchanged on the redirect whether the user grants or denies access |\n\nThe user logs in or signs up unless already logged in, then sees a prompt asking whether to authorize your client id to access data in GetAccept from their selected entity, with **Yes** and **No** buttons and a **Switch entity** link to pick another entity first. On **Yes** they are redirected to your redirect URI with a `code` query parameter, plus `state` if you sent one. When the client id, redirect URI or scope is not accepted, the page shows an error instead of the prompt and does not redirect.\n\n```\nhttps://REDIRECT_URI/?code=AUTHORIZATION_CODE&state=STATE\n```\n\nOn **No** they are redirected to your redirect URI with `error=access_denied` instead of `code`, plus `state` if you sent one.\n\n```\nhttps://REDIRECT_URI/?error=access_denied&state=STATE\n```\n\n### Get an access token\n\nExchange the authorization code for an access token. The code is valid for 30 seconds, so exchange it as soon as your redirect URI receives it. Send the parameters form-encoded in the request body; parameters in the query string are ignored:\n\n```\nPOST https://app.getaccept.com/oauth2/token\nContent-Type: application/x-www-form-urlencoded\n\nclient_id=CLIENT_ID&client_secret=CLIENT_SECRET&grant_type=authorization_code&code=AUTHORIZATION_CODE&redirect_uri=REDIRECT_URI\n```\n\n| Parameter | Description |\n| --- | --- |\n| `client_id` | The client id of your app. For testing you can use `api` |\n| `client_secret` | The client secret received from API support. For testing you can use `app` |\n| `grant_type` | `authorization_code` |\n| `code` | The code passed to your redirect URI when the user granted access |\n| `redirect_uri` | The same redirect URI as in the authorization request |\n\nYou can send `client_id` and `client_secret` with HTTP Basic authentication instead of in the body: `Authorization: Basic` followed by the Base64 encoding of `CLIENT_ID:CLIENT_SECRET`.\n\n```json\n{\n  \"access_token\": \"ACCESS_TOKEN\",\n  \"token_type\": \"Bearer\",\n  \"expires_in\": 3600,\n  \"refresh_token\": \"REFRESH_TOKEN\",\n  \"scope\": \"basic\"\n}\n```\n\n| Field | Description |\n| --- | --- |\n| `access_token` | Token to send on every request |\n| `token_type` | `Bearer` |\n| `expires_in` | Seconds until the token expires |\n| `refresh_token` | Token used to obtain a new access token |\n| `scope` | `basic` or `read+write` |\n\n### Refresh an OAuth access token\n\nGet a new access token with the refresh token, sent the same way:\n\n```\nPOST https://app.getaccept.com/oauth2/token\nContent-Type: application/x-www-form-urlencoded\n\nclient_id=CLIENT_ID&client_secret=CLIENT_SECRET&grant_type=refresh_token&refresh_token=REFRESH_TOKEN\n```\n\nThe response has the same fields as above, including a new `refresh_token`.\n\n### Test OAuth with the Google OAuth 2.0 Playground\n\nOpen the [Google OAuth Playground](https://developers.google.com/oauthplayground/#step1&scopes=read+write&url=https%3A//api.getaccept.com/v1/test&content_type=application/json&http_method=GET&useDefaultOauthCred=unchecked&oauthEndpointSelect=Custom&oauthAuthEndpointValue=https%3A//app.getaccept.com/oauth2/authorize&oauthTokenEndpointValue=https%3A//app.getaccept.com/oauth2/token&includeCredentials=unchecked&accessTokenType=bearer&autoRefreshToken=unchecked&accessType=offline&forceApprovalPrompt=checked&response_type=code), open the settings with the cogwheel, enter client id `Google` and client secret `test`, and close the settings. Click **Authorize APIs**; you are redirected to GetAccept to log in and authorize. Back in the playground, click **Exchange authorization code for tokens**, then make a test request to `GET /v1/test` to verify the token.\n\n## Webhooks\n\nWebhooks are the recommended way to follow document status changes. Instead of polling, subscribe to events and we POST them to your URL. An administrator can manage webhooks in the app under Settings, Integrations, Webhooks, shown when your plan includes webhooks, or you can create subscriptions with the subscriptions endpoints below. Several webhooks can be active for one application.\n\nYour endpoint must answer every POST with a 2xx status. Redirects are followed, up to 10 in a row. A 307 or 308 is followed with the same POST, but a 301, 302 or 303 is followed with a `GET` that has no body, and a 2xx answer to that `GET` counts as delivered, so register the final URL of your endpoint. Any other answer counts as a failure, as described under [Failures and retries](#failures-and-retries). Respond within 15 seconds; a slower response can time out.\n\nDeliveries are not signed and carry no authentication header. To check that a request comes from GetAccept, put a secret of your own in the path of the target URL or in the subscription's `payload`, which is sent in every body, and compare it on each request. Use an `https://` target URL: `http://` is accepted, but then events are sent unencrypted.\n\n### Events\n\n| Event | Triggered when | Details |\n| --- | --- | --- |\n| `document.created` | A new document is created | Fires once per document creation. Not sent for a document created as a new version (see [New version webhooks](#new-version-webhooks)), uploaded with `POST /v1/upload/archive`, or copied from a sample template in the app. |\n| `document.sent` | A document is sent to recipients | Fires once per send operation, not per recipient. Not sent when recipients are released with send to recipients (`POST /v1/documents/{id}/recipients/send`), not even for the first batch to a sealed document. |\n| `document.viewed` | A recipient opens the document | Fires per recipient, per new viewing session. Can fire multiple times for the same recipient across separate sessions. When the recipient is asked for tracking consent, it is only sent if they accept. |\n| `document.reviewed` | A recipient reads through the document | Can fire more than once for the same recipient. Only sent while the document has `status` `sent`, `viewed`, `reviewed`, `sealed` or `hardbounced`, and not for a recipient with `status` `signed`, `signedwithoutverification`, `rejected`, `approved`, `skipped` or `notrequired`. |\n| `document.opened` | Never sent for document activity | Still accepted as a subscription event, but only test deliveries from `POST /v1/subscriptions/test` send it. Subscribe to `document.viewed` for recipient visits. |\n| `document.signed` | All required signatures have been collected | Fires once when the document is fully signed. The payload includes a `recipients` array with all recipients and their signing methods. |\n| `document.approved` | An approver-role recipient approves the document | Fires per approver. Only applies to recipients with the approver role. |\n| `document.expired` | The document's expiration date has passed | Fires once per document. Checked periodically by a scheduled job. |\n| `document.rejected` | A recipient rejects the document | Fires when a recipient rejects the document. A signing group member whose rejection leaves the document open sends `document.partially_rejected` instead. The body carries the rejection reason in `event_meta.reason`. See [Rejection webhooks](#rejection-webhooks). |\n| `document.partially_rejected` | A signing group member rejects while the group can still collect its required signatures | Fires per rejecting signing group member whose rejection leaves the document open, so the document keeps its status and no `document.rejected` is sent. The body carries the rejection reason in `event_meta.reason`. See [Signing group webhooks](#signing-group-webhooks). |\n| `document.downloaded` | A recipient downloads the document PDF | Fires every time a recipient downloads the PDF, so the same recipient can trigger it more than once. Not sent once the document is signed, or once the recipient has `status` `signed` or `rejected`. |\n| `document.printed` | A recipient prints the document | Fires every time a recipient prints the document. Sent under the same conditions as `document.downloaded`. |\n| `document.forwarded` | A recipient forwards the document to another person | Fires per forward action. Depending on how the document was forwarded, `recipient` is either the new recipient or the recipient who forwarded it. |\n| `document.partially_signed` | An individual recipient completes signing | Fires per recipient that signs, except the signature that completes the document, which sends `document.signed` instead. Signing group members who no longer need to sign get no event. Includes signing method information for that recipient. |\n| `document.recalled` | The sender recalls the document, or creates a new version with the recall option | Fires once per recall. Creating a new version with the recall option also triggers this event for the previous version, even when it could not be recalled because it was already signed or recalled, and the body then carries `event_meta.new_document_id` identifying the replacement. See [New version webhooks](#new-version-webhooks). Deleting documents from the document list in the app recalls them without this event. |\n| `document.lost` | The sender marks the document as lost | Marking an already-lost document again does not trigger a new event. |\n| `document.page_tracked` | A recipient's tracked time on a document page is updated | Fires per recipient and page. See [Page tracking webhooks](#page-tracking-webhooks). |\n| `document.commented` | A comment is posted on the document | Fires per comment. Applies to the legacy chat-style comments on documents. The author and text are in `event_meta`. See [Comment webhooks](#comment-webhooks). |\n| `document.hardbounced` | Email delivery to a recipient permanently fails | Fires per bounced recipient. The body's `recipient` is the first entry in `recipients`, not necessarily the recipient whose email bounced. |\n| `comment.created` | A contextual comment is posted on a document | Fires when the comment becomes active. Applies to the contextual commenting system. See [Comment webhooks](#comment-webhooks). |\n| `comment.resolved` | A contextual comment thread is resolved | Fires per resolution. |\n| `comment.reply_created` | A reply is posted to a contextual comment thread | Fires per reply. |\n\n### Payload\n\nEvery document event except `document.expired` carries the same body. `download_url` and `preview_url` are only available for 10 minutes after the POST. A retry resends the original body, so both links have expired by then, except that a `document.signed` retry carries a new `download_url`, valid for about 15 minutes. On `document.expired`, `download_url`, `preview_url`, `thumb_url`, `company_logo_url`, `field_count`, `is_signed`, `entity_auto_comment_email`, `entity_auto_comment_text` and the `sender_*` fields are `null`, `custom_fields` is `{}`, `signing_groups` is `[]`, and the dates in `document` are ISO 8601 UTC with milliseconds and `Z`, such as `2015-10-31T22:59:00.000Z`, instead of `2015-10-31T22:59:00+00:00`. Also on `document.expired`, `document.user_id` is the id of the document's owner, where every other event sends `\"\"`, `value` is `0` when the document has no value, `company_id` is `null` when the document has no company, and `auto_comment_email`, `auto_comment_text`, `company_name`, `company_number`, `external_client_id`, `external_editor_id`, `external_editor_type`, `external_id` and `name` are sent as stored: `null` when the stored value is null, which every other event sends as `\"\"`. A test delivery of `document.expired` from `POST /v1/subscriptions/test` carries the same body as the other document events.\n\nThis `document.signed` body, for a document with one recipient, shows the full key set. `event_meta` is added on some events, as described below.\n\n```json\n{\n  \"event\": \"document.signed\",\n  \"event_type\": \"document\",\n  \"event_action\": \"signed\",\n  \"subscription_id\": \"pw1333abc\",\n  \"payload\": \"action=dosomething\",\n  \"custom_fields\": { \"shoe_size\": \"9\" },\n  \"entity\": {\n    \"entity_id\": \"xyz123\",\n    \"sub_domain\": \"example\",\n    \"custom_domain\": \"\",\n    \"email_send_subject\": \"\",\n    \"email_send_message\": \"\"\n  },\n  \"document\": {\n    \"id\": \"abc123def\",\n    \"entity_id\": \"xyz123\",\n    \"user_id\": \"\",\n    \"parent_id\": null,\n    \"unique_id\": 1042,\n    \"name\": \"Test proposal\",\n    \"type\": \"sales\",\n    \"status\": \"signed\",\n    \"value\": 4900,\n    \"external_id\": \"doc_19953\",\n    \"external_client_id\": \"\",\n    \"external_editor_id\": \"\",\n    \"external_editor_type\": \"\",\n    \"company_id\": \"\",\n    \"company_name\": \"Example Inc\",\n    \"company_number\": \"\",\n    \"company_logo_url\": \"\",\n    \"tags\": \"proposal,q4\",\n    \"field_count\": 2,\n    \"created_at\": \"2015-10-17T09:10:12+00:00\",\n    \"send_date\": \"2015-10-17T09:16:53+00:00\",\n    \"sign_date\": \"2015-10-19T17:56:40+00:00\",\n    \"expiration_date\": \"2015-10-31T22:59:00+00:00\",\n    \"scheduled_sending_time\": null,\n    \"contract_start_date\": null,\n    \"contract_end_date\": null,\n    \"is_signed\": true,\n    \"is_signing\": true,\n    \"is_signing_order\": false,\n    \"is_signing_biometric\": false,\n    \"is_signing_initials\": false,\n    \"is_signing_forward\": false,\n    \"is_selfsign\": false,\n    \"is_private\": false,\n    \"is_identify_recipient\": false,\n    \"is_reminder_sending\": true,\n    \"is_scheduled_sending\": false,\n    \"is_auto_comment\": false,\n    \"is_auto_comment_email\": false,\n    \"is_video\": false,\n    \"video_id\": null,\n    \"auto_comment_email\": \"\",\n    \"auto_comment_text\": \"\",\n    \"entity_auto_comment_email\": \"\",\n    \"entity_auto_comment_text\": \"\",\n    \"email_send_subject\": \"\",\n    \"email_send_message\": \"\",\n    \"email_send_template_id\": null,\n    \"sender_name\": \"Sam Sender\",\n    \"sender_email\": \"sam.sender@example.com\",\n    \"sender_thumb_url\": \"\",\n    \"signing_groups\": [],\n    \"thumb_url\": \"https://media.getaccept.com/preview/xyz123/abc123def.png\",\n    \"preview_url\": \"https://example.getaccept.com/v/preview/abc123def?token=PREVIEW_TOKEN\",\n    \"download_url\": \"https://example-bucket.s3.eu-west-1.amazonaws.com/xyz123/signed/abc123def.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=EXAMPLEKEYID%2F20151019%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20151019T175640Z&X-Amz-Expires=600&X-Amz-SignedHeaders=host&X-Amz-Signature=EXAMPLESIGNATURE\"\n  },\n  \"recipient\": {\n    \"id\": \"r1a2b3c4d\",\n    \"fullname\": \"Jane Doe\",\n    \"first_name\": \"Jane\",\n    \"last_name\": \"Doe\",\n    \"email\": \"jane@example.com\",\n    \"mobile\": \"\",\n    \"title\": \"\",\n    \"gender\": \"\",\n    \"note\": \"\",\n    \"company_name\": \"Example Inc\",\n    \"company_number\": \"\",\n    \"thumb_url\": \"\",\n    \"document_url\": null,\n    \"role\": \"signer\",\n    \"status\": \"signed\",\n    \"order_num\": \"1\",\n    \"signing_group_id\": null,\n    \"ip_address\": \"192.168.1.1\",\n    \"signing_methods\": [\n      {\n        \"type\": \"eid\",\n        \"verified_name\": \"Jane Doe\",\n        \"verified_birthdate\": \"1976-05-02\",\n        \"verified_phone\": null,\n        \"signed_at\": \"2015-10-19T17:56:40.000Z\"\n      }\n    ]\n  },\n  \"recipients\": [\n    {\n      \"id\": \"r1a2b3c4d\",\n      \"fullname\": \"Jane Doe\",\n      \"first_name\": \"Jane\",\n      \"last_name\": \"Doe\",\n      \"email\": \"jane@example.com\",\n      \"mobile\": \"\",\n      \"title\": \"\",\n      \"gender\": \"\",\n      \"note\": \"\",\n      \"company_name\": \"Example Inc\",\n      \"company_number\": \"\",\n      \"thumb_url\": \"\",\n      \"document_url\": null,\n      \"role\": \"signer\",\n      \"status\": \"signed\",\n      \"order_num\": \"1\",\n      \"signing_group_id\": null,\n      \"ip_address\": \"192.168.1.1\",\n      \"signing_methods\": [\n        {\n          \"type\": \"eid\",\n          \"verified_name\": \"Jane Doe\",\n          \"verified_birthdate\": \"1976-05-02\",\n          \"verified_phone\": null,\n          \"signed_at\": \"2015-10-19T17:56:40.000Z\"\n        }\n      ]\n    }\n  ]\n}\n```\n\nRecipient fields:\n\n- `recipient` is the recipient who triggered the event, such as the viewer on `document.viewed` or the signer on `document.partially_signed`. Otherwise it is the first entry in `recipients`, for example on `document.signed`, `document.hardbounced` and the `comment.*` events. It is omitted on `document.expired`.\n- `recipients` is an array of all recipients on the document, included on every event. It is empty on `document.expired`.\n- `signing_methods` is populated only on `document.signed` and `document.partially_signed`, one entry per verification completed by a recipient with `status` `signed`, `signedwithoutverification` or `approved`. It is `[]` for every other recipient and on every other event. Types: `eid`, `external_eid`, `qes`, `biometric`, `sms`, `initials`, `signature`. `signature` is the fallback for a recipient with `status` `signed` and no recorded verification; a `signedwithoutverification` or `approved` recipient with no recorded verification gets `[]` instead. Every key is always present; keys that do not apply to the type are `null`. The recipient `signing_methods` from the REST endpoints, such as `GET /v1/documents/{id}/recipients`, name the same verifications differently: `external_eid` is `external_eid_signature` there, and a recipient whose only verification is `qes` gets the `signature` fallback.\n- `signing_methods[].verified_name` and `verified_birthdate` (`YYYY-MM-DD`) come from the eID provider, only for `eid` and `external_eid`. `verified_birthdate` is `null` when the recipient has `settings.redact_date_of_birth` enabled.\n- `signing_methods[].verified_phone` is the number the SMS code was sent to, only for `sms`.\n- `signing_methods[].signed_at` is when the verification completed, and `null` on the `signature` fallback.\n- `ip_address` is the recipient's IP address at signing, only on `document.signed` and `document.partially_signed`.\n- `document_url` is always `null`.\n- `signing_group_id` is the `id` of the recipient's signing group in `document.signing_groups`, or `null`. See [Signing group webhooks](#signing-group-webhooks).\n\n### Comment webhooks\n\nComment events carry additional metadata under `event_meta`; the rest of the body is the same as above.\n\n```json\n{\n  \"event\": \"comment.created\",\n  \"event_type\": \"comment\",\n  \"event_action\": \"created\",\n  \"subscription_id\": \"pw1333abc\",\n  \"event_meta\": {\n    \"comment_id\": \"64edd66ea8e65ce5b233b922\",\n    \"created_by\": \"Sam Tester\",\n    \"created_at\": \"2022-03-08T12:17:24.000Z\",\n    \"text\": \"A new comment!\"\n  }\n}\n```\n\n`created_by` is the full name of the user or recipient who posted the comment. Reopening a resolved thread sends `comment.created` again, with `created_by` set to the person who reopened it and the original `created_at` and `text`. `comment.created` is not sent when the document's sender posts or reopens the comment, and no `comment.*` event is sent for internal comments, which recipients cannot see. For `comment.reply_created`, `event_meta` has the thread's `comment_id` plus the reply's `reply_id`, `created_by`, `created_at` and `text`. For `comment.resolved`, `event_meta` has `comment_id`, `resolved_by` (the full name of the person who resolved the thread) and, for a suggestion, `suggestion_decision`.\n\n`document.commented`, sent for the chat-style comments on a document, carries its own `event_meta`: `sender` is `sender` when a user in your entity wrote the comment and `recipient` when a recipient did, `comment` is the comment text, and `first_name` and `last_name` are the author's names, `null` when missing. Its `recipient` is the author when a recipient wrote the comment; otherwise it is the first entry in `recipients`.\n\n```json\n{\n  \"event\": \"document.commented\",\n  \"event_type\": \"document\",\n  \"event_action\": \"commented\",\n  \"subscription_id\": \"pw1333abc\",\n  \"event_meta\": {\n    \"sender\": \"recipient\",\n    \"comment\": \"Can we start in March instead?\",\n    \"first_name\": \"Jane\",\n    \"last_name\": \"Doe\"\n  }\n}\n```\n\n### New version webhooks\n\nA sent document is never edited in place. To change it, the sender creates a new version, a replacement document. With the recall option, `recall_original` set to `true` on `POST /v1/documents/{id}/versions` or the recall checkbox in the app, this emits `document.recalled` for the original, carrying `event_meta.new_document_id`, the id of the replacement. Creating the replacement emits no event of its own, so this is how you learn it exists. Without the recall option no event is sent, and the replacement can only be found through its `parent_id`.\n\n```json\n{\n  \"event\": \"document.recalled\",\n  \"event_type\": \"document\",\n  \"event_action\": \"recalled\",\n  \"subscription_id\": \"pw1333abc\",\n  \"event_meta\": { \"new_document_id\": \"kp3rd8vn\" },\n  \"document\": { \"id\": \"7xa9bq2m\", \"status\": \"recalled\" }\n}\n```\n\nThe replacement points back at the document it replaced through `parent_id` on the document object. Both ids use the same format as `document.id`. `event_meta` is only present on a recall that is part of a new-version flow; a plain recall omits it. `parent_id` is `null` for documents that are not a new version, and versions can chain: a third version points at the second, not the first.\n\n### Rejection webhooks\n\n`document.rejected` uses the standard body. The reason the recipient gave is included in `event_meta.reason`, `null` when no reason was given. The same reason is available as `rejection_reason` from the document status and document details endpoints.\n\n```json\n{\n  \"event\": \"document.rejected\",\n  \"event_type\": \"document\",\n  \"event_action\": \"rejected\",\n  \"subscription_id\": \"pw1333abc\",\n  \"event_meta\": { \"reason\": \"Pricing is above the approved budget\" },\n  \"recipient\": { \"email\": \"sam.tester@example.com\", \"status\": \"rejected\" },\n  \"document\": { \"id\": \"7xa9bq2m\", \"status\": \"rejected\" }\n}\n```\n\n### Signing group webhooks\n\nA signing group lets the sender add several signers of whom only some have to sign. `document.signing_groups` lists the groups on the document, `[]` when there are none. Each entry has `id`, `name`, `role` and `required_signatures`, the number of members who must sign. A recipient's `signing_group_id` is the `id` of the group it belongs to.\n\nWhen a group has collected `required_signatures` signatures, its remaining members get `status` `notrequired`. They are no longer asked to sign, no `document.partially_signed` event is sent for them, and they still receive the signed document. A member can also reject without rejecting the document, as long as the group can still collect its required signatures. That rejection sends `document.partially_rejected` with the reason in `event_meta.reason`, and no `document.rejected`; the document keeps its status. Members with `notrequired` or `rejected` have `signing_methods` `[]`, even if they verified their identity before the group was complete.\n\nTo know that a document is completed, use `document.signed`, or `document.status` `signed`, or `signedwithoutverification` for a document marked as signed with `POST /v1/documents/{id}/manually-sign` without a file. Do not wait for every recipient with `role` `signer` to have `status` `signed`: on a completed document with signing groups, some members have `notrequired` or `rejected` instead.\n\n```json\n{\n  \"event\": \"document.signed\",\n  \"document\": {\n    \"id\": \"abc123def\",\n    \"status\": \"signed\",\n    \"signing_groups\": [\n      {\n        \"id\": \"0b6f7c3e-2a41-4c1e-9d55-6f0e8a1b2c3d\",\n        \"name\": \"Board\",\n        \"role\": \"signer\",\n        \"required_signatures\": 2\n      }\n    ]\n  },\n  \"recipients\": [\n    { \"email\": \"alex@example.com\", \"role\": \"signer\", \"status\": \"signed\", \"signing_group_id\": \"0b6f7c3e-2a41-4c1e-9d55-6f0e8a1b2c3d\" },\n    { \"email\": \"sam@example.com\", \"role\": \"signer\", \"status\": \"signed\", \"signing_group_id\": \"0b6f7c3e-2a41-4c1e-9d55-6f0e8a1b2c3d\" },\n    { \"email\": \"robin@example.com\", \"role\": \"signer\", \"status\": \"notrequired\", \"signing_group_id\": \"0b6f7c3e-2a41-4c1e-9d55-6f0e8a1b2c3d\" }\n  ]\n}\n```\n\n### Page tracking webhooks\n\n`document.page_tracked` uses the standard body. The `recipient` and `document` objects identify who viewed which document; page-specific values are in `event_meta`. `page_id` identifies the page and `page_time` is the cumulative time this recipient has spent on the page, in seconds, the same value as that recipient's `page_time` from `GET /v1/documents/{documentId}/pages/tracking`.\n\n```json\n{\n  \"event\": \"document.page_tracked\",\n  \"event_type\": \"document\",\n  \"event_action\": \"page_tracked\",\n  \"subscription_id\": \"pw1333abc\",\n  \"document\": { \"id\": \"abc123def\" },\n  \"recipient\": { \"id\": \"recipient123\" },\n  \"event_meta\": { \"page_id\": \"eex9evra53x776\", \"page_time\": 16 }\n}\n```\n\n### Failures and retries\n\nA delivery fails when your URL answers with a status outside 2xx, cannot be reached, redirects more than 10 times, or does not answer before the request times out. A failed delivery is retried up to three times, and each retry waits at least the delay below after the previous attempt. A 410 Gone response is the exception: it disables the subscription immediately, without retries or an alert email. Any other failed response whose body is exactly `please unsubscribe me!` deletes the subscription, also without retries or an alert email.\n\n| Retry | Delay after the previous attempt | If the retry fails |\n| --- | --- | --- |\n| First | 60 minutes | An alert email is sent and the next retry is scheduled |\n| Second | 12 hours | The next retry is scheduled |\n| Third | 24 hours | The subscription is disabled |\n\nThe alert email goes to the subscription's `notification_email`. When none is set, it goes to a user in your entity, usually the document's sender. No alert email is sent for `document.page_tracked` or `document.partially_rejected`.\n\nA subscription whose `host` is `force.com`, the default for a target URL on a `force.com` domain, gets each delivery once: a failed delivery is not retried, sends no alert email and does not disable the subscription. A 410 Gone response and the `please unsubscribe me!` body still apply.\n\nA disabled subscription has `status` `-1` and receives no new events, but retries that were already scheduled are still sent. Updating the subscription sets it back to active.\n\n## Deal rooms\n\nDeal rooms have a separate REST API for creating rooms, managing participants and sending invitations. The full endpoint reference is in the [Deal Room API documentation](https://developer.getaccept.com/?api=dealroom). Authentication works the same way as described in the Authentication section.\n\n### Room links\n\nDeal room links are deterministic and can be constructed in an automation without an extra API call:\n\n```\nhttps://room.getaccept.com/dsr/{entity_id}/{room_id}\n```\n\n- `entity_id` is the id of your GetAccept entity. It is the same entity id used across the API and is constant for all rooms in the entity.\n- `room_id` is the id of the deal room, returned when creating a room and included in deal room webhook payloads.\n\nIf your entity has a branded subdomain or a custom domain, links generated by the app use that domain instead of `room.getaccept.com`; the path format is unchanged. This universal room link is not tied to a participant, so visitors are asked to identify themselves before entering. Personalized invitation links carry an additional `/{participant_id}` segment and should always be taken from the `roomLink` value returned when inviting a participant through the Deal Room API.\n\n## Errors\n\nA failed request returns a 4xx status with a descriptive message; unexpected errors return 500. Errors have this shape:\n\n```json\n{\n  \"code\": 400,\n  \"message\": \"Invalid data\",\n  \"errors\": \"Invalid input data: name: name is required\"\n}\n```\n\nA 5xx response body also carries `trace_id` and `support_message`. Include the `trace_id` when you contact support:\n\n```json\n{\n  \"code\": 500,\n  \"message\": \"Something went wrong\",\n  \"errors\": \"Something went wrong\",\n  \"trace_id\": \"4bf92f3577b34da6a3ce929d0e0e4736\",\n  \"support_message\": \"If this error persists, please contact support and include the trace_id.\"\n}\n```\n\nA `401` for an access token that is not valid or has expired can have an OAuth 2.0 error body instead:\n\n```json\n{\n  \"error\": \"invalid_token\",\n  \"error_description\": \"The access token provided is invalid\"\n}\n```\n\n| Status | Title | Description |\n| --- | --- | --- |\n| 400 | Bad request | The request is not formatted properly, for example the JSON body is missing or cannot be parsed. `POST /v1/auth` also answers 400 when `Content-Type` is not `application/json`. |\n| 400 | Invalid data | The posted data is invalid or of the wrong type. |\n| 400 | Invalid id | The id has an invalid format. |\n| 401 | Unauthorized | The access token is missing, invalid or expired. |\n| 403 | Access denied | The authorized user does not have access to the document, template or entity. Every endpoint that takes an access token also answers 403 when the user or entity may not use the API, for example because the entity has no active subscription or is quarantined or marked for deletion. |\n| 404 | Not found | The document, recipient, template or endpoint could not be found. A request with an HTTP method the endpoint does not support also returns 404, for example `GET /v1/auth`, because the auth endpoint only accepts `POST`. |\n| 408 | Request timeout | The document download or preview did not finish in time. |\n| 409 | Conflict | The request conflicts with the current state, for example a duplicate name or key, deleting or deactivating the only active admin of the entity, or writing to a knowledge base synced from Notion. Each endpoint lists its cases. |\n| 413 | Payload too large | The request body is larger than the maximum request size. |\n| 415 | Unsupported media type | The request has a body with a `Content-Type` the API does not accept, such as `text/csv`. Send `application/json`, or another content type the endpoint lists. |\n| 422 | Unprocessable entity | The request is well formed but cannot be applied, for example a template, or pricing table values, that cannot be applied to the document. Each endpoint lists its cases. |\n| 423 | Locked | The entity is marked for deletion, so no access token can be issued for it. |\n| 429 | Too many requests | The user has sent more requests than the rate limit allows, and further requests are rejected for one rate-limit window. Wait the number of seconds in the `Retry-After` header before trying again. `POST /v1/auth` answers 429 without `Retry-After` when token requests for the same user come less than a second apart, whichever entity they select. `POST /v1/users` answers 429 without `Retry-After` when too many users have registered from the IP address of the request in the last few days, so retrying soon does not help. See [Rate limits](#rate-limits). |\n| 500 | Internal server error | A rare error on our side. The body carries a `trace_id` to include when you contact support. |\n| 503 | Service unavailable | A service the request depends on is temporarily unavailable. The request was not completed and can be retried after a short delay. |\n\n## Rate limits\n\nTo keep the API fast for everyone, requests are rate limited. When a limit is exceeded the response is `429 Too Many Requests`. Responses from every endpoint except `POST /v1/auth` carry `X-Rate-Limit-Limit`, the limit, `X-Rate-Limit-Remaining`, the requests left in the current window, and `X-Rate-Limit-Reset`, the seconds until the window resets. A `401` for a missing or rejected access token and a `404` for a path that does not exist carry none of them. A `429` response from these limits also carries `Retry-After`, the seconds until requests are accepted again. While requests are blocked, `X-Rate-Limit-Remaining` and `X-Rate-Limit-Reset` describe the next window and can show requests left, so wait for `Retry-After` instead.\n\nThe limit is 60 requests per one-minute window, and 3600 requests per hour in total.\n\n`POST /v1/auth` is not counted against these limits. In production it answers `429` when token requests for the same user come less than a second apart, whichever entity they select. That `429` carries only `X-Rate-Limit-Remaining: 0` and no `Retry-After`, so wait a moment before retrying.\n","version":"v1","contact":{}},"tags":[{"name":"Auth","description":"Obtain, refresh and switch access tokens, and verify that an access token works."},{"name":"Documents","description":"Create, send, track and manage documents together with their recipients, fields, comments, attachments and tags."},{"name":"Templates","description":"List templates, read their roles, fields, pricing tables and custom images, and open a template in its external editor."},{"name":"Uploads","description":"Upload files, attachments, archived documents and videos for later requests, and list uploaded attachments."},{"name":"Subscriptions","description":"Webhook subscriptions that post document and recipient events to your callback URL."},{"name":"Contacts","description":"Manage the contacts used as a lookup reference when adding recipients to a document."},{"name":"Custom Data","description":"Define the custom document properties available to the entity."},{"name":"Products","description":"Manage the product library used in pricing tables, and list product properties."},{"name":"Email Templates","description":"Manage the email templates used when sending documents."},{"name":"Communication Templates","description":"Manage the communication templates that hold the messages recipients receive."},{"name":"Folders","description":"List the folders that structure archived documents and templates."},{"name":"Videos","description":"List uploaded videos and follow the conversion status of a video job."},{"name":"Knowledge Bases","description":"Manage the knowledge base entries that give AI features context about your business."},{"name":"Users","description":"Create and manage users, and read their statistics, sessions and notifications."},{"name":"Teams","description":"Create teams and manage their members."},{"name":"Entity","description":"Read the authenticated entity's settings and subscription features."},{"name":"Devices","description":"Register and remove the devices that receive push notifications."}],"servers":[{"url":"https://api.getaccept.com"}],"components":{"securitySchemes":{"authorization":{"scheme":"bearer","bearerFormat":"JWT","type":"http"},"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://app.getaccept.com/oauth2/authorize","tokenUrl":"https://app.getaccept.com/oauth2/token","scopes":{}}}}},"schemas":{"TestResponse":{"type":"object","properties":{"user_id":{"type":"string","description":"Id of the authenticated user."},"entity_id":{"type":"string","description":"Id of the entity the access token belongs to."},"first_name":{"type":"string","description":"First name of the authenticated user."},"last_name":{"type":"string","description":"Last name of the authenticated user."},"entity_name":{"type":"string","description":"Name of the entity the access token belongs to."}},"required":["user_id","entity_id","first_name","last_name","entity_name"]},"TeamSettingsDto":{"type":"object","properties":{"notification_email":{"type":"string","description":"Email address for team notifications"}}},"TeamsDto":{"type":"object","properties":{"team_id":{"type":"string","description":"Id of the team."},"name":{"type":"string","description":"Name of the team."},"status":{"type":"string","description":"Status of the team, active or inactive."},"team_user_count":{"type":"number","description":"Number of users in the team, returned when teams are listed. Missing when the entity restricts data visibility and the caller gets only their own teams."}},"required":["team_id","name","status"]},"TeamsResponse":{"type":"object","properties":{"teams":{"description":"Teams of the entity.","type":"array","items":{"$ref":"#/components/schemas/TeamsDto"}}},"required":["teams"]},"TeamStatus":{"type":"string","enum":["active","inactive"],"description":"Status of the team"},"CreateTeamBody":{"type":"object","properties":{"name":{"type":"string","description":"Name of the team"},"status":{"description":"Status of the team","allOf":[{"$ref":"#/components/schemas/TeamStatus"}]},"settings":{"description":"Optional team settings object","allOf":[{"$ref":"#/components/schemas/TeamSettingsDto"}]}},"required":["name","status"]},"CreateTeamResponse":{"type":"object","properties":{"team":{"description":"The created team.","allOf":[{"$ref":"#/components/schemas/TeamsDto"}]}},"required":["team"]},"UpdateTeamBody":{"type":"object","properties":{"name":{"type":"string","description":"Name of the team"},"status":{"description":"Status of the team","allOf":[{"$ref":"#/components/schemas/TeamStatus"}]},"settings":{"description":"Optional team settings object","allOf":[{"$ref":"#/components/schemas/TeamSettingsDto"}]}}},"TeamUserDto":{"type":"object","properties":{"team_id":{"type":"string","description":"Id of the team the user belongs to."},"entity_id":{"type":"string","description":"Id of the entity the team belongs to."},"user_id":{"type":"string","description":"Id of the user."}},"required":["team_id","entity_id","user_id"]},"TeamUsersResponse":{"type":"object","properties":{"users":{"description":"Users in the team.","type":"array","items":{"$ref":"#/components/schemas/TeamUserDto"}}},"required":["users"]},"AddUserToTeamBody":{"type":"object","properties":{"user_id":{"type":"string","description":"Id of the user to add to the team"}},"required":["user_id"]},"AttachmentDto":{"type":"object","properties":{"attachment_id":{"type":"string","description":"Unique identifier of the attachment."},"attachment_description":{"type":"string","description":"Description of the attachment."},"attachment_type":{"type":"string","description":"Kind of attachment: file for an uploaded file, external for a link, or upload for a request that a recipient uploads a file."},"attachment_title":{"type":"string","description":"Title of the attachment as it is shown to the reader."},"attachment_url":{"type":"string","description":"URL of the external attachment, empty for an uploaded file."},"attachment_extension":{"type":"string","description":"File extension of the attachment."},"attachment_size":{"type":"number","description":"Size of the attachment file in bytes."},"published":{"type":"boolean","description":"Whether the attachment is shared with all users of the entity. An unshared attachment is listed only to the user who added it."},"library":{"type":"boolean","description":"Whether the attachment is part of the entity attachment library."},"access_recipient_list":{"type":"string","description":"Always an empty string in this list. Access is restricted per document attachment."},"editable":{"type":"boolean","description":"Whether the attachment belongs to the authenticated user."},"restrict_access":{"type":"boolean","description":"Always false in this list. Access is restricted per document attachment."},"require_view":{"type":"boolean","description":"Always false in this list. A required view is set per document attachment."}},"required":["attachment_id","attachment_description","attachment_type","attachment_title","attachment_url","attachment_extension","attachment_size","published","library","access_recipient_list","editable","restrict_access","require_view"]},"ListAttachmentResponse":{"type":"object","properties":{"attachments":{"description":"Attachments of the entity that are shared, or that belong to the authenticated user, whether or not they are in the attachment library.","type":"array","items":{"$ref":"#/components/schemas/AttachmentDto"}}},"required":["attachments"]},"QuantityDto":{"type":"object","properties":{"variable":{"type":"boolean","description":"Whether a recipient may change the quantity."},"default_min_value":{"type":"string","description":"Lowest quantity a recipient may set."},"default_max_value":{"type":"string","description":"Highest quantity a recipient may set."}}},"MetaDataDto":{"type":"object","properties":{"locale":{"type":"string","description":"Locale the price is formatted with."},"currency":{"type":"string","description":"Currency the price is given in."},"optional_product":{"type":"boolean","description":"Whether a recipient may include or exclude the product."},"quantity":{"description":"How the quantity of the product may be changed.","allOf":[{"$ref":"#/components/schemas/QuantityDto"}]}},"required":["locale","currency"]},"ProductPropertyFieldDto":{"type":"object","properties":{"product_property_id":{"type":"string","description":"Id of the product property the value belongs to."},"value":{"type":"string","description":"Value of the product property for this product."}},"required":["product_property_id","value"]},"ImageTransformsDto":{"type":"object","properties":{"scale":{"type":"number","description":"Zoom applied to the image."},"translate_x":{"type":"number","description":"Horizontal offset applied to the image."},"translate_y":{"type":"number","description":"Vertical offset applied to the image."}}},"ImageDto":{"type":"object","properties":{"id":{"type":"string","description":"Id of the uploaded image file."},"transforms":{"description":"How the image is scaled and positioned.","allOf":[{"$ref":"#/components/schemas/ImageTransformsDto"}]}},"required":["id"]},"ProductDto":{"type":"object","properties":{"id":{"type":"string","description":"Id of the product."},"entity_id":{"type":"string","description":"Id of the entity that owns the product."},"name":{"type":"string","description":"Name of the product."},"description":{"type":"string","description":"Description of the product, which may contain markdown."},"sku":{"type":"string","description":"Stock keeping unit of the product."},"price":{"type":"string","description":"Price of the product as stored, a decimal string in the major unit of `meta_data.currency`, for example 199.99."},"meta_data":{"description":"Currency, locale and quantity settings of the product.","allOf":[{"$ref":"#/components/schemas/MetaDataDto"}]},"created_at":{"type":"string","description":"When the product was created, in UTC as ISO 8601 with an offset and without milliseconds, such as 2024-01-01T00:00:00+00:00."},"updated_at":{"type":"string","description":"When the product was last updated, in UTC as ISO 8601 with an offset and without milliseconds, such as 2024-01-01T00:00:00+00:00."},"created_by":{"type":"string","description":"Id of the user that created the product."},"updated_by":{"type":"string","description":"Id of the user that last updated the product."},"tax":{"type":"string","description":"Tax rate of the product in percent."},"product_property_fields":{"description":"Values of the product properties for this product.","type":"array","items":{"$ref":"#/components/schemas/ProductPropertyFieldDto"}},"images":{"description":"Images of the product.","type":"array","items":{"$ref":"#/components/schemas/ImageDto"}}},"required":["id","entity_id","name","description","sku","price","meta_data","created_at","updated_at","created_by","updated_by"]},"ProductListDto":{"type":"object","properties":{"products":{"description":"Products of the entity.","type":"array","items":{"$ref":"#/components/schemas/ProductDto"}},"total_count":{"type":"number","description":"Number of products the filter matched, ignoring limit and offset."}},"required":["products","total_count"]},"ColumnType":{"type":"string","description":"Kind of value a pricing table column or product property holds.","enum":["text","number","image"]},"ColumnUnitType":{"type":"string","description":"Unit a numeric value is given in.","enum":["currency","percentage","unknown"]},"ProductPropertyUsageResourceDomain":{"type":"string","enum":["contract","dealroom"],"description":"Kind of resource that uses the property."},"ProductPropertyUsageDto":{"type":"object","properties":{"resource_id":{"type":"string","description":"Id of the resource that uses the property."},"type":{"description":"Kind of resource that uses the property.","allOf":[{"$ref":"#/components/schemas/ProductPropertyUsageResourceDomain"}]},"number_of_times":{"type":"number","description":"Number of times the resource uses the property."},"updated_at":{"type":"string","description":"When the usage was last updated, in UTC as ISO 8601 with an offset and without milliseconds, such as 2024-01-01T00:00:00+00:00."}},"required":["resource_id","type","number_of_times","updated_at"]},"ProductPropertyDto":{"type":"object","properties":{"id":{"type":"string","description":"Id of the product property."},"entity_id":{"type":"string","description":"Id of the entity that owns the product property."},"name":{"type":"string","description":"Name of the product property."},"display_name":{"type":"string","description":"Label of the product property."},"type":{"description":"Kind of value the product property holds.","allOf":[{"$ref":"#/components/schemas/ColumnType"}]},"unit":{"description":"Unit the numeric values are given in. Only present on number properties.","allOf":[{"$ref":"#/components/schemas/ColumnUnitType"}]},"created_at":{"type":"string","description":"When the product property was created, in UTC as ISO 8601 with an offset and without milliseconds, such as 2024-01-01T00:00:00+00:00."},"created_by":{"type":"string","description":"Id of the user that created the product property."},"updated_at":{"type":"string","description":"When the product property was last updated, in UTC as ISO 8601 with an offset and without milliseconds, such as 2024-01-01T00:00:00+00:00."},"updated_by":{"type":"string","description":"Id of the user that last updated the product property."},"usages":{"description":"Resources that use the product property.","type":"array","items":{"$ref":"#/components/schemas/ProductPropertyUsageDto"}}},"required":["id","entity_id","name","display_name","type","created_at","created_by","updated_at","updated_by"]},"ProductPropertyListDto":{"type":"object","properties":{"product_properties":{"description":"Product properties of the entity.","type":"array","items":{"$ref":"#/components/schemas/ProductPropertyDto"}},"total_count":{"type":"number","description":"Number of product properties the filter matched, ignoring limit and offset."}},"required":["product_properties","total_count"]},"UpdateQuantityDto":{"type":"object","properties":{"variable":{"type":"boolean","description":"Whether the quantity is variable."},"default_min_value":{"type":"string","description":"Default minimum quantity as a string."},"default_max_value":{"type":"string","description":"Default maximum quantity as a string."}}},"CreateMetaDataDto":{"type":"object","properties":{"locale":{"type":"string","description":"Locale code in the form ll-CC, for example `en-US` or `sv-SE`. Any other form answers 400."},"currency":{"type":"string","description":"Currency code, for example `USD` or `SEK`."},"optional_product":{"type":"boolean","description":"Whether the product is optional."},"quantity":{"description":"Quantity settings object.","allOf":[{"$ref":"#/components/schemas/UpdateQuantityDto"}]}},"required":["locale","currency"]},"UpdateProductPropertyFieldDto":{"type":"object","properties":{"product_property_id":{"type":"string","description":"ID of the product property."},"value":{"type":"string","description":"Value of the product property. Text-type properties accept markdown or plain text."}},"required":["product_property_id","value"]},"CreateProductDto":{"type":"object","properties":{"name":{"type":"string","description":"Product name."},"description":{"type":"string","description":"Product description. Accepts markdown or plain text."},"sku":{"type":"string","description":"Product SKU."},"price":{"type":"string","description":"Price in the major unit of `meta_data.currency`, as a decimal string with a period as decimal separator, for example 199.99. Must be 0 or more."},"tax":{"type":"string","description":"Tax rate in percent as a decimal string, for example 25 for 25 percent. Must be 0 or more."},"meta_data":{"description":"Product metadata object.","allOf":[{"$ref":"#/components/schemas/CreateMetaDataDto"}]},"product_property_fields":{"description":"Array of product property fields.","type":"array","items":{"$ref":"#/components/schemas/UpdateProductPropertyFieldDto"}}},"required":["name","description","sku","price","meta_data"]},"UpdateMetaDataDto":{"type":"object","properties":{"locale":{"type":"string","description":"Locale code, for example `en-US` or `sv-SE`. Required whenever `meta_data` is sent."},"currency":{"type":"string","description":"Currency code, for example `USD` or `SEK`. Required whenever `meta_data` is sent."},"optional_product":{"type":"boolean","description":"Whether the product is optional."},"quantity":{"description":"Quantity settings object.","allOf":[{"$ref":"#/components/schemas/UpdateQuantityDto"}]}},"required":["locale","currency"]},"UpdateImageTransformsDto":{"type":"object","properties":{"scale":{"type":"number","description":"Scale factor for the image."},"translate_x":{"type":"number","description":"Horizontal translation in pixels."},"translate_y":{"type":"number","description":"Vertical translation in pixels."}}},"UpdateImageDto":{"type":"object","properties":{"id":{"type":"string","description":"ID of the image."},"transforms":{"description":"Image transformation settings.","allOf":[{"$ref":"#/components/schemas/UpdateImageTransformsDto"}]}},"required":["id"]},"UpdateProductDto":{"type":"object","properties":{"name":{"type":"string","description":"Product name."},"description":{"type":"string","description":"Product description. Accepts markdown or plain text."},"sku":{"type":"string","description":"Product SKU."},"price":{"type":"string","description":"Price in the major unit of `meta_data.currency`, as a decimal string with a period as decimal separator, for example 199.99. Must be 0 or more."},"tax":{"type":"string","description":"Tax rate in percent as a decimal string, for example 25 for 25 percent. Must be 0 or more."},"meta_data":{"description":"Product metadata object. When sent it must include `locale` and `currency`; the other metadata fields are merged into the stored ones.","allOf":[{"$ref":"#/components/schemas/UpdateMetaDataDto"}]},"product_property_fields":{"description":"Replaces all product property values of the product.","type":"array","items":{"$ref":"#/components/schemas/UpdateProductPropertyFieldDto"}},"images":{"description":"Replaces all images of the product. Images left out are removed from the product and their files are deleted.","type":"array","items":{"$ref":"#/components/schemas/UpdateImageDto"}}}},"TagStatus":{"type":"string","enum":["active","inactive"],"description":"Status of the tag, which is active on creation and can later be set to inactive."},"TagDto":{"type":"object","properties":{"id":{"type":"string","description":"Id of the tag."},"title":{"type":"string","description":"Title of the tag as it is shown on documents."},"status":{"description":"Status of the tag, which is active on creation and can later be set to inactive.","allOf":[{"$ref":"#/components/schemas/TagStatus"}]}},"required":["id","title","status"]},"TagsResponse":{"type":"object","properties":{"tags":{"description":"Every tag defined for the entity.","type":"array","items":{"$ref":"#/components/schemas/TagDto"}}},"required":["tags"]},"CustomDataValueType":{"type":"string","enum":["string","number","boolean","setValues"],"description":"Type of value the property accepts on a document."},"AllowedPropertyType":{"type":"string","enum":["default","custom"],"description":"Whether the property is a built-in default or one the entity created."},"Language":{"type":"string","enum":["sv","da","no","fr","en","es","de","nl","pt","fi","pl"],"description":"Language the localized `name` and `description` apply to."},"TranslationDto":{"type":"object","properties":{"language":{"description":"Language the localized `name` and `description` apply to.","allOf":[{"$ref":"#/components/schemas/Language"}]},"name":{"type":"string","description":"Localized display name in this language."},"description":{"type":"string","description":"Localized description stored alongside the `name`. The translations of an option are returned with only `language` and `name`."}},"required":["language","name"]},"CustomDataStatus":{"type":"string","enum":["active","inactive"],"description":"Status of the property, where a property stored without one is returned as active."},"CustomDataOptionStatus":{"type":"string","enum":["active","inactive"],"description":"Whether the option is active or inactive."},"CustomDataPropertyOption":{"type":"object","properties":{"key":{"type":"string","description":"Key of the allowed value, which is what a document stores as the value of the property."},"translations":{"description":"Localized display names, one entry per language.","type":"array","items":{"$ref":"#/components/schemas/TranslationDto"}},"status":{"description":"Whether the option is active or inactive.","allOf":[{"$ref":"#/components/schemas/CustomDataOptionStatus"}]}},"required":["key","translations","status"]},"AllowedCustomDataProperty":{"type":"object","properties":{"key":{"type":"string","description":"Key that identifies the property within the entity, where the built-in default properties are prefixed with a plus sign."},"value_type":{"description":"Type of value the property accepts on a document.","allOf":[{"$ref":"#/components/schemas/CustomDataValueType"}]},"property_type":{"description":"Whether the property is a built-in default or one the entity created.","allOf":[{"$ref":"#/components/schemas/AllowedPropertyType"}]},"label":{"type":"string","deprecated":true,"description":"Deprecated. Use translations instead."},"translations":{"description":"Localized display names, one entry per language.","type":"array","items":{"$ref":"#/components/schemas/TranslationDto"}},"status":{"description":"Status of the property, where a property stored without one is returned as active.","allOf":[{"$ref":"#/components/schemas/CustomDataStatus"}]},"options":{"description":"Allowed values of the property, returned only when `value_type` is setValues.","type":"array","items":{"$ref":"#/components/schemas/CustomDataPropertyOption"}}},"required":["key","value_type","property_type","status"]},"EntityCustomDataSettingsDto":{"type":"object","properties":{"entity_id":{"type":"string","description":"Id of the entity the custom data settings belong to."},"allowed_properties":{"description":"Custom data properties that may be set on documents in the entity: the custom ones in creation order, followed by the default ones unless the entity has turned the defaults off.","type":"array","items":{"$ref":"#/components/schemas/AllowedCustomDataProperty"}}},"required":["entity_id","allowed_properties"]},"CreateTranslationBody":{"type":"object","properties":{"language":{"description":"Language of the translation.","allOf":[{"$ref":"#/components/schemas/Language"}]},"name":{"type":"string","description":"Localized display name."},"description":{"type":"string","description":"Localized description of the property."}},"required":["language","name"]},"CreateCustomDataPropertyOptionBody":{"type":"object","properties":{"key":{"type":"string","description":"Key of the allowed value. Follows the same character rules as the property key."},"translations":{"description":"Localized display names for the option, one entry per language. Each language may appear at most once.","type":"array","items":{"$ref":"#/components/schemas/CreateTranslationBody"}},"status":{"description":"Status of the allowed value.","allOf":[{"$ref":"#/components/schemas/CustomDataOptionStatus"}]}},"required":["key","translations","status"]},"AddCustomDataPropertyBody":{"type":"object","properties":{"key":{"type":"string","description":"Unique key for the custom data property. Must be unique within the entity and may contain letters, numbers, curly brackets, dots, dashes and underscores."},"value_type":{"description":"Type of value for the custom data property.","allOf":[{"$ref":"#/components/schemas/CustomDataValueType"}]},"label":{"type":"string","deprecated":true,"description":"Deprecated. Use translations instead. When provided without translations, the label is stored as a single translation for the entity default language."},"translations":{"description":"Localized display names for the property, one entry per language. Each language may appear at most once.","type":"array","items":{"$ref":"#/components/schemas/CreateTranslationBody"}},"options":{"description":"Options for setValues type. Required when value_type is setValues.","type":"array","items":{"$ref":"#/components/schemas/CreateCustomDataPropertyOptionBody"}}},"required":["key","value_type"]},"UpdateEntityCustomDataPropertyBody":{"type":"object","properties":{"label":{"type":"string","deprecated":true,"description":"Deprecated. Use translations instead."},"translations":{"description":"Localized display names, replacing the whole translations array.","type":"array","items":{"$ref":"#/components/schemas/CreateTranslationBody"}},"status":{"description":"New status for the property.","allOf":[{"$ref":"#/components/schemas/CustomDataStatus"}]},"options":{"description":"Options for setValues properties. Replaces the entire options array.","type":"array","items":{"$ref":"#/components/schemas/CreateCustomDataPropertyOptionBody"}}}},"DocumentTypeStatus":{"type":"string","enum":["active","inactive"],"description":"Whether the document type is active. Only an active document type can be used to create a document."},"DocumentTypeDto":{"type":"object","properties":{"type":{"type":"string","description":"Identifier of the document (contract) type. Pass it as `type` when you create a document."},"status":{"description":"Whether the document type is active. Only an active document type can be used to create a document.","allOf":[{"$ref":"#/components/schemas/DocumentTypeStatus"}]},"translations":{"description":"Localized display names, one entry per language.","type":"array","items":{"$ref":"#/components/schemas/TranslationDto"}}},"required":["type","status","translations"]},"DocumentTypesResponse":{"type":"object","properties":{"document_types":{"description":"Every document type configured for the entity.","type":"array","items":{"$ref":"#/components/schemas/DocumentTypeDto"}}},"required":["document_types"]},"AuthBody":{"type":"object","properties":{"email":{"type":"string","description":"The email of the user"},"password":{"type":"string","description":"The password of the user"},"client_id":{"type":"string","description":"The client id of your app, if you received one from our API support"},"entity_id":{"type":"string","description":"Which entity to select when the user belongs to several. When omitted, the entity of the user's oldest active membership is used, skipping entities that are marked for deletion or quarantined."},"user_id":{"type":"string","description":"Id of the user to authenticate, used together with the required `email` to select one specific user. It must be the id of a user with that email, otherwise the request fails like wrong credentials. Ignored when `email` itself carries the `@user.id` suffix, which takes precedence."}},"required":["email","password"]},"AuthDto":{"type":"object","properties":{"access_token":{"type":"string","description":"Access token to send as an Authorization Bearer header on every request."},"expires_in":{"type":"number","description":"Seconds until the access token expires."}},"required":["access_token","expires_in"]},"LatestCommentDto":{"type":"object","properties":{"id":{"type":"string","description":"Id of the comment."},"document_id":{"type":"string","description":"Id of the document the comment was written on."},"document_name":{"type":"string","description":"Name of the document the comment was written on."},"depth":{"type":"number","deprecated":true,"description":"Deprecated field, set to 1 when the comment replies to another comment and 0 otherwise."},"self":{"type":"number","description":"Whether an entity user wrote the comment rather than a recipient, as 1 or 0."},"full_name":{"type":"string","description":"Name of the person that wrote the comment, empty when neither a recipient nor a user could be resolved."},"email":{"type":"string","nullable":true,"description":"Email address of the person that wrote the comment."},"thumb_url":{"type":"string","nullable":true,"description":"Avatar of the person that wrote the comment."},"text":{"type":"string","description":"Text of the comment."},"position":{"type":"string","deprecated":true,"description":"Deprecated position stored on older comments, which comments created through the API never set."},"created_at":{"type":"string","nullable":true,"description":"When the comment was written, in UTC."}},"required":["id","document_id","document_name","depth","self","full_name","email","thumb_url","text","position","created_at"]},"CommunicationTemplateSendoutTemplate":{"type":"object","properties":{"email_subject":{"type":"string","description":"Subject line of the email."},"message":{"type":"string","description":"Body of the email."},"button_text":{"type":"string","description":"Label of the button in the email."},"footer":{"type":"string","description":"Footer of the email."},"sms_message":{"type":"string","description":"Text of the accompanying SMS."},"automatic_message":{"type":"boolean","description":"Whether the message is sent automatically."}}},"CommunicationTemplateSignedTemplate":{"type":"object","properties":{"email_subject":{"type":"string","description":"Subject line of the email."},"message":{"type":"string","description":"Body of the email."},"button_text":{"type":"string","description":"Label of the button in the email."},"footer":{"type":"string","description":"Footer of the email."}}},"CommunicationTemplateConversationTemplate":{"type":"object","properties":{"conversation_starter":{"type":"string","description":"First message of the conversation."},"automatic_message":{"type":"boolean","description":"Whether the conversation starter is sent automatically."},"reminder_message":{"type":"string","description":"Message sent as a reminder in the conversation."},"automatic_reminder_message":{"type":"boolean","description":"Whether the reminder is sent automatically."}}},"CommunicationTemplateStatus":{"type":"string","enum":["draft","published","deleted"],"description":"Status of the template: published, draft or deleted. A deleted template can still be read by id."},"CommunicationTemplateType":{"type":"string","enum":["default","none"],"description":"Kind of communication template."},"CommunicationTemplateDto":{"type":"object","properties":{"id":{"type":"string","description":"Id of the communication template."},"entity_id":{"type":"string","description":"Id of the entity that owns the communication template."},"name":{"type":"string","description":"Name of the communication template."},"language":{"type":"string","description":"Language of the template as an ISO 639 code, for example en or sv."},"email_sendout_template":{"description":"Email sent when the document is sent.","allOf":[{"$ref":"#/components/schemas/CommunicationTemplateSendoutTemplate"}]},"email_sendout_reminder_template":{"description":"Email sent as a reminder.","allOf":[{"$ref":"#/components/schemas/CommunicationTemplateSendoutTemplate"}]},"signed_sendout_template":{"description":"Email sent once the document is signed.","allOf":[{"$ref":"#/components/schemas/CommunicationTemplateSignedTemplate"}]},"conversation_sendout_template":{"description":"Messages used in the document conversation.","allOf":[{"$ref":"#/components/schemas/CommunicationTemplateConversationTemplate"}]},"created_by":{"type":"string","description":"Id of the user that created the communication template."},"updated_by":{"type":"string","description":"Id of the user that last updated the communication template."},"tags":{"description":"Tags of the communication template.","type":"array","items":{"type":"string"}},"created_at":{"type":"string","description":"When the communication template was created."},"updated_at":{"type":"string","description":"When the communication template was last updated."},"status":{"description":"Status of the template: published, draft or deleted. A deleted template can still be read by id.","allOf":[{"$ref":"#/components/schemas/CommunicationTemplateStatus"}]},"deleted_at":{"type":"number","description":"When the communication template was deleted, in epoch milliseconds, unlike created_at and updated_at. Only present on templates that were deleted."},"deleted_by":{"type":"string","description":"Id of the user that deleted the communication template."},"type":{"description":"Kind of communication template.","allOf":[{"$ref":"#/components/schemas/CommunicationTemplateType"}]}},"required":["id","entity_id","name","language","created_by","updated_by","created_at","updated_at","status","type"]},"GetCommunicationTemplatesResponse":{"type":"object","properties":{"communication_templates":{"description":"Communication templates of the entity.","type":"array","items":{"$ref":"#/components/schemas/CommunicationTemplateDto"}}},"required":["communication_templates"]},"CreateCommunicationTemplateBody":{"type":"object","properties":{"name":{"type":"string","description":"Communication template name"},"language":{"description":"Language of the template, one of sv, da, no, fr, en, es, de, nl, pt, fi or pl. Any other value answers 400.","allOf":[{"$ref":"#/components/schemas/Language"}]},"email_sendout_template":{"description":"Template for the initial communication","allOf":[{"$ref":"#/components/schemas/CommunicationTemplateSendoutTemplate"}]},"email_sendout_reminder_template":{"description":"Template for the reminder sendout","allOf":[{"$ref":"#/components/schemas/CommunicationTemplateSendoutTemplate"}]},"signed_sendout_template":{"description":"Template for signed document sendout","allOf":[{"$ref":"#/components/schemas/CommunicationTemplateSignedTemplate"}]},"conversation_sendout_template":{"description":"Conversation starter and reminder template","allOf":[{"$ref":"#/components/schemas/CommunicationTemplateConversationTemplate"}]},"tags":{"description":"Array of tags for the communication template","type":"array","items":{"type":"string"}},"status":{"description":"Status of the new template: published, draft or deleted.","allOf":[{"$ref":"#/components/schemas/CommunicationTemplateStatus"}]},"type":{"description":"Kind of communication template.","allOf":[{"$ref":"#/components/schemas/CommunicationTemplateType"}]}},"required":["name","language","status"]},"UpdateCommunicationTemplateBody":{"type":"object","properties":{"name":{"type":"string","description":"Name of the communication template."},"language":{"description":"Language of the template, one of sv, da, no, fr, en, es, de, nl, pt, fi or pl. Any other value answers 400.","allOf":[{"$ref":"#/components/schemas/Language"}]},"email_sendout_template":{"description":"Email sent when the document is sent.","allOf":[{"$ref":"#/components/schemas/CommunicationTemplateSendoutTemplate"}]},"email_sendout_reminder_template":{"description":"Email sent as a reminder.","allOf":[{"$ref":"#/components/schemas/CommunicationTemplateSendoutTemplate"}]},"signed_sendout_template":{"description":"Email sent once the document is signed.","allOf":[{"$ref":"#/components/schemas/CommunicationTemplateSignedTemplate"}]},"conversation_sendout_template":{"description":"Messages used in the document conversation.","allOf":[{"$ref":"#/components/schemas/CommunicationTemplateConversationTemplate"}]},"tags":{"description":"Tags of the communication template.","type":"array","items":{"type":"string"}},"status":{"description":"Status to set: published, draft or deleted. Setting deleted records deleted_at and deleted_by.","allOf":[{"$ref":"#/components/schemas/CommunicationTemplateStatus"}]}}},"DeviceDto":{"type":"object","properties":{"deviceId":{"type":"string","description":"Id of the device, which the delete route accepts."},"type":{"type":"string","description":"Type of the device, stored as sent and returned unchanged."},"token":{"type":"string","description":"Push token the device was registered with."},"createdAt":{"type":"string","description":"When the device was registered, as yyyy-MM-dd HH:mm:ss."},"updatedAt":{"type":"string","description":"When the device was last updated, as yyyy-MM-dd HH:mm:ss."}},"required":["deviceId","type","token","createdAt","updatedAt"]},"GetDevicesResponse":{"type":"object","properties":{"devices":{"description":"Registered devices of the authenticated user, holding at most one device.","type":"array","items":{"$ref":"#/components/schemas/DeviceDto"}}},"required":["devices"]},"CreateDeviceBody":{"type":"object","properties":{"type":{"type":"string","description":"Type of the device, stored as sent and returned unchanged."},"token":{"type":"string","description":"Push token of the device, which together with the user identifies the device to create or update."}},"required":["type","token"]},"CreateDeviceResponse":{"type":"object","properties":{"device_id":{"type":"string","description":"Id of the created or updated device."}},"required":["device_id"]},"CreateExternalSignatureSettingsDto":{"type":"object","properties":{"identification_stages":{"description":"Stages that require EID identification in addition to signing, where View also requires it before the document is viewed.","type":"array","items":{"type":"string"}}}},"CommentSettingsBody":{"type":"object","properties":{"disabled":{"type":"boolean","description":"Disable document chat for senders and recipients."},"disable_after_sign":{"type":"boolean","description":"Disable document chat once the document is signed."}}},"CreateSigningGroupDto":{"type":"object","properties":{"key":{"type":"string","description":"Caller-chosen key, unique within the request, that recipients reference through settings.signing_group_key"},"name":{"type":"string","description":"Name of the signing group."},"required_signatures":{"type":"number","description":"Number of members that must sign for the group to count as signed. At least 1 and lower than the number of members."}},"required":["key","name","required_signatures"]},"CreateRecipientSettingsDto":{"type":"object","properties":{"show_ssn_permission":{"type":"boolean","description":"Whether this recipient may see the national identity numbers of the other recipients."},"exclude_verified_eid_signature":{"type":"boolean","description":"Whether this recipient may sign by hand although the document requires a verified EID."},"redact_date_of_birth":{"type":"boolean","description":"Whether the date of birth of this recipient is masked on the signing certificate and withheld from the recipient responses."},"qes_allowed_methods":{"description":"Qualified electronic signature methods this recipient may sign with.","type":"array","items":{"type":"string"}},"signing_group_key":{"type":"string","description":"Key of the signing group in signing_groups this recipient belongs to. Members must be signers."}}},"CreateDocumentRecipientDto":{"type":"object","properties":{"first_name":{"type":"string","description":"First name of the recipient."},"last_name":{"type":"string","description":"Last name of the recipient."},"fullname":{"type":"string","description":"Full name of the recipient, used when first_name and last_name are omitted."},"email":{"type":"string","description":"Email address of the recipient, required when no mobile number is given."},"mobile":{"type":"string","description":"Mobile number of the recipient as [+countrycode]7123456789, required when no email is given."},"phone":{"type":"string","description":"Landline number of the recipient."},"title":{"type":"string","description":"Job title of the recipient."},"company_name":{"type":"string","description":"Company the recipient represents."},"company_number":{"type":"string","description":"Registration number of the company the recipient represents."},"company_id":{"type":"string","description":"Identifier of the company the recipient represents."},"thumb_url":{"type":"string","description":"URL of the recipient avatar."},"note":{"type":"string","description":"Free text stored on the recipient."},"role_id":{"type":"string","description":"Id of the template role the recipient fills, as returned by get template roles. Takes precedence over `role_name`. When `role_id` matches no role of the template, the recipient is not added and the request still succeeds, so check `recipients` in the response."},"role_name":{"type":"string","description":"Name of the template role the recipient fills, compared ignoring case and surrounding spaces. Only used when `role_id` is omitted: when `role_id` is set, `role_name` is ignored, even if `role_id` matches no role. When `role_name` matches no role of the template, the recipient is not added and the request still succeeds."},"verify_eid":{"type":"boolean","description":"Whether the recipient signs with an eID."},"verify_eid_type":{"type":"string","description":"eID method to default to for this recipient: bankid, nemid, nemid-keyfile, nemid-org, mitid, bankid-fi or bankid-se."},"verify_eid_number":{"type":"string","description":"Social security number the eID verification is compared against."},"verify_eid_open":{"type":"boolean","description":"Whether the recipient verifies with an eID before opening the document."},"verify_sms":{"type":"boolean","description":"Whether the recipient verifies by SMS code, which requires a mobile number."},"verify_sms_open":{"type":"boolean","description":"Whether the SMS code is required before opening the document."},"verify_sms_sign":{"type":"boolean","description":"Whether the SMS code is required before signing the document."},"verify_qna":{"type":"boolean","description":"Whether the recipient verifies by answering a question."},"verify_qna_open":{"type":"boolean","description":"Whether the question is asked before opening the document."},"verify_qna_sign":{"type":"boolean","description":"Whether the question is asked before signing the document."},"verify_qna_question":{"type":"string","description":"Question the recipient is asked."},"verify_qna_answer":{"type":"string","description":"Answer the recipient has to give."},"role":{"type":"string","description":"Recipient role: `signer`, `approver`, `externalApprover`, `internalApprover` or `cc`. When omitted the recipient is a `signer` if `is_signing` is true and a `cc` otherwise. An unsupported role returns 400. Recipients are added after the document is created, so a draft document exists even when this 400 is returned."},"order_num":{"type":"number","description":"Position of the recipient when signing in order."},"signature":{"type":"string","description":"Base30 signature data. A signature on any recipient turns on automatic signing for the request, which marks every recipient added in the request as signed, not only this one."},"settings":{"description":"Per-recipient signing and privacy settings.","allOf":[{"$ref":"#/components/schemas/CreateRecipientSettingsDto"}]}}},"CustomFieldDto":{"type":"object","properties":{"id":{"type":"string","description":"Id of the custom field, used when `name` is omitted."},"name":{"type":"string","description":"Name of the custom field, used when `id` is omitted."},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}],"description":"Value stored on the custom field. In the editor content of a template, `true` leaves the field unchanged, and so do `false`, `0` and `\"\"` for a field matched by `id`."}},"required":["value"]},"CustomImageDto":{"type":"object","properties":{"file_id":{"type":"string","description":"Id of the image file, which has to be uploaded before the document is created."},"name":{"type":"string","description":"Name of the image key, used when `id` is omitted."},"id":{"type":"string","description":"Id of the image key, used when `name` is omitted."}},"required":["file_id"]},"AttachmentType":{"type":"string","enum":["external","file","upload"],"description":"Whether the attachment is an uploaded file or a link to an external one."},"CreateDocumentAttachmentDto":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"Id of the uploaded attachment, given without its file extension."},"title":{"type":"string","description":"Title of the attachment as it is shown to the reader."},"description":{"type":"string","description":"Description of the attachment."},"type":{"description":"Whether the attachment is an uploaded file or a link to an external one.","allOf":[{"$ref":"#/components/schemas/AttachmentType"}]},"url":{"type":"string","description":"URL of the external attachment."},"filename":{"type":"string","description":"Filename of the attachment."},"size":{"type":"number","description":"Size of the attachment file in bytes."},"published":{"type":"boolean","description":"Whether the attachment is available to be added to documents."},"library":{"type":"boolean","description":"Whether the attachment is part of the entity attachment library."},"restrict_access":{"type":"boolean","description":"Whether only selected recipients may open the attachment."},"require_view":{"type":"boolean","description":"Whether the recipients have to open the attachment before they can sign."}}},"CustomDataPropertyDto":{"type":"object","properties":{"key":{"type":"string","description":"Key of the custom data property."},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}],"description":"Value of the custom data property."},"value_type":{"description":"Type of the value stored on the property.","allOf":[{"$ref":"#/components/schemas/CustomDataValueType"}]},"label":{"type":"string","description":"Deprecated and ignored on input; labels come from the translations of the entity custom data settings."}},"required":["key","value"]},"CustomDataDto":{"type":"object","properties":{"properties":{"description":"Custom data properties applied to the document.","type":"array","items":{"$ref":"#/components/schemas/CustomDataPropertyDto"}}},"required":["properties"]},"UpdateDocumentPricingTableSummaryValueBody":{"type":"object","properties":{"value":{"type":"string","nullable":true,"description":"Value of the summary line."},"flat_fee":{"type":"boolean","nullable":true,"description":"Whether the value is a flat amount instead of a percentage."},"enabled":{"type":"boolean","nullable":true,"description":"Whether the summary line is shown."},"display_name":{"type":"string","nullable":true,"description":"Label of the summary line."},"rates":{"description":"Rate groups the value is broken down into.","type":"array","items":{"$ref":"#/components/schemas/UpdateDocumentPricingTableSummaryValueBody"}}}},"UpdateDocumentPricingTableExtendedSummaryBody":{"type":"object","properties":{"column_id":{"type":"string","nullable":true,"description":"Id of the column the summary is calculated from."},"display_name":{"type":"string","nullable":true,"description":"Label of the summary line."},"enabled":{"type":"boolean","description":"Whether the summary line is shown."},"name":{"type":"string","nullable":true,"description":"Name of the summary line."},"unit":{"nullable":true,"description":"Unit the value is given in.","allOf":[{"$ref":"#/components/schemas/ColumnUnitType"}]},"value":{"type":"string","nullable":true,"description":"Value of the summary line."}}},"UpdateDocumentPricingTableSummaryBody":{"type":"object","properties":{"display_name":{"type":"string","nullable":true,"description":"Label of the summary."},"price":{"description":"Price the summary is calculated from.","allOf":[{"$ref":"#/components/schemas/UpdateDocumentPricingTableSummaryValueBody"}]},"discount":{"description":"Discount applied to the table.","allOf":[{"$ref":"#/components/schemas/UpdateDocumentPricingTableSummaryValueBody"}]},"tax":{"description":"Tax applied to the table.","allOf":[{"$ref":"#/components/schemas/UpdateDocumentPricingTableSummaryValueBody"}]},"base_subtotal":{"description":"Sum of the section totals before taxes and discounts.","allOf":[{"$ref":"#/components/schemas/UpdateDocumentPricingTableSummaryValueBody"}]},"tax_breakdown":{"description":"Sum of the tax groups of the table.","allOf":[{"$ref":"#/components/schemas/UpdateDocumentPricingTableSummaryValueBody"}]},"combined_subtotal":{"description":"Sum of the section subtotals including taxes and discounts.","allOf":[{"$ref":"#/components/schemas/UpdateDocumentPricingTableSummaryValueBody"}]},"extended_summaries":{"description":"Summary lines calculated from the table columns.","type":"array","items":{"$ref":"#/components/schemas/UpdateDocumentPricingTableExtendedSummaryBody"}}}},"UpdateDocumentPricingTableCurrencySettingsBody":{"type":"object","properties":{"currency":{"type":"string","description":"Currency the prices are given in."},"locale":{"type":"string","description":"Locale the prices are formatted with."}}},"UpdateDocumentPricingTableColumnBody":{"type":"object","properties":{"column_id":{"type":"string","description":"Id of the column to update."},"display_name":{"type":"string","nullable":true,"description":"Label of the column."}},"required":["column_id"]},"UpdateDocumentPricingTableRowValueBody":{"type":"object","properties":{"column_id":{"type":"string","description":"Id of the column the value belongs to."},"value":{"type":"string","nullable":true,"description":"Value of the cell, which is the file id of an uploaded image when is_image is true."},"is_image":{"type":"boolean","description":"Whether the value is an image."},"is_markdown":{"type":"boolean","description":"Whether the value is markdown text."}},"required":["column_id","value"]},"DocumentPricingTableDiscountCalculatedFrom":{"type":"string","enum":["price","totalPrice"],"description":"Value the row discount is calculated from."},"UpdateDocumentPricingTableRowBody":{"type":"object","properties":{"values":{"description":"Cells of the row, one per column.","type":"array","items":{"$ref":"#/components/schemas/UpdateDocumentPricingTableRowValueBody"}},"discount_flat_fee":{"type":"boolean","nullable":true,"description":"Whether the row discount is a flat amount instead of a percentage."},"discount_calculated_from":{"nullable":true,"description":"Value the row discount is calculated from.","allOf":[{"$ref":"#/components/schemas/DocumentPricingTableDiscountCalculatedFrom"}]},"tax_flat_fee":{"type":"boolean","nullable":true,"description":"Whether the row tax is a flat amount instead of a percentage."},"external_id":{"type":"string","nullable":true,"description":"External id of the line item, used by integrations."},"optional_product":{"type":"boolean","nullable":true,"description":"Whether a recipient may include or exclude the product."},"variable_quantity":{"type":"boolean","nullable":true,"description":"Whether a recipient may change the quantity."}},"required":["values"]},"UpdateDocumentPricingTableSectionBody":{"type":"object","properties":{"id":{"type":"string","description":"Id of the section to update, or of the template section it was copied from. A section id that matches no section of the table is skipped."},"display_name":{"type":"string","nullable":true,"description":"Label of the section."},"columns":{"nullable":true,"description":"Optional column label overrides. Callers supply labels in their desired language. Each column_id can be the current column id or the id of the column copied from the template. An unknown valid id is skipped. Omit columns or set columns or display_name to null to retain the current label; supplied labels, including whitespace, are stored as provided.","type":"array","items":{"$ref":"#/components/schemas/UpdateDocumentPricingTableColumnBody"}},"show_discount_in_price_column":{"type":"boolean","description":"Whether the discount is shown in the price column."},"section_summary":{"description":"Summary lines of the section.","allOf":[{"$ref":"#/components/schemas/UpdateDocumentPricingTableSummaryBody"}]},"rows":{"description":"Rows of the section. They replace every existing row of the section, and each row gets a new row_id.","type":"array","items":{"$ref":"#/components/schemas/UpdateDocumentPricingTableRowBody"}}},"required":["id","rows"]},"UpdateDocumentPricingTableBody":{"type":"object","properties":{"id":{"type":"string","description":"Id of the pricing table to update, or of the template pricing table it was copied from. A table id that matches no pricing table of the document is skipped."},"display_name":{"type":"string","nullable":true,"description":"Label of the pricing table."},"pre_calculated":{"type":"boolean","nullable":true,"description":"Whether the totals are calculated in advance instead of on the signing page."},"summary_values":{"description":"Summary lines of the pricing table.","allOf":[{"$ref":"#/components/schemas/UpdateDocumentPricingTableSummaryBody"}]},"currency_settings":{"nullable":true,"description":"Currency the prices are given in.","allOf":[{"$ref":"#/components/schemas/UpdateDocumentPricingTableCurrencySettingsBody"}]},"external_id":{"type":"string","nullable":true,"description":"External id of the pricing table, used by integrations."},"locked":{"type":"boolean","nullable":true,"description":"Whether the pricing table can no longer be edited from the app after the document was sent. Set to true when omitted or null."},"sections":{"description":"Sections of the pricing table.","type":"array","items":{"$ref":"#/components/schemas/UpdateDocumentPricingTableSectionBody"}}},"required":["id","sections"]},"CreateDocumentBody":{"type":"object","properties":{"name":{"type":"string","description":"Name of the document."},"data":{"type":"string","description":"JSON string of the document fields, used instead of the other body fields. Read only when the access token was issued to the `Zapier` client, and ignored otherwise."},"type":{"type":"string","default":"sales","description":"Document type identifier, also called contract type. Pass the `type` of any document type that is active for the entity, including custom ones, as returned by `GET /v1/document-types`. The identifier template is not accepted on this endpoint."},"value":{"type":"number","default":0,"description":"Monetary value of the document in the entity currency."},"tags":{"type":"string","description":"Comma separated document tags."},"external_id":{"type":"string","description":"External identifier for the document."},"external_client_id":{"type":"string","description":"Replaced by the client id of the access token whenever the token has one, which is `api` unless another client id was given when authenticating."},"company_name":{"type":"string","description":"Company name associated with the document."},"company_number":{"type":"string","description":"Company registration number associated with the document."},"expiration_date":{"oneOf":[{"type":"integer"},{"type":"string"}],"description":"Unix timestamp in seconds (10 digits) or a parseable date string."},"template_id":{"type":"string","description":"Id of the template the document is created from. The document inherits the template's post-sign redirect URL when the entity has Extended Branding."},"external_editor_type":{"type":"string","description":"External editor type."},"external_editor_id":{"type":"string","description":"External editor identifier."},"replace_pages":{"type":"boolean","default":false,"description":"Replaces the pages of the template with the supplied file."},"keep_fields":{"type":"boolean","default":false,"description":"Keeps the form fields defined on the template."},"file_name":{"type":"string","description":"Filename of the document including its extension, used when converting other file types."},"file_ids":{"type":"string","description":"Comma separated string of uploaded file ids, not an array, with no spaces: a space becomes part of the next id, and the import stops at that file, so neither it nor any file after it is imported; a `.docx` id answers 404 instead."},"file_url":{"type":"string","description":"URL of the document file, which must be publicly available for download. It is always downloaded over `https://`, also when the URL starts with `http://`."},"file_content":{"type":"string","description":"Base64 encoded file content."},"is_signing":{"type":"boolean","description":"Whether the document is signable. When omitted, this is set automatically from recipient roles: no recipients enables signing; recipients with no signers disables it; at least one signer enables it."},"is_selfsign":{"type":"boolean","description":"Whether the sender also signs the document."},"is_signing_biometric":{"type":"boolean","description":"Whether signers draw their signature when signing."},"is_signing_initials":{"type":"boolean","description":"Whether initials are the default signing method."},"is_signing_forward":{"type":"boolean","description":"Whether a recipient may forward the signing rights to someone else."},"is_signing_order":{"type":"boolean","description":"Whether signers are notified in the order given by their `order_num`."},"qualified_electronic_signature":{"type":"boolean","default":false,"description":"Enables qualified electronic signature, which requires the QES add-on and is incompatible with `is_selfsign`."},"external_eid_signature":{"type":"boolean","default":false,"description":"Lets recipients sign with an external electronic ID provider, referred to as Norwegian BankID (NBIES) in the app, and is incompatible with `is_selfsign`."},"external_signature_settings":{"description":"Configuration for external EID signing, only applicable when `external_eid_signature` is enabled.","allOf":[{"$ref":"#/components/schemas/CreateExternalSignatureSettingsDto"}]},"comment_settings":{"description":"Document chat settings. When omitted with template_id, the template setting is inherited.","allOf":[{"$ref":"#/components/schemas/CommentSettingsBody"}]},"sign_redirect":{"type":"string","nullable":true,"description":"HTTPS URL the recipient is redirected to after signing, taking precedence over the entity sign redirect. Merge tags may not appear in the host, and `{{customData.key}}` tags only as query parameter values. Requires extended branding. When omitted or null with template_id, the template sign redirect is inherited."},"block_recipient_invite":{"type":"boolean","description":"Blocks recipients from inviting additional participants from the signing page. When omitted with template_id, the template setting is inherited."},"sign_copy_emails":{"nullable":true,"maxItems":10,"description":"Up to 10 email addresses that receive an email copy of the signed document once everyone has signed. They are not recipients: they are never invited, not shown to signers and not on the certificate. When omitted or null with template_id, the template addresses are inherited. When provided, including an empty array, they replace the template addresses.","type":"array","items":{"type":"string"}},"signing_groups":{"nullable":true,"description":"Signing groups where only required_signatures of the members have to sign. When omitted or null with template_id, the template signing groups are inherited. When provided, including an empty array, they replace the template signing groups.","type":"array","items":{"$ref":"#/components/schemas/CreateSigningGroupDto"}},"omit_ip_from_certificate":{"type":"boolean","default":false,"description":"Omits the IP address from the signature fields and the audit log of the signing certificate, while IP addresses are still recorded."},"verify_recipient_ssn":{"type":"boolean","default":false,"description":"Compares the social security number returned by the eID provider with the `verify_eid_number` of the recipient."},"is_identify_recipient":{"type":"boolean","description":"Identifies returning recipients by cookie."},"is_automatic_sending":{"type":"boolean","default":false,"description":"Sends the document once it is created instead of leaving it in status draft, or once its file is imported when one is included. Sending starts after the response, which still shows the status before sending, such as `draft` or `importing`, so do not also call send document."},"is_scheduled_sending":{"type":"boolean","default":false,"description":"Schedules the automatic sending for `scheduled_sending_time` instead of sending at once."},"scheduled_sending_time":{"type":"string","description":"Date and time the document is sent when `is_scheduled_sending` is enabled."},"sender_id":{"type":"string","nullable":true,"description":"Id of the user that owns and sends the document."},"sender_email":{"type":"string","nullable":true,"description":"Email address of the user that owns and sends the document."},"email_send_subject":{"type":"string","description":"Subject line used when the document is sent."},"email_send_message":{"type":"string","description":"Message to the recipients used when the document is sent."},"email_send_template_id":{"type":"string","description":"Id of the email template used when the document is sent."},"communication_template_id":{"type":"string","description":"Id of the communication template used for the document."},"is_reminder_sending":{"type":"number","default":-1,"description":"Sends automatic reminders based on the entity sending settings, where -1 inherits the entity setting."},"is_sms_sending":{"type":"number","default":-1,"description":"Includes an SMS to every recipient with a valid mobile number when the document is sent, where -1 inherits the entity setting."},"is_sms_reminder":{"type":"number","default":-1,"description":"Sends reminders as SMS, where -1 inherits the entity setting."},"is_auto_comment":{"type":"number","default":-1,"description":"Posts `auto_comment_text` as a comment when the document is opened, where -1 inherits the configured setting."},"auto_comment_text":{"type":"string","description":"Text used for the automatic comment."},"is_private":{"type":"boolean","description":"When true the document can only be viewed by the owner."},"recipients":{"description":"Recipients of the document, each with a first_name and last_name or a fullname, and an email or a mobile number.","type":"array","items":{"$ref":"#/components/schemas/CreateDocumentRecipientDto"}},"custom_fields":{"description":"Values for the custom fields of the document, identified by name or id.","type":"array","items":{"$ref":"#/components/schemas/CustomFieldDto"}},"custom_images":{"description":"Images for the custom image keys of the document, which only has effect together with `template_id`.","type":"array","items":{"$ref":"#/components/schemas/CustomImageDto"}},"attachments":{"description":"Attachments to include with the document.","type":"array","items":{"$ref":"#/components/schemas/CreateDocumentAttachmentDto"}},"custom_data":{"description":"Custom data properties for the document, overriding the properties the template defines.","allOf":[{"$ref":"#/components/schemas/CustomDataDto"}]},"custom_pricing_tables":{"nullable":true,"description":"Pricing tables to include with the document. Null or omitted column overrides retain existing labels; other column label overrides use the same current or copied template column ids as pricing table updates.","type":"array","items":{"$ref":"#/components/schemas/UpdateDocumentPricingTableBody"}},"video_id":{"type":"string","description":"Id of a video presented before the document is opened."}},"required":["name"]},"DocumentStatus":{"type":"string","enum":["draft","archived","expired","hardbounced","importing","lost","processing","recalled","rejected","reviewed","scheduled","sealed","sent","signed","signedwithoutverification","viewed"],"description":"Current status of the document."},"IdentificationStage":{"type":"string","enum":["View","Sign"],"description":"Stages at which the recipient must identify with eID: when viewing the document, when signing it, or both."},"ExternalSignatureFieldCapture":{"type":"string","enum":["inApp","inAppPrepared"],"description":"How recipient field values are captured for the external eID signature. Unset keeps capture in the eID provider form."},"ExternalSignatureSettingsDto":{"type":"object","properties":{"identificationStages":{"type":"array","description":"Stages at which the recipient must identify with eID: when viewing the document, when signing it, or both.","items":{"$ref":"#/components/schemas/IdentificationStage"}},"signAttachments":{"type":"boolean","description":"Attachments are signed together with the document in the external eID signature."},"fieldCapture":{"description":"How recipient field values are captured for the external eID signature. Unset keeps capture in the eID provider form.","allOf":[{"$ref":"#/components/schemas/ExternalSignatureFieldCapture"}]}}},"RedliningSettingsDto":{"type":"object","properties":{"recipientSuggestions":{"type":"boolean","description":"Recipients may suggest changes to the document content. Unset inherits the entity setting."},"internalSuggestions":{"type":"boolean","description":"Users may suggest changes to each other on the draft. Unset inherits the entity setting."}}},"CommentSettingsDto":{"type":"object","properties":{"disabled":{"type":"boolean","description":"Document chat is disabled for senders and recipients."},"disableAfterSign":{"type":"boolean","description":"Document chat is disabled once the document is signed."}}},"RecipientRole":{"type":"string","description":"Part a recipient takes in the document, such as signer, approver or cc. `0` is stored for a recipient saved without a role, who neither signs nor approves.","enum":["approver","cc","signer","internalApprover","externalApprover","0"]},"DocumentSigningGroupDto":{"type":"object","properties":{"id":{"type":"string","description":"Signing group id, referenced by recipient settings.signing_group_id"},"name":{"type":"string","description":"Name of the signing group."},"role":{"description":"Part the members of the group take in the document.","allOf":[{"$ref":"#/components/schemas/RecipientRole"}]},"requiredSignatures":{"type":"number","description":"Number of members that must sign for the group to count as signed. Remaining members get status notrequired."}},"required":["name","role","requiredSignatures"]},"DocumentSettingsDto":{"type":"object","properties":{"qualifiedElectronicSignature":{"type":"boolean","description":"Recipients sign with a qualified electronic signature."},"omitIpFromCertificate":{"type":"boolean","description":"IP addresses are left out of the signature fields and the audit log of the signing certificate."},"verifyRecipientSsn":{"type":"boolean","description":"The social security number returned by the eID provider is compared with the one set on the recipient."},"externalEidSignature":{"type":"boolean","description":"Recipients sign with an external eID signature."},"externalSignatureSettings":{"description":"Settings of the external eID signature.","allOf":[{"$ref":"#/components/schemas/ExternalSignatureSettingsDto"}]},"nameTemplate":{"type":"string","description":"Contract name configured on a template, returned as the raw template with its merge tags."},"expirationDays":{"type":"number","description":"Default number of days before the document expires. On a template, applied to the documents created from it."},"blockRecipientInvite":{"type":"boolean","description":"Blocks recipients from inviting additional participants from the signing page."},"signCopyEmails":{"description":"Email addresses that receive an email copy of the signed document once everyone has signed. They are not recipients.","type":"array","items":{"type":"string"}},"contextualCommenting":{"type":"boolean","description":"Contextual comments on the document content are allowed. Unset inherits the entity setting."},"redlining":{"description":"Suggested-changes settings of the document.","allOf":[{"$ref":"#/components/schemas/RedliningSettingsDto"}]},"comment":{"description":"Document chat settings.","allOf":[{"$ref":"#/components/schemas/CommentSettingsDto"}]},"signingGroups":{"description":"Signing groups where only part of the members have to sign for the group to count as signed.","type":"array","items":{"$ref":"#/components/schemas/DocumentSigningGroupDto"}},"signRedirect":{"type":"string","description":"HTTPS URL the recipient is redirected to after signing, taking precedence over the entity sign redirect. Unset when the document has no override."}}},"DocumentPageType":{"type":"number","enum":[0,1,2,3,4,5],"description":"Kind of page as a numeric code: 0 none, 1 text_block, 2 document_page, 3 content_link_block, 4 video, 5 editor_block. page_type_name carries the same kind by name."},"DocumentPageTypeName":{"type":"string","enum":["none","text_block","document_page","content_link_block","video","editor_block"],"description":"Kind of page by name: none, text_block, document_page, content_link_block, video or editor_block."},"DocumentPageDto":{"type":"object","properties":{"page_id":{"type":"string","description":"Id of the page."},"block_hash":{"oneOf":[{"type":"string"},{"type":"number"}],"description":"Id of the editor or content link block the page renders, or 0 when it renders none."},"video_hash":{"oneOf":[{"type":"string"},{"type":"number"}],"description":"Id of the video the page renders, or 0 when it renders none."},"page_type":{"description":"Kind of page as a numeric code: 0 none, 1 text_block, 2 document_page, 3 content_link_block, 4 video, 5 editor_block. page_type_name carries the same kind by name.","allOf":[{"$ref":"#/components/schemas/DocumentPageType"}]},"page_type_name":{"description":"Kind of page by name: none, text_block, document_page, content_link_block, video or editor_block.","allOf":[{"$ref":"#/components/schemas/DocumentPageTypeName"}]},"page_width":{"type":"number","description":"Width of the source PDF page in PDF points (1/72 inch), rounded. 0 on editor, video and content link pages."},"page_height":{"type":"number","description":"Height of the source PDF page in PDF points (1/72 inch), rounded. 0 on editor, video and content link pages."},"page_num":{"type":"number","description":"Position of the page in the document, starting at 1."},"cropBoxW":{"type":"number","description":"Width of the visible area of the source PDF page, its crop box clipped to its media box, in PDF points. 0 on editor, video and content link pages."},"cropBoxH":{"type":"number","description":"Height of the visible area of the source PDF page, its crop box clipped to its media box, in PDF points. 0 on editor, video and content link pages."},"page_time":{"type":"number","description":"Seconds the recipients have spent on the page in total."},"order_num":{"type":"number","deprecated":true,"description":"Deprecated legacy sort position, usually 0. Pages are ordered by page_num."},"thumb_url":{"type":"string","nullable":true,"description":"URL of the page thumbnail. On PDF and editor pages it is a signed link that expires after a few minutes, so request the pages again instead of storing it. On a video or content link page it is the thumbnail of the video or link, and null when it has none."},"title":{"type":"string","description":"Title of the page."},"description":{"type":"string","description":"Description of the page."},"clicks":{"type":"number","description":"Number of times the page content was clicked."},"view_duration_seconds":{"type":"number","description":"Total seconds the recipients have watched the video on this page, summed over every tracked play. Only on video pages."}},"required":["page_id","block_hash","video_hash","page_type","page_type_name","page_width","page_height","page_num","cropBoxW","cropBoxH","page_time","order_num","thumb_url"]},"DocumentStatsDto":{"type":"object","properties":{"document_page_count":{"type":"number","description":"Number of pages in the document."},"document_recipient_count":{"type":"number","description":"Number of recipients on the document."},"document_visit_count":{"type":"number","description":"Number of tracked visits to the document."},"document_visit_time":{"type":"number","description":"Seconds recipients have spent on the document, summed over its pages."},"document_page_completion":{"type":"number","description":"Number of pages that have been viewed at least once."},"document_viewer_count":{"type":"number","description":"Number of distinct recipients that have visited the document."}},"required":["document_page_count","document_recipient_count","document_visit_count","document_visit_time","document_page_completion","document_viewer_count"]},"DocumentAttachmentDto":{"type":"object","properties":{"document_attachment_id":{"type":"string","description":"Unique identifier of the attachment on this document."},"attachment_id":{"type":"string","description":"Unique identifier of the attachment."},"attachment_type":{"type":"string","description":"Whether the attachment is an uploaded file or a link to an external one."},"attachment_title":{"type":"string","description":"Title of the attachment as it is shown to the reader."},"attachment_description":{"type":"string","description":"Description of the attachment."},"attachment_extension":{"type":"string","description":"Icon type of the attachment rather than its file extension: upload when attachment_type is upload, home when it is external, and otherwise pdf, doc or docx from the filename, or document for any other file."},"attachment_url":{"type":"string","description":"URL of the external attachment, empty for an uploaded file."},"attachment_filename":{"type":"string","description":"Filename of the attachment, empty for an external one."},"restrict_access":{"type":"boolean","description":"Whether only selected recipients may open the attachment."},"access_recipient_names":{"description":"Names of the recipients the attachment is restricted to, empty when it is open to all of them.","type":"array","items":{"type":"string"}},"require_view":{"type":"boolean","description":"Whether the recipients have to open the attachment before they can sign."},"preview_url":{"type":"string","description":"Relative path starting with /view/ that opens the attachment for a recipient, or an empty string when the attachment has no filename."},"download_url":{"type":"string","nullable":true,"description":"Presigned URL the attachment file can be downloaded from, the attachment_url of an external attachment, or null when there is neither."},"last_attachment_view":{"type":"string","nullable":true,"description":"When a recipient last opened the attachment, formatted as yyyy-MM-dd HH:mm:ss with no time zone offset, or null while none has."}},"required":["document_attachment_id","attachment_id","attachment_type","attachment_title","attachment_description","attachment_extension","attachment_url","attachment_filename","restrict_access","access_recipient_names","require_view","preview_url","download_url","last_attachment_view"]},"RecipientStatus":{"type":"string","description":"Progress of a recipient through the document, such as sent, viewed, signed or rejected. notrequired means the recipient belongs to a signing group whose required signatures were collected by other members.","enum":["signed","approved","reviewed","rejected","sent","viewed","added","signedwithoutverification","waiting","hardbounced","skipped","notrequired"]},"SigningMethod":{"type":"string","enum":["eid","biometric","sms","initials","signature","external_eid_signature"],"description":"Verification the recipient completed, where signature is the fallback for a recipient that signed without a recorded verification."},"SigningMethodDto":{"type":"object","properties":{"type":{"description":"Verification the recipient completed, where signature is the fallback for a recipient that signed without a recorded verification.","allOf":[{"$ref":"#/components/schemas/SigningMethod"}]},"verified_name":{"type":"string","description":"Name of the signer as returned by the eID provider, only set for eid and external_eid_signature."},"verified_birthdate":{"type":"string","description":"Date of birth of the signer as returned by the eID provider in YYYY-MM-DD, withheld when the recipient has settings.redact_date_of_birth enabled."},"verified_phone":{"type":"string","description":"Number the SMS verification code was sent to, only set for sms."},"signed_at":{"type":"string","description":"When the verification was completed, absent on the fallback signature entry."}},"required":["type"]},"RecipientSettingsDto":{"type":"object","properties":{"show_ssn_permission":{"type":"boolean","description":"Whether this recipient may see the national identity numbers of the other recipients."},"exclude_verified_eid_signature":{"type":"boolean","description":"Whether this recipient may sign by hand although the document requires a verified EID."},"redact_date_of_birth":{"type":"boolean","description":"Whether the date of birth of this recipient is masked on the signing certificate and withheld from this response."},"qes_allowed_methods":{"description":"Qualified electronic signature methods this recipient may sign with.","type":"array","items":{"type":"string"}},"signing_group_id":{"type":"string","description":"Id of the signing group in the document settings.signingGroups this recipient belongs to"}}},"RecipientDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the recipient."},"fullname":{"type":"string","description":"First and last name of the recipient joined by a space."},"first_name":{"type":"string","description":"First name of the recipient."},"last_name":{"type":"string","description":"Last name of the recipient."},"email":{"type":"string","description":"Email address of the recipient."},"role":{"description":"Part the recipient takes in the document, such as signer, approver or cc.","allOf":[{"$ref":"#/components/schemas/RecipientRole"}]},"role_name":{"type":"string","description":"Name of the template role the recipient fills."},"company_name":{"type":"string","description":"Company the recipient represents."},"company_number":{"type":"string","description":"Registration number of the company the recipient represents."},"status":{"description":"Recipient status. notrequired means the recipient belongs to a signing group whose required signatures were collected by other members.","allOf":[{"$ref":"#/components/schemas/RecipientStatus"}]},"title":{"type":"string","description":"Job title of the recipient."},"note":{"type":"string","description":"Free text stored on the recipient."},"mobile":{"type":"string","description":"Mobile number of the recipient, including its country code."},"phone":{"type":"string","description":"Landline number of the recipient."},"thumb_url":{"type":"string","description":"URL of the recipient avatar."},"order_num":{"type":"string","description":"Position of the recipient when signing in order."},"document_url":{"type":"string","description":"URL the recipient opens the document on. Create document and list document recipients return it empty while the document is importing, processing or a draft; seal document always returns it."},"contact_id":{"type":"string","description":"Id of the contact the recipient was created from."},"signing_methods":{"description":"One entry per verification the recipient completed. When none was recorded, a recipient with `status` `signed` gets one `signature` entry and any other recipient gets `[]`.","type":"array","items":{"$ref":"#/components/schemas/SigningMethodDto"}},"settings":{"description":"Per-recipient signing and privacy settings.","allOf":[{"$ref":"#/components/schemas/RecipientSettingsDto"}]}},"required":["id","fullname","first_name","last_name","email","role","role_name","company_name","company_number","status","title","note","mobile","phone","thumb_url","order_num","document_url","contact_id"]},"CreateDocumentResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the document."},"name":{"type":"string","description":"Name of the document as it is presented to the recipients."},"value":{"type":"number","description":"Monetary value of the document in the entity currency."},"type":{"type":"string","description":"Document type, which sets the defaults and the look of the document."},"tags":{"type":"string","description":"Comma separated document tags."},"thumb_url":{"type":"string","description":"URL of the thumbnail of the first document page."},"external_id":{"type":"string","description":"External identifier of the document, empty unless it was set by the caller."},"external_client_id":{"type":"string","description":"Client that created the document. Create document stores the client id of the access token: the `client_id` sent when authenticating, the OAuth client id, or `api` when neither is set. Empty when the document has no client stored."},"external_editor_type":{"type":"string","description":"External editor the document content is edited in."},"external_editor_id":{"type":"string","description":"Identifier of the document in its external editor."},"company_name":{"type":"string","description":"Company the document is sent to."},"company_number":{"type":"string","description":"Registration number of the company the document is sent to."},"company_id":{"type":"string","description":"Identifier of the company the document is sent to."},"company_logo_url":{"type":"string","description":"URL of the logo of the company the document is sent to."},"unique_id":{"type":"number","description":"Number the document was given in the running order of the entity."},"is_selfsign":{"type":"boolean","description":"Whether the sender also signs the document, inherited from the entity when unset on the document."},"is_signing_biometric":{"type":"boolean","description":"Whether signers draw their signature on screen, inherited from the entity when unset on the document."},"is_signing_initials":{"type":"boolean","description":"Whether signers write their initials when signing, inherited from the entity when unset on the document."},"is_signing_forward":{"type":"boolean","description":"Whether a recipient may forward the signing rights, inherited from the entity when unset on the document."},"is_identify_recipient":{"type":"boolean","description":"Whether returning recipients are identified by cookie, inherited from the entity when unset on the document."},"is_private":{"type":"boolean","description":"Whether the document can only be viewed by its owner."},"status":{"description":"Current status of the document.","allOf":[{"$ref":"#/components/schemas/DocumentStatus"}]},"send_date":{"type":"string","nullable":true,"description":"When the document was sent, or null while it is a draft."},"sign_date":{"type":"string","nullable":true,"description":"When the last required signature was collected, or null while the document is unsigned."},"created_at":{"type":"string","description":"When the document was created."},"updated_at":{"type":"string","nullable":true,"description":"When the document was last updated, or null when that is unavailable."},"download_url":{"type":"string","description":"URL the document file can be downloaded from."},"app_url":{"type":"string","description":"URL of the document view page in the app."},"user_id":{"type":"string","description":"Id of the user that owns the document."},"sender_name":{"type":"string","description":"Full name of the user that owns the document."},"sender_thumb_url":{"type":"string","description":"URL of the avatar of the user that owns the document."},"sender_email":{"type":"string","description":"Email address of the user that owns the document."},"parent_id":{"type":"string","description":"Id of the document this document is a new version of. Empty when the document is not a new version."},"email_send_template_id":{"type":"string","description":"Id of the email template the document is sent with, 0 when none is set."},"email_send_subject":{"type":"string","description":"Subject line the document is sent with."},"email_send_message":{"type":"string","description":"Message to the recipients the document is sent with."},"is_signing":{"type":"boolean","description":"Whether the document is signable."},"is_signing_order":{"type":"boolean","description":"Whether signers are notified one at a time in their given order instead of all at once."},"is_signed":{"type":"boolean","description":"Whether the document has been signed."},"expiration_date":{"type":"string","nullable":true,"description":"When the document stops being available to the recipients, or null when it never expires."},"is_scheduled_sending":{"type":"boolean","description":"Whether the automatic sending is scheduled instead of immediate."},"scheduled_sending_time":{"type":"string","nullable":true,"description":"When the scheduled sending runs, or null when no sending is scheduled."},"is_reminder_sending":{"type":"boolean","description":"Whether reminders are sent automatically, inherited from the entity when unset on the document."},"is_video":{"type":"boolean","description":"Whether a video is presented before the document is opened."},"video_id":{"type":"string","nullable":true,"description":"Id of the video presented before the document is opened, or null when there is none."},"is_auto_comment":{"type":"boolean","description":"Whether a comment is posted automatically, inherited from the entity when unset on the document."},"auto_comment_text":{"type":"string","description":"Text of the automatic comment on the document."},"is_auto_comment_email":{"type":"boolean","description":"Whether the automatic comment is also emailed, inherited from the entity when unset on the document."},"auto_comment_email":{"type":"string","description":"Email address the automatic comment of the document is sent to."},"entity_auto_comment_text":{"type":"string","description":"Automatic comment text configured on the entity."},"entity_auto_comment_email":{"type":"string","description":"Email address for automatic comments configured on the entity."},"field_count":{"type":"number","description":"Number of fields on the document."},"contract_start_date":{"type":"string","nullable":true,"description":"Start date of the contract for contract management, or null when unset."},"contract_end_date":{"type":"string","nullable":true,"description":"End date of the contract for contract management, or null when unset."},"settings":{"nullable":true,"description":"Signing, certificate and chat settings of the document, or null when it has none.","allOf":[{"$ref":"#/components/schemas/DocumentSettingsDto"}]},"preview_url":{"type":"string","description":"URL that opens the document in preview mode."},"name_template":{"type":"string","description":"Contract name template configured on this template, returned raw. May contain {{entity.company_name}}, {{document.company_name}}, {{document.id}}, {{document.unique_id}} and {{date}}; Create document resolves {{document.company_name}} from the top-level company_name, {{document.id}} to the newly created document ID and {{document.unique_id}} to its unique ID, or removes {{document.unique_id}} when the company has no unique ID counter. Only present on templates that have one configured."},"pages":{"description":"Pages of the document, included when they were requested.","type":"array","items":{"$ref":"#/components/schemas/DocumentPageDto"}},"page_count":{"type":"number","description":"Number of pages in the document, included when the pages were requested."},"stats":{"description":"Visit and page statistics of the document, included when they were requested.","allOf":[{"$ref":"#/components/schemas/DocumentStatsDto"}]},"attachments":{"description":"Attachments of the document, included when they were requested.","type":"array","items":{"$ref":"#/components/schemas/DocumentAttachmentDto"}},"rejection_reason":{"type":"string","nullable":true,"description":"Reason given by the recipient who rejected the document. Null when the document is not rejected or no reason was given."},"recipients":{"description":"Recipients of the created document.","type":"array","items":{"$ref":"#/components/schemas/RecipientDto"}}},"required":["id","name","value","type","tags","thumb_url","external_id","external_client_id","external_editor_type","external_editor_id","company_name","company_number","company_id","company_logo_url","unique_id","is_selfsign","is_signing_biometric","is_signing_initials","is_signing_forward","is_identify_recipient","is_private","status","send_date","sign_date","created_at","updated_at","download_url","app_url","user_id","sender_name","sender_thumb_url","sender_email","parent_id","email_send_template_id","email_send_subject","email_send_message","is_signing","is_signing_order","is_signed","expiration_date","is_scheduled_sending","scheduled_sending_time","is_reminder_sending","is_video","video_id","is_auto_comment","auto_comment_text","is_auto_comment_email","auto_comment_email","entity_auto_comment_text","entity_auto_comment_email","field_count","contract_start_date","contract_end_date","settings","preview_url","recipients"]},"CreateDocumentAsyncResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Id of the created document."},"status":{"type":"string","description":"Returned instead of the full document when the client id of the access token is a built-in integration (`Dynamics 365`, `Pipedrive`, `HubSpot`, `Upsales`, `Freshsales`, `Freshworks`, `Lime Go`, `Lime`, `icentrum`, `Zapier`, `fastapi`, `Salesforce` or `Chargebee`) and `is_automatic_sending` is true or the template is a Google Docs template. Empty, except `draft` for a Google Docs template without `is_automatic_sending`."}},"required":["id","status"]},"DocumentListRecipientDto":{"type":"object","properties":{"first_name":{"type":"string","description":"First name of the recipient."},"last_name":{"type":"string","description":"Last name of the recipient."},"email":{"type":"string","description":"Email address of the recipient."},"thumb_url":{"type":"string","description":"URL of the recipient avatar."},"status":{"description":"Progress of the recipient through the document.","allOf":[{"$ref":"#/components/schemas/RecipientStatus"}]},"role":{"description":"Part the recipient takes in the document, such as signer, approver or cc.","allOf":[{"$ref":"#/components/schemas/RecipientRole"}]},"company_name":{"type":"string","description":"Company the recipient represents."},"note":{"type":"string","description":"Free text stored on the recipient."},"company_number":{"type":"string","description":"Registration number of the company the recipient represents."},"recipient_status":{"description":"Progress of the recipient through the document, repeated for the legacy clients.","allOf":[{"$ref":"#/components/schemas/RecipientStatus"}]}},"required":["first_name","last_name","email","thumb_url","status","role","company_name","note","company_number","recipient_status"]},"DocumentListItemDto":{"type":"object","properties":{"id":{"type":"string","description":"Id of the document."},"name":{"type":"string","description":"Name of the document as it is presented to the recipients."},"type":{"type":"string","description":"Document type, which sets the defaults and the look of the document."},"external_id":{"type":"string","nullable":true,"description":"External identifier of the document, or null when it was never set."},"is_private":{"type":"boolean","description":"Whether the document can only be viewed by its owner."},"is_signing":{"type":"boolean","description":"Whether the document is signable."},"company_name":{"type":"string","description":"Company the document is sent to."},"user_id":{"type":"string","description":"Id of the user that owns the document."},"sender_name":{"type":"string","description":"Full name of the user that owns the document."},"sender_thumb":{"type":"string","description":"URL of the avatar of the user that owns the document."},"status":{"description":"Current status of the document.","allOf":[{"$ref":"#/components/schemas/DocumentStatus"}]},"value":{"type":"number","description":"Monetary value of the document in the entity currency."},"tags":{"type":"string","description":"Comma separated document tags."},"sign_date":{"type":"string","nullable":true,"description":"When the last required signature was collected, or null while the document is unsigned."},"expiration_date":{"type":"string","nullable":true,"description":"When the document stops being available to the recipients, or null when it never expires."},"created_at":{"type":"string","nullable":true,"description":"When the document was created."},"updated_at":{"type":"string","nullable":true,"description":"When the document was last updated, or null when that is unavailable."},"recipients":{"description":"Recipients of the document. Left out when `filter` is `archive`.","type":"array","items":{"$ref":"#/components/schemas/DocumentListRecipientDto"}},"thumb_url":{"type":"string","description":"URL of the thumbnail of the first document page. Only returned when `filter` is `archive`."}},"required":["id","name","type","external_id","is_private","is_signing","company_name","user_id","sender_name","sender_thumb","status","value","tags","sign_date","expiration_date","created_at","updated_at"]},"DocumentRecipient":{"type":"object","properties":{"fullname":{"type":"string","description":"First and last name of the recipient joined by a space."},"first_name":{"type":"string","description":"First name of the recipient."},"last_name":{"type":"string","description":"Last name of the recipient."},"email":{"type":"string","description":"Email address of the recipient."},"mobile":{"type":"string","description":"Mobile number of the recipient, including its country code."},"thumb_url":{"type":"string","description":"URL of the recipient avatar."},"role":{"description":"Part the recipient takes in the document, such as signer, approver or cc.","allOf":[{"$ref":"#/components/schemas/RecipientRole"}]},"company_name":{"type":"string","description":"Company the recipient represents."},"company_number":{"type":"string","description":"Registration number of the company the recipient represents."},"order_num":{"type":"string","description":"Position of the recipient when signing in order."},"note":{"type":"string","description":"Free text stored on the recipient."},"title":{"type":"string","description":"Job title of the recipient."},"status":{"description":"Progress of the recipient through the document, such as sent, viewed, signed or notrequired.","allOf":[{"$ref":"#/components/schemas/RecipientStatus"}]},"settings":{"description":"Per-recipient signing and privacy settings.","allOf":[{"$ref":"#/components/schemas/RecipientSettingsDto"}]}},"required":["fullname","first_name","last_name","email","mobile","thumb_url","role","company_name","company_number","order_num","note","title","status"]},"DocumentDetailsDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the document."},"name":{"type":"string","description":"Name of the document as it is presented to the recipients."},"value":{"type":"number","description":"Monetary value of the document in the entity currency."},"type":{"type":"string","description":"Document type, which sets the defaults and the look of the document."},"tags":{"type":"string","description":"Comma separated document tags."},"thumb_url":{"type":"string","description":"URL of the thumbnail of the first document page."},"external_id":{"type":"string","description":"External identifier of the document, empty unless it was set by the caller."},"external_client_id":{"type":"string","description":"Client that created the document. Create document stores the client id of the access token: the `client_id` sent when authenticating, the OAuth client id, or `api` when neither is set. Empty when the document has no client stored."},"external_editor_type":{"type":"string","description":"External editor the document content is edited in."},"external_editor_id":{"type":"string","description":"Identifier of the document in its external editor."},"company_name":{"type":"string","description":"Company the document is sent to."},"company_number":{"type":"string","description":"Registration number of the company the document is sent to."},"company_id":{"type":"string","description":"Identifier of the company the document is sent to."},"company_logo_url":{"type":"string","description":"URL of the logo of the company the document is sent to."},"unique_id":{"type":"number","description":"Number the document was given in the running order of the entity."},"is_selfsign":{"type":"boolean","description":"Whether the sender also signs the document, inherited from the entity when unset on the document."},"is_signing_biometric":{"type":"boolean","description":"Whether signers draw their signature on screen, inherited from the entity when unset on the document."},"is_signing_initials":{"type":"boolean","description":"Whether signers write their initials when signing, inherited from the entity when unset on the document."},"is_signing_forward":{"type":"boolean","description":"Whether a recipient may forward the signing rights, inherited from the entity when unset on the document."},"is_identify_recipient":{"type":"boolean","description":"Whether returning recipients are identified by cookie, inherited from the entity when unset on the document."},"is_private":{"type":"boolean","description":"Whether the document can only be viewed by its owner."},"status":{"description":"Current status of the document.","allOf":[{"$ref":"#/components/schemas/DocumentStatus"}]},"send_date":{"type":"string","nullable":true,"description":"When the document was sent, or null while it is a draft."},"sign_date":{"type":"string","nullable":true,"description":"When the last required signature was collected, or null while the document is unsigned."},"created_at":{"type":"string","description":"When the document was created."},"updated_at":{"type":"string","nullable":true,"description":"When the document was last updated, or null when that is unavailable."},"download_url":{"type":"string","description":"URL the document file can be downloaded from."},"app_url":{"type":"string","description":"URL of the document view page in the app."},"user_id":{"type":"string","description":"Id of the user that owns the document."},"sender_name":{"type":"string","description":"Full name of the user that owns the document."},"sender_thumb_url":{"type":"string","description":"URL of the avatar of the user that owns the document."},"sender_email":{"type":"string","description":"Email address of the user that owns the document."},"parent_id":{"type":"string","description":"Id of the document this document is a new version of. Empty when the document is not a new version."},"email_send_template_id":{"type":"string","description":"Id of the email template the document is sent with, 0 when none is set."},"email_send_subject":{"type":"string","description":"Subject line the document is sent with."},"email_send_message":{"type":"string","description":"Message to the recipients the document is sent with."},"is_signing":{"type":"boolean","description":"Whether the document is signable."},"is_signing_order":{"type":"boolean","description":"Whether signers are notified one at a time in their given order instead of all at once."},"is_signed":{"type":"boolean","description":"Whether the document has been signed."},"expiration_date":{"type":"string","nullable":true,"description":"When the document stops being available to the recipients, or null when it never expires."},"is_scheduled_sending":{"type":"boolean","description":"Whether the automatic sending is scheduled instead of immediate."},"scheduled_sending_time":{"type":"string","nullable":true,"description":"When the scheduled sending runs, or null when no sending is scheduled."},"is_reminder_sending":{"type":"boolean","description":"Whether reminders are sent automatically, inherited from the entity when unset on the document."},"is_video":{"type":"boolean","description":"Whether a video is presented before the document is opened."},"video_id":{"type":"string","nullable":true,"description":"Id of the video presented before the document is opened, or null when there is none."},"is_auto_comment":{"type":"boolean","description":"Whether a comment is posted automatically, inherited from the entity when unset on the document."},"auto_comment_text":{"type":"string","description":"Text of the automatic comment on the document."},"is_auto_comment_email":{"type":"boolean","description":"Whether the automatic comment is also emailed, inherited from the entity when unset on the document."},"auto_comment_email":{"type":"string","description":"Email address the automatic comment of the document is sent to."},"entity_auto_comment_text":{"type":"string","description":"Automatic comment text configured on the entity."},"entity_auto_comment_email":{"type":"string","description":"Email address for automatic comments configured on the entity."},"field_count":{"type":"number","description":"Number of fields on the document."},"contract_start_date":{"type":"string","nullable":true,"description":"Start date of the contract for contract management, or null when unset."},"contract_end_date":{"type":"string","nullable":true,"description":"End date of the contract for contract management, or null when unset."},"settings":{"nullable":true,"description":"Signing, certificate and chat settings of the document, or null when it has none.","allOf":[{"$ref":"#/components/schemas/DocumentSettingsDto"}]},"preview_url":{"type":"string","description":"URL that opens the document in preview mode."},"name_template":{"type":"string","description":"Contract name template configured on this template, returned raw. May contain {{entity.company_name}}, {{document.company_name}}, {{document.id}}, {{document.unique_id}} and {{date}}; Create document resolves {{document.company_name}} from the top-level company_name, {{document.id}} to the newly created document ID and {{document.unique_id}} to its unique ID, or removes {{document.unique_id}} when the company has no unique ID counter. Only present on templates that have one configured."},"recipients":{"description":"Recipients of the document.","type":"array","items":{"$ref":"#/components/schemas/DocumentRecipient"}},"pages":{"description":"Pages of the document, included when they were requested.","type":"array","items":{"$ref":"#/components/schemas/DocumentPageDto"}},"page_count":{"type":"number","description":"Number of pages in the document, included when the pages were requested."},"stats":{"description":"Visit and page statistics of the document, included when they were requested.","allOf":[{"$ref":"#/components/schemas/DocumentStatsDto"}]},"attachments":{"description":"Attachments of the document, included when they were requested.","type":"array","items":{"$ref":"#/components/schemas/DocumentAttachmentDto"}},"rejection_reason":{"type":"string","nullable":true,"description":"Reason given by the recipient who rejected the document. Null when the document is not rejected or no reason was given."}},"required":["id","name","value","type","tags","thumb_url","external_id","external_client_id","external_editor_type","external_editor_id","company_name","company_number","company_id","company_logo_url","unique_id","is_selfsign","is_signing_biometric","is_signing_initials","is_signing_forward","is_identify_recipient","is_private","status","send_date","sign_date","created_at","updated_at","download_url","app_url","user_id","sender_name","sender_thumb_url","sender_email","parent_id","email_send_template_id","email_send_subject","email_send_message","is_signing","is_signing_order","is_signed","expiration_date","is_scheduled_sending","scheduled_sending_time","is_reminder_sending","is_video","video_id","is_auto_comment","auto_comment_text","is_auto_comment_email","auto_comment_email","entity_auto_comment_text","entity_auto_comment_email","field_count","contract_start_date","contract_end_date","settings","preview_url","recipients"]},"LatestDocumentEntityDto":{"type":"object","properties":{"email_send_subject":{"type":"string","description":"Default subject line configured on the entity."},"email_send_message":{"type":"string","description":"Default message to the recipients configured on the entity."},"sub_domain":{"type":"string","description":"Subdomain the entity is reached on."},"custom_domain":{"type":"string","description":"Custom domain the entity is reached on, empty when it has none."}},"required":["email_send_subject","email_send_message","sub_domain","custom_domain"]},"LatestDocumentInObjectDto":{"type":"object","properties":{"document":{"description":"The document itself.","allOf":[{"$ref":"#/components/schemas/DocumentDetailsDto"}]},"entity":{"description":"Sending defaults and domains of the entity that owns the document.","allOf":[{"$ref":"#/components/schemas/LatestDocumentEntityDto"}]},"recipient":{"description":"First recipient of the document, omitted when it has none.","allOf":[{"$ref":"#/components/schemas/DocumentRecipient"}]},"custom_fields":{"type":"object","additionalProperties":{"type":"string"},"description":"Custom field values of the document keyed by their sanitized label, omitted when it has none."}},"required":["document","entity"]},"DocumentPricingTableSummarySettingsDto":{"type":"object","properties":{"summary_enabled":{"type":"boolean","description":"Whether the summary is shown."}},"required":["summary_enabled"]},"DocumentPricingTableCurrencySettingsDto":{"type":"object","properties":{"currency":{"type":"string","nullable":true,"description":"Currency the prices are given in."},"locale":{"type":"string","nullable":true,"description":"Locale the prices are formatted with."},"price_unit_fraction_digits":{"type":"number","nullable":true,"description":"Number of decimals shown on prices."}},"required":["currency","locale","price_unit_fraction_digits"]},"DocumentPricingTableImageDisplayMode":{"type":"string","enum":["separate-column","inline-with-name"],"description":"How the row images are displayed."},"DocumentPricingTableSectionDisplayModeDto":{"type":"object","properties":{"image_display_mode":{"nullable":true,"description":"How the row images are displayed.","allOf":[{"$ref":"#/components/schemas/DocumentPricingTableImageDisplayMode"}]}},"required":["image_display_mode"]},"DocumentPricingTableExtendedSummaryDto":{"type":"object","properties":{"column_id":{"type":"string","nullable":true,"description":"Id of the column the summary is calculated from."},"display_name":{"type":"string","nullable":true,"description":"Label of the summary line."},"enabled":{"type":"boolean","description":"Whether the summary line is shown."},"name":{"type":"string","nullable":true,"description":"Name of the summary line."},"unit":{"nullable":true,"description":"Unit the value is given in.","allOf":[{"$ref":"#/components/schemas/ColumnUnitType"}]},"value":{"type":"string","nullable":true,"description":"Value of the summary line."}},"required":["column_id","display_name","enabled","name","unit","value"]},"DocumentPricingTableSectionSummaryDto":{"type":"object","properties":{"extended_summaries":{"description":"Summary lines calculated for the section.","type":"array","items":{"$ref":"#/components/schemas/DocumentPricingTableExtendedSummaryDto"}}},"required":["extended_summaries"]},"DocumentPricingTableColumnDto":{"type":"object","properties":{"column_id":{"type":"string","description":"Id of the column, referenced from the row values."},"name":{"type":"string","nullable":true,"description":"Name of the column."},"display_name":{"type":"string","nullable":true,"description":"Label of the column."},"enabled":{"type":"boolean","nullable":true,"description":"Whether the column is shown."},"type":{"description":"Kind of value the column holds.","allOf":[{"$ref":"#/components/schemas/ColumnType"}]},"unit":{"nullable":true,"description":"Unit the column values are given in.","allOf":[{"$ref":"#/components/schemas/ColumnUnitType"}]}},"required":["column_id","name","display_name","enabled"]},"DocumentPricingTableRowImageDto":{"type":"object","properties":{"image_id":{"type":"string","nullable":true,"description":"Id of the image."},"src_url":{"type":"string","description":"URL the image is loaded from, only included when `exclude_media` is false."}},"required":["image_id"]},"DocumentPricingTableRowValueDto":{"type":"object","properties":{"column_id":{"type":"string","description":"Id of the column the value belongs to."},"value":{"type":"string","description":"Value of the cell as a string. Number cells hold a plain decimal number with a period as decimal separator, prices in the table currency. Tax and discount cells hold a percentage from 0 to 100 unless the tax_flat_fee or discount_flat_fee of the row is true. Empty for image cells, whose image is in `images`."},"images":{"description":"Images shown in the cell.","type":"array","items":{"$ref":"#/components/schemas/DocumentPricingTableRowImageDto"}}},"required":["column_id","value","images"]},"DocumentPricingTableRowDto":{"type":"object","properties":{"row_id":{"type":"string","description":"Id of the row."},"external_id":{"type":"string","nullable":true,"description":"External id of the line item, used by integrations."},"optional_product_field_id":{"type":"string","description":"Id of the field that lets a recipient include or exclude the product."},"variable_quantity_field_id":{"type":"string","description":"Id of the field that lets a recipient change the quantity."},"discount_flat_fee":{"type":"boolean","description":"Whether the row discount is a flat amount instead of a percentage."},"discount_calculated_from":{"nullable":true,"description":"Value the row discount is calculated from.","allOf":[{"$ref":"#/components/schemas/DocumentPricingTableDiscountCalculatedFrom"}]},"tax_flat_fee":{"type":"boolean","description":"Whether the row tax is a flat amount instead of a percentage."},"values":{"description":"Cells of the row, one per column.","type":"array","items":{"$ref":"#/components/schemas/DocumentPricingTableRowValueDto"}}},"required":["row_id","external_id","optional_product_field_id","variable_quantity_field_id","discount_flat_fee","discount_calculated_from","tax_flat_fee","values"]},"DocumentPricingTableSectionDto":{"type":"object","properties":{"section_id":{"type":"string","description":"Id of the section."},"name":{"type":"string","nullable":true,"description":"Name of the section."},"display_name":{"type":"string","nullable":true,"description":"Label of the section."},"show_discount_in_price_column":{"type":"boolean","description":"Whether the discount is shown in the price column."},"display_mode":{"description":"How the section displays its rows.","allOf":[{"$ref":"#/components/schemas/DocumentPricingTableSectionDisplayModeDto"}]},"section_summary_settings":{"description":"Whether the section shows a summary.","allOf":[{"$ref":"#/components/schemas/DocumentPricingTableSummarySettingsDto"}]},"section_summary":{"description":"Summary lines of the section.","allOf":[{"$ref":"#/components/schemas/DocumentPricingTableSectionSummaryDto"}]},"columns":{"description":"Columns of the section.","type":"array","items":{"$ref":"#/components/schemas/DocumentPricingTableColumnDto"}},"rows":{"description":"Rows of the section.","type":"array","items":{"$ref":"#/components/schemas/DocumentPricingTableRowDto"}}},"required":["section_id","name","display_name","show_discount_in_price_column","display_mode","section_summary_settings","section_summary","columns","rows"]},"DocumentPricingTableSummaryValueDto":{"type":"object","properties":{"value":{"type":"string","nullable":true,"description":"Value of the summary line as a plain decimal string in the table currency, for example 1234.5. On discount and tax it is a percentage from 0 to 100 unless flat_fee is true. On a tax_breakdown rate it is the tax amount of that rate group."},"enabled":{"type":"boolean","description":"Whether the summary line is shown."},"display_name":{"type":"string","nullable":true,"description":"Label of the summary line."}},"required":["value","enabled","display_name"]},"DocumentPricingTableTaxBreakdownSummaryValueDto":{"type":"object","properties":{"value":{"type":"string","nullable":true,"description":"Value of the summary line as a plain decimal string in the table currency, for example 1234.5. On discount and tax it is a percentage from 0 to 100 unless flat_fee is true. On a tax_breakdown rate it is the tax amount of that rate group."},"enabled":{"type":"boolean","description":"Whether the summary line is shown."},"display_name":{"type":"string","nullable":true,"description":"Label of the summary line."},"rates":{"description":"Rate groups the value is broken down into.","type":"array","items":{"$ref":"#/components/schemas/DocumentPricingTableSummaryValueDto"}}},"required":["value","enabled","display_name"]},"DocumentPricingTableTaxDiscountSummaryValueDto":{"type":"object","properties":{"value":{"type":"string","nullable":true,"description":"Value of the summary line as a plain decimal string in the table currency, for example 1234.5. On discount and tax it is a percentage from 0 to 100 unless flat_fee is true. On a tax_breakdown rate it is the tax amount of that rate group."},"enabled":{"type":"boolean","description":"Whether the summary line is shown."},"display_name":{"type":"string","nullable":true,"description":"Label of the summary line."},"flat_fee":{"type":"boolean","nullable":true,"description":"Whether the value is a flat amount instead of a percentage."}},"required":["value","enabled","display_name","flat_fee"]},"DocumentPricingTableSummaryDto":{"type":"object","properties":{"base_subtotal":{"nullable":true,"description":"Sum of the section totals before taxes and discounts.","allOf":[{"$ref":"#/components/schemas/DocumentPricingTableSummaryValueDto"}]},"tax_breakdown":{"nullable":true,"description":"Sum of the tax groups of the table.","allOf":[{"$ref":"#/components/schemas/DocumentPricingTableTaxBreakdownSummaryValueDto"}]},"combined_subtotal":{"nullable":true,"description":"Sum of the section subtotals including taxes and discounts.","allOf":[{"$ref":"#/components/schemas/DocumentPricingTableSummaryValueDto"}]},"discount":{"nullable":true,"description":"Discount applied to the table.","allOf":[{"$ref":"#/components/schemas/DocumentPricingTableTaxDiscountSummaryValueDto"}]},"tax":{"nullable":true,"description":"Tax applied to the table.","allOf":[{"$ref":"#/components/schemas/DocumentPricingTableTaxDiscountSummaryValueDto"}]}},"required":["base_subtotal","tax_breakdown","combined_subtotal","discount","tax"]},"DocumentPricingTableDto":{"type":"object","properties":{"table_id":{"type":"string","description":"Id of the pricing table."},"external_id":{"type":"string","nullable":true,"description":"External id of the pricing table, used by integrations."},"name":{"type":"string","nullable":true,"description":"Name of the pricing table."},"display_name":{"type":"string","nullable":true,"description":"Label of the pricing table."},"summary_settings":{"description":"Whether the table shows a summary.","allOf":[{"$ref":"#/components/schemas/DocumentPricingTableSummarySettingsDto"}]},"pre_calculated":{"type":"boolean","nullable":true,"description":"Whether the totals are calculated in advance instead of on the signing page."},"currency_settings":{"nullable":true,"description":"Currency and formatting of the prices.","allOf":[{"$ref":"#/components/schemas/DocumentPricingTableCurrencySettingsDto"}]},"sections":{"description":"Sections of the pricing table.","type":"array","items":{"$ref":"#/components/schemas/DocumentPricingTableSectionDto"}},"parent_id":{"type":"string","nullable":true,"description":"Id of the pricing table this one was copied from."},"summary":{"description":"Summary lines of the pricing table.","allOf":[{"$ref":"#/components/schemas/DocumentPricingTableSummaryDto"}]}},"required":["table_id","external_id","name","display_name","summary_settings","pre_calculated","currency_settings","sections","parent_id"]},"ListDocumentPricingTablesResponse":{"type":"object","properties":{"pricing_tables":{"description":"Pricing tables of the document.","type":"array","items":{"$ref":"#/components/schemas/DocumentPricingTableDto"}}},"required":["pricing_tables"]},"UpdateDocumentPricingTablesBody":{"type":"object","properties":{"pricing_tables":{"description":"Pricing tables to update.","type":"array","items":{"$ref":"#/components/schemas/UpdateDocumentPricingTableBody"}}},"required":["pricing_tables"]},"UpdateDocumentBody":{"type":"object","properties":{"external_id":{"type":"string","description":"Change the external id of the document."},"external_client_id":{"type":"string","description":"Replaces the client stored on the document, as returned in `external_client_id` by get document. Only accepted while the document is a draft."},"value":{"type":"number","minimum":0,"description":"Monetary value of the document, 0 or higher. Rejected with 403 when a conditional logic condition on the document uses the document value and at least one recipient has signed or approved the document."},"tags":{"type":"string","description":"Comma separated tag titles to add to the document, without spaces around the commas, for example POC,Europe,ICP. Tags already on the document are kept, and a title that matches no tag of the entity creates that tag."},"is_private":{"type":"boolean","nullable":true,"description":"When true the document can only be viewed by the owner."},"comment_settings":{"description":"Document chat settings.","allOf":[{"$ref":"#/components/schemas/CommentSettingsBody"}]},"sign_redirect":{"type":"string","description":"HTTPS URL the recipient is redirected to after signing, taking precedence over the entity sign redirect. Merge tags may not appear in the host, and `{{customData.key}}` tags only as query parameter values. Requires extended branding. Replaces the current document sign redirect."},"block_recipient_invite":{"type":"boolean","description":"Blocks recipients from inviting additional participants from the signing page."},"sign_copy_emails":{"nullable":true,"maxItems":10,"description":"Up to 10 email addresses that receive an email copy of the signed document once everyone has signed. They are not recipients: they are never invited, not shown to signers and not on the certificate. Replaces the current addresses; send null or an empty array to remove them all.","type":"array","items":{"type":"string"}},"contract_start_date":{"oneOf":[{"type":"integer"},{"type":"string"}],"nullable":true,"description":"Start date of the contract for contract management. Accepted formats: yyyy-MM-dd, dd-MM-yyyy, MM/dd/yyyy, yyyy-MM-ddTHH:mm:ss.SSSZ or a Unix timestamp in seconds (10 digits). A date without a time zone is read as UTC. Send both contract dates together: when only one of them has a value, the other is cleared. Send null, 0 or an empty string to clear this date."},"contract_end_date":{"oneOf":[{"type":"integer"},{"type":"string"}],"nullable":true,"description":"End date of the contract for contract management. Accepted formats: yyyy-MM-dd, dd-MM-yyyy, MM/dd/yyyy, yyyy-MM-ddTHH:mm:ss.SSSZ or a Unix timestamp in seconds (10 digits). A date without a time zone is read as UTC. Send both contract dates together: when only one of them has a value, the other is cleared. Send null, 0 or an empty string to clear this date."}}},"DocumentStatusDto":{"type":"object","properties":{"status":{"description":"Current status of the document.","allOf":[{"$ref":"#/components/schemas/DocumentStatus"}]},"rejection_reason":{"type":"string","nullable":true,"description":"Reason given by the recipient who rejected the document. Null when the document is not rejected or no reason was given."}},"required":["status","rejection_reason"]},"ListDocumentAttachmentResponse":{"type":"object","properties":{"attachments":{"description":"Attachments of the document.","type":"array","items":{"$ref":"#/components/schemas/DocumentAttachmentDto"}}},"required":["attachments"]},"CreateDocumentCommentBody":{"type":"object","properties":{"text":{"type":"string","description":"The comment text to add to the document."}},"required":["text"]},"DocumentCommentCreatedDto":{"type":"object","properties":{"comment_id":{"type":"string","description":"Id of the created comment."}},"required":["comment_id"]},"UpdateDocumentExpirationBody":{"type":"object","properties":{"expiration_date":{"oneOf":[{"type":"string"},{"type":"number"}],"description":"New expiration date for the document, which must be in the future. Accepted formats: yyyy-MM-dd, dd-MM-yyyy, MM/dd/yyyy, yyyy-MM-ddTHH:mm:ss.SSSZ or a Unix timestamp in seconds (10 digits). A date without a time zone is read as UTC. The expiration cannot be removed: null returns 400."},"send_notification":{"type":"boolean","description":"Whether a notification is sent to the recipients. Defaults to false."}},"required":["expiration_date"]},"UpdateDocumentExpirationResponse":{"type":"object","properties":{"status":{"type":"number","description":"Set to 1 when the expiration date was updated."}},"required":["status"]},"DocumentDownloadResponse":{"type":"object","properties":{"document_url":{"type":"string","description":"Temporary URL the document file can be downloaded from."},"file":{"type":"string","description":"The same URL as `document_url`."},"file_content":{"type":"string","description":"Base64 encoded document file, returned only when it was requested and the file is small enough."}},"required":["document_url","file"]},"DownloadDocumentBody":{"type":"object","properties":{"direct":{"type":"boolean","description":"Send `true`, `\"true\"` or `\"1\"` to return the binary file directly; any other value is ignored. Falls back to document_url for files larger than 100MB."},"with_file_content":{"type":"boolean","description":"Send `true`, `\"true\"` or `\"1\"` to return the file content as base64 encoded; any other value is ignored. Falls back to document_url for files larger than 100MB."}}},"DocumentPreviewRecipientBody":{"type":"object","properties":{"first_name":{"type":"string","description":"First name used to fill the recipient merge fields."},"last_name":{"type":"string","description":"Last name used to fill the recipient merge fields."},"email":{"type":"string","description":"Email address used to fill the recipient merge fields."},"mobile":{"type":"string","description":"Mobile number used to fill the recipient merge fields."},"role":{"type":"string","description":"Role the recipient is previewed as."},"company_name":{"type":"string","description":"Company name used to fill the recipient merge fields."},"company_number":{"type":"string","description":"Company number used to fill the recipient merge fields."}}},"DocumentPreviewBody":{"type":"object","properties":{"name":{"type":"string","description":"Name used to fill the document merge fields."},"type":{"type":"string","description":"Document type the preview is rendered as."},"value":{"oneOf":[{"type":"string"},{"type":"number"}],"description":"Monetary value used to fill the document merge fields."},"external_id":{"type":"string","description":"External id used to fill the document merge fields."},"company_name":{"type":"string","description":"Company name used to fill the document merge fields."},"company_number":{"type":"string","description":"Company number used to fill the document merge fields."},"recipients":{"description":"Values for the recipient merge fields, matched by position to the recipients of the document: the first entry overrides the first recipient, and so on. Entries beyond the number of recipients are ignored.","type":"array","items":{"$ref":"#/components/schemas/DocumentPreviewRecipientBody"}},"custom_fields":{"description":"Values for the custom fields of the preview, identified by name or id.","type":"array","items":{"$ref":"#/components/schemas/CustomFieldDto"}}}},"DocumentPreviewResponse":{"type":"object","properties":{"preview_url":{"type":"string","description":"URL of the generated preview, which expires after ten minutes."}},"required":["preview_url"]},"SealDocumentBody":{"type":"object","properties":{"sender_id":{"type":"string","description":"Id of a user of the entity who may send documents. Send document sends the document from this user and makes them its owner; send and seal both self-sign the document as this user when it was created with the self-sign option."},"sender_email":{"type":"string","description":"Email address of a user of the entity who may send documents, an alternative to `sender_id` that wins when both are set. Send document sends the document from this user and makes them its owner; send and seal both self-sign the document as this user when it was created with the self-sign option."}}},"SealDocumentResponse":{"type":"object","properties":{"recipients":{"description":"Recipients of the sealed document.","type":"array","items":{"$ref":"#/components/schemas/RecipientDto"}}},"required":["recipients"]},"CreateDocumentRevisionBody":{"type":"object","properties":{"message":{"type":"string","description":"Revision message. Defaults to an empty string."},"send_document":{"type":"boolean","description":"Whether the document should be sent to the recipients. Defaults to false."}}},"CreateNewDocumentVersionBody":{"type":"object","properties":{"keep_content":{"type":"boolean","description":"Copy pages, attachments, video and fields to the new version","default":true},"keep_recipients":{"type":"boolean","description":"Copy recipients to the new version","default":true},"keep_email_content":{"type":"boolean","description":"Copy the email sendout content to the new version","default":true},"recall_original":{"type":"boolean","description":"Recall the original document after the new version is created","default":false}}},"CreateNewDocumentVersionResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Id of the new document version"},"parent_id":{"type":"string","description":"Id of the original document the new version was created from"}},"required":["id","parent_id"]},"ForwardDocumentBody":{"type":"object","properties":{"first_name":{"type":"string","description":"First name of the new recipient."},"last_name":{"type":"string","description":"Last name of the new recipient."},"email":{"type":"string","description":"Email of the new recipient."},"mobile":{"type":"string","description":"Mobile number of the new recipient in international format."},"transfer":{"type":"boolean","description":"Transfer the signature rights to the forwarded recipient. Requires recipient_id."},"recipient_id":{"type":"string","description":"Id of an existing recipient of the document. With `transfer` true, this recipient must be a signer, and its signature rights move to the new recipient. Without `transfer`, the new CC recipient copies the eID verification and recipient settings of this recipient, and its SMS verification settings when `mobile` is sent. An id that matches no recipient of the document returns 400."},"title":{"type":"string","description":"Title of the new recipient, for example CEO or Sales manager."},"company_name":{"type":"string","description":"Company name of the new recipient."},"company_number":{"type":"string","description":"Company number of the new recipient."}}},"ManuallySignDocumentBody":{"type":"object","properties":{"file_id":{"type":"string","description":"ID of a previously uploaded file. If provided, the document is marked as signed with the uploaded file. If omitted, the document is marked as signed without verification."}}},"ListRecipientsResponse":{"type":"object","properties":{"recipients":{"description":"Recipients of the document.","type":"array","items":{"$ref":"#/components/schemas/RecipientDto"}}},"required":["recipients"]},"SendDocumentToRecipientsBody":{"type":"object","properties":{"recipient_ids":{"description":"Ids of the recipients on this document to send to now. Recipients not listed are left untouched.","type":"array","items":{"type":"string"}}},"required":["recipient_ids"]},"DocumentLogDto":{"type":"object","properties":{"document_id":{"type":"string","description":"Id of the document the row belongs to."},"first_name":{"type":"string","description":"First name of the person the row belongs to."},"last_name":{"type":"string","description":"Last name of the person the row belongs to."},"email":{"type":"string","description":"Email address of the person the row belongs to."},"event_name":{"type":"string","description":"What happened: an event log name such as sent, viewed, verified, signed or rejected; emailopened, videoplayed, clicked or attachmentopened for tracked activity; an email bounce status such as hardbounced or softbounced; or sms, video or reminder for a reminder."},"event_meta_data":{"type":"string","description":"Extra data of the row. On most event log rows it is the device type: desktop, smartphone, tablet or empty. A verified row holds the verification method, such as biometric or sms; a commented row the comment; a rejected row the reason the recipient gave. A videoplayed row holds the watch time, such as 12.5 s.; emailopened the email client details; an email bounce the bounce reason; clicked the value of the clicked field; attachmentopened the attachment title. Empty otherwise."},"geo_ip":{"type":"string","description":"IP address the action came from."},"geo_city":{"type":"string","description":"City the IP address resolved to."},"geo_country_name":{"type":"string","description":"Country the IP address resolved to."},"created_at":{"type":"string","description":"When the action happened."}},"required":["document_id","first_name","last_name","email","event_name","event_meta_data","geo_ip","geo_city","geo_country_name","created_at"]},"DocumentEventDto":{"type":"object","properties":{"first_name":{"type":"string","nullable":true,"description":"First name of the person the event belongs to."},"last_name":{"type":"string","nullable":true,"description":"Last name of the person the event belongs to."},"email":{"type":"string","nullable":true,"description":"Email address of the person the event belongs to."},"thumb_url":{"type":"string","nullable":true,"description":"Avatar of the person the event belongs to."},"company_name":{"type":"string","nullable":true,"description":"Company of the recipient the event belongs to. On an event log row it falls back to the company name of your entity, and then to the entity name, when the recipient has none or the event is a sender action. On a bounce, click or reminder row it is the company of the recipient, or null when the row has no matching recipient."},"event_name":{"type":"string","description":"What happened: an event log name such as sent, viewed, signed or rejected; an email bounce status (deferred, hardbounced, queued, softbounced or spamreport); clicked for a clicked field; or sms, video or reminder for a reminder."},"document_name":{"type":"string","description":"Current name of the document, except on email bounce events, where it holds the reason the email bounced."},"document_status":{"type":"string","description":"Current status of the document, the same on every event rather than the status at the time of the event."},"event_meta_data":{"type":"string","description":"Extra data of the event, which on a rejected event is the reason the recipient gave."},"created_at":{"type":"string","description":"When the event happened."},"document_id":{"type":"string","description":"Id of the document the event belongs to."}},"required":["first_name","last_name","email","thumb_url","company_name","event_name","document_name","document_status","event_meta_data","created_at","document_id"]},"DocumentCommentDto":{"type":"object","properties":{"id":{"type":"string","description":"Id of the comment."},"depth":{"type":"number","deprecated":true,"description":"Deprecated legacy field that is not populated."},"self":{"type":"number","description":"Whether the authenticated user wrote the comment, as 1 or 0."},"full_name":{"type":"string","description":"Name of the person that wrote the comment."},"email":{"type":"string","description":"Email address of the person that wrote the comment."},"thumb_url":{"type":"string","nullable":true,"description":"Avatar of the person that wrote the comment, or null when they have none."},"text":{"type":"string","description":"Text of the comment."},"position":{"type":"string","deprecated":true,"description":"Deprecated legacy field that is not populated."},"created_at":{"type":"string","description":"When the comment was written, in UTC."}},"required":["id","depth","self","full_name","email","thumb_url","text","position","created_at"]},"ReminderEntity":{"type":"object","properties":{"sms_reminder_text":{"type":"string","description":"Default SMS reminder text of the entity, which callers can send back as the reminder `text`."}},"required":["sms_reminder_text"]},"ReminderRecipient":{"type":"object","properties":{"first_name":{"type":"string","description":"First name of the recipient."},"last_name":{"type":"string","description":"Last name of the recipient."},"fullname":{"type":"string","description":"First and last name of the recipient joined by a space."},"mobile":{"type":"string","description":"Mobile number of the recipient, including its country code."}},"required":["first_name","last_name","fullname","mobile"]},"DocumentReminderDto":{"type":"object","properties":{"entity":{"description":"Entity level reminder defaults for the document.","allOf":[{"$ref":"#/components/schemas/ReminderEntity"}]},"recipients":{"description":"Signers and approvers of the document that have a mobile number an SMS reminder can reach.","type":"array","items":{"$ref":"#/components/schemas/ReminderRecipient"}}},"required":["entity","recipients"]},"CreateDocumentReminderResponse":{"type":"object","properties":{"status":{"type":"number","description":"Set to 1 when the reminder was accepted for sending."}}},"DocumentReminderType":{"type":"string","enum":["sms","email","video"],"description":"Type of reminder to send. A missing or unknown type answers 400."},"CreateDocumentReminderBody":{"type":"object","properties":{"type":{"description":"Type of reminder to send. A missing or unknown type answers 400.","allOf":[{"$ref":"#/components/schemas/DocumentReminderType"}]},"text":{"type":"string","nullable":true,"description":"Text of the reminder. Required for an `sms` reminder: when it is missing or empty nothing is sent and the response is an empty array. Optional for `email` and `video` reminders; in an email it can contain merge tags."},"subject":{"type":"string","nullable":true,"description":"Custom subject line for the reminder email. Only applies to email reminders; the default reminder subject is used when omitted."},"recipient_ids":{"nullable":true,"description":"Recipient ids to remind. For an `email` reminder combined with not_signed or not_opened, only the listed recipients that match the filter are reminded. For an `sms` reminder, the recipients that have not signed are reminded when it is omitted. Not used for `video`, but an invalid id still answers 400.","type":"array","items":{"type":"string"}},"not_signed":{"type":"boolean","description":"Email reminders only: remind the recipients that have not signed or approved the document. When both not_signed and not_opened are true, only not_opened applies. Without recipient_ids, set not_signed or not_opened, or no recipient is reminded."},"not_opened":{"type":"boolean","description":"Email reminders only: remind the recipients that have not opened the document. Takes precedence over not_signed when both are true."},"video_id":{"type":"string","nullable":true,"description":"Id of an existing or uploaded video. Required for a `video` reminder, which answers 400 without it, and ignored for the other types."}},"required":["type"]},"ListDocumentPagesResponse":{"type":"object","properties":{"pages":{"description":"Pages of the document.","type":"array","items":{"$ref":"#/components/schemas/DocumentPageDto"}},"page_count":{"type":"number","description":"Number of pages returned."}},"required":["pages","page_count"]},"DocumentPageRecipientTrackingDto":{"type":"object","properties":{"recipient_id":{"type":"string","description":"Id of the recipient."},"page_time":{"type":"number","description":"Seconds this recipient has spent on the page."}},"required":["recipient_id","page_time"]},"DocumentPageTrackingDto":{"type":"object","properties":{"page_id":{"type":"string","description":"Id of the page."},"page_num":{"type":"number","description":"Position of the page in the document, starting at 1."},"page_time":{"type":"number","description":"Seconds the recipients have spent on the page in total."},"recipients":{"description":"Time spent on the page broken down per recipient.","type":"array","items":{"$ref":"#/components/schemas/DocumentPageRecipientTrackingDto"}}},"required":["page_id","page_num","page_time","recipients"]},"ListDocumentPageTrackingResponse":{"type":"object","properties":{"pages":{"description":"Pages of the document with their tracked time.","type":"array","items":{"$ref":"#/components/schemas/DocumentPageTrackingDto"}},"page_count":{"type":"number","description":"Number of pages returned."}},"required":["pages","page_count"]},"CustomDataValueTypeString":{"type":"string","enum":["string"],"description":"Type of value for the custom data property. Must correspond to the entity level property settings."},"CustomDataPropertyString":{"type":"object","properties":{"key":{"type":"string","maxLength":100,"description":"Key of the custom data property. Must match a key defined in the entity custom data settings."},"label":{"type":"string","deprecated":true,"maxLength":100,"description":"Deprecated. Label is resolved from entity custom data settings."},"value":{"type":"string","maxLength":1000,"description":"Value for the custom data property."},"value_type":{"description":"Type of value for the custom data property. Must correspond to the entity level property settings.","allOf":[{"$ref":"#/components/schemas/CustomDataValueTypeString"}]}},"required":["key","value","value_type"]},"CustomDataValueTypeBoolean":{"type":"string","enum":["boolean"],"description":"Type of value for the custom data property. Must correspond to the entity level property settings."},"CustomDataPropertyBoolean":{"type":"object","properties":{"key":{"type":"string","maxLength":100,"description":"Key of the custom data property. Must match a key defined in the entity custom data settings."},"label":{"type":"string","deprecated":true,"maxLength":100,"description":"Deprecated. Label is resolved from entity custom data settings."},"value":{"type":"boolean","description":"Value for the custom data property."},"value_type":{"description":"Type of value for the custom data property. Must correspond to the entity level property settings.","allOf":[{"$ref":"#/components/schemas/CustomDataValueTypeBoolean"}]}},"required":["key","value","value_type"]},"CustomDataValueTypeNumber":{"type":"string","enum":["number"],"description":"Type of value for the custom data property. Must correspond to the entity level property settings."},"CustomDataPropertyNumber":{"type":"object","properties":{"key":{"type":"string","maxLength":100,"description":"Key of the custom data property. Must match a key defined in the entity custom data settings."},"label":{"type":"string","deprecated":true,"maxLength":100,"description":"Deprecated. Label is resolved from entity custom data settings."},"value":{"type":"number","description":"Value for the custom data property."},"value_type":{"description":"Type of value for the custom data property. Must correspond to the entity level property settings.","allOf":[{"$ref":"#/components/schemas/CustomDataValueTypeNumber"}]}},"required":["key","value","value_type"]},"CustomDataValueTypeSetValues":{"type":"string","enum":["setValues"],"description":"Type of value for the custom data property. Must correspond to the entity level property settings."},"CustomDataPropertySetValues":{"type":"object","properties":{"key":{"type":"string","maxLength":100,"description":"Key of the custom data property. Must match a key defined in the entity custom data settings."},"label":{"type":"string","deprecated":true,"maxLength":100,"description":"Deprecated. Label is resolved from entity custom data settings."},"value":{"type":"string","maxLength":1000,"description":"Key of one of the active options defined on the entity custom data property. A value that is not an active option is not stored, and the property is created without a value."},"value_type":{"description":"Type of value for the custom data property. Must correspond to the entity level property settings.","allOf":[{"$ref":"#/components/schemas/CustomDataValueTypeSetValues"}]}},"required":["key","value","value_type"]},"CreateDocumentCustomDataBody":{"type":"object","properties":{"property":{"oneOf":[{"$ref":"#/components/schemas/CustomDataPropertyString"},{"$ref":"#/components/schemas/CustomDataPropertyNumber"},{"$ref":"#/components/schemas/CustomDataPropertyBoolean"},{"$ref":"#/components/schemas/CustomDataPropertySetValues"}],"description":"The custom data property to add to the document. Its `key` and `value_type` must match a property defined in the entity custom data settings."}},"required":["property"]},"CustomDataPropertyStringResponse":{"type":"object","properties":{"key":{"type":"string","maxLength":100,"description":"Key of the custom data property. Must match a key defined in the entity custom data settings."},"label":{"type":"string","deprecated":true,"maxLength":100,"description":"Deprecated. Use translations instead."},"value":{"type":"string","maxLength":1000,"description":"Value of the custom data property, left out when none is stored."},"value_type":{"description":"Type of value for the custom data property. Must correspond to the entity level property settings.","allOf":[{"$ref":"#/components/schemas/CustomDataValueTypeString"}]},"translations":{"description":"Localized display names resolved from the entity custom data settings.","type":"array","items":{"$ref":"#/components/schemas/TranslationDto"}}},"required":["key","value_type"]},"CustomDataPropertyBooleanResponse":{"type":"object","properties":{"key":{"type":"string","maxLength":100,"description":"Key of the custom data property. Must match a key defined in the entity custom data settings."},"label":{"type":"string","deprecated":true,"maxLength":100,"description":"Deprecated. Use translations instead."},"value":{"type":"boolean","description":"Value of the custom data property, left out when none is stored."},"value_type":{"description":"Type of value for the custom data property. Must correspond to the entity level property settings.","allOf":[{"$ref":"#/components/schemas/CustomDataValueTypeBoolean"}]},"translations":{"description":"Localized display names resolved from the entity custom data settings.","type":"array","items":{"$ref":"#/components/schemas/TranslationDto"}}},"required":["key","value_type"]},"CustomDataPropertyNumberResponse":{"type":"object","properties":{"key":{"type":"string","maxLength":100,"description":"Key of the custom data property. Must match a key defined in the entity custom data settings."},"label":{"type":"string","deprecated":true,"maxLength":100,"description":"Deprecated. Use translations instead."},"value":{"type":"number","description":"Value of the custom data property, left out when none is stored."},"value_type":{"description":"Type of value for the custom data property. Must correspond to the entity level property settings.","allOf":[{"$ref":"#/components/schemas/CustomDataValueTypeNumber"}]},"translations":{"description":"Localized display names resolved from the entity custom data settings.","type":"array","items":{"$ref":"#/components/schemas/TranslationDto"}}},"required":["key","value_type"]},"CustomDataPropertySetValuesResponse":{"type":"object","properties":{"key":{"type":"string","maxLength":100,"description":"Key of the custom data property. Must match a key defined in the entity custom data settings."},"label":{"type":"string","deprecated":true,"maxLength":100,"description":"Deprecated. Use translations instead."},"value":{"type":"string","maxLength":1000,"description":"Value of the custom data property, left out when none is stored."},"value_type":{"description":"Type of value for the custom data property. Must correspond to the entity level property settings.","allOf":[{"$ref":"#/components/schemas/CustomDataValueTypeSetValues"}]},"translations":{"description":"Localized display names resolved from the entity custom data settings.","type":"array","items":{"$ref":"#/components/schemas/TranslationDto"}}},"required":["key","value_type"]},"DocumentCustomDataPropertyDto":{"type":"object","properties":{"id":{"type":"string","description":"Id of the custom data entry on the document, which the get, update and delete routes take in their path."},"document_id":{"type":"string","description":"Id of the document the custom data entry belongs to."},"property":{"oneOf":[{"$ref":"#/components/schemas/CustomDataPropertyStringResponse"},{"$ref":"#/components/schemas/CustomDataPropertyNumberResponse"},{"$ref":"#/components/schemas/CustomDataPropertyBooleanResponse"},{"$ref":"#/components/schemas/CustomDataPropertySetValuesResponse"}],"description":"The custom data property, with its label and translations resolved from the entity custom data settings."}},"required":["id","document_id","property"]},"ListDocumentCustomDataPropertiesResponse":{"type":"object","properties":{"custom_data":{"description":"The requested page of custom data properties of the document.","type":"array","items":{"$ref":"#/components/schemas/DocumentCustomDataPropertyDto"}},"total_count":{"type":"number","description":"Number of custom data properties on the document, ignoring `limit` and `offset`."}},"required":["custom_data","total_count"]},"UpdateCustomDataPropertyString":{"type":"object","properties":{"label":{"type":"string","deprecated":true,"maxLength":100,"description":"Deprecated. Label is resolved from entity custom data settings."},"value":{"type":"string","maxLength":1000,"description":"Updated value for the custom data property."},"value_type":{"description":"Type of value for the custom data property. Must correspond to the entity level property settings.","allOf":[{"$ref":"#/components/schemas/CustomDataValueTypeString"}]}},"required":["value","value_type"]},"UpdateCustomDataPropertyNumber":{"type":"object","properties":{"label":{"type":"string","deprecated":true,"maxLength":100,"description":"Deprecated. Label is resolved from entity custom data settings."},"value":{"type":"number","description":"Updated value for the custom data property."},"value_type":{"description":"Type of value for the custom data property. Must correspond to the entity level property settings.","allOf":[{"$ref":"#/components/schemas/CustomDataValueTypeNumber"}]}},"required":["value","value_type"]},"UpdateCustomDataPropertyBoolean":{"type":"object","properties":{"label":{"type":"string","deprecated":true,"maxLength":100,"description":"Deprecated. Label is resolved from entity custom data settings."},"value":{"type":"boolean","description":"Updated value for the custom data property."},"value_type":{"description":"Type of value for the custom data property. Must correspond to the entity level property settings.","allOf":[{"$ref":"#/components/schemas/CustomDataValueTypeBoolean"}]}},"required":["value","value_type"]},"UpdateCustomDataPropertySetValues":{"type":"object","properties":{"label":{"type":"string","deprecated":true,"maxLength":100,"description":"Deprecated. Label is resolved from entity custom data settings."},"value":{"type":"string","maxLength":1000,"description":"Key of one of the active options defined on the entity custom data property. Any other value answers 400."},"value_type":{"description":"Type of value for the custom data property. Must correspond to the entity level property settings.","allOf":[{"$ref":"#/components/schemas/CustomDataValueTypeSetValues"}]}},"required":["value","value_type"]},"UpdateDocumentCustomDataBody":{"type":"object","properties":{"property":{"oneOf":[{"$ref":"#/components/schemas/UpdateCustomDataPropertyString"},{"$ref":"#/components/schemas/UpdateCustomDataPropertyNumber"},{"$ref":"#/components/schemas/UpdateCustomDataPropertyBoolean"},{"$ref":"#/components/schemas/UpdateCustomDataPropertySetValues"}],"description":"The new value for the custom data property. Its `value_type` must correspond to the entity level property settings."}},"required":["property"]},"UploadBody":{"type":"object","properties":{"file_content":{"type":"string","description":"Send the file as base64 encoded. Note that base64 encoding files will increase the file size by about 30%"},"file_url":{"type":"string","description":"Url to the file. The file must be available for download without any authorization. It is always downloaded over `https://`, also when the URL starts with `http://`."},"file_name":{"type":"string","description":"Filename of the file including the extension. The extension will be helpful for converting different file types"}}},"UploadAttachmentBody":{"type":"object","properties":{"file_content":{"type":"string","description":"Send the file as base64 encoded. Note that base64 encoding files will increase the file size by about 30%"},"file_url":{"type":"string","description":"Url to the file. The file must be available for download without any authorization. It is always downloaded over `https://`, also when the URL starts with `http://`."},"file_name":{"type":"string","description":"Filename including the extension, for example terms.pdf. Required with `file_url` or `file_content`: without it the upload is rejected with `status` 0. Optional for a multipart upload, where the multipart file name is used. A file_name without an extension answers 400."}}},"UploadFileStatus":{"type":"string","enum":["file.uploaded"],"description":"Status of the uploaded file, always file.uploaded in a successful response."},"UploadResponse":{"type":"object","properties":{"file_id":{"type":"string","description":"Generated id of the uploaded file including its extension, used to add the file to a document."},"file_status":{"description":"Status of the uploaded file, always file.uploaded in a successful response.","allOf":[{"$ref":"#/components/schemas/UploadFileStatus"}]}},"required":["file_id","file_status"]},"UploadAttachmentStatus":{"type":"number","enum":[0,1],"description":"Outcome of the upload, 1 when the file was stored and 0 when it was rejected with the reason in `error`.","x-enumNames":["Failed","Uploaded"]},"UploadAttachmentType":{"type":"string","enum":["file"],"description":"Attachment type of the created attachment, always file for an uploaded file."},"UploadAttachmentResponse":{"type":"object","properties":{"status":{"description":"Outcome of the upload, 1 when the file was stored and 0 when it was rejected with the reason in `error`.","allOf":[{"$ref":"#/components/schemas/UploadAttachmentStatus"}]},"error":{"type":"string","description":"Reason the upload was rejected, returned only when `status` is 0."},"id":{"type":"string","description":"Id of the created attachment, used to assign it to a document."},"file_id":{"type":"string","description":"Legacy file id generated for the response, which does not reference the stored attachment."},"filename":{"type":"string","description":"Name the attachment was stored under, taken from `file_name` or the multipart file name."},"extension":{"type":"string","description":"File extension of `filename`, without the leading dot."},"type":{"description":"Attachment type of the created attachment, always file for an uploaded file.","allOf":[{"$ref":"#/components/schemas/UploadAttachmentType"}]}},"required":["status","type"]},"UploadArchiveBody":{"type":"object","properties":{"file_ids":{"type":"string","description":"File id of a previously uploaded file, see Upload a file. Only the first id of a comma separated list is used."},"file_name":{"type":"string","description":"Filename of the archived document, with the extension"},"file_url":{"type":"string","description":"Url to the file. The file must be available for download without any authorization. It is always downloaded over `https://`, also when the URL starts with `http://`."},"file_content":{"type":"string","description":"Send the file as base64 encoded. Note that base64 encoding files will increase the file size by about 30%"},"name":{"type":"string","description":"Name of the document"},"type":{"type":"string","default":"sales","description":"Document type identifier, such as sales, hr, introduction or other."},"value":{"oneOf":[{"type":"string"},{"type":"number"}],"default":0,"description":"Monetary value of the document in the entity currency"},"tags":{"type":"string","description":"Comma separated tag titles. A title that matches an existing tag of the entity reuses it; any other title creates a new tag."},"contract_start_date":{"type":"string","description":"Start date of the contract for contract management. ISO 8601 (for example 2024-01-31 or 2024-01-31T10:00:00+00:00), yyyy-MM-dd HH:mm:ss, RFC 2822 and common US date formats are accepted, and a value without an offset is read as UTC."},"contract_end_date":{"type":"string","description":"End date of the contract for contract management. ISO 8601 (for example 2024-01-31 or 2024-01-31T10:00:00+00:00), yyyy-MM-dd HH:mm:ss, RFC 2822 and common US date formats are accepted, and a value without an offset is read as UTC."},"sign_date":{"type":"string","description":"Date and time when the document was signed. ISO 8601 (for example 2024-01-31 or 2024-01-31T10:00:00+00:00), yyyy-MM-dd HH:mm:ss, RFC 2822 and common US date formats are accepted, and a value without an offset is read as UTC. A value that cannot be read answers 400."},"company_name":{"type":"string","description":"Associated company"},"company_number":{"type":"string","description":"Associated company number"},"sender_id":{"type":"string","description":"Id of the user to set as the sender and owner of the document"},"sender_email":{"type":"string","description":"Email of the user to own the archived document, which takes precedence over `sender_id`."},"data":{"type":"string","description":"JSON encoded object used by the Zapier integration. On a multipart request from Zapier, `file_url`, `file_content` and `file_name` are read from it instead of the form fields; every other field is still read from the form."}}},"UploadArchiveDocumentDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the document."},"name":{"type":"string","description":"Name of the document as it is presented to the recipients."},"value":{"type":"number","description":"Monetary value of the document in the entity currency."},"type":{"type":"string","description":"Document type, which sets the defaults and the look of the document."},"tags":{"type":"string","description":"Comma separated document tags."},"thumb_url":{"type":"string","description":"URL of the thumbnail of the first document page."},"external_id":{"type":"string","description":"External identifier of the document, empty unless it was set by the caller."},"external_client_id":{"type":"string","description":"Client that created the document. Create document stores the client id of the access token: the `client_id` sent when authenticating, the OAuth client id, or `api` when neither is set. Empty when the document has no client stored."},"external_editor_type":{"type":"string","description":"External editor the document content is edited in."},"external_editor_id":{"type":"string","description":"Identifier of the document in its external editor."},"company_name":{"type":"string","description":"Company the document is sent to."},"company_number":{"type":"string","description":"Registration number of the company the document is sent to."},"company_id":{"type":"string","description":"Identifier of the company the document is sent to."},"company_logo_url":{"type":"string","description":"URL of the logo of the company the document is sent to."},"unique_id":{"type":"number","description":"Number the document was given in the running order of the entity."},"is_selfsign":{"type":"boolean","description":"Whether the sender also signs the document, inherited from the entity when unset on the document."},"is_signing_biometric":{"type":"boolean","description":"Whether signers draw their signature on screen, inherited from the entity when unset on the document."},"is_signing_initials":{"type":"boolean","description":"Whether signers write their initials when signing, inherited from the entity when unset on the document."},"is_signing_forward":{"type":"boolean","description":"Whether a recipient may forward the signing rights, inherited from the entity when unset on the document."},"is_identify_recipient":{"type":"boolean","description":"Whether returning recipients are identified by cookie, inherited from the entity when unset on the document."},"is_private":{"type":"boolean","description":"Whether the document can only be viewed by its owner."},"status":{"description":"Current status of the document.","allOf":[{"$ref":"#/components/schemas/DocumentStatus"}]},"send_date":{"type":"string","nullable":true,"description":"When the document was sent, or null while it is a draft."},"sign_date":{"type":"string","nullable":true,"description":"When the last required signature was collected, or null while the document is unsigned."},"created_at":{"type":"string","description":"When the document was created."},"updated_at":{"type":"string","nullable":true,"description":"When the document was last updated, or null when that is unavailable."},"download_url":{"type":"string","description":"URL the document file can be downloaded from."},"app_url":{"type":"string","description":"URL of the document view page in the app."},"user_id":{"type":"string","description":"Id of the user that owns the document."},"sender_name":{"type":"string","description":"Full name of the user that owns the document."},"sender_thumb_url":{"type":"string","description":"URL of the avatar of the user that owns the document."},"sender_email":{"type":"string","description":"Email address of the user that owns the document."},"parent_id":{"type":"string","description":"Id of the document this document is a new version of. Empty when the document is not a new version."},"email_send_template_id":{"type":"string","description":"Id of the email template the document is sent with, 0 when none is set."},"email_send_subject":{"type":"string","description":"Subject line the document is sent with."},"email_send_message":{"type":"string","description":"Message to the recipients the document is sent with."},"is_signing":{"type":"boolean","description":"Whether the document is signable."},"is_signing_order":{"type":"boolean","description":"Whether signers are notified one at a time in their given order instead of all at once."},"is_signed":{"type":"boolean","description":"Whether the document has been signed."},"expiration_date":{"type":"string","nullable":true,"description":"When the document stops being available to the recipients, or null when it never expires."},"is_scheduled_sending":{"type":"boolean","description":"Whether the automatic sending is scheduled instead of immediate."},"scheduled_sending_time":{"type":"string","nullable":true,"description":"When the scheduled sending runs, or null when no sending is scheduled."},"is_reminder_sending":{"type":"boolean","description":"Whether reminders are sent automatically, inherited from the entity when unset on the document."},"is_video":{"type":"boolean","description":"Whether a video is presented before the document is opened."},"video_id":{"type":"string","nullable":true,"description":"Id of the video presented before the document is opened, or null when there is none."},"is_auto_comment":{"type":"boolean","description":"Whether a comment is posted automatically, inherited from the entity when unset on the document."},"auto_comment_text":{"type":"string","description":"Text of the automatic comment on the document."},"is_auto_comment_email":{"type":"boolean","description":"Whether the automatic comment is also emailed, inherited from the entity when unset on the document."},"auto_comment_email":{"type":"string","description":"Email address the automatic comment of the document is sent to."},"entity_auto_comment_text":{"type":"string","description":"Automatic comment text configured on the entity."},"entity_auto_comment_email":{"type":"string","description":"Email address for automatic comments configured on the entity."},"field_count":{"type":"number","description":"Number of fields on the document."},"contract_start_date":{"type":"string","nullable":true,"description":"Start date of the contract for contract management, or null when unset."},"contract_end_date":{"type":"string","nullable":true,"description":"End date of the contract for contract management, or null when unset."},"settings":{"nullable":true,"description":"Signing, certificate and chat settings of the document, or null when it has none.","allOf":[{"$ref":"#/components/schemas/DocumentSettingsDto"}]},"preview_url":{"type":"string","description":"URL that opens the document in preview mode."},"name_template":{"type":"string","description":"Contract name template configured on this template, returned raw. May contain {{entity.company_name}}, {{document.company_name}}, {{document.id}}, {{document.unique_id}} and {{date}}; Create document resolves {{document.company_name}} from the top-level company_name, {{document.id}} to the newly created document ID and {{document.unique_id}} to its unique ID, or removes {{document.unique_id}} when the company has no unique ID counter. Only present on templates that have one configured."},"pages":{"description":"Pages of the document, included when they were requested.","type":"array","items":{"$ref":"#/components/schemas/DocumentPageDto"}},"page_count":{"type":"number","description":"Number of pages in the document, included when the pages were requested."},"stats":{"description":"Visit and page statistics of the document, included when they were requested.","allOf":[{"$ref":"#/components/schemas/DocumentStatsDto"}]},"attachments":{"description":"Attachments of the document, included when they were requested.","type":"array","items":{"$ref":"#/components/schemas/DocumentAttachmentDto"}},"rejection_reason":{"type":"string","nullable":true,"description":"Reason given by the recipient who rejected the document. Null when the document is not rejected or no reason was given."}},"required":["id","name","value","type","tags","thumb_url","external_id","external_client_id","external_editor_type","external_editor_id","company_name","company_number","company_id","company_logo_url","unique_id","is_selfsign","is_signing_biometric","is_signing_initials","is_signing_forward","is_identify_recipient","is_private","status","send_date","sign_date","created_at","updated_at","download_url","app_url","user_id","sender_name","sender_thumb_url","sender_email","parent_id","email_send_template_id","email_send_subject","email_send_message","is_signing","is_signing_order","is_signed","expiration_date","is_scheduled_sending","scheduled_sending_time","is_reminder_sending","is_video","video_id","is_auto_comment","auto_comment_text","is_auto_comment_email","auto_comment_email","entity_auto_comment_text","entity_auto_comment_email","field_count","contract_start_date","contract_end_date","settings","preview_url"]},"UploadArchiveResponse":{"type":"object","properties":{"document":{"description":"The archived document as created, before the file is imported: shaped like get a document without its recipients and rejection_reason, with `status` draft until the import finishes and sets it to signedwithoutverification.","allOf":[{"$ref":"#/components/schemas/UploadArchiveDocumentDto"}]},"entity":{"description":"Sending defaults and domains of the entity that owns the document.","allOf":[{"$ref":"#/components/schemas/LatestDocumentEntityDto"}]}},"required":["document","entity"]},"DocumentFieldType":{"type":"string","enum":["check","dropdown","formatted","initials","link","merge","signature","signature_intials","text"],"description":"Kind of field, such as text, signature or initials."},"TemplateFieldOptionDto":{"type":"object","properties":{"value":{"type":"string","description":"Option the field can be set to."}},"required":["value"]},"TemplateFieldsFieldDto":{"type":"object","properties":{"field_id":{"type":"string","description":"Id of the field."},"page_id":{"type":"string","description":"Id of the page the field is placed on."},"field_type":{"description":"Kind of field, such as text, signature or initials.","allOf":[{"$ref":"#/components/schemas/DocumentFieldType"}]},"field_label":{"type":"string","nullable":true,"description":"Label of the field. In get document fields, a signature or initials field holds the signature or initials captured when it was signed instead, and is empty before; sender initials are built from the first and last name of the sender."},"field_value":{"oneOf":[{"type":"string"},{"type":"number"}],"nullable":true,"description":"Value of the field."},"field_options":{"nullable":true,"description":"Options of a dropdown field, or null when it has none.","type":"array","items":{"$ref":"#/components/schemas/TemplateFieldOptionDto"}},"is_collectable":{"type":"boolean","nullable":true,"description":"Whether the recipient has to fill the field in."},"is_editable":{"type":"boolean","nullable":true,"description":"Whether the sender may move or edit the field on a document created from a template."},"is_required":{"type":"boolean","nullable":true,"description":"Whether the field has to be filled in before signing."},"recipient_id":{"type":"string","nullable":true,"description":"Id of the recipient the field is assigned to."},"recipient_name":{"type":"string","nullable":true,"description":"Name of the recipient the field is assigned to."},"company_name":{"type":"string","nullable":true,"description":"Company of the recipient the field is assigned to."},"company_number":{"type":"string","nullable":true,"description":"Registration number of that company."},"role_name":{"type":"string","nullable":true,"description":"Name of the template role the field is assigned to."},"field_top":{"type":"number","nullable":true,"description":"Distance from the top edge of the page to the top of the field, in page units: every page is 900 units wide and its height follows the page aspect ratio, so an A4 page is about 1273 units tall."},"field_left":{"type":"number","nullable":true,"description":"Distance from the left edge of the page to the left of the field, in page units: every page is 900 units wide and its height follows the page aspect ratio, so an A4 page is about 1273 units tall."},"field_width":{"type":"number","nullable":true,"description":"Width of the field, in page units: every page is 900 units wide and its height follows the page aspect ratio, so an A4 page is about 1273 units tall."},"field_height":{"type":"number","nullable":true,"description":"Height of the field, in page units: every page is 900 units wide and its height follows the page aspect ratio, so an A4 page is about 1273 units tall."},"validation_regex":{"type":"string","nullable":true,"description":"Regular expression the value has to match."},"validation_warning":{"type":"string","nullable":true,"description":"Message shown when the value does not match validation_regex."}},"required":["field_id","page_id","field_type","field_label","field_value","field_options","is_collectable","is_editable","is_required","recipient_id","recipient_name","company_name","company_number","role_name","field_top","field_left","field_width","field_height","validation_regex","validation_warning"]},"FieldInputType":{"type":"string","enum":["Text","Checkbox","Dropdown","Number","Signature","Date","Email"],"description":"Input type of the field, which decides the format of its value."},"TemplateEditorInputSettingsDto":{"type":"object","properties":{"type":{"description":"Input type of the field, which decides the format of its value.","allOf":[{"$ref":"#/components/schemas/FieldInputType"}]},"required":{"type":"boolean","nullable":true,"description":"Whether the field has to be filled in."},"label":{"type":"string","nullable":true,"description":"Label of the field, which may reference other fields as {{field_id}}."},"options":{"nullable":true,"description":"Values a dropdown field can be set to.","type":"array","items":{"type":"string"}},"min_value":{"type":"string","nullable":true,"description":"Lowest value a number field accepts."},"max_value":{"type":"string","nullable":true,"description":"Highest value a number field accepts."},"help_text":{"type":"string","nullable":true,"description":"Help text shown with the field."}}},"MarkdownFieldRegexSettingsDto":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether the value has to match pattern."},"pattern":{"type":"string","description":"Regular expression the value has to match."},"description":{"type":"string","description":"Message shown when the value does not match pattern."}},"required":["enabled","pattern","description"]},"DateSettingsType":{"type":"string","enum":["Flexible","Fixed","NoSelection"],"description":"Kind of limit: Flexible, Fixed or NoSelection."},"FlexibleDateSettingsOption":{"type":"string","enum":["StartDate","SendDate"],"description":"Date a Flexible limit counts its days from."},"MarkdownFieldDateLimitDto":{"type":"object","properties":{"type":{"description":"Kind of limit: Flexible, Fixed or NoSelection.","allOf":[{"$ref":"#/components/schemas/DateSettingsType"}]},"days":{"type":"number","description":"Number of days counted from option, on a Flexible limit."},"option":{"description":"Date a Flexible limit counts its days from.","allOf":[{"$ref":"#/components/schemas/FlexibleDateSettingsOption"}]}},"required":["type"]},"MarkdownFieldDateSettingsDto":{"type":"object","properties":{"startDate":{"description":"Earliest date the field accepts.","allOf":[{"$ref":"#/components/schemas/MarkdownFieldDateLimitDto"}]},"endDate":{"description":"Latest date the field accepts.","allOf":[{"$ref":"#/components/schemas/MarkdownFieldDateLimitDto"}]}},"required":["startDate","endDate"]},"MarkdownFieldInputSettingsDto":{"type":"object","properties":{"type":{"description":"Input type of the field, which decides the format of its value.","allOf":[{"$ref":"#/components/schemas/FieldInputType"}]},"required":{"type":"boolean","description":"Whether the field has to be filled in."},"label":{"type":"string","description":"Label of the field, which may reference other fields as {{field_id}}."},"richTextLabel":{"type":"string","description":"Label of the field with its rich-text formatting."},"defaultValue":{"type":"string","description":"Value the field starts with."},"placeholder":{"type":"string","description":"Placeholder shown while the field is empty."},"options":{"description":"Values a dropdown field can be set to.","type":"array","items":{"type":"string"}},"helpText":{"type":"string","description":"Help text shown with the field."},"connectedId":{"type":"string","description":"Id of the field this field is connected to."},"width":{"type":"number","description":"Display width of the field."},"minValue":{"type":"string","description":"Lowest value a number or date field accepts."},"maxValue":{"type":"string","description":"Highest value a number or date field accepts."},"hide":{"type":"boolean","description":"Whether the field is hidden from the recipient."},"minChars":{"type":"number","description":"Fewest characters a text field accepts."},"maxChars":{"type":"number","description":"Most characters a text field accepts."},"regex":{"description":"Pattern a text field value has to match.","allOf":[{"$ref":"#/components/schemas/MarkdownFieldRegexSettingsDto"}]},"settings":{"description":"Range of dates a date field accepts.","allOf":[{"$ref":"#/components/schemas/MarkdownFieldDateSettingsDto"}]}},"required":["type"]},"FieldType":{"type":"string","enum":["Merge","Input","Custom","Markdown","Image"],"description":"Kind of editor field: Custom, Merge, Input or Markdown."},"MergeCategory":{"type":"string","enum":["Document","Sender","Recipient","Entity"],"description":"Merge category of a Merge field, such as Document, Sender, Recipient or Entity."},"MergeKey":{"type":"string","enum":["name","value","sendDate","uniqueId","firstName","lastName","title","email","mobile","companyName","companyNumber","address","zip","state","city","country","registeredNumber","website","expirationDate","signDate"],"description":"Merge key of a Merge field, such as name, value or companyName."},"TemplateEditorFieldDto":{"type":"object","properties":{"id":{"type":"string","description":"Id of the field, referenced from other fields as {{field_id}}."},"type":{"description":"Kind of editor field: Custom, Merge, Input or Markdown.","allOf":[{"$ref":"#/components/schemas/FieldType"}]},"category":{"nullable":true,"description":"Merge category of a Merge field, such as Document, Sender, Recipient or Entity.","allOf":[{"$ref":"#/components/schemas/MergeCategory"}]},"merge_key":{"nullable":true,"description":"Merge key of a Merge field, such as name, value or companyName.","allOf":[{"$ref":"#/components/schemas/MergeKey"}]},"recipient_id":{"type":"string","nullable":true,"description":"Id of the recipient the field is assigned to."},"user_id":{"type":"string","nullable":true,"description":"Id of the user the field is assigned to."},"custom_name":{"type":"string","nullable":true,"description":"Name of a Custom field."},"value":{"type":"string","nullable":true,"description":"Value of the field, which may reference Merge and Custom fields as {{field_id}}. A Markdown field value is a ProseMirror document serialized as a JSON string."},"input_settings":{"anyOf":[{"$ref":"#/components/schemas/TemplateEditorInputSettingsDto"},{"$ref":"#/components/schemas/MarkdownFieldInputSettingsDto"}],"nullable":true,"description":"Settings of an Input or Markdown field. Input fields, and Markdown fields on template routes, use snake_case keys. Markdown fields returned by get document fields carry the editor's own settings with camelCase keys."},"markdown_formatting_options":{"nullable":true,"description":"Markdown formatting the field accepts.","type":"array","items":{"type":"string"}}},"required":["id","type"]},"GetDocumentFieldsResponse":{"type":"object","properties":{"fields":{"description":"Form fields placed on PDF pages, followed by the Custom fields of editor pages. A Custom field appears with field_type merge, field_label holding its value, field_value holding its custom name, and null flags, position and recipient details.","type":"array","items":{"$ref":"#/components/schemas/TemplateFieldsFieldDto"}},"editor_fields":{"description":"Merge, Custom, Input and Markdown fields of the editor pages of the document.","type":"array","items":{"$ref":"#/components/schemas/TemplateEditorFieldDto"}}},"required":["fields","editor_fields"]},"CreateDocumentField":{"type":"object","properties":{"page_id":{"type":"string","nullable":true,"description":"Unique page id. Either `page_id` or `page_num` is required."},"page_num":{"type":"number","nullable":true,"description":"Actual page number in the document, starting at 1. Takes precedence over `page_id` when it matches a page. Either `page_id` or `page_num` is required."},"field_type":{"description":"The type of field.","allOf":[{"$ref":"#/components/schemas/DocumentFieldType"}]},"field_label":{"type":"string","nullable":true,"description":"Label to place next to the field. Defaults to an empty string."},"field_value":{"type":"string","nullable":true,"description":"Pre-defined value for the field. For signature fields, `sender` or `recipient`."},"field_options":{"nullable":true,"description":"Selectable options of the field, required for a dropdown and ignored for every other field type.","type":"array","items":{"type":"string"}},"is_collectable":{"type":"boolean","nullable":true,"description":"If the field is to be filled out by the sender or recipient. Defaults to false."},"is_editable":{"type":"boolean","nullable":true,"description":"If the field can be edited by the sender. Defaults to true."},"is_required":{"type":"boolean","nullable":true,"description":"If the field is required to be filled out. Defaults to false."},"recipient_id":{"type":"string","nullable":true,"description":"Unique id of the recipient to fill out this field."},"field_top":{"type":"number","nullable":true,"description":"Distance from the top edge of the page to the top of the field, in page units: every page is 900 units wide and its height follows the page aspect ratio, so an A4 page is about 1273 units tall. Stored as a whole number. Defaults to 0."},"field_left":{"type":"number","nullable":true,"description":"Distance from the left edge of the page to the left of the field, in page units: every page is 900 units wide and its height follows the page aspect ratio, so an A4 page is about 1273 units tall. Stored as a whole number. Defaults to 0."},"field_width":{"type":"number","nullable":true,"description":"Width of the field, in page units: every page is 900 units wide and its height follows the page aspect ratio, so an A4 page is about 1273 units tall. Stored as a whole number. Defaults to 0."},"field_height":{"type":"number","nullable":true,"description":"Height of the field, in page units: every page is 900 units wide and its height follows the page aspect ratio, so an A4 page is about 1273 units tall. Stored as a whole number. Defaults to 0."},"validation_regex":{"type":"string","nullable":true,"description":"Regular expression the entered value has to match."},"validation_warning":{"type":"string","nullable":true,"description":"Message shown when the entered value does not match `validation_regex`."}},"required":["field_type"]},"CreateDocumentFieldResponse":{"type":"object","properties":{"field_id":{"type":"string","description":"Id of the created field."}},"required":["field_id"]},"PopulateCustomField":{"type":"object","properties":{"id":{"type":"string","description":"Id of the editor field to update, as `editor_fields[].id` from get document fields. Required if `name` is not provided."},"value":{"type":"string","description":"The new value of the field. Merge fields cannot be populated. A Markdown field takes Markdown text, and an Input field value has to suit its input type or the request answers 422."},"name":{"type":"string","description":"The `custom_name` of a Custom or Markdown field, or the `input_settings.label` of an Input field. Required if `id` is not provided."}},"required":["value"]},"PopulateFields":{"type":"object","properties":{"editor_fields":{"description":"Editor fields to update, each identified by either its id or its name.","type":"array","items":{"$ref":"#/components/schemas/PopulateCustomField"}}},"required":["editor_fields"]},"ListEmailTemplateDto":{"type":"object","properties":{"id":{"type":"string","description":"Id of the email template."},"name":{"type":"string","description":"Name of the email template."},"type":{"type":"string","description":"Group the template belongs to, which is Default templates for the ones shipped with GetAccept and Customer templates for the ones of the entity."}},"required":["id","name","type"]},"EmailTemplateDto":{"type":"object","properties":{"id":{"type":"string","description":"Id of the email template."},"name":{"type":"string","description":"Name of the email template."},"code":{"type":"string","description":"HTML of the email template."}},"required":["id","name","code"]},"GetEmailTemplateResponse":{"type":"object","properties":{"email_template":{"description":"The requested email template, including its HTML.","allOf":[{"$ref":"#/components/schemas/EmailTemplateDto"}]}},"required":["email_template"]},"CreateEmailTemplateBody":{"type":"object","properties":{"name":{"type":"string","description":"Template name"},"code":{"type":"string","description":"Template HTML code"}},"required":["name","code"]},"CreatedEmailTemplateDto":{"type":"object","properties":{"id":{"type":"string","description":"Id of the email template."},"name":{"type":"string","description":"Name of the email template."},"code":{"type":"string","description":"HTML of the email template."},"entity_id":{"type":"string","description":"Id of the entity the template was created on."}},"required":["id","name","code","entity_id"]},"UpdateEmailTemplateBody":{"type":"object","properties":{"name":{"type":"string","description":"Template name"},"code":{"type":"string","description":"Template HTML code"}}},"DataVisibilityMode":{"type":"string","enum":["off","teams","restricted"],"description":"Data visibility mode of the entity. security_restrict is true only when it is restricted."},"EntityPlan":{"type":"string","enum":["webtrial","salestrial","enterprise","professional","esign","sub","partner","free","essential","enterpriseplus","solo","business","pro"],"description":"Subscription plan of the entity."},"EntityRedliningSettingsResponse":{"type":"object","properties":{"recipient_suggestions":{"type":"boolean","description":"Whether recipients may suggest changes on the signing page."},"internal_suggestions":{"type":"boolean","description":"Whether users may suggest changes to each other on draft documents."}},"required":["recipient_suggestions","internal_suggestions"]},"EntityImmutableSettingsResponse":{"type":"object","properties":{"verify_sms_open":{"type":"boolean","description":"Whether SMS verification before opening is mandatory, so it cannot be turned off on a single document."}}},"EntityCustomEmailDomainRuleResponse":{"type":"object","properties":{"match":{"type":"string","description":"Email domain of the sending user, or * for the catch-all rule."},"send_domain":{"type":"string","description":"Domain the email is sent from when the rule matches, one of custom_email_domains."}},"required":["match","send_domain"]},"LobbyBrandingMode":{"type":"string","enum":["textAndMedia","textOnly"],"description":"Layout of the lobby, text with media or text only."},"BackgroundType":{"type":"string","enum":["image","gradientSolid","gradientLinear","gradientRadial","gradientConic"],"description":"Whether the background is an image or a kind of gradient."},"EntityLobbyBackgroundResponse":{"type":"object","properties":{"background_type":{"description":"Whether the background is an image or a kind of gradient.","allOf":[{"$ref":"#/components/schemas/BackgroundType"}]},"background_gradient_color_one":{"type":"string","description":"First color of the gradient as a hex code."},"background_gradient_color_two":{"type":"string","description":"Second color of the gradient as a hex code."},"background_gradient_lightness":{"type":"number","description":"Lightness adjustment of the gradient, from -50 to 50."},"background_image":{"type":"string","description":"Image used as the background."}}},"EntityLobbyBrandingSettingsResponse":{"type":"object","properties":{"mode":{"description":"Layout of the lobby, text with media or text only.","allOf":[{"$ref":"#/components/schemas/LobbyBrandingMode"}]},"background_primary":{"description":"Background of the lobby page.","allOf":[{"$ref":"#/components/schemas/EntityLobbyBackgroundResponse"}]},"background_secondary":{"description":"Image shown on the right side of the lobby in the text with media layout.","allOf":[{"$ref":"#/components/schemas/EntityLobbyBackgroundResponse"}]}}},"EntityDocumentRenderSettingsResponse":{"type":"object","properties":{"obfuscate_ip_address":{"type":"boolean","description":"Whether IP addresses are obfuscated on the signing certificate."},"obfuscate_email_address":{"type":"boolean","description":"Whether email addresses are obfuscated on the signing certificate."},"exclude_audit_log":{"type":"boolean","description":"Whether the audit log is left out of the signing certificate."},"exclude_comments":{"type":"boolean","description":"Whether document comments are left out of the signed document."}}},"DefaultSigningMethod":{"type":"string","enum":["default","qualifiedElectronicSignature","externalEidSignature"],"description":"Signing method preselected on new documents."},"EntityDataRemovalPolicyResponse":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether the policy removes data."},"after_days":{"type":"number","description":"Number of days after which the data is removed, at least 14."}}},"EntityDataRemovalSettingsResponse":{"type":"object","properties":{"inactive_documents":{"description":"Removal of documents that have had no activity for the given number of days.","allOf":[{"$ref":"#/components/schemas/EntityDataRemovalPolicyResponse"}]},"signed_documents":{"description":"Removal of signed documents once they are the given number of days old.","allOf":[{"$ref":"#/components/schemas/EntityDataRemovalPolicyResponse"}]},"inactive_contacts":{"description":"Removal of contacts that have had no activity for the given number of days.","allOf":[{"$ref":"#/components/schemas/EntityDataRemovalPolicyResponse"}]},"notification_email":{"type":"string","description":"Email address notified about automatically removed documents and contacts."}}},"EntityDocumentCreationPolicyResponse":{"type":"object","properties":{"block_creation_without_template":{"type":"boolean","description":"Whether users with the user role, unlike admins and managers, may only create documents from templates."},"block_template_creation":{"type":"boolean","description":"Whether users with the user role, unlike admins and managers, are blocked from creating templates."}}},"EntityDeletionRestrictionsResponse":{"type":"object","properties":{"documents":{"type":"boolean","description":"Whether only entity admins may delete documents. Omitted means false."}}},"EntityContactCreationPolicyResponse":{"type":"object","properties":{"block_auto_creation":{"type":"boolean","description":"Whether recipients are kept from being saved as contacts automatically."}}},"EntityReminderEntryResponse":{"type":"object","properties":{"days":{"type":"number","description":"Number of days before the date that the reminder is sent."}},"required":["days"]},"EntityReminderRuleResponse":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether the reminders of the rule are sent."},"reminders":{"description":"Reminders of the rule.","type":"array","items":{"$ref":"#/components/schemas/EntityReminderEntryResponse"}}},"required":["enabled","reminders"]},"EntityReminderRuleSetResponse":{"type":"object","properties":{"expiry":{"description":"Reminders before the contract end date.","allOf":[{"$ref":"#/components/schemas/EntityReminderRuleResponse"}]},"renewal":{"description":"Reminders before the contract renewal date.","allOf":[{"$ref":"#/components/schemas/EntityReminderRuleResponse"}]}}},"EntityDocumentTypeRemindersResponse":{"type":"object","properties":{"expiry":{"description":"Reminders before the contract end date.","allOf":[{"$ref":"#/components/schemas/EntityReminderRuleResponse"}]},"renewal":{"description":"Reminders before the contract renewal date.","allOf":[{"$ref":"#/components/schemas/EntityReminderRuleResponse"}]},"document_type":{"type":"string","description":"Document type the rules apply to."}},"required":["document_type"]},"EntityInternalReminderSettingsResponse":{"type":"object","properties":{"default_rules":{"description":"Rules for document types without rules of their own.","allOf":[{"$ref":"#/components/schemas/EntityReminderRuleSetResponse"}]},"by_type":{"description":"Rules for specific document types.","type":"array","items":{"$ref":"#/components/schemas/EntityDocumentTypeRemindersResponse"}}}},"DealsTerminology":{"type":"string","enum":["deals","opportunities"],"description":"What the Deals module is called for the entity. Omitted means deals."},"EntitySalesProcessSetupResponse":{"type":"object","properties":{"last_step":{"type":"number","description":"Last step the sales process setup guide reached, from 1 to 5."},"completed_at":{"type":"number","description":"When the guide was completed, as a Unix timestamp in milliseconds. Omitted while it is in progress."}},"required":["last_step"]},"EntityNotificationSettingsResponse":{"type":"object","properties":{"allow_user_override":{"type":"boolean","description":"Whether users may opt out of the notification events the entity has enabled. Omitted means false."},"notification_document_signed_email":{"type":"boolean","description":"Whether the sender gets an email once every recipient has signed a document. Omitted means true."}}},"EntitySettingsResponse":{"type":"object","properties":{"block_qualified_electronic_signature":{"type":"boolean","description":"Whether signing with a qualified electronic signature is turned off."},"contextual_commenting":{"type":"boolean","description":"Whether comments on document content are turned on."},"redlining":{"description":"Who may suggest changes to documents.","allOf":[{"$ref":"#/components/schemas/EntityRedliningSettingsResponse"}]},"immutable_settings":{"description":"Settings enforced on every document of the entity.","allOf":[{"$ref":"#/components/schemas/EntityImmutableSettingsResponse"}]},"custom_email_domains":{"description":"Domains emails from the entity may be sent from, taken from the parent entity when the entity has none of its own.","type":"array","items":{"type":"string"}},"custom_email_domain_rules":{"description":"Rules that choose the custom domain an email is sent from, taken from the parent entity when the entity has none of its own.","type":"array","items":{"$ref":"#/components/schemas/EntityCustomEmailDomainRuleResponse"}},"bcc_email_addresses":{"nullable":true,"description":"Email addresses that get a blind copy of emails sent to recipients, except reminders.","type":"array","items":{"type":"string"}},"organization_wide_saml":{"type":"boolean","description":"Whether SAML single sign-on applies to all entities of the organization."},"api_saml_access":{"type":"boolean","description":"Whether SAML single sign-on is used for API and integration access rather than for the GetAccept app."},"qes_visual_stamp":{"type":"boolean","description":"Whether documents signed with a qualified electronic signature get a visual stamp."},"company_description":{"type":"string","description":"Description of the company."},"signing_domain":{"type":"string","description":"Customer-owned domain serving the signing page, such as sign.example.com."},"dealroom_domain":{"type":"string","description":"Customer-owned domain serving deal rooms to participants, such as rooms.example.com."},"lobby_branding_settings":{"description":"Branding of the participant lobby.","allOf":[{"$ref":"#/components/schemas/EntityLobbyBrandingSettingsResponse"}]},"document_render_settings":{"description":"What the signing certificate and the signed document leave out or obfuscate.","allOf":[{"$ref":"#/components/schemas/EntityDocumentRenderSettingsResponse"}]},"block_external_eid_signature":{"type":"boolean","description":"Whether signing with an external eID is turned off."},"block_signed_attachments_for_recipient":{"type":"boolean","description":"Whether the signed document is left out of the email recipients get once signing is complete."},"block_recipient_invite":{"type":"boolean","description":"Whether recipients are blocked by default from inviting other participants from the signing page."},"default_signing_method":{"description":"Signing method preselected on new documents.","allOf":[{"$ref":"#/components/schemas/DefaultSigningMethod"}]},"default_price_book_id":{"type":"string","description":"Id of the default price book of the entity."},"data_removal":{"description":"Automatic removal of documents and contacts.","allOf":[{"$ref":"#/components/schemas/EntityDataRemovalSettingsResponse"}]},"remove_inactive_contacts":{"type":"boolean","deprecated":true,"description":"Legacy flag for removing contacts without activity, applied only when data_removal is absent. Otherwise data_removal.inactive_contacts applies."},"remove_inactive_contacts_months":{"type":"number","deprecated":true,"description":"Legacy number of months without activity after which contacts are removed, applied only when data_removal is absent. Otherwise data_removal.inactive_contacts applies."},"document_creation_policy":{"description":"Limits on creating documents and templates.","allOf":[{"$ref":"#/components/schemas/EntityDocumentCreationPolicyResponse"}]},"deletion_restrictions":{"description":"Limits on who may delete documents.","allOf":[{"$ref":"#/components/schemas/EntityDeletionRestrictionsResponse"}]},"show_verified_identities_in_timeline":{"type":"boolean","description":"Whether verified recipient identities are shown in the document timeline."},"contact_creation_policy":{"description":"Whether recipients are saved as contacts automatically.","allOf":[{"$ref":"#/components/schemas/EntityContactCreationPolicyResponse"}]},"internal_reminders":{"description":"Reminders sent to document owners before a contract ends or renews.","allOf":[{"$ref":"#/components/schemas/EntityInternalReminderSettingsResponse"}]},"deals_terminology":{"description":"What the Deals module is called for the entity. Omitted means deals.","allOf":[{"$ref":"#/components/schemas/DealsTerminology"}]},"sales_process_setup":{"description":"Progress of the sales process setup guide.","allOf":[{"$ref":"#/components/schemas/EntitySalesProcessSetupResponse"}]},"data_visibility_mode":{"description":"Who can see the data of the entity, off when no mode is set.","allOf":[{"$ref":"#/components/schemas/DataVisibilityMode"}]},"notifications":{"description":"Notification settings of the entity.","allOf":[{"$ref":"#/components/schemas/EntityNotificationSettingsResponse"}]}},"required":["contextual_commenting","redlining","immutable_settings","data_visibility_mode"]},"EntityDetailsResponse":{"type":"object","properties":{"id":{"type":"string","description":"Id of the entity."},"name":{"type":"string","description":"Name of the entity."},"company_name":{"type":"string","nullable":true,"description":"Company name of the entity, or null when it has none."},"country_code":{"type":"string","description":"Two character country code of the entity."},"timezone":{"type":"string","description":"Timezone of the entity, usually a UTC offset such as +01:00."},"currency":{"type":"string","description":"Three letter code of the currency of the entity, such as SEK."},"language":{"type":"string","description":"Default language of the entity as an ISO 639 code, such as en."},"datacenter_id":{"type":"string","description":"Id of the datacenter the data of the entity is stored in, as a numeric string."},"app_mode":{"type":"string","description":"App mode of the entity, sales or business."},"theme_id":{"type":"string","description":"Id of the branding theme of the entity."},"address":{"type":"string","description":"Street address of the entity."},"zip":{"type":"string","description":"Postal code of the entity."},"state":{"type":"string","description":"State or region of the entity."},"city":{"type":"string","description":"City of the entity."},"country":{"type":"string","description":"Country of the entity."},"phone":{"type":"string","description":"Phone number of the entity."},"fax":{"type":"string","description":"Fax number of the entity."},"website":{"type":"string","description":"Website of the entity."},"email":{"type":"string","description":"Email address of the entity."},"registered_number":{"type":"string","description":"Company registration number of the entity."},"logo_url":{"type":"string","description":"URL of the logo of the entity."},"sub_domain":{"type":"string","description":"Subdomain the entity is reached on."},"custom_domain":{"type":"string","description":"Custom domain the entity is reached on, empty when it has none."},"default_expiration_days":{"type":"number","description":"Number of days until a sent document expires, used as the default for new documents."},"document_reject_reason":{"type":"boolean","deprecated":true,"description":"Legacy document rejection setting, kept for backwards compatibility."},"document_download":{"type":"boolean","description":"Whether recipients may download documents before and after signing."},"document_unique_id":{"type":"number","description":"Unique ID given to the most recent document, or 0 when unique IDs are turned off. The next document gets this value plus one."},"is_selfsign":{"type":"boolean","description":"Whether the sender signs a document automatically when it is sent, used as the default for new documents."},"is_signing_biometric":{"type":"boolean","description":"Whether recipients sign with a digital handwritten signature, used as the default for new documents."},"is_signing_initials":{"type":"boolean","description":"Whether recipients sign with their initials, used as the default for new documents."},"is_signing_forward":{"type":"boolean","description":"Whether recipients may transfer the signing to someone else, used as the default for new documents."},"is_signing_write":{"type":"boolean","description":"Whether recipients may type their signature instead of drawing it."},"is_signing_linkedin":{"type":"boolean","description":"Whether LinkedIn verification is turned on for new recipients by default."},"is_signing_eid":{"type":"boolean","description":"Whether signers verify their identity with a national electronic ID, such as BankID or MitID, before they sign."},"is_esign_consent":{"type":"boolean","description":"Whether recipients are asked to consent to signing electronically before they sign."},"verify_sms_sign":{"type":"boolean","description":"Whether recipients confirm their signature with a code sent by SMS."},"verify_sms_open":{"type":"boolean","description":"Whether recipients verify themselves with a code sent by SMS before they open a document."},"custom_fingerprint":{"type":"number","description":"Offset of the page fingerprint in the document footer."},"sign_copy_email":{"type":"string","description":"Comma-separated email addresses that get a copy of every non-private signed document."},"sign_redirect":{"type":"string","description":"URL recipients are sent to after they sign."},"email_send_template_id":{"type":"string","description":"Id of the email design used when documents are sent, used as the default for new documents."},"email_send_subject":{"type":"string","description":"Subject of the email sent with a document, from the default communication template. Empty when it has none."},"email_send_message":{"type":"string","description":"Message of the email sent with a document, from the default communication template. Empty when it has none."},"email_notification_template_id":{"type":"string","description":"Id of the email design used for notifications."},"email_reminder_subject":{"type":"string","description":"Subject of the reminder email, from the default communication template. Empty when it has none."},"email_reminder_message":{"type":"string","description":"Message of the reminder email, from the default communication template. Empty when it has none."},"email_signed_subject":{"type":"string","description":"Subject of the email sent once a document is signed, from the default communication template. Empty when it has none."},"email_signed_message":{"type":"string","description":"Message of the email sent once a document is signed, from the default communication template. Empty when it has none."},"email_footer_text":{"type":"string","description":"Footer of the email sent with a document, from the default communication template. Empty when it has none."},"email_sender_name":{"type":"string","description":"Sender name shown on emails from the entity."},"email_sender_address":{"type":"string","description":"Email address emails from the entity are sent from."},"sms_reminder_text":{"type":"string","description":"Text of the reminder SMS, from the default communication template. Empty when it has none."},"sms_sending_text":{"type":"string","description":"Text of the SMS sent with a document, from the default communication template. Empty when it has none."},"sms_sender":{"type":"string","description":"Sender name shown on SMS from the entity."},"auto_comment_text":{"type":"string","description":"First chat message of a document conversation, from the default communication template. Empty when it has none."},"auto_comment_email":{"type":"string","description":"Reminder message of a document conversation, from the default communication template. Empty when it has none."},"is_auto_comment_email":{"oneOf":[{"type":"boolean"},{"type":"string","enum":[""]}],"description":"Whether the conversation reminder is sent automatically, from the default communication template. An empty string when the template does not set it."},"is_disable_comment":{"type":"boolean","description":"Whether document chat is turned off."},"is_auto_comment":{"oneOf":[{"type":"boolean"},{"type":"string","enum":[""]}],"description":"Whether the first chat message is posted automatically, from the default communication template. An empty string when the template does not set it."},"is_sms_sending":{"oneOf":[{"type":"boolean"},{"type":"string","enum":[""]}],"description":"Whether an SMS is sent automatically with a document, from the default communication template. An empty string when the template does not set it."},"is_sms_reminder":{"oneOf":[{"type":"boolean"},{"type":"string","enum":[""]}],"description":"Whether an SMS is sent automatically with a reminder, from the default communication template. An empty string when the template does not set it."},"is_reminder_sending":{"type":"boolean","description":"Whether recipient reminders are turned on by default for new documents and templates."},"is_identify_recipient":{"type":"boolean","description":"Whether the sender is notified by email when someone who is not on the recipient list opens a document, identified by cookie. Used as the default for new documents."},"reminder_opened":{"type":"boolean","description":"Whether recipients who have not opened a document get a reminder."},"reminder_opened_days":{"type":"number","description":"Number of days without opening after which the reminder is sent."},"reminder_signed":{"type":"boolean","description":"Whether recipients who have not signed a document get a reminder."},"reminder_signed_days":{"type":"number","description":"Number of days without signing after which the reminder is sent."},"reminder_repeat":{"type":"boolean","description":"Whether reminders are repeated."},"reminder_repeat_days":{"type":"number","description":"Number of days between repeated reminders."},"reminder_expiration":{"type":"boolean","description":"Whether recipients get a reminder before a document expires."},"reminder_expiration_days":{"type":"number","description":"Number of days before expiry that the reminder is sent."},"reminder_weekend":{"type":"boolean","description":"Whether reminders are also sent on weekends."},"notification_email":{"type":"boolean","description":"Whether the sender gets email notifications about document events."},"notification_opened":{"type":"boolean","description":"Whether the sender is notified when a recipient opens a document."},"notification_viewed":{"type":"boolean","description":"Whether the sender is notified when a recipient views a document."},"notification_reviewed":{"type":"boolean","description":"Whether the sender is notified when a recipient reviews a document."},"notification_commented":{"type":"boolean","description":"Whether the sender is notified when a recipient comments on a document."},"notification_signed":{"type":"boolean","description":"Whether the sender is notified when a recipient signs a document."},"notification_rejected":{"type":"boolean","description":"Whether the sender is notified when a recipient rejects a document."},"notification_bounced":{"type":"boolean","description":"Whether the sender is notified when an email to a recipient bounces."},"notification_downloaded":{"type":"boolean","description":"Whether the sender is notified when a recipient downloads a document."},"notification_printed":{"type":"boolean","description":"Whether the sender is notified when a recipient prints a document."},"notification_expired":{"type":"boolean","description":"Whether the sender is notified when a document expires."},"notification_attachment":{"type":"boolean","description":"Whether the sender is notified when a recipient opens an attachment."},"notification_forwarded":{"type":"boolean","description":"Whether the sender is notified when a recipient forwards a document."},"security_encryption":{"type":"boolean","deprecated":true,"description":"Legacy encryption setting, kept for backwards compatibility."},"security_password":{"type":"boolean","description":"Whether users must use strong passwords."},"security_restrict":{"type":"boolean","deprecated":true,"description":"Deprecated, use data_visibility_mode. True only when the data visibility mode of the entity is restricted."},"data_visibility_mode":{"description":"Data visibility mode of the entity. security_restrict is true only when it is restricted.","allOf":[{"$ref":"#/components/schemas/DataVisibilityMode"}]},"security_twofactor":{"type":"number","description":"Non-zero when users must sign in with two-factor authentication."},"security_sso":{"type":"boolean","deprecated":true,"description":"Legacy single sign-on setting, kept for backwards compatibility."},"security_attachment":{"type":"boolean","deprecated":true,"description":"Legacy attachment security setting, kept for backwards compatibility."},"security_certificate":{"type":"boolean","description":"Whether signed documents carry a digital certificate, so the signatures can be verified in Adobe Acrobat Reader."},"security_social":{"type":"boolean","description":"Whether profile photos of new recipients are fetched from social profiles."},"security_sms":{"type":"boolean","description":"Whether users may send documents and reminders by SMS."},"security_signedattachment":{"type":"boolean","description":"Whether the signed document is attached to the email the sender gets once signing is complete."},"security_share":{"type":"boolean","description":"Whether users may share a document link manually."},"security_obfuscate":{"type":"boolean","description":"Whether personal information is obfuscated on the signing certificate."},"remove_inactive":{"type":"boolean","description":"Whether documents without activity are removed automatically."},"remove_inactive_months":{"type":"number","description":"Months without activity after which documents are removed, rounded up from settings.data_removal.inactive_documents when that is set."},"remove_signed":{"type":"boolean","description":"Whether signed documents are removed automatically."},"remove_signed_months":{"type":"number","description":"Age in months at which signed documents are removed, rounded up from settings.data_removal.signed_documents when that is set."},"remove_notification_email":{"type":"string","description":"Email address notified about automatically removed documents and contacts."},"remove_consent":{"type":"boolean","description":"Whether recipients must give consent before they access a document."},"remove_consent_text":{"type":"string","description":"Consent text shown to recipients before they access a document."},"tracking_consent":{"type":"boolean","description":"Whether recipients must give consent before their activity in a document is tracked."},"tracking_consent_text":{"type":"string","description":"Consent text shown to recipients before tracking starts."},"plan":{"description":"Subscription plan of the entity.","allOf":[{"$ref":"#/components/schemas/EntityPlan"}]},"billing_currency":{"type":"string","description":"Currency the entity is billed in."},"billing_frequency":{"type":"string","description":"How often the entity is billed, such as monthly."},"billing_company":{"type":"string","description":"Company name on the invoices of the entity."},"billing_address":{"type":"string","description":"Billing street address."},"billing_zip":{"type":"string","description":"Billing postal code."},"billing_state":{"type":"string","description":"Billing state or region."},"billing_city":{"type":"string","description":"Billing city."},"billing_country":{"type":"string","description":"Billing country."},"billing_reference":{"type":"string","description":"Reference shown on the invoices of the entity."},"billing_email":{"type":"string","description":"Email address invoices are sent to."},"billing_vat":{"type":"string","description":"VAT number of the entity."},"marked_for_delete":{"type":"boolean","description":"Whether the entity is scheduled for deletion."},"parent_entity_id":{"type":"string","description":"Id of the parent entity, or the string 0 when the entity is not a sub entity."},"settings":{"description":"Further settings of the entity. Every stored setting is returned, so this object can contain keys not listed here, and new settings appear as they are added.","allOf":[{"$ref":"#/components/schemas/EntitySettingsResponse"}]},"default_email_send_subject":{"type":"string","description":"GetAccept default subject of the email sent with a document, in the language of the entity, with merge tags in double curly braces."},"default_email_send_message":{"type":"string","description":"GetAccept default message of the email sent with a document, in the language of the entity, with merge tags in double curly braces."}},"required":["id","name","company_name","country_code","timezone","currency","language","datacenter_id","app_mode","theme_id","address","zip","state","city","country","phone","fax","website","email","registered_number","logo_url","sub_domain","custom_domain","default_expiration_days","document_reject_reason","document_download","document_unique_id","is_selfsign","is_signing_biometric","is_signing_initials","is_signing_forward","is_signing_write","is_signing_linkedin","is_signing_eid","is_esign_consent","verify_sms_sign","verify_sms_open","custom_fingerprint","sign_copy_email","sign_redirect","email_send_template_id","email_send_subject","email_send_message","email_notification_template_id","email_reminder_subject","email_reminder_message","email_signed_subject","email_signed_message","email_footer_text","email_sender_name","email_sender_address","sms_reminder_text","sms_sending_text","sms_sender","auto_comment_text","auto_comment_email","is_auto_comment_email","is_disable_comment","is_auto_comment","is_sms_sending","is_sms_reminder","is_reminder_sending","is_identify_recipient","reminder_opened","reminder_opened_days","reminder_signed","reminder_signed_days","reminder_repeat","reminder_repeat_days","reminder_expiration","reminder_expiration_days","reminder_weekend","notification_email","notification_opened","notification_viewed","notification_reviewed","notification_commented","notification_signed","notification_rejected","notification_bounced","notification_downloaded","notification_printed","notification_expired","notification_attachment","notification_forwarded","security_encryption","security_password","security_restrict","data_visibility_mode","security_twofactor","security_sso","security_attachment","security_certificate","security_social","security_sms","security_signedattachment","security_share","security_obfuscate","remove_inactive","remove_inactive_months","remove_signed","remove_signed_months","remove_notification_email","remove_consent","remove_consent_text","tracking_consent","tracking_consent_text","plan","billing_currency","billing_frequency","billing_company","billing_address","billing_zip","billing_state","billing_city","billing_country","billing_reference","billing_email","billing_vat","marked_for_delete","parent_entity_id","settings","default_email_send_subject","default_email_send_message"]},"EntityResponse":{"type":"object","properties":{"entity":{"description":"Settings of the entity, covering company, branding, signing, reminder, notification, security, data removal and billing, together with the subjects and messages of its default communication template.","allOf":[{"$ref":"#/components/schemas/EntityDetailsResponse"}]}},"required":["entity"]},"GetTemplateEditorBody":{"type":"object","properties":{"external_editor":{"type":"string","description":"Required, but its value is not used: any value, such as docs, is accepted, and only templates edited in Google Docs return an editor."},"external_editor_id":{"type":"string","description":"Id of the template in its external editor, when it already has one."}},"required":["external_editor"]},"ExternalEditorType":{"type":"string","enum":["docs","docx"],"description":"External editor the template is edited in, always docs."},"GetTemplateEditorResponse":{"type":"object","properties":{"external_editor_type":{"description":"External editor the template is edited in, always docs.","allOf":[{"$ref":"#/components/schemas/ExternalEditorType"}]},"external_editor_id":{"type":"string","description":"Id of the template in its external editor."},"editor_url":{"type":"string","nullable":true,"description":"URL that opens the template in its external editor, or null when there is none."}},"required":["external_editor_type","external_editor_id","editor_url"]},"TemplateListItemDto":{"type":"object","properties":{"id":{"type":"string","description":"Id of the template."},"name":{"type":"string","description":"Name of the template."},"type":{"type":"string","description":"Document type of the template."},"external_editor_type":{"type":"string","description":"External editor the template content is edited in."},"is_private":{"type":"boolean","description":"Whether the template can only be seen by its owner."},"is_editable":{"type":"boolean","description":"Whether the authenticated user may edit the template."},"page_count":{"type":"number","description":"Number of pages in the template."},"field_count":{"type":"number","description":"Number of fields on the template."},"role_count":{"type":"number","description":"Number of roles defined on the template."},"thumb_url":{"type":"string","description":"URL of the thumbnail of the first template page. For an uploaded page it is a presigned URL that expires 10 minutes after the response; for an editor page it is the preview image of the editor block; without either it is a placeholder image."},"sender_name":{"type":"string","description":"Full name of the user that owns the template."},"sender_thumb_url":{"type":"string","description":"URL of the avatar of the user that owns the template."},"tags":{"type":"string","description":"Comma separated template tags."},"video_id":{"type":"string","description":"Id of the video presented before the template is opened."},"video_thumb_url":{"type":"string","description":"URL of the thumbnail of that video."},"user_id":{"type":"string","description":"Id of the user that owns the template."},"created_at":{"type":"string","description":"When the template was created, in UTC formatted as yyyy-MM-dd HH:mm:ss with no time zone offset, or an empty string when unknown."},"communication_template_id":{"type":"string","description":"Id of the linked communication template, only present when it was requested and the template has one."},"name_template":{"type":"string","description":"Contract name template configured on this template, returned raw. May contain {{entity.company_name}}, {{document.company_name}}, {{document.id}}, {{document.unique_id}} and {{date}}; Create document resolves {{document.company_name}} from the top-level company_name, {{document.id}} to the newly created document ID and {{document.unique_id}} to its unique ID, or removes {{document.unique_id}} when the company has no unique ID counter. Only present when configured."}},"required":["id","name","type","external_editor_type","is_private","is_editable","page_count","field_count","role_count","thumb_url","sender_name","sender_thumb_url","tags","video_id","video_thumb_url","user_id","created_at"]},"GetTemplatesResponse":{"type":"object","properties":{"templates":{"description":"Templates of the entity.","type":"array","items":{"$ref":"#/components/schemas/TemplateListItemDto"}}},"required":["templates"]},"TemplateRoleDto":{"type":"object","properties":{"role_id":{"type":"string","description":"Id of the role, passed as role_id when adding a recipient."},"role":{"description":"Part the role takes in the document, such as signer, approver or cc.","allOf":[{"$ref":"#/components/schemas/RecipientRole"}]},"role_name":{"type":"string","description":"Name of the role, passed as role_name when adding a recipient."},"first_name":{"type":"string","description":"First name prefilled on the role."},"last_name":{"type":"string","description":"Last name prefilled on the role."},"email":{"type":"string","description":"Email address prefilled on the role."},"mobile":{"type":"string","description":"Mobile number prefilled on the role."},"verify_eid":{"type":"boolean","description":"Whether the recipient of this role verifies with an eID."},"verify_sms_sign":{"type":"boolean","description":"Whether the recipient of this role verifies by SMS code before signing."},"verify_sms_open":{"type":"boolean","description":"Whether the recipient of this role verifies by SMS code before opening."},"order_num":{"type":"number","nullable":true,"description":"Position of the role when signing in order, or null when it has none."}},"required":["role_id","role","first_name","last_name","email","mobile","verify_eid","verify_sms_sign","verify_sms_open","order_num"]},"GetTemplateRolesResponse":{"type":"object","properties":{"roles":{"description":"Roles defined on the template.","type":"array","items":{"$ref":"#/components/schemas/TemplateRoleDto"}}},"required":["roles"]},"TemplateFieldDto":{"type":"object","properties":{"field_id":{"type":"string","description":"Id of the field."},"page_id":{"type":"string","description":"Id of the page the field is placed on."},"field_type":{"description":"Kind of field, such as text, signature or initials.","allOf":[{"$ref":"#/components/schemas/DocumentFieldType"}]},"field_label":{"type":"string","description":"Label of the field."},"field_value":{"oneOf":[{"type":"string"},{"type":"number"}],"description":"Value of the field."},"field_options":{"nullable":true,"description":"Options of a dropdown field, or null when it has none.","type":"array","items":{"$ref":"#/components/schemas/TemplateFieldOptionDto"}},"is_collectable":{"type":"boolean","description":"Whether the recipient has to fill the field in."},"is_editable":{"type":"boolean","description":"Whether the sender may move or edit the field on a document created from a template."},"is_required":{"type":"boolean","description":"Whether the field has to be filled in before signing."},"recipient_id":{"type":"string","description":"Id of the recipient the field is assigned to."},"recipient_name":{"type":"string","description":"Name of the recipient the field is assigned to."},"company_name":{"type":"string","description":"Company of the recipient the field is assigned to."},"company_number":{"type":"string","description":"Registration number of that company."},"role_name":{"type":"string","description":"Name of the template role the field is assigned to."},"field_top":{"type":"number","description":"Distance from the top edge of the page to the top of the field, in page units: every page is 900 units wide and its height follows the page aspect ratio, so an A4 page is about 1273 units tall."},"field_left":{"type":"number","description":"Distance from the left edge of the page to the left of the field, in page units: every page is 900 units wide and its height follows the page aspect ratio, so an A4 page is about 1273 units tall."},"field_width":{"type":"number","description":"Width of the field, in page units: every page is 900 units wide and its height follows the page aspect ratio, so an A4 page is about 1273 units tall."},"field_height":{"type":"number","description":"Height of the field, in page units: every page is 900 units wide and its height follows the page aspect ratio, so an A4 page is about 1273 units tall."},"validation_regex":{"type":"string","description":"Regular expression the value has to match."},"validation_warning":{"type":"string","description":"Message shown when the value does not match validation_regex."}},"required":["field_id","page_id","field_type","field_label","field_value","field_options","is_collectable","is_editable","is_required","recipient_id","recipient_name","company_name","company_number","role_name","field_top","field_left","field_width","field_height","validation_regex","validation_warning"]},"GetTemplateFieldsRolesResponse":{"type":"object","properties":{"roles":{"description":"Roles defined on the template.","type":"array","items":{"$ref":"#/components/schemas/TemplateRoleDto"}},"fields":{"description":"Fields of the template, omitted when it has none.","type":"array","items":{"$ref":"#/components/schemas/TemplateFieldDto"}}},"required":["roles"]},"GetTemplateFieldsResponse":{"type":"object","properties":{"fields":{"description":"Form fields placed on the template pages.","type":"array","items":{"$ref":"#/components/schemas/TemplateFieldsFieldDto"}},"editor_fields":{"description":"Merge, custom, input and Markdown fields of the template content.","type":"array","items":{"$ref":"#/components/schemas/TemplateEditorFieldDto"}}},"required":["fields","editor_fields"]},"TemplatePricingTableSummarySettingsDto":{"type":"object","properties":{"summary_enabled":{"type":"boolean","description":"Whether the summary is shown."}},"required":["summary_enabled"]},"TemplatePricingTableCurrencySettingsDto":{"type":"object","properties":{"currency":{"type":"string","nullable":true,"description":"Currency the prices are given in."},"locale":{"type":"string","nullable":true,"description":"Locale the prices are formatted with."},"price_unit_fraction_digits":{"type":"number","nullable":true,"description":"Number of decimals shown on prices."}},"required":["currency","locale","price_unit_fraction_digits"]},"TemplatePricingTableDisplayModeDto":{"type":"object","properties":{"image_display_mode":{"type":"string","nullable":true,"description":"How the row images are displayed."}},"required":["image_display_mode"]},"TemplatePricingTableExtendedSummaryDto":{"type":"object","properties":{"column_id":{"type":"string","nullable":true,"description":"Id of the column the summary is calculated from."},"display_name":{"type":"string","nullable":true,"description":"Label of the summary line."},"enabled":{"type":"boolean","description":"Whether the summary line is shown."},"name":{"type":"string","nullable":true,"description":"Name of the summary line."},"unit":{"type":"string","nullable":true,"description":"Unit the value is given in."},"value":{"type":"string","nullable":true,"description":"Value of the summary line."}},"required":["column_id","display_name","enabled","name","unit","value"]},"TemplatePricingTableSectionSummaryDto":{"type":"object","properties":{"extended_summaries":{"description":"Summary lines calculated for the section.","type":"array","items":{"$ref":"#/components/schemas/TemplatePricingTableExtendedSummaryDto"}}},"required":["extended_summaries"]},"TemplatePricingTableColumnDto":{"type":"object","properties":{"column_id":{"type":"string","description":"Id of the column, referenced from the row values."},"name":{"type":"string","nullable":true,"description":"Name of the column."},"display_name":{"type":"string","nullable":true,"description":"Label of the column."},"enabled":{"type":"boolean","nullable":true,"description":"Whether the column is shown."},"type":{"description":"Kind of value the column holds.","allOf":[{"$ref":"#/components/schemas/ColumnType"}]},"unit":{"nullable":true,"description":"Unit the column values are given in.","allOf":[{"$ref":"#/components/schemas/ColumnUnitType"}]}},"required":["column_id","name","display_name","enabled"]},"TemplatePricingTableSectionDto":{"type":"object","properties":{"section_id":{"type":"string","description":"Id of the section."},"name":{"type":"string","nullable":true,"description":"Name of the section."},"display_name":{"type":"string","nullable":true,"description":"Label of the section."},"show_discount_in_price_column":{"type":"boolean","description":"Whether the discount is shown in the price column."},"display_mode":{"description":"How the section displays its rows.","allOf":[{"$ref":"#/components/schemas/TemplatePricingTableDisplayModeDto"}]},"section_summary_settings":{"description":"Whether the section shows a summary.","allOf":[{"$ref":"#/components/schemas/TemplatePricingTableSummarySettingsDto"}]},"section_summary":{"description":"Summary lines of the section.","allOf":[{"$ref":"#/components/schemas/TemplatePricingTableSectionSummaryDto"}]},"columns":{"description":"Columns of the section.","type":"array","items":{"$ref":"#/components/schemas/TemplatePricingTableColumnDto"}}},"required":["section_id","name","display_name","show_discount_in_price_column","display_mode","section_summary_settings","section_summary","columns"]},"TemplatePricingTableSummaryValueDto":{"type":"object","properties":{"value":{"type":"string","nullable":true,"description":"Value of the summary line."},"enabled":{"type":"boolean","description":"Whether the summary line is shown."},"display_name":{"type":"string","nullable":true,"description":"Label of the summary line."},"rates":{"description":"Rate groups the value is broken down into.","type":"array","items":{"$ref":"#/components/schemas/TemplatePricingTableSummaryValueDto"}}},"required":["value","enabled","display_name"]},"TemplatePricingTableTaxDiscountSummaryValueDto":{"type":"object","properties":{"value":{"type":"string","nullable":true,"description":"Value of the summary line."},"enabled":{"type":"boolean","description":"Whether the summary line is shown."},"display_name":{"type":"string","nullable":true,"description":"Label of the summary line."},"rates":{"description":"Rate groups the value is broken down into.","type":"array","items":{"$ref":"#/components/schemas/TemplatePricingTableSummaryValueDto"}},"flat_fee":{"type":"boolean","nullable":true,"description":"Whether the value is a flat amount instead of a percentage."}},"required":["value","enabled","display_name","flat_fee"]},"TemplatePricingTableSummaryDto":{"type":"object","properties":{"base_subtotal":{"nullable":true,"description":"Sum of the section totals before taxes and discounts.","allOf":[{"$ref":"#/components/schemas/TemplatePricingTableSummaryValueDto"}]},"tax_breakdown":{"nullable":true,"description":"Sum of the tax groups of the table.","allOf":[{"$ref":"#/components/schemas/TemplatePricingTableSummaryValueDto"}]},"combined_subtotal":{"nullable":true,"description":"Sum of the section subtotals including taxes and discounts.","allOf":[{"$ref":"#/components/schemas/TemplatePricingTableSummaryValueDto"}]},"discount":{"nullable":true,"description":"Discount applied to the table.","allOf":[{"$ref":"#/components/schemas/TemplatePricingTableTaxDiscountSummaryValueDto"}]},"tax":{"nullable":true,"description":"Tax applied to the table.","allOf":[{"$ref":"#/components/schemas/TemplatePricingTableTaxDiscountSummaryValueDto"}]}},"required":["base_subtotal","tax_breakdown","combined_subtotal","discount","tax"]},"TemplatePricingTableDto":{"type":"object","properties":{"table_id":{"type":"string","description":"Id of the pricing table."},"external_id":{"type":"string","nullable":true,"description":"External id of the pricing table, used by integrations."},"name":{"type":"string","nullable":true,"description":"Name of the pricing table."},"display_name":{"type":"string","nullable":true,"description":"Label of the pricing table."},"summary_settings":{"description":"Whether the table shows a summary.","allOf":[{"$ref":"#/components/schemas/TemplatePricingTableSummarySettingsDto"}]},"pre_calculated":{"type":"boolean","nullable":true,"description":"Whether the totals are calculated in advance instead of on the signing page."},"currency_settings":{"nullable":true,"description":"Currency and formatting of the prices.","allOf":[{"$ref":"#/components/schemas/TemplatePricingTableCurrencySettingsDto"}]},"sections":{"description":"Sections of the pricing table.","type":"array","items":{"$ref":"#/components/schemas/TemplatePricingTableSectionDto"}},"parent_id":{"type":"string","nullable":true,"description":"Id of the pricing table this one was copied from."},"summary":{"description":"Summary lines of the pricing table.","allOf":[{"$ref":"#/components/schemas/TemplatePricingTableSummaryDto"}]}},"required":["table_id","external_id","name","display_name","summary_settings","pre_calculated","currency_settings","sections","parent_id"]},"GetTemplatePricingTablesResponse":{"type":"object","properties":{"pricing_tables":{"description":"Pricing tables of the template.","type":"array","items":{"$ref":"#/components/schemas/TemplatePricingTableDto"}}},"required":["pricing_tables"]},"CustomImage":{"type":"object","properties":{"id":{"type":"string","description":"Id of the image key, passed as id in custom_images when creating a document."},"name":{"type":"string","description":"Name of the image key, passed as name in custom_images when creating a document."}},"required":["id"]},"GetTemplateCustomImagesResponse":{"type":"object","properties":{"custom_images":{"description":"Image keys the template can be filled with.","type":"array","items":{"$ref":"#/components/schemas/CustomImage"}}},"required":["custom_images"]},"TemplateDetailsDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the document."},"name":{"type":"string","description":"Name of the document as it is presented to the recipients."},"value":{"type":"number","description":"Monetary value of the document in the entity currency."},"type":{"type":"string","description":"Document type, which sets the defaults and the look of the document."},"tags":{"type":"string","description":"Comma separated document tags."},"thumb_url":{"type":"string","description":"URL of the thumbnail of the first document page."},"external_id":{"type":"string","description":"External identifier of the document, empty unless it was set by the caller."},"external_client_id":{"type":"string","description":"Client that created the document. Create document stores the client id of the access token: the `client_id` sent when authenticating, the OAuth client id, or `api` when neither is set. Empty when the document has no client stored."},"external_editor_type":{"type":"string","description":"External editor the document content is edited in."},"external_editor_id":{"type":"string","description":"Identifier of the document in its external editor."},"company_name":{"type":"string","description":"Company the document is sent to."},"company_number":{"type":"string","description":"Registration number of the company the document is sent to."},"company_id":{"type":"string","description":"Identifier of the company the document is sent to."},"company_logo_url":{"type":"string","description":"URL of the logo of the company the document is sent to."},"unique_id":{"type":"number","description":"Number the document was given in the running order of the entity."},"is_selfsign":{"type":"boolean","description":"Whether the sender also signs the document, inherited from the entity when unset on the document."},"is_signing_biometric":{"type":"boolean","description":"Whether signers draw their signature on screen, inherited from the entity when unset on the document."},"is_signing_initials":{"type":"boolean","description":"Whether signers write their initials when signing, inherited from the entity when unset on the document."},"is_signing_forward":{"type":"boolean","description":"Whether a recipient may forward the signing rights, inherited from the entity when unset on the document."},"is_identify_recipient":{"type":"boolean","description":"Whether returning recipients are identified by cookie, inherited from the entity when unset on the document."},"is_private":{"type":"boolean","description":"Whether the document can only be viewed by its owner."},"status":{"description":"Current status of the document.","allOf":[{"$ref":"#/components/schemas/DocumentStatus"}]},"send_date":{"type":"string","nullable":true,"description":"When the document was sent, or null while it is a draft."},"sign_date":{"type":"string","nullable":true,"description":"When the last required signature was collected, or null while the document is unsigned."},"created_at":{"type":"string","description":"When the document was created."},"updated_at":{"type":"string","nullable":true,"description":"When the document was last updated, or null when that is unavailable."},"download_url":{"type":"string","description":"URL the document file can be downloaded from."},"app_url":{"type":"string","description":"URL of the document view page in the app."},"user_id":{"type":"string","description":"Id of the user that owns the document."},"sender_name":{"type":"string","description":"Full name of the user that owns the document."},"sender_thumb_url":{"type":"string","description":"URL of the avatar of the user that owns the document."},"sender_email":{"type":"string","description":"Email address of the user that owns the document."},"parent_id":{"type":"string","description":"Id of the document this document is a new version of. Empty when the document is not a new version."},"email_send_template_id":{"type":"string","description":"Id of the email template the document is sent with, 0 when none is set."},"email_send_subject":{"type":"string","description":"Subject line the document is sent with."},"email_send_message":{"type":"string","description":"Message to the recipients the document is sent with."},"is_signing":{"type":"boolean","description":"Whether the document is signable."},"is_signing_order":{"type":"boolean","description":"Whether signers are notified one at a time in their given order instead of all at once."},"is_signed":{"type":"boolean","description":"Whether the document has been signed."},"expiration_date":{"type":"string","nullable":true,"description":"When the document stops being available to the recipients, or null when it never expires."},"is_scheduled_sending":{"type":"boolean","description":"Whether the automatic sending is scheduled instead of immediate."},"scheduled_sending_time":{"type":"string","nullable":true,"description":"When the scheduled sending runs, or null when no sending is scheduled."},"is_reminder_sending":{"type":"boolean","description":"Whether reminders are sent automatically, inherited from the entity when unset on the document."},"is_video":{"type":"boolean","description":"Whether a video is presented before the document is opened."},"video_id":{"type":"string","nullable":true,"description":"Id of the video presented before the document is opened, or null when there is none."},"is_auto_comment":{"type":"boolean","description":"Whether a comment is posted automatically, inherited from the entity when unset on the document."},"auto_comment_text":{"type":"string","description":"Text of the automatic comment on the document."},"is_auto_comment_email":{"type":"boolean","description":"Whether the automatic comment is also emailed, inherited from the entity when unset on the document."},"auto_comment_email":{"type":"string","description":"Email address the automatic comment of the document is sent to."},"entity_auto_comment_text":{"type":"string","description":"Automatic comment text configured on the entity."},"entity_auto_comment_email":{"type":"string","description":"Email address for automatic comments configured on the entity."},"field_count":{"type":"number","description":"Number of fields on the document."},"contract_start_date":{"type":"string","nullable":true,"description":"Start date of the contract for contract management, or null when unset."},"contract_end_date":{"type":"string","nullable":true,"description":"End date of the contract for contract management, or null when unset."},"settings":{"nullable":true,"description":"Signing, certificate and chat settings of the document, or null when it has none.","allOf":[{"$ref":"#/components/schemas/DocumentSettingsDto"}]},"preview_url":{"type":"string","description":"URL that opens the document in preview mode."},"name_template":{"type":"string","description":"Contract name template configured on this template, returned raw. May contain {{entity.company_name}}, {{document.company_name}}, {{document.id}}, {{document.unique_id}} and {{date}}; Create document resolves {{document.company_name}} from the top-level company_name, {{document.id}} to the newly created document ID and {{document.unique_id}} to its unique ID, or removes {{document.unique_id}} when the company has no unique ID counter. Only present on templates that have one configured."}},"required":["id","name","value","type","tags","thumb_url","external_id","external_client_id","external_editor_type","external_editor_id","company_name","company_number","company_id","company_logo_url","unique_id","is_selfsign","is_signing_biometric","is_signing_initials","is_signing_forward","is_identify_recipient","is_private","status","send_date","sign_date","created_at","updated_at","download_url","app_url","user_id","sender_name","sender_thumb_url","sender_email","parent_id","email_send_template_id","email_send_subject","email_send_message","is_signing","is_signing_order","is_signed","expiration_date","is_scheduled_sending","scheduled_sending_time","is_reminder_sending","is_video","video_id","is_auto_comment","auto_comment_text","is_auto_comment_email","auto_comment_email","entity_auto_comment_text","entity_auto_comment_email","field_count","contract_start_date","contract_end_date","settings","preview_url"]},"UserRole":{"type":"string","enum":["admin","user","manager"],"description":"Role the user has in this entity."},"UserStatus":{"type":"string","enum":["active","inactive","pending"],"description":"Status of the user in this entity."},"Access":{"type":"object","properties":{"contractroom_access":{"type":"boolean","description":"Whether the user may use the Contract room module."},"dealroom_access":{"type":"boolean","description":"Whether the user may use the Dealroom module."}},"required":["contractroom_access","dealroom_access"]},"UserDetailsDto":{"type":"object","properties":{"id":{"type":"string","description":"Id of the user."},"first_name":{"type":"string","description":"First name of the user, obfuscated while the user is pending."},"last_name":{"type":"string","description":"Last name of the user, obfuscated while the user is pending."},"email":{"type":"string","description":"Email address of the user."},"phone":{"type":"string","description":"Phone number of the user, obfuscated while the user is pending."},"mobile":{"type":"string","description":"Mobile number of the user, obfuscated while the user is pending."},"title":{"type":"string","description":"Job title of the user, obfuscated while the user is pending."},"note":{"type":"string","description":"Internal note about the user, obfuscated while the user is pending."},"thumb_url":{"type":"string","description":"URL of the user avatar, obfuscated while the user is pending."},"entity_id":{"type":"string","description":"Id of the entity the user profile belongs to."},"entity_name":{"type":"string","description":"Name of the entity the user profile belongs to."},"language":{"type":"string","description":"Language of the user, falling back to the entity language."},"timezone":{"type":"string","description":"Timezone of the user, falling back to the entity timezone."},"app_mode":{"type":"string","description":"App mode of the user in this entity, falling back to the entity app mode."},"role":{"description":"Role the user has in this entity.","allOf":[{"$ref":"#/components/schemas/UserRole"}]},"disallow_create":{"type":"boolean","description":"Whether the user is blocked from creating documents."},"status":{"description":"Status of the user in this entity.","allOf":[{"$ref":"#/components/schemas/UserStatus"}]},"team_id":{"type":"string","deprecated":true,"description":"Deprecated, use team_ids. The first entry of team_ids, or an empty string when the user is in no team."},"team_ids":{"description":"Ids of every team the user belongs to. When the data visibility mode of the entity is restricted and the caller is neither an admin nor a manager in no team, Get a user returns the teams of the caller here instead.","type":"array","items":{"type":"string"}},"access":{"nullable":true,"description":"Modules the user has access to.","allOf":[{"$ref":"#/components/schemas/Access"}]}},"required":["id","first_name","last_name","email","phone","mobile","title","note","thumb_url","entity_id","entity_name","language","timezone","app_mode","role","disallow_create","status","team_id","team_ids"]},"UserEntityAuth":{"type":"string","enum":["2fa","saml"],"description":"Authentication method the user signs in to this entity with, or null when the entity requires neither 2fa nor saml."},"UserEntity":{"type":"object","properties":{"id":{"type":"string","description":"Id of the entity."},"name":{"type":"string","description":"Name of the entity."},"plan":{"description":"Subscription plan of the entity.","allOf":[{"$ref":"#/components/schemas/EntityPlan"}]},"plan_title":{"type":"string","description":"Plan of the entity suffixed with -plan, for example pro-plan."},"role":{"description":"Role the user has in this entity.","allOf":[{"$ref":"#/components/schemas/UserRole"}]},"auth":{"nullable":true,"description":"Authentication method the user signs in to this entity with, or null when the entity requires neither 2fa nor saml.","allOf":[{"$ref":"#/components/schemas/UserEntityAuth"}]}},"required":["id","name","plan","plan_title","role","auth"]},"GetMeResponse":{"type":"object","properties":{"user":{"description":"The user.","allOf":[{"$ref":"#/components/schemas/UserDetailsDto"}]},"entities":{"description":"Entities where the user has an active or pending profile. Entities where the user is inactive are left out. Switching to an entity where the profile is pending issues a token that every other request rejects with 403 until the profile is active.","type":"array","items":{"$ref":"#/components/schemas/UserEntity"}}},"required":["user","entities"]},"ValueAndCountDto":{"type":"object","properties":{"value":{"type":"number","description":"Summed document value for the status groups, and the number of documents that reached a conclusion for the hit rate groups."},"count":{"type":"number","description":"Number of documents in the group, which is the number signed for the hit rate groups."}},"required":["value","count"]},"DealTime":{"type":"object","properties":{"count_days":{"type":"number","description":"Average number of whole days from sending to signing, rounded to the nearest day. 0 when no sales document was signed in the period."},"count_hours":{"type":"number","description":"The same average in whole hours, rounded to the nearest hour. It is the total, not the hours left over after count_days. 0 when no sales document was signed in the period."}},"required":["count_days","count_hours"]},"Perfomer":{"type":"object","properties":{"first_name":{"type":"string","description":"First name of the user."},"last_name":{"type":"string","description":"Last name of the user."},"thumb_url":{"type":"string","description":"URL of the user avatar."},"count":{"type":"number","description":"Number of sales documents of the user signed in the current month."},"value":{"type":"number","description":"Summed value of those signed documents."},"total":{"type":"number","description":"Number of sales documents for signing of the user that were signed, lost or expired unsigned in the current month."}},"required":["first_name","last_name","thumb_url","count","value","total"]},"Statistics":{"type":"object","properties":{"vod":{"description":"Sales documents that are not drafts, signed, recalled or lost and have not expired, and that were rejected, have seen no event in the last five days, or expire within five days. A document without an expiration date counts as expiring within five days.","allOf":[{"$ref":"#/components/schemas/ValueAndCountDto"}]},"expired":{"description":"Sales documents that passed their expiration date without being signed, rejected, recalled or lost.","allOf":[{"$ref":"#/components/schemas/ValueAndCountDto"}]},"hot":{"description":"Sales documents that are open, unexpired and were reviewed, downloaded or printed in the last five days.","allOf":[{"$ref":"#/components/schemas/ValueAndCountDto"}]},"sent":{"description":"Documents in status sent that have not expired.","allOf":[{"$ref":"#/components/schemas/ValueAndCountDto"}]},"active":{"description":"Open, unexpired documents, apart from introductions and templates.","allOf":[{"$ref":"#/components/schemas/ValueAndCountDto"}]},"signed":{"description":"Documents signed in the current month.","allOf":[{"$ref":"#/components/schemas/ValueAndCountDto"}]},"won":{"description":"Sales documents signed in the current month.","allOf":[{"$ref":"#/components/schemas/ValueAndCountDto"}]},"won_last":{"description":"Sales documents signed in the previous month.","allOf":[{"$ref":"#/components/schemas/ValueAndCountDto"}]},"hit_total":{"description":"All-time hit rate of sales documents, as the number signed against the number that reached a conclusion.","allOf":[{"$ref":"#/components/schemas/ValueAndCountDto"}]},"estimated":{"description":"Sales deals expected to close, projected from the average closing time.","allOf":[{"$ref":"#/components/schemas/ValueAndCountDto"}]},"hit":{"description":"Hit rate of sales documents for the current month, on the same basis as hit_total.","allOf":[{"$ref":"#/components/schemas/ValueAndCountDto"}]},"hit_last":{"description":"Hit rate of sales documents for the previous month, on the same basis as hit_total.","allOf":[{"$ref":"#/components/schemas/ValueAndCountDto"}]},"dealtime":{"description":"Average time from sending to signing for sales documents signed in the current month.","allOf":[{"$ref":"#/components/schemas/DealTime"}]},"dealtime_last":{"description":"Average time from sending to signing for sales documents signed in the previous month.","allOf":[{"$ref":"#/components/schemas/DealTime"}]},"performers":{"description":"Up to five users of the entity with the highest summed value of signed sales documents in the current month, highest first. Users whose profile is inactive are left out.","type":"array","items":{"$ref":"#/components/schemas/Perfomer"}}},"required":["vod","expired","hot","sent","active","signed","won","won_last","hit_total","estimated","hit","hit_last","dealtime","dealtime_last","performers"]},"DateStartEnd":{"type":"object","properties":{"start":{"type":"string","description":"First day of the period, as yyyy-MM-dd."},"end":{"type":"string","description":"Last day of the period, as yyyy-MM-dd."}},"required":["start","end"]},"DateRange":{"type":"object","properties":{"current":{"description":"The current month, which the statistics are calculated over.","allOf":[{"$ref":"#/components/schemas/DateStartEnd"}]},"previous":{"description":"The previous month, which the comparison figures are calculated over.","allOf":[{"$ref":"#/components/schemas/DateStartEnd"}]}},"required":["current","previous"]},"UserStatisticsDto":{"type":"object","properties":{"statistics":{"description":"Document statistics of the user.","allOf":[{"$ref":"#/components/schemas/Statistics"}]},"daterange":{"description":"Periods the statistics and their comparison figures cover.","allOf":[{"$ref":"#/components/schemas/DateRange"}]}},"required":["statistics","daterange"]},"Session":{"type":"object","properties":{"entity_hash":{"type":"string","description":"Id of the entity the session belongs to."},"entity_name":{"type":"string","description":"Name of the entity."},"first_name":{"type":"string","description":"First name of the user."},"last_name":{"type":"string","description":"Last name of the user."},"full_name":{"type":"string","description":"First and last name of the user joined by a space."},"thumb_url":{"type":"string","description":"URL of the user avatar."},"email":{"type":"string","description":"Email address of the user."},"mobile":{"type":"string","description":"Mobile number of the user."},"user_hash":{"type":"string","description":"Id of the user."},"user_role":{"description":"Role the user has in this entity.","allOf":[{"$ref":"#/components/schemas/UserRole"}]},"currency":{"type":"string","description":"Currency of the entity."},"language":{"type":"string","description":"Language of the user, falling back to the entity language."},"timezone":{"type":"string","description":"Timezone of the user, falling back to the entity timezone."},"app_mode":{"type":"string","description":"App mode of the user in this entity, falling back to the entity app mode."},"user_created_at":{"type":"string","description":"When the user was created, as yyyy-MM-dd HH:mm:ss without a time zone offset, or 0000-00-00 00:00:00 when unknown."},"registration_source":{"type":"string","description":"Source the user registered through."},"registration_campaign":{"type":"string","description":"Campaign the user registered through."},"registration_device":{"type":"string","description":"Device the user registered from."},"achievements_level":{"type":"string","description":"Achievement level the user has reached."},"entity_created_at":{"type":"string","description":"When the entity was created, as yyyy-MM-dd HH:mm:ss without a time zone offset."},"plan":{"description":"Subscription plan of the entity, taken from the parent entity for a sub entity.","allOf":[{"$ref":"#/components/schemas/EntityPlan"}]},"is_sub_entity":{"type":"boolean","description":"Whether the entity has a parent entity."},"entity_count":{"type":"number","description":"Number of entities the user has a profile in."},"team_count":{"type":"number","description":"Number of teams the user belongs to."},"login_count":{"type":"number","description":"Number of times the user has logged in."},"device_count":{"type":"number","description":"Number of devices the user has registered in this entity. Always 0 when an admin reads the session of another user."},"instant_phone":{"type":"boolean","description":"Whether the phone integration is connected for the user."},"salesnavigator":{"type":"boolean","description":"Whether the LinkedIn Sales Navigator integration is enabled for the user."},"externaleditor":{"type":"boolean","description":"Whether the external editor integration is connected for the user."},"show_team":{"type":"boolean","description":"Whether the user sees the documents of their teams."},"show_all":{"type":"boolean","description":"Whether the user sees every document of the entity, granted to administrators only."},"security_attachment":{"type":"boolean","description":"Legacy attachment security setting of the entity."},"security_restrict":{"type":"boolean","description":"Whether the data visibility mode of the entity is restricted."},"data_visibility_mode":{"description":"Data visibility mode of the entity. security_restrict is true only when it is restricted.","allOf":[{"$ref":"#/components/schemas/DataVisibilityMode"}]},"security_social":{"type":"boolean","description":"Whether recipient photos are fetched from social profiles."},"security_sms":{"type":"boolean","description":"Whether the entity may send documents by SMS."},"security_share":{"type":"boolean","description":"Whether users may share a document link manually."},"security_obfuscate":{"type":"boolean","description":"Whether personal information is obfuscated on the signing certificate."},"team_id":{"type":"string","deprecated":true,"description":"Deprecated, use team_ids. The first entry of team_ids, or an empty string when the user is in no team."},"team_ids":{"description":"Ids of every team the user belongs to.","type":"array","items":{"type":"string"}},"team_names":{"description":"Names of every team the user belongs to.","type":"array","items":{"type":"string"}},"disallow_create":{"type":"boolean","description":"Whether the user is blocked from creating documents."},"iio_hash":{"type":"string","description":"Intercom identity verification hash of the user for the web widget."},"iio_hash_ios":{"type":"string","description":"Intercom identity verification hash of the user for the iOS app."},"iio_hash_android":{"type":"string","description":"Intercom identity verification hash of the user for the Android app."}},"required":["entity_hash","entity_name","first_name","last_name","full_name","thumb_url","email","mobile","user_hash","user_role","currency","language","timezone","app_mode","user_created_at","registration_source","registration_campaign","registration_device","achievements_level","entity_created_at","plan","is_sub_entity","entity_count","team_count","login_count","device_count","instant_phone","salesnavigator","externaleditor","show_team","show_all","security_attachment","security_restrict","data_visibility_mode","security_social","security_sms","security_share","security_obfuscate","team_id","team_ids","team_names","disallow_create","iio_hash","iio_hash_ios","iio_hash_android"]},"UserSessionDto":{"type":"object","properties":{"session":{"description":"Session of the user in the requested entity.","allOf":[{"$ref":"#/components/schemas/Session"}]}},"required":["session"]},"UpdateUserBody":{"type":"object","properties":{"first_name":{"type":"string","description":"First name of the user."},"last_name":{"type":"string","description":"Last name of the user."},"title":{"type":"string","description":"Title of the user, for example CEO or Sales manager."},"phone":{"type":"string","description":"Phone number of the user in international format."},"mobile":{"type":"string","description":"Mobile number of the user in international format."},"note":{"type":"string","description":"Internal note about the user."},"thumb_url":{"type":"string","description":"URL of the user avatar."},"language":{"type":"string","description":"Language of the user as an ISO 639 code, for example en or sv."},"timezone":{"type":"string","description":"Timezone of the user as a UTC offset, for example +01:00."},"signature":{"type":"string","description":"Saved signature of the user, applied when they sign a document."}}},"UserBasicDto":{"type":"object","properties":{"user_id":{"type":"string","description":"Id of the user."},"name":{"type":"string","description":"First and last name of the user joined by a space."},"first_name":{"type":"string","description":"First name of the user, obfuscated while the user is pending."},"last_name":{"type":"string","description":"Last name of the user, obfuscated while the user is pending."},"email":{"type":"string","description":"Email address of the user."},"status":{"description":"Status of the user in this entity.","allOf":[{"$ref":"#/components/schemas/UserStatus"}]},"role":{"description":"Role the user has in this entity.","allOf":[{"$ref":"#/components/schemas/UserRole"}]},"team_name":{"type":"string","nullable":true,"deprecated":true,"description":"Deprecated. The first team of team_names, kept for backwards compatibility. Use team_names."},"team_ids":{"description":"Ids of every team the user belongs to. When the data visibility mode of the entity is restricted and the caller is neither an admin nor a manager in no team, only the teams the caller also belongs to are listed.","type":"array","items":{"type":"string"}},"team_names":{"description":"Names of every team the user belongs to. When the data visibility mode of the entity is restricted and the caller is neither an admin nor a manager in no team, only the teams the caller also belongs to are listed.","type":"array","items":{"type":"string"}},"last_login":{"type":"string","description":"When the user last logged in, as yyyy-MM-dd HH:mm:ss without a time zone offset, or 0000-00-00 00:00:00 when the user has never logged in."}},"required":["user_id","name","first_name","last_name","email","status","role","team_name","team_ids","team_names","last_login"]},"GetUsersResponse":{"type":"object","properties":{"users":{"description":"Users of the entity.","type":"array","items":{"$ref":"#/components/schemas/UserBasicDto"}}},"required":["users"]},"GetUserResponse":{"type":"object","properties":{"user":{"description":"The user.","allOf":[{"$ref":"#/components/schemas/UserDetailsDto"}]}},"required":["user"]},"CreateUserBody":{"type":"object","properties":{"email":{"type":"string","description":"Email of the user."},"first_name":{"type":"string","description":"First name of the user. Ignored when an account with this email already exists."},"last_name":{"type":"string","description":"Last name of the user. Ignored when an account with this email already exists."},"title":{"type":"string","description":"Title of the user, for example CEO or Sales manager. Ignored when an account with this email already exists."},"phone":{"type":"string","description":"Phone number of the user in international format. Ignored when an account with this email already exists."},"mobile":{"type":"string","description":"Mobile number of the user in international format. Ignored when an account with this email already exists."},"note":{"type":"string","description":"Internal note about the user. Ignored when an account with this email already exists."},"role":{"description":"Role of the new user: user, manager or admin.","allOf":[{"$ref":"#/components/schemas/UserRole"}]},"language":{"type":"string","description":"Language of the new user as an ISO 639 code, for example en or sv. Defaults to the entity language. Ignored when an account with this email already exists."},"team_id":{"type":"string","description":"Id of a team to add the user to."},"team_ids":{"description":"Ids of the teams to add the user to. Combined with team_id when both are given.","type":"array","items":{"type":"string"}},"skip_invitation":{"type":"boolean","description":"Set to true to add a new account as active without sending an invitation email. Defaults to false, which adds the user as pending and sends an invitation. When an account with this email already exists, it is ignored: the user is added as pending and invited, unless they already have an active profile in the same organization, in which case they are added as active without an invitation."}},"required":["email"]},"CreateUserResponse":{"type":"object","properties":{"user":{"description":"The user.","allOf":[{"$ref":"#/components/schemas/UserDetailsDto"}]}},"required":["user"]},"ContactResponse":{"type":"object","properties":{"contact_id":{"type":"string","description":"Id of the contact."},"fullname":{"type":"string","description":"Same value as first_name: the first name of the contact, or an empty string when it has none."},"first_name":{"type":"string","description":"First name of the contact, empty when none is stored."},"last_name":{"type":"string","description":"Last name of the contact, empty when none is stored."},"title":{"type":"string","description":"Job title of the contact, for example CEO or Sales manager."},"mobile":{"type":"string","description":"Mobile number of the contact as stored. A number saved through Create a contact is kept exactly as sent, so it can lack the country code."},"phone":{"type":"string","description":"Landline number of the contact."},"email":{"type":"string","description":"Email address of the contact."},"thumb_url":{"type":"string","description":"URL of the contact avatar, empty when the contact has none."},"note":{"type":"string","description":"Internal note stored on the contact."},"document_count":{"type":"number","description":"Number of document recipients created from the contact, counted over signed recipients only when the list is filtered on signed."},"company_id":{"type":"string","description":"Id of the company stored on the contact. Contacts created through Create a contact, and contacts without a company, carry an id that names no company; use company_name to identify the company."},"company_name":{"type":"string","description":"Name of the company associated with the contact."},"company_logo_url":{"type":"string","description":"URL of the logo of the company associated with the contact, empty when there is none."},"created_at":{"type":"string","description":"When the contact was created, in UTC."}},"required":["contact_id","fullname","first_name","last_name","title","mobile","phone","email","thumb_url","note","document_count","company_id","company_name","company_logo_url","created_at"]},"ListContactsResponse":{"type":"object","properties":{"contacts":{"description":"Contacts matching the request, which is returned as a bare array when nothing matches.","type":"array","items":{"$ref":"#/components/schemas/ContactResponse"}}},"required":["contacts"]},"ContactStatus":{"type":"string","enum":["active","inactive","signed"],"description":"Contact status: active for a contact that is a recipient of at least one document or is in a deal room, inactive for one that is neither, and signed for one that has signed at least one document."},"ContactSortBy":{"type":"string","enum":["name","email","company_name","document_count","created"],"description":"Field contacts are sorted by: name sorts on first name, email on email address, company_name on company name, document_count on the number of documents the contact is a recipient of, and created on when the contact was created."},"SortOrder":{"type":"string","enum":["ASC","DESC"],"description":"Sort direction: ASC for ascending or DESC for descending."},"CreateContactBody":{"type":"object","properties":{"first_name":{"type":"string","description":"First name of the contact"},"last_name":{"type":"string","description":"The last name of the contact"},"fullname":{"type":"string","description":"Full name to use instead of `first_name` and `last_name`, ignored when `first_name` is sent. The last word becomes the last name and the words before it the first name, so a single word is stored as the last name."},"company_name":{"type":"string","description":"Associated company"},"company_number":{"type":"string","description":"Associated company number"},"title":{"type":"string","description":"The title of the contact, for example CEO or Sales manager"},"phone":{"type":"string","description":"Phone number of the contact in international format"},"mobile":{"type":"string","description":"Mobile number of the contact, preferably in international format with the country code. A number without country code is accepted when it is valid with the country code of the entity, and it is stored as sent."},"email":{"type":"string","description":"The email of the contact"},"thumb_url":{"type":"string","description":"Avatar URL to store on the contact, kept exactly as supplied."},"note":{"type":"string","description":"Optional internal note for the contact"}}},"CreateContactResponse":{"type":"object","properties":{"contact_id":{"type":"string","description":"Id of the contact. When `email` matches an existing contact of the entity, or `mobile` matches an existing contact without email, that contact is updated and its id returned: title, mobile, email, note, company_name, company_number and phone are replaced, and cleared when not sent, while first_name, last_name and thumb_url are kept unless sent."}},"required":["contact_id"]},"EventNotificationName":{"type":"string","enum":["approved","attachment","commented","downloaded","expired","forwarded","hardbounced","printed","rejected","reviewed","signed","viewed"],"description":"What happened, such as viewed, signed or commented."},"NotificationDto":{"type":"object","properties":{"document_id":{"type":"string","description":"Id of the document the notification belongs to."},"first_name":{"type":"string","nullable":true,"description":"First name of the recipient that triggered the event."},"last_name":{"type":"string","nullable":true,"description":"Last name of the recipient that triggered the event."},"thumb_url":{"type":"string","nullable":true,"description":"Avatar of the recipient that triggered the event."},"company_name":{"type":"string","nullable":true,"description":"Company of the recipient that triggered the event."},"event_name":{"description":"What happened, such as viewed, signed or commented.","allOf":[{"$ref":"#/components/schemas/EventNotificationName"}]},"document_name":{"type":"string","nullable":true,"description":"Current name of the document the notification is about."},"document_status":{"nullable":true,"description":"Current status of the document the notification is about.","allOf":[{"$ref":"#/components/schemas/DocumentStatus"}]},"external_id":{"type":"string","nullable":true,"description":"External id of the document, empty when none was set."},"event_meta_data":{"type":"string","nullable":true,"description":"Extra data of the event, which on a rejected event is the reason the recipient gave."},"created_at":{"type":"string","nullable":true,"description":"When the event happened, in UTC."}},"required":["document_id","first_name","last_name","thumb_url","company_name","event_name","document_name","document_status","external_id","event_meta_data","created_at"]},"GetNotificationsResponse":{"type":"object","properties":{"notifications":{"description":"Notifications for the request, newest first.","type":"array","items":{"$ref":"#/components/schemas/NotificationDto"}}},"required":["notifications"]},"QuantitySettingsResponse":{"type":"object","properties":{"max_quantity":{"type":"number","description":"Maximum allowed quantity."},"unlimited":{"type":"boolean","description":"Whether the quantity is unlimited."}},"required":["unlimited"]},"FeatureResponse":{"type":"object","properties":{"name":{"type":"string","description":"Display name of the feature."},"id":{"type":"string","description":"Unique feature identifier."},"type":{"type":"string","description":"Feature type: `Switch` or `Quantity`."},"active":{"type":"boolean","description":"Whether the feature is enabled."},"quantity_settings":{"description":"Only present for `Quantity` features.","allOf":[{"$ref":"#/components/schemas/QuantitySettingsResponse"}]}},"required":["name","id","type","active"]},"GetFeaturesResponse":{"type":"object","properties":{"features":{"description":"Subscription features available to the authenticated entity.","type":"array","items":{"$ref":"#/components/schemas/FeatureResponse"}}},"required":["features"]},"FolderType":{"type":"string","enum":["archive","template"],"description":"Kind of folder: archive holds archived documents and template holds templates."},"FolderPathItem":{"type":"object","properties":{"id":{"type":"string","description":"For an archive folder, the id of the ancestor folder. For a template folder, the id of the folder that contains the named folder, so the first item has the id of the template root."},"name":{"type":"string","description":"Name of the folder: an ancestor for an archive folder, or a folder from the top level down to the current one for a template folder."}},"required":["id","name"]},"CurrentFolder":{"type":"object","properties":{"id":{"type":"string","description":"Id of the folder. A template folder id is the base64 encoded directory path, padding included, such as L015IHRlbXBsYXRlIGZvbGRlci8= for /My template folder/; an archive folder id is a hashed id."},"type":{"description":"Whether the folder holds archived documents or templates.","allOf":[{"$ref":"#/components/schemas/FolderType"}]},"name":{"type":"string","description":"Name of the folder."},"path":{"nullable":true,"description":"For an archive folder: the ancestor folders from the root down to the immediate parent, or null when it has none. For a template folder: every folder from the top level down to and including this one, each carrying the id of the folder that contains it.","type":"array","items":{"$ref":"#/components/schemas/FolderPathItem"}}},"required":["id","type","name"]},"FolderListItem":{"type":"object","properties":{"id":{"type":"string","description":"Id of the folder. A template folder id is the base64 encoded directory path, padding included, such as L015IHRlbXBsYXRlIGZvbGRlci8= for /My template folder/; an archive folder id is a hashed id."},"type":{"description":"Whether the folder holds archived documents or templates.","allOf":[{"$ref":"#/components/schemas/FolderType"}]},"name":{"type":"string","description":"Name of the folder."}},"required":["id","type","name"]},"GetFolderResponse":{"type":"object","properties":{"current":{"nullable":true,"description":"The folder the request addressed. Null when Retrieve folders lists the root level without `type` or with `type=template`, and left out for `type=archive` and for the template root folder.","allOf":[{"$ref":"#/components/schemas/CurrentFolder"}]},"folders":{"description":"Folders directly below `current`, or the root folders when none was requested, and absent for an archive folder.","type":"array","items":{"$ref":"#/components/schemas/FolderListItem"}}}},"VideoType":{"type":"string","enum":["file","upload","vimeo","youtube","loom","vidyard","wistia","quickchannel","viostream","synthesia"],"description":"Source of the video, where file and upload are stored by GetAccept and the other values are external providers."},"GetVideoResponse":{"type":"object","properties":{"video_id":{"type":"string","description":"Id of the video, used to assign it to a document, template or reminder."},"video_type":{"description":"Source of the video, where file and upload are stored by GetAccept and the other values are external providers.","allOf":[{"$ref":"#/components/schemas/VideoType"}]},"video_title":{"type":"string","description":"Title of the video, empty when it has none."},"video_url":{"type":"string","description":"URL of the video. For a video stored by GetAccept it is a presigned link, valid for 30 minutes when you get or list videos, that stays empty until the conversion has completed; when listing videos it is only filled in with `include_video_url`. For a video from an external provider it is the provider URL."},"thumb_url":{"type":"string","description":"URL of the video thumbnail. When listing videos, thumbnails of videos stored by GetAccept are only filled in with `include_thumb_url`."},"saved":{"type":"boolean","description":"Legacy flag stored on the video and returned unchanged."},"published":{"type":"boolean","description":"Whether the video is published on the entity, which lists it for users other than its owner."},"editable":{"type":"boolean","description":"Whether the video belongs to the authenticated user."},"created_at":{"type":"string","description":"When the video was created."}},"required":["video_id","video_type","video_title","video_url","thumb_url","saved","published","editable","created_at"]},"GetVideosResponse":{"type":"object","properties":{"videos":{"description":"Videos owned by the authenticated user together with the videos published on the entity, newest first.","type":"array","items":{"$ref":"#/components/schemas/GetVideoResponse"}}},"required":["videos"]},"VideoJobStatus":{"type":"string","enum":["Not Processed","Submitted","Progressing","Complete","Error"],"description":"Conversion status of the video: Not Processed, Submitted, Progressing or Complete, with Error for any other state."},"GetVideoJobResponse":{"type":"object","properties":{"Status":{"description":"Conversion status of the video: Not Processed, Submitted, Progressing or Complete, with Error for any other state.","allOf":[{"$ref":"#/components/schemas/VideoJobStatus"}]},"video_url":{"type":"string","description":"URL of the converted video, returned once the status is Complete."},"thumb_url":{"type":"string","description":"URL of the video thumbnail, returned once the status is Complete."}},"required":["Status"]},"UploadVideoBody":{"type":"object","properties":{"file_name":{"type":"string","description":"Filename of the video, with the extension, for example intro.mp4. Required with `file_content`: without it the video is created with an empty title and never gets a playable URL. With a multipart file or `file_url` it defaults to the uploaded file name or the last segment of the URL."},"file_url":{"type":"string","description":"Url to the video file. The file must be available for download without any authorization. It is always downloaded over `https://`, also when the URL starts with `http://`."},"file_content":{"type":"string","description":"Send the video file as base64 encoded. Make multiple requests to upload multiple files. Note that base64 encoding files will increase the file size by about 30%"}}},"UploadVideoResponse":{"type":"object","properties":{"status":{"type":"number","description":"Legacy success indicator, always 1 in a successful response."},"id":{"type":"string","description":"Id of the created video, the same value as `video_id`."},"file_id":{"type":"string","description":"Legacy file id generated for the response, which does not reference the stored video."},"filename":{"type":"string","description":"Name the video was uploaded with, taken from `file_name`, the multipart file name or the last segment of `file_url`."},"job_id":{"type":"string","description":"Id to poll the video job status with, the same value as `video_id`."},"video_id":{"type":"string","description":"Id of the uploaded video, used to assign it to a document, template or reminder."},"file_status":{"type":"string","description":"Status of the uploaded file, always file.uploaded in a successful response."}},"required":["status","id","file_id","filename","job_id","video_id","file_status"]},"EventSubscriptionEvent":{"type":"string","description":"Event a webhook subscription can listen to.","enum":["document.approved","document.viewed","document.hardbounced","document.commented","document.opened","document.created","document.partially_signed","document.forwarded","document.sent","document.rejected","document.downloaded","document.printed","comment.created","document.expired","document.signed","document.reviewed","document.recalled","comment.reply_created","comment.resolved","document.lost","document.page_tracked","document.partially_rejected"]},"CreateSubscriptionBody":{"type":"object","properties":{"event":{"description":"The event to subscribe to. Omit it and send only a target_url to delete the global subscription with that target_url instead of creating one.","allOf":[{"$ref":"#/components/schemas/EventSubscriptionEvent"}]},"target_url":{"type":"string","description":"The URL to post payload to on event"},"global":{"type":"boolean","description":"If the webhook should catch events for all entity users. Default is false. Also accepts 1 and the strings \"1\", \"true\", \"on\" and \"yes\" (any case) as true; any other value is false. Only admin users may create a global subscription; for other users true answers 403."},"host":{"type":"string","nullable":true,"description":"Label for filtering subscriptions with the `host` query parameter. Defaults to the domain of target_url, for example `example.com`. Events are always posted to target_url."},"payload":{"type":"string","nullable":true,"description":"Additional payload data to post"},"notification_email":{"type":"string","nullable":true,"description":"If the webhook fails, send a notification to this email instead of the sender"}},"required":["target_url"]},"SubscriptionEventResponse":{"type":"object","properties":{"value":{"description":"Value to pass as event when creating a subscription.","allOf":[{"$ref":"#/components/schemas/EventSubscriptionEvent"}]},"name":{"type":"string","description":"Name of the event as it is shown to a reader."}},"required":["value","name"]},"SubscriptionErrorResponse":{"type":"object","properties":{"event":{"description":"Event that failed to be delivered.","allOf":[{"$ref":"#/components/schemas/EventSubscriptionEvent"}]},"status":{"type":"string","description":"HTTP status the callback URL answered with, as a string, or 0 when no response was received, for example on a timeout."},"target_url":{"type":"string","description":"URL the event was posted to."},"result":{"type":"string","description":"Response body the callback URL answered with, or the error message when no response was received, cut at 10,000 characters."},"retry":{"type":"string","description":"Number of retries that had been made when the error was recorded."},"payload":{"type":"string","description":"Webhook body that was posted to the callback URL, as JSON text cut at 10,000 characters."},"created_at":{"type":"string","nullable":true,"description":"When the delivery failed."}},"required":["event","status","target_url","result","retry","payload","created_at"]},"SubscriptionResponse":{"type":"object","properties":{"id":{"type":"string","description":"Id of the subscription."},"subscription_id":{"type":"string","description":"Id of the subscription, repeated for the legacy clients."},"status":{"type":"number","description":"Whether the subscription is active: 1 when active and -1 once it has been disabled."},"event":{"description":"Event the subscription listens to.","allOf":[{"$ref":"#/components/schemas/EventSubscriptionEvent"}]},"host":{"type":"string","nullable":true,"description":"Label for filtering subscriptions with the `host` query parameter, derived from the domain of target_url when it was not given. Events are always posted to target_url."},"target_url":{"type":"string","description":"URL the event is posted to."},"payload":{"type":"string","nullable":true,"description":"Extra data posted with every event, empty when none was given."},"global":{"type":"boolean","description":"Whether the subscription catches the events of every user in the entity."},"notification_email":{"type":"string","nullable":true,"description":"Email address alerted when the delivery fails, empty when the sender is alerted instead."},"created_at":{"type":"string","description":"When the subscription was created, as `yyyy-MM-dd HH:mm:ss` without a time zone offset."}},"required":["id","subscription_id","status","event","host","target_url","payload","global","notification_email","created_at"]},"UpdateSubscriptionBody":{"type":"object","properties":{"event":{"description":"Event to subscribe to.","allOf":[{"$ref":"#/components/schemas/EventSubscriptionEvent"}]},"target_url":{"type":"string","description":"URL to post the event to."},"global":{"type":"boolean","description":"Whether the subscription catches the events of every user in the entity. Also accepts 1 and the strings \"1\", \"true\", \"on\" and \"yes\" (any case) as true; any other value is false."},"host":{"type":"string","nullable":true,"description":"Label for filtering subscriptions with the `host` query parameter. Defaults to the domain of target_url, for example `example.com`. Events are always posted to target_url."},"payload":{"type":"string","nullable":true,"description":"Extra data to post with every event."},"notification_email":{"type":"string","nullable":true,"description":"Email address to alert when the delivery fails instead of the sender."}},"required":["event","target_url"]},"TestSubscriptionBody":{"type":"object","properties":{"event":{"description":"The event to trigger","allOf":[{"$ref":"#/components/schemas/EventSubscriptionEvent"}]},"document_id":{"type":"string","description":"The document id of an existing document to trigger the event for"},"recipient_id":{"type":"string","description":"The recipient the test event is about, such as the viewer of document.viewed. When omitted, the first recipient of the document is used."}},"required":["event","document_id"]},"KnowledgeBaseContentTypeText":{"type":"string","enum":["text"],"description":"Always text, and the entry then carries `content`."},"KnowledgeBaseStatus":{"type":"string","enum":["processing","ready","failed"],"description":"Embedding state. Entries are queryable by the AI features only once ready"},"KnowledgeBaseTextResponse":{"type":"object","properties":{"id":{"type":"string","description":"Id of the knowledge base entry."},"title":{"type":"string","description":"Title of the knowledge base entry."},"description":{"type":"string","description":"Description of the content."},"content_type":{"description":"Always text, and the entry then carries `content`.","allOf":[{"$ref":"#/components/schemas/KnowledgeBaseContentTypeText"}]},"status":{"description":"Embedding state. Entries are queryable by the AI features only once ready","allOf":[{"$ref":"#/components/schemas/KnowledgeBaseStatus"}]},"total_chunks":{"type":"number","description":"Number of embedded content chunks"},"user_id":{"type":"string","description":"User that created the entry"},"created_at":{"type":"number","description":"When the entry was created, in epoch milliseconds."},"updated_at":{"type":"number","description":"When the entry was last changed, in epoch milliseconds, either by an update or when its embedding finished or failed. Absent until either happens."},"content_updated_at":{"type":"number","description":"When the content of the entry was set or last replaced, in epoch milliseconds. Equals created_at until the content is replaced."},"content":{"type":"string","description":"Raw text content"}},"required":["id","title","content_type","status","created_at","content"]},"KnowledgeBaseContentTypeFile":{"type":"string","enum":["file"],"description":"Always file, and the entry then carries `file_name`."},"KnowledgeBaseFileResponse":{"type":"object","properties":{"id":{"type":"string","description":"Id of the knowledge base entry."},"title":{"type":"string","description":"Title of the knowledge base entry."},"description":{"type":"string","description":"Description of the content."},"content_type":{"description":"Always file, and the entry then carries `file_name`.","allOf":[{"$ref":"#/components/schemas/KnowledgeBaseContentTypeFile"}]},"status":{"description":"Embedding state. Entries are queryable by the AI features only once ready","allOf":[{"$ref":"#/components/schemas/KnowledgeBaseStatus"}]},"total_chunks":{"type":"number","description":"Number of embedded content chunks"},"user_id":{"type":"string","description":"User that created the entry"},"created_at":{"type":"number","description":"When the entry was created, in epoch milliseconds."},"updated_at":{"type":"number","description":"When the entry was last changed, in epoch milliseconds, either by an update or when its embedding finished or failed. Absent until either happens."},"content_updated_at":{"type":"number","description":"When the content of the entry was set or last replaced, in epoch milliseconds. Equals created_at until the content is replaced."},"file_name":{"type":"string","description":"Uploaded file name"}},"required":["id","title","content_type","status","created_at","file_name"]},"KnowledgeBaseListResponse":{"type":"object","properties":{"knowledge_bases":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/KnowledgeBaseTextResponse"},{"$ref":"#/components/schemas/KnowledgeBaseFileResponse"}]},"description":"The requested page of knowledge base entries."},"total_count":{"type":"number","description":"Number of entries on the entity, ignoring `limit` and `offset`."}},"required":["knowledge_bases","total_count"]},"CreateKnowledgeBaseTextBody":{"type":"object","properties":{"title":{"type":"string","description":"Title of the knowledge base entry"},"description":{"type":"string","description":"Description of the content"},"content_type":{"description":"Send text to create the entry from the raw text in `content`.","allOf":[{"$ref":"#/components/schemas/KnowledgeBaseContentTypeText"}]},"content":{"type":"string","description":"Raw text content to be processed and embedded"}},"required":["title","content_type","content"]},"CreateKnowledgeBaseFileBody":{"type":"object","properties":{"title":{"type":"string","description":"Title of the knowledge base entry"},"description":{"type":"string","description":"Description of the content"},"content_type":{"description":"Send file to create the entry from a file posted to the returned presigned link.","allOf":[{"$ref":"#/components/schemas/KnowledgeBaseContentTypeFile"}]},"file_name":{"type":"string","description":"Name of the file that will be uploaded. Allowed extensions: pdf, docx, txt, md, html, csv, xlsx"}},"required":["title","content_type","file_name"]},"PresignedPostLinkResponse":{"type":"object","properties":{"url":{"type":"string","description":"URL to upload the file to as a `multipart/form-data` POST. The link is valid for at most one hour, so upload the file right away. If it expires before you upload, delete the entry and create it again."},"headers":{"type":"string","description":"Not HTTP headers: the form fields to send with the upload, as `name:value` pairs separated by commas. Split the string on commas, split each pair at its first colon, and append every field to the form. Append the file last, in a part named `file`. Send no other fields, such as `Content-Type`; the upload is rejected if the form has a field the link does not list."}},"required":["url","headers"]},"CreateKnowledgeBaseResponse":{"type":"object","properties":{"knowledge_base":{"oneOf":[{"$ref":"#/components/schemas/KnowledgeBaseTextResponse"},{"$ref":"#/components/schemas/KnowledgeBaseFileResponse"}],"description":"The created entry, which stays in processing until it has been embedded."},"presigned_link":{"description":"Returned for file entries only. Upload the file here to finish creating the entry","allOf":[{"$ref":"#/components/schemas/PresignedPostLinkResponse"}]}},"required":["knowledge_base"]},"KnowledgeBaseDownloadLinkResponse":{"type":"object","properties":{"presigned_link":{"type":"string","description":"Presigned URL, valid for one hour"}},"required":["presigned_link"]},"UpdateKnowledgeBaseBody":{"type":"object","properties":{"title":{"type":"string","description":"Title of the knowledge base entry"},"description":{"type":"string","description":"Description of the content"},"content":{"type":"string","description":"Replaces the text content. Sending this returns the entry to processing while it is re-embedded"}}},"ErrorResponse":{"type":"object","required":["code","message","errors"],"properties":{"code":{"type":"integer","description":"The HTTP status code of the response.","example":404},"message":{"type":"string","description":"A human-readable description of the error.","example":"Document not found"},"errors":{"type":"string","description":"The error detail. Repeats `message` when there is no more specific detail.","example":"Document not found"},"trace_id":{"type":"string","description":"The trace id of the request. Only sent with 5xx status codes."},"support_message":{"type":"string","description":"A note asking to include the trace_id when contacting support. Only sent with 5xx status codes."}}},"InvalidTokenResponse":{"type":"object","required":["error","error_description"],"properties":{"error":{"type":"string","description":"The OAuth 2.0 error code, always `invalid_token`.","example":"invalid_token"},"error_description":{"type":"string","description":"A human-readable description of the error.","example":"The access token provided is invalid"}}}}}}