{
    "openapi": "3.1.0",
    "info": {
        "title": "fynk API Reference",
        "version": "2026-08-25",
        "description": "The fynk API offers a range of endpoints that allow you to build custom integrations against your fynk\naccount.\n\nAs far as possible, it uses REST-style, resource-based URLs to allow your applications to interact with the\n[Documents](\/#documents) and [other entities](\/#core-concepts) that make up your fynk account.\n\n## Quickstart\n\nFollow these steps to get up and running using the API to work with your fynk account.\n\n### 1. Create an account\n\n[Click here](https:\/\/app.fynk.com\/register) to create a fynk account, or [login here](https:\/\/app.fynk.com\/login) if you already have an\naccount.\n\n### 2. Create a party\n\nMake sure your account contains at least one [party](https:\/\/app.fynk.com\/account-settings\/parties). You'll need a party to use in your\n[documents](\/#documents) and [templates](\/#templates).\n\n### 3. Create a template\n\nMake sure your account has at least one [template](\/#templates) available in its [template\nlist](https:\/\/app.fynk.com\/templates) . You can create a template from scratch or use one from the\n[gallery](https:\/\/app.fynk.com\/templates#gallery).\n\n### 4. Create an API token\n\n> Only fynk users with the \"Owner\" role can perform this step.\n\nGo to [the fynk API settings page](https:\/\/app.fynk.com\/account-settings\/integrations\/api) and click the **Create Token** button. Give your token\na name and give it at least the \"Template Reader\" role. Feel free to also set an expiry date if you would\nlike to be sure that the token cannot be used later. Then click **Create Token** and you'll be shown your\nnew API token. Copy the token to your clipboard, and then paste it somewhere safe such a password manager.\n\n> For security reasons, we can't show you the API token again after you move past this step, so it's\n> important to note it down somewhere safe that you can refer to later.\n\n### 5. Try using your API token\n\nYou can try out your new API token right from this documentation. Open the page for the [Current API token\ndetails](\/operations\/v1.api-tokens.show-me) API endpoint and paste your API token into the **Token**\ninput in the **Auth** box, then click **Send API Request**.\n\nYou should then see a JSON response appear, with a `data` array at the top level containing information\nabout your API token. It should look something like the example below.\n\n```js\n{\n  \"data\": {\n    \"uuid\": \"efc24626-9724-43cd-9247-e9769fe08844\",\n    \"name\": \"fynk API token\",\n    \"expires_at\": null,\n    \"account\": {\n      \"uuid\": \"08fd4c01-7327-42d4-9442-a09dd57f55b8\",\n      \"name\": \"Demo Inc.\"\n    },\n    \"settings\": {\n      \"account_default_api_version\": \"2025-05-22\",\n      \"request_api_version\": \"2025-05-22\",\n      \"latest_api_version\": \"2025-06-06\",\n      \"changelog\": {}\n    },\n    \"created_at\": \"2025-07-01T06:19:03Z\",\n    \"updated_at\": \"2025-07-01T06:19:03Z\"\n  },\n  \"links\": {\n    \"documentation\": \"https:\/\/app.fynk.com\/v1\/docs\",\n    \"document_list\": \"https:\/\/app.fynk.com\/v1\/api\/documents\",\n    \"template_list\": \"https:\/\/app.fynk.com\/v1\/api\/templates\"\n  }\n}\n```\n\n> If you instead see a `401 Unauthorized` response, make sure you copied the whole of the generated API\n> token, if you think you might be missing part of it, you can revoke the token you created in step 4 and\n> try generating a new token.\n\n### 6. Try fetching data\n\nNow that you know your API token works, open the page for the [List templates](\/operations\/v1.templates.index) API\nendpoint and try sending that request. You should receive a response like the one below, containing details\nof the template you created in step three.\n\nAt this point, if you would like, you can try altering some of the request parameters like `sort_by` or\n`sort_direction` and re-send the request to see how this affects the response.\n\nYou could also copy one of the returned template `uuid` values and use it to fetch additional information\nabout the template by pasting it into the **template** input on the\n[Show template](\/operations\/v1.templates.show) page and sending that request.\n\n```js\n{\n  \"data\": [\n    {\n      \"uuid\": \"00ac949f-4871-496f-904c-8703a33fe163\",\n      \"name\": \"Contract Layout A\",\n      \"locale\": \"en-US\",\n      \"published\": true,\n      \"signature_type\": null,\n      \"sequential_signing\": false,\n      \"created_at\": \"2025-05-28T07:11:14Z\",\n      \"updated_at\": \"2025-05-28T07:11:15Z\",\n      \"archived_at\": null,\n      \"parties\": [\n        {\n          \"uuid\": \"e137ca22-c69d-43ec-bb6b-4b5ebd10417f\",\n          \"reference\": \"Demo Inc.\",\n          \"entity_name\": \"Demo Inc.\",\n          \"address\": \"Am Tabor 36\\n1020 Wien\",\n          \"scope\": \"internal\",\n          \"is_internal_party\": true,\n          \"created_at\": \"2025-05-28T07:11:14Z\",\n          \"updated_at\": \"2025-05-28T07:11:14Z\"\n        },\n        {\n          \"uuid\": \"9781632f-12b0-4528-bde9-346377f79fe9\",\n          \"reference\": \"Counterparty\",\n          \"entity_name\": null,\n          \"address\": null,\n          \"scope\": \"internal_and_external\",\n          \"is_internal_party\": false,\n          \"created_at\": \"2025-05-28T07:11:14Z\",\n          \"updated_at\": \"2025-05-28T07:11:14Z\"\n        }\n      ]\n      \"links\": {\n        \"show\": \"https:\/\/app.fynk.com\/v1\/api\/templates\/00ac949f-4871-496f-904c-8703a33fe163\"\n      }\n    },\n    \/\/ ...\n```\n\n### 7. Integrate with your systems\n\nYou now have a working API token and have seen what an API response looks like. To help you start\nintegrating the API into your systems, take a look at the **Request Sample** section of any endpoint\ndocumentation page. There you can use the menu to select your preferred programming language and see an\nexample of how you could send that endpoint's request using the selected language.\n\n## How to create a document from a template\n\n### Create a template\n\nCreating a [document](\/#documents) through the API first requires that your account contains a\n[template](\/#template) to use as the basis of the new document. If you don't have a template available\nalready, you can either create one from scratch or choose one from the [gallery](https:\/\/app.fynk.com\/templates#gallery) and\nmodify it to fit your needs.\n\n### Create a document from the template\n\nTo create a document from a template, you will need to send a `POST` request to the [Create document from\ntemplate](\/operations\/v1.documents.create-from-template) endpoint. Before you can do this, you will first need to find the UUID of\nthe template you would like to base your new document on.\n\nYou can use a filtered request to the [List templates](\/operations\/v1.templates.index) endpoint to find the UUID of\nthe template you would like to use. For example, if your template is called \"Contract Layout A\", a request\nlike this using `curl` would return a list of the templates matching that name, and you can then take the\n`uuid` from the appropriate template in the response:\n\n```shell\ncurl \"https:\/\/app.fynk.com\/v1\/api\/templates?filter%5Bquery%5D=Contract%20Layout%20A\" \\\n    -H 'Authorization: Bearer <your-api-token>' \\\n    -H 'Accept: application\/json'\n```\n\nThe template UUID can then be used as the `template_uuid` parameter in the [Create document from\ntemplate](\/operations\/v1.documents.create-from-template) request. You can optionally provide a `name` parameter to set the name\nof the new document - if you don't provide a name, then the new document will be given the same name as the\ntemplate it is based on.\n\nThe request parameters should be sent in a JSON object in the request body. The following example shows how\nthis would look if you wanted to create a document called \"Employment Contract\" from the template with the\nUUID \"4df1e60a-0114-4dce-89e7-8c5ad397fcf2\":\n\n```shell\ncurl -X \"POST\" \"https:\/\/app.fynk.com\/v1\/api\/documents\/create-from-template\" \\\n    -H 'Authorization: Bearer <your-api-token>' \\\n    -H 'Accept: application\/json' \\\n    -H 'Content-Type: application\/json; charset=utf-8' \\\n    -d '{\"name\": \"Employment Contract\", \"template_uuid\": \"4df1e60a-0114-4dce-89e7-8c5ad397fcf2\"}'\n```\n\n> **Assigning document ownership**: you can optionally specify which users from your account should be given\n> ownership of the new document by including the `owner_emails` parameter in your request. This parameter\n> should contain an array of email addresses belonging to users in your fynk account.\n\nSending this request will return a JSON response containing the details of the newly created document, which\nwill look something like this:\n\n```js\n{\n  \"data\": {\n    \"uuid\": \"14e82085-6e94-48c7-9b9b-15bc5c4656d4\",\n    \"name\": \"Employment Contract\",\n    \"origin\": \"template\",\n    \/\/ ...\n}\n```\n\nThe `data.uuid` returned in the response is the UUID of the newly created document. This would be the value\nyou would need to use in subsequent requests when the endpoint documentation specifies that it accepts a\n`document` parameter in the URL (as in the [Show document](\/operations\/v1.documents.show) endpoint, for example).\n\nAt this point the document has been created and would be visible in the [documents](https:\/\/app.fynk.com\/documents) list to\nusers with the appropriate permissions.\n\n### Populate dynamic fields\n\nIf your template contains [dynamic fields](\/#dynamic-fields), your new document will also contain those same\ndynamic fields, and you can now use the API to customise the content of your document by updating its\ndynamic field values. The response returned after creating the document will contain a `data.dynamic_fields`\nlist, which will contain all of the document's dynamic fields and their initial values. This example shows\nhow this could look for a variety of different field types:\n\n```js\n{\n  \"data\": {\n    \"uuid\": \"14e82085-6e94-48c7-9b9b-15bc5c4656d4\",\n    \/\/ ...\n    \"dynamic_fields\": [\n      {\n        \"uuid\": \"f4522967-c04f-4113-8762-6d5642c9d863\",\n        \"type\": \"date\",\n        \"name\": \"Start of employment\",\n        \"scope\": \"internal\",\n        \"settings\": null,\n        \"autofill_type\": null,\n        \"format\": null,\n        \"select_values\": null,\n        \"is_mandatory\": true,\n        \"question\": \"When does the employee start?\",\n        \"question_external\": null,\n        \"value\": \"2025-10-01\",\n        \"order\": null\n      },\n      {\n        \"uuid\": \"4000293a-773b-4efa-ae4b-96bc511d8ad7\",\n        \"type\": \"text\",\n        \"name\": \"Job Title\",\n        \"scope\": \"internal\",\n        \"settings\": null,\n        \"autofill_type\": null,\n        \"format\": null,\n        \"select_values\": null,\n        \"is_mandatory\": true,\n        \"question\": \"What is the role's job title?\",\n        \"question_external\": null,\n        \"value\": \"Full-stack Developer\",\n        \"order\": null\n      },\n      {\n        \"uuid\": \"c6c0b0bb-87af-44e9-bc8d-0e543b217429\",\n        \"type\": \"currency\",\n        \"name\": \"Yearly Gross Salary\",\n        \"scope\": \"internal\",\n        \"settings\": {\n          \"currencies\": [\n            \"EUR\"\n          ]\n        },\n        \"autofill_type\": null,\n        \"format\": null,\n        \"select_values\": null,\n        \"is_mandatory\": true,\n        \"question\": \"What is the role's yearly gross salary?\",\n        \"question_external\": null,\n        \"value\": \"EUR;75000\",\n        \"order\": null\n      },\n      {\n        \"uuid\": \"6778cfe0-1509-47fc-a333-c80c794c0443\",\n        \"type\": \"select\",\n        \"name\": \"Location\",\n        \"scope\": \"internal\",\n        \"settings\": null,\n        \"autofill_type\": null,\n        \"format\": null,\n        \"select_values\": [\n          \"Cork\",\n          \"Dublin\"\n        ],\n        \"is_mandatory\": true,\n        \"question\": \"In which location will the employee be based?\",\n        \"question_external\": null,\n        \"value\": \"Dublin\",\n        \"order\": null\n      },\n      {\n        \"uuid\": \"30e5296d-08fe-4fc8-abd4-df2670583115\",\n        \"type\": \"bool\",\n        \"name\": \"Remote work\",\n        \"scope\": \"internal\",\n        \"settings\": null,\n        \"autofill_type\": null,\n        \"format\": null,\n        \"select_values\": null,\n        \"is_mandatory\": true,\n        \"question\": \"Does the role allow a remote work component?\",\n        \"question_external\": null,\n        \"value\": false,\n        \"order\": null\n      }\n    ],\n    \/\/ ...\n  }\n}\n```\n\nThis list of current dynamic field values for a document is also included in the [Show\ndocument](\/operations\/v1.documents.show) response or can be fetched (without the rest of the document's data) using\nthe [List document's dynamic fields](\/operations\/v1.documents.dynamic-fields.index) endpoint.\n\nTo change the value of a dynamic field, you can use the [Update dynamic field](\/operations\/v1.documents.dynamic-fields.update)\nendpoint. Looking at the documentation for this, you can see that URL for this request requires a `document`\nparameter and a `dynamicField` parameter. `document` is the UUID of the document, which you received in\n`data.uuid` when creating the document. `dynamicField` is the UUID of the dynamic field you would like to\nupdate, which you can take from the appropriate entry in the document's `data.dynamic_fields` list.\n\nUsing the values from the previous example response, if you wanted to change the value of the \"Job Title\"\nfield to \"Software Engineer\", you would take the UUIDs \"14e82085-6e94-48c7-9b9b-15bc5c4656d4\" for `document`\nand \"4000293a-773b-4efa-ae4b-96bc511d8ad7\" for `dynamicField` and send a request like this:\n\n```shell\ncurl -X \"PUT\" \"https:\/\/app.fynk.com\/v1\/api\/documents\/14e82085-6e94-48c7-9b9b-15bc5c4656d4\/dynamic-fields\/4000293a-773b-4efa-ae4b-96bc511d8ad7\" \\\n    -H 'Authorization: Bearer <your-api-token>' \\\n    -H 'Accept: application\/json' \\\n    -H 'Content-Type: application\/json; charset=utf-8' \\\n    -d '{\"value\": \"Software Engineer\"}'\n```\n\nThe format of the `value` parameter sent in the request body will depend on the `type` of the dynamic field,\nthe possible types and their corresponding formats are detailed in the [Update dynamic\nfield](\/operations\/v1.documents.dynamic-fields.update#value-format) documentation.\n\n### Assign metadata\n\nAt this point it is also possible to enrich your document with [metadata](\/#metadata). Your fynk account\ncomes with a selection of [reference metadata fields](https:\/\/app.fynk.com\/account-settings\/metadata#reference) as well as allowing\nyou to create custom [account metadata fields](https:\/\/app.fynk.com\/account-settings\/metadata#account). You can assign values for any\nof these metadata fields to your documents using the API.\n\nAssigning a new metadata value to a document is a two step process:\n\n1. Use the [List metadata](\/operations\/v1.metadata.index) endpoint to find the metadata field's UUID.\n2. Send an [Add metadata value to document](\/operations\/v1.documents.metadata-values.store) request to create a \"metadata value\" for that field.\n\n> Metadata fields can be scoped to specific [document types](\/#document-types) via their\n> `relevant_document_type_uuids` property. Use the [List document types](\/operations\/v1.document-types.index)\n> endpoint to discover the document type UUIDs available in your account when creating or updating\n> metadata definitions.\n\nThe [List metadata](\/operations\/v1.metadata.index) endpoint will return a list of all of the metadata fields that are\navailable in your account. Its response will look something like this:\n\n```js\n{\n  \"data\": [\n    {\n      \"uuid\": \"ddfc1bd7-05c9-456e-9dab-dacfcf44fbb2\",\n      \"type\": \"system_reference\",\n      \"value_type\": \"select\",\n      \"name\": \"end_user_license_type\",\n      \"display_name\": \"End User License Type\",\n      \"settings\": null,\n      \"select_values\": [\n        \"Freeware\",\n        \"Shareware\",\n        \"Proprietary\",\n        \"Subscription\",\n        \"Open Source\",\n        \"Public Domain\",\n        \"Other\"\n      ],\n      \"always_exists\": false,\n      \"description\": \"The type of license governing the use of the software product.\"\n    },\n    {\n      \"uuid\": \"7c997428-de84-483b-a072-f2c9da93d924\",\n      \"type\": \"system_reference\",\n      \"value_type\": \"currency\",\n      \"name\": \"freelance_rate\",\n      \"display_name\": \"Freelance Rate\",\n      \"settings\": null,\n      \"select_values\": null,\n      \"always_exists\": false,\n      \"description\": \"The hourly rate charged for freelance services.\"\n    },\n    {\n      \"uuid\": \"205a379c-c4d5-469d-9f67-a025bc630cbf\",\n      \"type\": \"system_reference\",\n      \"value_type\": \"number\",\n      \"name\": \"freelance_hours\",\n      \"display_name\": \"Freelance Hours\",\n      \"settings\": null,\n      \"select_values\": null,\n      \"always_exists\": false,\n      \"description\": \"The number of hours to be provided as part of the freelance services.\"\n    },\n    \/\/ ...\n  ]\n}\n```\n\nLets assume that you would like to set the `freelance_hours` metadata field to `100` for your document. The\n[Add metadata value to document](\/operations\/v1.documents.metadata-values.store) endpoint requires three parameters:\n\n- `document` in the URL: The UUID of the document to add the metadata value to.\n- `metadata_uuid` in the request body: The UUID of the metadata field to add the value to.\n- `value` in the request body: The value to assign to the metadata field.\n\nUsing the values from the previous example responses, this means you would send a request like this:\n\n```shell\ncurl -X \"POST\" \"https:\/\/app.fynk.com\/v1\/api\/documents\/14e82085-6e94-48c7-9b9b-15bc5c4656d4\/metadata-values\" \\\n    -H 'Authorization: Bearer <your-api-token>' \\\n    -H 'Accept: application\/json' \\\n    -H 'Content-Type: application\/json; charset=utf-8' \\\n    -d '{\"value\": 100, \"metadata_uuid\": \"205a379c-c4d5-469d-9f67-a025bc630cbf\"}'\n```\n\nYou would then be able to see the newly set metadata value in `data.metadata_values` field of the [Show\ndocument](\/operations\/v1.documents.show) response.\n\n> If you need to set or remove values for several metadata fields at once, the [Bulk update metadata\n> values](\/operations\/v1.documents.metadata-values.bulk-update) endpoint lets you do so in a single request, rather than sending an\n> individual request per field.\n\n### Managing parties\n\nAt this point, your document may need to have the details of at least one of its [parties](\/#parties)\ncompleted, since your template likely only contains a generic `reference` to the external party, rather than\ntheir concrete details.\n\n#### List document parties\n\nTo see all parties associated with a document, use the [List document parties](\/operations\/v1.documents.parties.index)\nendpoint:\n\n```shell\ncurl \"https:\/\/app.fynk.com\/v1\/api\/documents\/14e82085-6e94-48c7-9b9b-15bc5c4656d4\/parties\" \\\n    -H 'Authorization: Bearer <your-api-token>' \\\n    -H 'Accept: application\/json'\n```\n\n> `is_internal_party` in the response tells you whether the party will be editable via the API. Only parties\n> where this field is false can be updated via API. Internal parties can be edited in the [settings of your\n> fynk account](https:\/\/app.fynk.com\/account-settings\/parties).\n\n#### Update party details\n\nYou can edit party information using the [Update document party](\/operations\/v1.documents.parties.update) endpoint.\n\nFor example, to update a party's name and address and set that they are business:\n\n```shell\ncurl -X \"PUT\" \"https:\/\/app.fynk.com\/v1\/api\/documents\/14e82085-6e94-48c7-9b9b-15bc5c4656d4\/parties\/ad899fc9-3130-45d5-9cd5-d7a0737f0ffd\" \\\n    -H 'Authorization: Bearer <your-api-token>' \\\n    -H 'Accept: application\/json' \\\n    -H 'Content-Type: application\/json; charset=utf-8' \\\n    -d '{\"entity_name\": \"BigCo Inc.\", \"address\":\"BigCo Plaza, New York\"}'\n```\n\n> Party management is only allowed while the document is in `draft`, `approved_draft`, `review`, or\n> `approved_review` stages. Once a document reaches the `signing` or `done` stage, parties cannot be\n> updated.\n\n### Assign a signatory\n\nBefore your document can be signed, you need to assign [signatories](\/#signatories) to it. Signatories are\nindividuals who will sign the document and must belong to one of the document's [parties](\/#parties).\n\nTo add a signatory to your document, use the [Add signatory](\/operations\/v1.documents.signatories.store)\nendpoint. This endpoint requires:\n\n- `document` in the URL: The UUID of the document to add the signatory to\n- `party_uuid` in the request body: The UUID of the party this signatory belongs to\n- `email` in the request body: The email address of the signatory\n\nYou can also optionally provide additional information like `first_name`, `last_name`, `mobile_phone`, and\n`title`.\n\nUsing the document UUID from our previous examples and assuming you want to add a signatory named \"Alex\nSmith\" with email \"alex.smith@example.com\" to the party with UUID \"ad899fc9-3130-45d5-9cd5-d7a0737f0ffd\",\nyou would send a request like this:\n\n```shell\ncurl -X \"POST\" \"https:\/\/app.fynk.com\/v1\/api\/documents\/14e82085-6e94-48c7-9b9b-15bc5c4656d4\/signatories\" \\\n    -H 'Authorization: Bearer <your-api-token>' \\\n    -H 'Accept: application\/json' \\\n    -H 'Content-Type: application\/json; charset=utf-8' \\\n    -d '{\n      \"party_uuid\": \"ad899fc9-3130-45d5-9cd5-d7a0737f0ffd\",\n      \"email\": \"alex.smith@example.com\",\n      \"first_name\": \"Alex\",\n      \"last_name\": \"Smith\",\n      \"title\": \"Software Engineer\"\n    }'\n```\n\nThe response will include the details of the newly created signatory:\n\n```js\n{\n  \"data\": {\n    \"uuid\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n    \"party_uuid\": \"ad899fc9-3130-45d5-9cd5-d7a0737f0ffd\",\n    \"first_name\": \"Alex\",\n    \"last_name\": \"Smith\",\n    \"email\": \"alex.smith@example.com\",\n    \"mobile_phone\": null,\n    \"title\": \"Software Engineer\",\n    \"profile_photo_url\": \"https:\/\/ui-avatars.com\/api\/?name=AS\",\n    \"signing_order\": 1,\n    \"has_account_user\": false\n  }\n}\n```\n\n#### Managing signatories\n\nYou can also update signatory information using the [Update signatory](\/operations\/v1.documents.signatories.update)\nendpoint, or remove a signatory using the [Remove signatory](\/operations\/v1.documents.signatories.destroy)\nendpoint.\n\nTo list all signatories for a document, use the [List signatories](\/operations\/v1.documents.signatories.index)\nendpoint.\n\n> Some changes to signatories may be prevented while a document is in the `signing` stage. For example, it\n> is not allowed to remove the only remaining signatory from a party while a document is being signed. If\n> you try to make a modification that is not allowed in the document's current stage, your request will\n> receive a response with a `409 Conflict` status.\n\n#### Granting document access\n\nSignatories are one kind of [document user](\/#document-users). If you want to give someone access to the\ndocument without making them a signatory - for example a collaborator who should review the document, or\nan additional owner - use the [Add document user](\/operations\/v1.documents.users.store) endpoint.\n\n### Move the document to review\n\nAt this point, assuming you haven't made any changes to your document outside of the API, it will be in the\n`draft` stage. You can use the\n[Move document to review stage](\/operations\/v1.documents.stage-transitions.review) endpoint to move the\ndocument into the `review` stage, where you can share it with collaborators:\n\n```shell\ncurl -X \"POST\" \"https:\/\/app.fynk.com\/v1\/api\/documents\/14e82085-6e94-48c7-9b9b-15bc5c4656d4\/stage-transitions\/review\" \\\n    -H 'Authorization: Bearer <your-api-token>' \\\n    -H 'Accept: application\/json' \\\n```\n\n### Move the document to signing\n\nOnce you are happy with your document's content, have configured its [parties](\/#parties) and their\n[signatories](\/#signatories), and have added signature blocks to the document for each signatory, you can\ncan use the [Move document to signing stage](\/operations\/v1.documents.stage-transitions.signing) endpoint to\nmove the document into the `signing` stage:\n\n```shell\ncurl -X \"POST\" \"https:\/\/app.fynk.com\/v1\/api\/documents\/14e82085-6e94-48c7-9b9b-15bc5c4656d4\/stage-transitions\/signing\" \\\n    -H 'Authorization: Bearer <your-api-token>' \\\n    -H 'Accept: application\/json' \\\n```\n\nThis request sends invitations to all document signatories. If sequential signing is enabled, invitations\nare sent one at a time in the order specified by each signatory's `signing_order` property. Otherwise, all\nsignatories receive their invitations simultaneously.\n\n### Access the document\n\nOnce you have created a document, you can access it in the fynk web application by visiting it from the\n[documents list](https:\/\/app.fynk.com\/documents), assuming your fynk user has the appropriate role and\/or team membership.\nYou can also download the document as a PDF via the API, using the `data.pdf_url` returned by the [Show\nlatest revision PDF details](\/operations\/v1.documents.revisions.latest.pdf.show) endpoint, or directly via\nthe [Download latest revision PDF](\/operations\/v1.documents.revisions.latest.pdf.download) endpoint.\n\nThe latter option would look like this using `curl` to download to a file named `my-document.pdf`. Note that\nbecause the API endpoint returns a HTTP 302 redirect to the actual PDF data, we have to tell `curl` to\nfollow redirects using the `--location` flag:\n\n```shell\ncurl \"https:\/\/app.fynk.com\/v1\/api\/documents\/14e82085-6e94-48c7-9b9b-15bc5c4656d4\/revisions\/latest\/pdf\/download\" \\\n    -H 'Authorization: Bearer <your-api-token>' \\\n    --location > my-document.pdf\n```\n\nYou can also give people outside your fynk account read access to the document by creating a [public\nlink](\/#shareable-links) for it via the [Create public link](\/operations\/v1.documents.public-link.store)\nendpoint:\n\n```shell\ncurl -X POST \"https:\/\/app.fynk.com\/v1\/api\/documents\/14e82085-6e94-48c7-9b9b-15bc5c4656d4\/public-link\" \\\n    -H 'Authorization: Bearer <your-api-token>'\n```\n\nThe `data.url` in the response is the link to share. Treat it like a secret: anyone who has the URL can\nview the document with it.\n\n## How to create a document from a PDF file\n\nCreating a [document](\/#documents) from a PDF file requires a multi-step upload process to ensure your PDF\nis safely transferred and processed.\n\n### Generate a presigned upload URL\n\nFirst, you need to obtain an upload URL by making a request to the [Create document PDF upload\nURL](\/operations\/v1.file-uploads.document-pdf.create) endpoint:\n\n```shell\ncurl -X \"POST\" \"https:\/\/app.fynk.com\/v1\/api\/file-uploads\/document-pdf\" \\\n    -H 'Authorization: Bearer <your-api-token>' \\\n    -H 'Accept: application\/json' \\\n    -H 'Content-Type: application\/json; charset=utf-8'\n```\n\nThis will return a response containing the upload details:\n\n```json\n{\n  \"data\": {\n    \"uuid\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n    \"url\": \"https:\/\/example-bucket.s3.amazonaws.com\/\",\n    \"method\": \"POST\",\n    \"fields\": {\n        \"key\": \"tmp\/a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n        \"acl\": \"private\",\n        \"Content-Type\": \"application\/pdf\",\n        \"policy\": \"...\",\n        \"X-Amz-Algorithm\": \"AWS4-HMAC-SHA256\",\n        \"X-Amz-Credential\": \"...\",\n        \"X-Amz-Date\": \"20260609T120000Z\",\n        \"X-Amz-Signature\": \"...\"\n    },\n    \"expires_at\": \"2025-07-29T15:30:00Z\"\n  }\n}\n```\n\n> Hold on to the `uuid` value - you'll need it when you reach the \"Create the document\" step. The upload URL\n> expires at the time specified in `expires_at`, so complete the upload promptly.\n\n### Upload your PDF file\n\nUsing the URL and fields from the previous response, upload your PDF file with a `multipart\/form-data` POST\nrequest. Send every entry of `data.fields` as a form field exactly as provided, then the raw PDF file data\n(not base64-encoded) in a final `file` field:\n\n```shell\ncurl -X \"POST\" \"https:\/\/example-bucket.s3.amazonaws.com\/\" \\ # use the URL from data.url in the previous response\n    -F \"key=tmp\/a1b2c3d4-e5f6-7890-abcd-ef1234567890\" \\ # these come from data.fields in the previous response\n    -F \"acl=private\" \\\n    -F \"Content-Type=application\/pdf\" \\\n    -F \"policy=...\" \\\n    -F \"X-Amz-Algorithm=AWS4-HMAC-SHA256\" \\\n    -F \"X-Amz-Credential=...\" \\\n    -F \"X-Amz-Date=20260609T120000Z\" \\\n    -F \"X-Amz-Signature=...\" \\\n    -F \"file=@\/path\/to\/your\/document.pdf\" # the file field must come last\n```\n\n> This is a direct upload to an S3-compatible storage bucket using a presigned URL. You do not need to\n> include your fynk API token in the request. Include all fields from the previous response exactly as\n> provided, and send the `file` field last.\n\nA successful upload returns a `204 No Content` response with no body content.\n\n### Create the document\n\nFinally, create your fynk document from the uploaded PDF using the [Create document from\nPDF](\/operations\/v1.documents.create-from-pdf) endpoint, providing the `uuid` from step 1:\n\n```shell\ncurl -X \"POST\" \"https:\/\/app.fynk.com\/v1\/api\/documents\/create-from-pdf\" \\\n    -H 'Authorization: Bearer <your-api-token>' \\\n    -H 'Accept: application\/json' \\\n    -H 'Content-Type: application\/json; charset=utf-8' \\\n    -d '{\n      \"file_upload_uuid\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n      \"file_name\": \"my-contract.pdf\",\n      \"initial_stage\": \"draft\",\n      \"name\": \"My Contract from PDF\",\n    }'\n```\nThis returns the newly created document:\n\n```js\n{\n  \"data\": {\n    \"uuid\": \"b71a0628-529f-4ae1-a891-e1c6e9339507\",\n    \"name\": \"My Contract from PDF\",\n    \"origin\": \"pdf\",\n    \"stage\": \"draft\",\n    \/\/ ...\n  }\n}\n```\n\n#### Initial stage\n\nThe `initial_stage` may be either `draft` or `done`. Here we've used `draft`, indicating that the document\nstill needs to be signed through fynk. If we'd instead used `done` this would be the same as the \"Import\nwithout signing\" option in the fynk web interface - the document would be created already in the \"Done\"\nstage.\n\n#### Using a Template\n\nYou can specify a `template_uuid` to copy settings from an existing template. When using `template_uuid`,\nvarious settings (parties, metadata, etc.) will be copied from the template to the new document.\n\n#### Additional Options\n\nSeveral optional parameters are available for customizing the document, including team assignment, tags,\nand AI analysis settings. See the [Create document from PDF](\/operations\/v1.documents.create-from-pdf)\nendpoint documentation for the complete list of available parameters.\n\n### What happens next\n\nYour PDF will be processed and converted into a fynk document. If your account has access to AI Analyses,\nan analysis will be automatically started for the newly created document.\n\nThe new document will appear in your [documents list](https:\/\/app.fynk.com\/documents) and can be managed like any other fynk\ndocument through both the web interface and API.\n\n## How to store a file in a document's file storage\n\nStoring a file in a [document](\/#documents) file storage requires a multi-step upload process to ensure your\nfile is safely transferred and processed.\n\n### Generate a presigned upload URL\n\nFirst, you need to obtain an upload URL by making a request to the [Create document file storage upload\nURL](\/operations\/v1.file-uploads.document-file-storage.create) endpoint:\n\n```shell\ncurl -X \"POST\" \"https:\/\/app.fynk.com\/v1\/api\/file-uploads\/document-file-storage\" \\\n  -H 'Accept: application\/json' \\\n  -H 'Authorization: Bearer <your-api-token>' \\\n  -H 'Content-Type: application\/json' \\\n  -d '{\"content_type\": \"application\/pdf\"}'\n```\n\nThis will return a response containing the upload details:\n\n```json\n{\n  \"data\": {\n    \"uuid\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n    \"url\": \"https:\/\/example-bucket.s3.amazonaws.com\/\",\n    \"method\": \"POST\",\n    \"fields\": {\n        \"key\": \"tmp\/a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n        \"acl\": \"private\",\n        \"Content-Type\": \"application\/pdf\",\n        \"policy\": \"...\",\n        \"X-Amz-Algorithm\": \"AWS4-HMAC-SHA256\",\n        \"X-Amz-Credential\": \"...\",\n        \"X-Amz-Date\": \"20260609T120000Z\",\n        \"X-Amz-Signature\": \"...\"\n    },\n    \"expires_at\": \"2025-07-29T15:30:00Z\"\n  }\n}\n```\n\n> Hold on to the `uuid` value - you'll need it when you reach the \"Store the file in a document's file\n> storage\" step. The upload URL expires at the time specified in `expires_at`, so complete the upload\n> promptly.\n\n### Upload your file\n\nUsing the URL and fields from the previous response, upload your file with a `multipart\/form-data` POST\nrequest. Send every entry of `data.fields` as a form field exactly as provided, then the raw file data (not\nbase64-encoded) in a final `file` field:\n\n```shell\ncurl -X \"POST\" \"https:\/\/example-bucket.s3.amazonaws.com\/\" \\ # use the URL from data.url in the previous response\n    -F \"key=tmp\/a1b2c3d4-e5f6-7890-abcd-ef1234567890\" \\ # these come from data.fields in the previous response\n    -F \"acl=private\" \\\n    -F \"Content-Type=application\/pdf\" \\\n    -F \"policy=...\" \\\n    -F \"X-Amz-Algorithm=AWS4-HMAC-SHA256\" \\\n    -F \"X-Amz-Credential=...\" \\\n    -F \"X-Amz-Date=20260609T120000Z\" \\\n    -F \"X-Amz-Signature=...\" \\\n    -F \"file=@\/path\/to\/your\/document.pdf\" # the file field must come last\n```\n\n> This is a direct upload to an S3-compatible storage bucket using a presigned URL. You do not need to\n> include your fynk API token in the request. Include all fields from the previous response exactly as\n> provided, and send the `file` field last.\n\nA successful upload returns a `204 No Content` response with no body content.\n\n### Store the file in the document's file storage\n\nFinally, link your newly uploaded file to the file storage of the document in question using the [Store a file in a document's file storage\nPDF](\/operations\/v1.documents.document-file-storage.store) endpoint, providing the `uuid` from step 1:\n\n```shell\ncurl -X \"POST\" \"https:\/\/app.fynk.com\/v1\/api\/documents\/{document}\/file-storage\" \\\n  -H 'Accept: application\/json' \\\n  -H 'Authorization: Bearer <your-api-token>' \\\n  -H 'Content-Type: application\/json' \\\n  -d '{\n    \"file_upload_uuid\": \"e1413d6e-d516-4f67-84be-6dd98446aebb\",\n    \"file_name\": \"your-filename.pdf\"\n  }'\n```\nThis returns the details of the newly stored file:\n\n```js\n{\n  \"data\": {\n    \"uuid\": \"09d358a7-4268-413f-a79b-7fed013f8768\",\n    \"sha256\": \"697651f6ceea8a931289ff64cb62f78ceea5d36f7e84590fe9d5920b2dce52cf\",\n    \"file_name\": \"your-filename.pdf\",\n    \"file_size\": 349059,\n    \"mime_type\": \"application\/pdf\",\n  }\n}\n```\n\n## Core concepts\n\n### UUIDs\n\nAll resources returned by the fynk API are identified by a UUID. The UUID that identifies a particular\nresource will always be returned in the `uuid` field of the resource's JSON representation.\n\n```js\n{\n  \"data\" {\n    \"uuid\": \"88a774d2-904a-4b1a-9c49-338cdc203041\",\n    \/\/ ...\n  }\n}\n```\n\n### Documents\n\nDocuments are the individual contracts, quotes, forms, etc that you are managing through fynk.\n\nAmong other things, the API allows you to:\n\n- [Create new documents](\/operations\/v1.documents.create-from-template)\n- [List and search for existing documents](\/operations\/v1.documents.index)\n- [View details of a document](\/operations\/v1.documents.show)\n- [Rename a document or update its general settings](\/operations\/v1.documents.update)\n- [Download a PDF copy of a document](\/operations\/v1.documents.revisions.latest.pdf.download)\n- Manage a document's [dynamic field](\/#dynamic-fields) and [metadata](\/#metadata) values\n\n### Templates\n\nTemplates in fynk allow you to create standardized [documents](\/#documents) efficiently while maintaining\nflexibility for customization. You can read more about using templates in fynk in our [article\nhere](https:\/\/help.fynk.com\/en\/articles\/270538-templates-in-fynk).\n\nUsing the API you can:\n\n- [List and search the templates](\/operations\/v1.templates.index) available in your account\n- [View details of a template](\/operations\/v1.templates.show)\n- [Use a template to create a new document](\/operations\/v1.documents.create-from-template)\n\n### Parties\n\nA party represents a business or natural person who will be involved in a [document](\/#documents). Your fynk\naccount will have at least one internal party representing the internal entities relevant to your\norganization - such as company locations, legal subsidiaries, or departments. Your documents may involve\nthose internal parties, as well as external parties - like suppliers, customers, or partners.\n\nYou can read more about managing your account's parties in [our article\nhere](https:\/\/help.fynk.com\/en\/articles\/125635-managing-account-settings-in-fynk?#h_1689d3ae54).\n\nA given party may have one or more [signatories](\/#signatories) in a document.\n\nUsing the API you can:\n\n- [List document parties](\/operations\/v1.documents.parties.index)\n- [Update document party](\/operations\/v1.documents.parties.update)\n\nYou will also find party information in both [documents](\/#documents) and [templates](\/#templates) in\ntheir `parties` fields, which will look something like this:\n\n```json\n{\n  \"data\": {\n    \"parties\": [\n      {\n        \"uuid\": \"e85ce001-529d-4ed3-a320-cf374a2eec7a\",\n        \"reference\": \"Employer\",\n        \"entity_name\": \"Demo Inc.\",\n        \"address\": \"2 Example Street\\nLondon\\nW1 7PQ\",\n        \"scope\": \"internal\",\n        \"is_internal_party\": true,\n        \"is_ready_for_signing\": false,\n        \"ready_for_signing_at\": null,\n        \"created_at\": \"2025-06-03T06:28:54Z\",\n        \"updated_at\": \"2025-06-03T06:28:54Z\"\n      },\n      {\n        \"uuid\": \"ad899fc9-3130-45d5-9cd5-d7a0737f0ffd\",\n        \"reference\": \"Employee\",\n        \"entity_name\": \"Jane Marshall\",\n        \"address\": \"1 Main Street\\nBirmingham\\nB2 8QR\",\n        \"scope\": \"internal_and_external\",\n        \"is_internal_party\": false,\n        \"is_ready_for_signing\": false,\n        \"ready_for_signing_at\": null,\n        \"created_at\": \"2025-06-03T06:28:54Z\",\n        \"updated_at\": \"2025-06-03T13:05:56Z\"\n      }\n    ]\n  }\n}\n```\n\n### Signature types\n\nThe signing process for a fynk [document](\/#documents) may use one of three different signature types:\n\n- Simple electronic signature (SES)\n- Advanced electronic signature (AES)\n- Qualified electronic signature (QES)\n\nSee our article [here](https:\/\/help.fynk.com\/en\/articles\/126836-signature-types) for details of the\ndifferences between these.\n\nDocuments returned by the API have a `signature_type` field indicating their currently assigned type. If a\ndocument does not have a signature type assigned, a type may be specified when [moving the document to the\nsigning stage](\/operations\/v1.documents.stage-transitions.signing).\n\n### Document users\n\nDocument users are the people who have access to a [document](\/#documents). Every document user has\nexactly one access level, exposed by the API as their `role`:\n\n- `owner`: Manages the document, including its users. Every document always has at least one owner, and\n  only people with an [account\n  user](https:\/\/help.fynk.com\/en\/articles\/125635-managing-account-settings-in-fynk#h_b6fd630e81) in your\n  fynk account can be owners.\n- `collaborator`: Can work on the document.\n- `viewer`: Can view the document.\n\nDocument users belong to one of the document's [parties](\/#parties), indicated by their `party_uuid`.\nSpecifying a party is required when [adding a document user](\/operations\/v1.documents.users.store) via\nthe API; however, users created through some other means (for example fynk's CRM integrations) may not\nbelong to a party, in which case their `party_uuid` is `null`.\n\nIndependently of their access level, a document user may also be a [signatory](\/#signatories), indicated\nby the `is_signatory` field. A document user and the corresponding signatory share the same `uuid`. Note\nthat [adding a signatory](\/operations\/v1.documents.signatories.store) whose email address is not yet on\nthe document therefore also creates a document user, with the `viewer` access level.\n\nThe API provides endpoints to [list](\/operations\/v1.documents.users.index),\n[add](\/operations\/v1.documents.users.store), [update](\/operations\/v1.documents.users.update) and\n[remove](\/operations\/v1.documents.users.destroy) document users.\n\n> **Warning:** [Removing a document user](\/operations\/v1.documents.users.destroy) revokes their access to\n> the document entirely, including their signatory status. To only remove a user from signing while\n> keeping their access to the document, use the [Remove\n> signatory](\/operations\/v1.documents.signatories.destroy) endpoint instead.\n\nDocument users are also included in the [Show document](\/operations\/v1.documents.show) API response, in its\n`users` field:\n\n```json\n{\n  \"data\": {\n    \"users\": [\n      {\n        \"uuid\": \"7f356fd9-5144-4a75-8378-d223bf13011d\",\n        \"first_name\": \"Jane\",\n        \"last_name\": \"Marshall\",\n        \"email\": \"jane@example.org\",\n        \"title\": \"HR Manager\",\n        \"party_uuid\": \"e85ce001-529d-4ed3-a320-cf374a2eec7a\",\n        \"has_account_user\": true,\n        \"role\": \"owner\",\n        \"is_signatory\": true\n      },\n      {\n        \"uuid\": \"5cb21e44-3002-4af6-91d4-fe8127cb13d2\",\n        \"first_name\": \"Liam\",\n        \"last_name\": \"Roberts\",\n        \"email\": \"roberts@example.com\",\n        \"title\": null,\n        \"party_uuid\": null,\n        \"has_account_user\": false,\n        \"role\": \"collaborator\",\n        \"is_signatory\": false\n      }\n    ]\n  }\n}\n```\n\n### Signatories\n\nA signatory represents an individual person who will sign a [document](\/#documents). All signatories must\nbelong to a [party](\/#party).\n\nA signatory may be either an internal user, who has an [account\nuser](https:\/\/help.fynk.com\/en\/articles\/125635-managing-account-settings-in-fynk#h_b6fd630e81) in your fynk\naccount, or they may be any other person, who does not have access to your fynk account - e.g. employees of\nyour suppliers, customers, or partners.\n\nNote that signatories for `internal` parties do not necessarily have to have a fynk account user in your\naccount.\n\nYou can find signatory information in both the [Show document](\/operations\/v1.documents.show) and [Show\ntemplate](\/operations\/v1.templates.show) API responses:\n\n```json\n{\n  \"data\": {\n    \"signatories\": [\n      {\n        \"uuid\": \"7f356fd9-5144-4a75-8378-d223bf13011d\",\n        \"party_uuid\": \"e85ce001-529d-4ed3-a320-cf374a2eec7a\",\n        \"first_name\": \"Jane\",\n        \"last_name\": \"Marshall\",\n        \"email\": \"jane@example.org\",\n        \"mobile_phone\": \"+447951123456\",\n        \"title\": \"HR Manager\",\n        \"profile_photo_url\": \"https:\\\/\\\/ui-avatars.com\\\/api\\\/?name=JM\",\n        \"signing_order\": 2,\n        \"has_account_user\": true,\n      },\n      {\n        \"uuid\": \"5cb21e44-3002-4af6-91d4-fe8127cb13d2\",\n        \"party_uuid\": \"ad899fc9-3130-45d5-9cd5-d7a0737f0ffd\",\n        \"first_name\": \"Liam\",\n        \"last_name\": \"Roberts\",\n        \"email\": \"roberts@example.com\",\n        \"mobile_phone\": null,\n        \"title\": null,\n        \"profile_photo_url\": \"https:\\\/\\\/ui-avatars.com\\\/api\\\/?name=LR\",\n        \"signing_order\": 1,\n        \"has_account_user\": false,\n      }\n    ]\n  }\n}\n```\n\n### Shareable links\n\nShareable links let people access a [document](\/#documents) via a secret URL, without needing a fynk\naccount or receiving an invitation email. Anyone who has the URL can view the document with it, so treat\nshareable link URLs like secrets.\n\nA document has at most one active **public link** \u2014 a shareable link that is not tied to a specific\nperson. You can manage it via the [Show](\/operations\/v1.documents.public-link.show),\n[Create](\/operations\/v1.documents.public-link.store),\n[Update](\/operations\/v1.documents.public-link.update) and [Delete public\nlink](\/operations\/v1.documents.public-link.destroy) endpoints.\n\nA shareable link can also be tied to a single [document user](\/#document-users) without a fynk account\nuser, identifying that person when they open the document - a **personal link**. Each document user has\nat most one active personal link, managed via the [Show](\/operations\/v1.documents.users.personal-link.show),\n[Create](\/operations\/v1.documents.users.personal-link.store),\n[Update](\/operations\/v1.documents.users.personal-link.update) and [Delete personal\nlink](\/operations\/v1.documents.users.personal-link.destroy) endpoints. As a shortcut, you can also\ncreate the user and their link in one request by passing `invite_method: personal_link` to the [Add\ndocument user](\/operations\/v1.documents.users.store) endpoint; the link is then returned in the\nresponse's `personal_link` field. Delivering the link to the user is then up to you - fynk sends no\ninvitation email.\n\nShareable links expire 3 months after creation by default. You can choose a different expiry date - or\ndisable expiration entirely - via the `expires_at` parameter when creating or updating a link. A link's\nURL never changes; to invalidate a URL that has been shared too widely, delete the link and create a new\none.\n\nNote that shareable links cannot be created while a document is still being drafted (i.e. in the `draft`\nor `approved_draft` stage).\n\n### Dynamic fields\n\nDynamic fields allow your [templates](\/#templates) and [documents](\/#documents) to contain dynamically\ncustomisable placeholders. To find out how to add dynamic fields to your documents, see our article on\n[using the fynk editor](https:\/\/help.fynk.com\/en\/articles\/147803-using-fynk-s-editor#h_6c4eafc77e).\n\nDynamic fields are included in the the [Show document](\/operations\/v1.documents.show) and [Show\ntemplate](\/operations\/v1.templates.show) API responses in their `dynamic_fields` fields.\n\nSee [this section](\/#populate-dynamic-fields) of the API's [How to create a\ndocument](\/#how-to-create-a-document-from-a-template) guide for an introduction to working with dynamic\nfields via the API.\n\n### Metadata\n\nIn fynk, metadata are details such as dates, financial figures, or contract clauses related to your\n[documents](\/#documents). You can find an overview of how metadata can help in your document management\nprocesses in our [using metadata](https:\/\/help.fynk.com\/en\/articles\/126993-using-metadata) article.\n\nThe API allows you to retrieve a list of the metadata fields available in your account via the [List\nmetadata](\/operations\/v1.metadata.index) endpoint, and the [Show document](\/operations\/v1.documents.show) and [Show\ntemplate](\/operations\/v1.templates.show) responses each include a `metadata_values` list, which contain the\ncurrent metadata values assigned to the respective document or [template](\/#templates).\n\nSee [this section](\/#assign-metadata) of the API's [How to create a\ndocument](\/#how-to-create-a-document-from-a-template) guide for an introduction to working with metadata via\nthe API.\n\n### Document types\n\nDocument types categorize the [documents](\/#documents) in your account, e.g. as employment contracts,\nNDAs, or vendor contracts. Your account comes with a set of system-provided types and may define additional\ncustom types of its own.\n\nThe API allows you to retrieve the document types available in your account via the [List document\ntypes](\/operations\/v1.document-types.index) endpoint. The returned `uuid` values can be used to assign a document\ntype to a document via the [Update document](\/operations\/v1.documents.update) endpoint, or to scope\n[metadata](\/#metadata) fields to specific document types via their `relevant_document_type_uuids` property.\n\n## Authentication\n\n### API tokens\n\nTo access the API you will need an API token. You can generate new API tokens in your\n[Account Settings](https:\/\/app.fynk.com\/account-settings\/integrations\/api), or by asking your account's owner to do this for you if you do not have\nsufficient permissions.\n\n> You will only be able to see a new API token's value one time, immediately after you create it, so make\n> sure to save it.\n\nAn API token needs to be sent in the `Authorization` header of each request. The value of the header should\nbe in the format `Bearer <token>`, where `<token>` is the API token itself. For example, if your API token\nwas \"WAnMlf6725\", your request's `Authorization` header would look like this:\n\n```\nAuthorization: Bearer WAnMlf6725\n```\n\n### Tokens created during free trial\n\nIf your account is on a Trial plan, you will be able to generate API tokens and use them to make requests\nto the API for the duration of your trial period. Once your trial ends, you will need to move to a paid plan\nto continue using the API.\n\n## Versioning\n\nThe API may change over time. Wherever possible, backwards incompatible changes will only be included in a\nnew \"version\" of the API, and we will attempt to keep old versions working for a reasonable period after\nthe release of a new version.\n\n### Backwards compatibility\n\nNew API versions are only released for backwards-incompatible changes. The following changes are considered\nbackwards compatible and will not trigger the release of a new version:\n\n- Adding new API endpoints\n- Adding new optional request parameters to existing API endpoints\n- Adding new properties to existing responses\n- Changing the order of properties in existing responses\n- Adding new variants to enumerated types returned in existing responses, e.g. adding a new [DocumentType](\/schemas\/DocumentType)\n\nBackwards incompatible changes like the following will result in the release of a new version:\n\n- Removing existing API endpoints\n- Adding new mandatory request parameters to existing API endpoints\n- Removing, renaming or changing the type of properties in existing responses\n\n### Setting your Default API Version\n\nWhen you first visit the [API settings page](https:\/\/app.fynk.com\/account-settings\/integrations\/api) to generate an API token, your account's\nDefault API Version will automatically be set to the current API version. All API tokens you create will use\nthis version by default for API requests.\n\n### Updating to new versions\n\nYou can update your account's default API version when new versions are released by visiting your [Account\nSettings](https:\/\/app.fynk.com\/account-settings\/integrations\/api), where available newer versions will be listed.\n\n> Version downgrades are not supported. Once you upgrade to a newer version, you cannot revert to an older\n> version.\n>\n> To test your integrations against a newer version of the API, without changing your account's default\n> setting, refer to the \"Overriding the Default API Version\" section on this page.\n\n### Overriding the Default API Version\n\nYou can override your account's default API version for individual requests by including the\n`Fynk-Api-Version` request header. This is useful when testing integrations against newer API versions.\n\n**Example:** If your account has its default version set to 2025-07-07 and you want to test against version\n2025-07-14, include this header:\n\n```\nFynk-Api-Version: 2025-07-14\n```\n\n**Verification:** To confirm the version used, check the `Fynk-Api-Version` header in the API response. This\nheader is included in every response and shows which version processed your request.\n\n#### Fynk-Api-Version requirements\n\n- The version must be valid and available for your account\n- The version must be the same as or newer than your account's default API version\n- Requesting an older version will be ignored, and your account's default version will be used instead\n\n**Finding available versions:** View all available API versions for your account in your [Account\nSettings](https:\/\/app.fynk.com\/account-settings\/integrations\/api).\n\n## Pagination\n\nCertain endpoints that return a list of resources support pagination. By default, these endpoints will\nreturn the first page of their result set with the resources for that page in the `data` key of the\nresponse. The response will include both a `links` object containing the URLs of other pages and a `meta`\nobject containing information about the total size of the list.\n\n```js\n{\n  \"data\": [\n    { \/* ... *\/ },\n    { \/* ... *\/ },\n  ],\n  \"links\": {\n    \"first\": \"https:\/\/app.fynk.com\/v1\/api\/documents?page=1\",\n    \"last\": \"https:\/\/app.fynk.com\/v1\/api\/documents?page=2\",\n    \"prev\": null,\n    \"next\": \"https:\/\/app.fynk.com\/v1\/api\/documents?page=2\"\n  },\n  \"meta\": {\n    \"per_page\": 10,    \/\/ maximum number of resources returned in a single page\n    \"current_page\": 1, \/\/ the page that was returned in this response\n    \"last_page\": 2,    \/\/ the last available page\n    \"from\": 1,         \/\/ index of the first item in the current page, starting from 1\n    \"to\": 10,          \/\/ index of the last item in the current page, starting from 1\n    \"total\": 17,       \/\/ total number of resources available\n    \"path\": \"https:\/\/app.fynk.com\/v1\/api\/documents\"\n  }\n}\n```\n\nTo request the next pages from the result set, you can either use the `next` link from the returned `links`\nobject or add a `page` parameter to the query string of your next request.\n\nYou may also control the size of the returned pages by including a `page_size` parameter in the query\nstring. When an endpoint supports pagination, the `page` and `page_size` parameters will be documented in\nthe _Query Parameters_ section of the endpoint's documentation.\n\n## Rate Limits\n\nRequests to the API are rate limited based on a rolling one-minute window. If an API token exceeds its rate\nlimit, requests will be rejected with a `429 Too Many Requests` response. If this happens, the response will\ninclude a `Retry-After` header indicating how many seconds you should wait before sending any more requests.\n\nThe rate limit for the current API token is returned on every response in the `X-RateLimit-Limit` HTTP\nheader. The number of remaining requests in the current window is returned in the `X-RateLimit-Remaining`\nheader.\n\n> - Some endpoints may be subject to stricter limits than the general per-minute limit.\n> - Requests made by Trial accounts may be subject to additional limits.\n\n## Webhooks\n\nWebhooks allow you to configure fynk so that it will notify your systems about events that happen in fynk.\n\n### Getting started\n\nTo setup fynk to send webhooks you'll first need a URL to receive the webhook requests. This will usually be\neither a dedicated URL on your own systems, or a URL provided by a third party system (e.g. Zapier,\nMicrosoft Teams, Slack, etc). For testing during development, you may wish to use a tool like\n[webhook.site](https:\/\/webhook.site\/) to allow you to inspect various webhook payloads.\n\nThe only requirement for the URL handler is that it returns a 20X HTTP status code when it has successfully\nprocessed a request. If it returns any other status code, fynk will consider the request failed and attempt\nto retry it later.\n\nOnce you have a URL that you would like to receive the webhook requests, go to the\n[Webhooks](https:\/\/app.fynk.com\/account-settings\/webhook-targets) page in your account settings and add a new webhook using that URL. If you\nare integrating with your own systems, you will probably want to leave the \"delivery format\" and \"signature\nlocation\" options on their default settings.\n\n> Only fynk users with the \"Owner\" role can access the Webhooks settings page.\n\nNow you will need to choose which notification types your webhook should receive. You can do this from your\naccount's [Notifications settings](https:\/\/app.fynk.com\/account-settings\/document-notifications) page, via the \"Edit\" option on the relevant\nnotification types.\n\nIf you would like different webhooks to be notified based on which template a document was created from, you\ncan override the global notification settings for a particular template by opening the template and editing\nthe settings found in its \"Template notifications\" tab.\n\nOnce you have created a webhook, and configured at least one type of notification to use it, then whenever\nan event of that type occurs, fynk will send a HTTP POST request to the webhook's URL. See the following\nsections for details of what the request payload will contain, and how you can verify it was sent\nby fynk.\n\n### Webhook delivery formats\n\n#### Default delivery format\n\nWebhooks using the \"Default\" delivery format will receive requests containing a JSON object like this:\n\n```json\n{\n  \"events\": [\n    {\n      \"uuid\": \"05113346-425d-48df-8bf2-a20037fc6fa4\",\n      \"type\": \"document.moved_to_stage.signing\",\n      \"timestamp\": \"2026-01-08T14:32:50Z\",\n      \"data\": {\n        \"document\": {\n          \"name\": \"Employment Contract\",\n          \"uuid\": \"0a4b6e64-3c4a-4973-af2c-0ec1072b2e1e\"\n        }\n      }\n    }\n  ],\n  \"timestamp\": \"2026-01-08T14:32:59Z\"\n}\n```\n\nThe top-level `events` field will contain one or more event objects. Each event in the array will have\nthese fields:\n\n| Field name | Description |\n|------------|-------------|\n| `uuid`       | Unique ID for the event |\n| `type`       | What kind of event in fynk you are being notified about. The `events` array may contain events of multiple different types |\n| `timestamp`  | When the event occurred |\n| `data`       | An object containing type-specific data about the event |\n\nThese are the possible values for the `type` field:\n\n- `document.checkpoint.approved`\n- `document.checkpoint.canceled`\n- `document.checkpoint.rejected`\n- `document.comment.created`\n- `document.signed_by_all_parties`\n- `document.moved_to_stage.signing`\n- `document.party.ready_for_signing`\n- `document.reminder.cancellation_notice_period`\n- `document.reminder.effective`\n- `document.reminder.expiring`\n- `document.reminder.renewal`\n\nWhich types of event your webhook actually receives will depend on which [Notifications](https:\/\/app.fynk.com\/account-settings\/document-notifications)\nyou configure to send to the webhook.\n\nBelow you'll find a JSON example showing the structure of each event type. Your webhook handler should parse\nthese from the `events` array in the payload.\n\n> Each example shows a single event object. The actual `events` array in a webhook delivery may contain\n> multiple events.\n\n##### document.checkpoint.approved\n\n```json\n{\n  \"uuid\": \"d445a7e7-d2b7-44c0-87ae-7be2fb2438cd\",\n  \"type\": \"document.checkpoint.approved\",\n  \"timestamp\": \"2026-01-13T12:33:53Z\",\n  \"data\": {\n    \"document\": {\n      \"name\": \"Employment Contract\",\n      \"uuid\": \"0a4b6e64-3c4a-4973-af2c-0ec1072b2e1e\"\n    },\n    \"checkpoint\": {\n      \"uuid\": \"a833571d-fffe-4b4f-b427-ac04036b56f8\",\n      \"document_stage\": \"review\"\n    }\n  }\n}\n```\n\n##### document.checkpoint.canceled\n\n```json\n{\n  \"uuid\": \"2d17653c-6bda-47e3-b51b-2664eb6c8392\",\n  \"type\": \"document.checkpoint.canceled\",\n  \"timestamp\": \"2026-01-13T12:32:44Z\",\n  \"data\": {\n    \"document\": {\n      \"name\": \"Employment Contract\",\n      \"uuid\": \"0a4b6e64-3c4a-4973-af2c-0ec1072b2e1e\"\n    },\n    \"checkpoint\": {\n      \"uuid\": \"a833571d-fffe-4b4f-b427-ac04036b56f8\",\n      \"document_stage\": \"review\"\n    }\n  }\n}\n```\n\n##### document.checkpoint.rejected\n\n```json\n{\n  \"uuid\": \"ccbbb212-d72a-4bb1-a214-db866f45baba\",\n  \"type\": \"document.checkpoint.rejected\",\n  \"timestamp\": \"2026-01-13T12:33:13Z\",\n  \"data\": {\n    \"document\": {\n      \"name\": \"Employment Contract\",\n      \"uuid\": \"0a4b6e64-3c4a-4973-af2c-0ec1072b2e1e\"\n    },\n    \"checkpoint\": {\n      \"uuid\": \"a833571d-fffe-4b4f-b427-ac04036b56f8\",\n      \"document_stage\": \"review\"\n    }\n  }\n}\n```\n\n##### document.comment.created\n\n```json\n{\n  \"uuid\": \"e8880462-bd62-4ff3-8495-6a084c059076\",\n  \"type\": \"document.comment.created\",\n  \"timestamp\": \"2026-01-13T10:30:56Z\",\n  \"data\": {\n    \"comment\": {\n      \"type\": \"comment\",\n      \"uuid\": \"089d1493-2157-4f73-8077-aa248205af79\"\n    },\n    \"document\": {\n      \"name\": \"Employement Contract\",\n      \"uuid\": \"0a4b6e64-3c4a-4973-af2c-0ec1072b2e1e\"\n    }\n  }\n}\n```\n\n##### document.signed_by_all_parties\n\n```json\n{\n  \"uuid\": \"f0c61a22-4deb-4706-8906-097c25e86ed6\",\n  \"type\": \"document.signed_by_all_parties\",\n  \"timestamp\": \"2026-01-13T11:48:33Z\",\n  \"data\": {\n    \"document\": {\n      \"name\": \"Employment Contract\",\n      \"uuid\": \"0a4b6e64-3c4a-4973-af2c-0ec1072b2e1e\"\n    }\n  }\n}\n```\n\n##### document.moved_to_stage.signing\n\n```json\n{\n  \"uuid\": \"7a425adc-4a0c-48a8-a5cb-5da162780a27\",\n  \"type\": \"document.moved_to_stage.signing\",\n  \"timestamp\": \"2026-01-12T11:46:31Z\",\n  \"data\": {\n    \"document\": {\n      \"name\": \"Employment Contract\",\n      \"uuid\": \"0a4b6e64-3c4a-4973-af2c-0ec1072b2e1e\"\n    }\n  }\n}\n```\n\n##### document.party.ready_for_signing\n\n```json\n{\n  \"uuid\": \"d2925089-ebae-4348-af1c-469760e19d54\",\n  \"type\": \"document.party.ready_for_signing\",\n  \"timestamp\": \"2026-01-13T11:52:53Z\",\n  \"data\": {\n    \"party\": {\n      \"uuid\": \"0ad899fc9-3130-45d5-9cd5-d7a0737f0ffd\",\n      \"reference\": \"Employee\",\n      \"entity_name\": \"Jane Marshall\"\n    },\n    \"document\": {\n      \"name\": \"Employment Contract\",\n      \"uuid\": \"0a4b6e64-3c4a-4973-af2c-0ec1072b2e1e\"\n    }\n  }\n}\n```\n\n##### document.reminder.cancellation_notice_period\n\n```json\n{\n  \"uuid\": \"75f4d704-8b10-4b68-8ff3-0deb4d46cfcb\",\n  \"type\": \"document.reminder.cancellation_notice_period\",\n  \"timestamp\": \"2026-01-13T06:25:15Z\",\n  \"data\": {\n    \"document\": {\n      \"name\": \"Lease - 1 Oxford Rd\",\n      \"uuid\": \"756b6deb-4c69-42d0-b416-369710dd24e9\"\n    },\n    \"reminder_about_date\": \"2026-02-13T00:00:00Z\"\n  }\n}\n```\n\n##### document.reminder.effective\n\n```json\n{\n  \"uuid\": \"90d9d243-8c5c-4995-9f1f-a3da6b8dde86\",\n  \"type\": \"document.reminder.effective\",\n  \"timestamp\": \"2026-01-13T06:36:40Z\",\n  \"data\": {\n    \"document\": {\n      \"name\": \"Lease - 1 Oxford Rd\",\n      \"uuid\": \"756b6deb-4c69-42d0-b416-369710dd24e9\"\n    },\n    \"reminder_about_date\": \"2026-02-13T00:00:00Z\"\n  }\n}\n```\n\n##### document.reminder.expiring\n\n```json\n{\n  \"uuid\": \"d1d4a218-83bb-46ab-ad8c-758043f0385f\",\n  \"type\": \"document.reminder.expiring\",\n  \"timestamp\": \"2026-01-13T06:16:29Z\",\n  \"data\": {\n    \"document\": {\n      \"name\": \"Lease - 1 Oxford Rd\",\n      \"uuid\": \"756b6deb-4c69-42d0-b416-369710dd24e9\"\n    },\n    \"reminder_about_date\": \"2026-04-13T00:00:00Z\"\n  }\n}\n```\n\n##### document.reminder.renewal\n\n```json\n{\n  \"uuid\": \"5d2e326a-e145-41e3-b23c-639ac4c58f70\",\n  \"type\": \"document.reminder.renewal\",\n  \"timestamp\": \"2026-01-13T05:45:00Z\",\n  \"data\": {\n    \"document\": {\n      \"name\": \"Lease - 1 Oxford Rd\",\n      \"uuid\": \"756b6deb-4c69-42d0-b416-369710dd24e9\"\n    },\n    \"reminder_about_date\": \"2026-02-13T00:00:00Z\"\n  }\n}\n```\n\n#### Microsoft Teams delivery format\n\nWebhooks using the \"Microsoft Teams\" delivery format are intended for use with webhooks created by following\n[these instructions for Workflows for Microsoft Teams](https:\/\/support.microsoft.com\/en-us\/office\/create-incoming-webhooks-with-workflows-for-microsoft-teams-8ae491c7-0394-4861-ba59-055e33f75498),\nusing either the \"Send webhook alerts to a channel\" or \"Send webhook alerts to a chat\" workflow template.\n\n1. Follow the instructions to setup a workflow for the channel or chat of your choice\n2. Take the URL that this gives you and create a new fynk Webhook Target using this URL. The webhook's delivery format must be set to \"Microsoft Teams\"\n3. Configure one or more [Notifications](https:\/\/app.fynk.com\/account-settings\/document-notifications) in fynk to use the new webhook\n\nWhenever your selected notifications are triggered, a message desribing the event will be posted to the\nTeams channel or chat that you selected when setting up your workflow.\n\n### Webhook request signatures\n\nWhen a webhook is created using the default settings, all requests sent to that webhook will include a\n([Standard Webhooks](https:\/\/www.standardwebhooks.com\/) compatible) signature to allow you to verify that\nthe requests you receive are really sent by fynk.\n\nfynk uses the \"Symmetric\" signature scheme described [here](https:\/\/github.com\/standard-webhooks\/standard-webhooks\/blob\/main\/spec\/standard-webhooks.md#verifying-webhook-authenticity)\nin the Standard Webhooks spec. The signing secret needed to verify received requests is unique per webhook\nand is available by visiting the Webhooks page in your account [settings](https:\/\/app.fynk.com\/account-settings\/webhook-targets).\n\nWhen a webhook uses the default signature location (\"Header\"), the request ID, signature and timestamp\nneeded for verifying the signature will be included in the headers described in the Standard Webhooks\nspecification (`webhook-id`, `webhook-signature`, `webhook-timestamp`).\n\nIf for some reason, you need to receive webhooks in an environment that does not have access to the request\nheaders - and you would still like to verify the requests' authenticity - you can instead set the webhook's\nsignature location to \"Query parameter\". When you do this, fynk will dynamically include three additional\nquery parameters in the webhook's URL: `wh_id` (the unique webhook identifier), `wh_sig` (the signature of\nthe webhook) & `wh_ts` (the webhook timestamp).\n"
    },
    "servers": [
        {
            "url": "https:\/\/app.fynk.com\/v1\/api"
        }
    ],
    "tags": [
        {
            "name": "General"
        },
        {
            "name": "Document Operations"
        },
        {
            "name": "Template Operations"
        },
        {
            "name": "File Upload Helpers"
        },
        {
            "name": "Account"
        },
        {
            "name": "Auth"
        }
    ],
    "security": [
        {
            "http": []
        }
    ],
    "paths": {
        "\/documents\/create-from-pdf": {
            "post": {
                "operationId": "v1.documents.create-from-pdf",
                "description": "<small>Requires an API token with the **Document Manager** role.<\/small>\n\nCreates a new [document](\/#documents) from a previously uploaded PDF file.\n\nThis endpoint requires a two-step upload process:\n\n1. Generate upload URL: Call the [Create document PDF upload URL](\/operations\/v1.file-uploads.document-pdf.create) endpoint to get a presigned upload URL\n2. Upload PDF: Make a POST request to the returned URL with the specified form fields, followed by the PDF file contents in a `file` field\n3. Create document: Call this endpoint with `file_upload_uuid` set to the `uuid` received in step 1\n\nThe PDF will be processed and converted into a fynk document with extractable content and signature fields.\n\nFor a complete guide with examples, see [How to create a document from a PDF file](\/#how-to-create-a-document-from-a-pdf-file).",
                "summary": "Create document from PDF",
                "tags": [
                    "General"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/CreateDocumentFromPdfRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "`DocumentDetailResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/DocumentDetailResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "$ref": "#\/components\/responses\/ChangeNotAllowedException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/documents\/create-from-template": {
            "post": {
                "operationId": "v1.documents.create-from-template",
                "description": "<small>Requires an API token with the **Document Manager** role.<\/small>\n\nCreates a new [document](\/#documents) based on the [template](\/#templates) with the given UUID.\n\n> **Note:** When a provided signatory's email corresponds to an existing user in the current fynk account,\n> the signatory will be linked to that user. Any additional fields (`first_name`, `last_name`, `mobile_phone`,\n> `title`) will be ignored and the signatory information will be populated from the existing user's profile.",
                "summary": "Create document from template",
                "tags": [
                    "General"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/CreateDocumentFromTemplateRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "`DocumentDetailResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/DocumentDetailResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/documents": {
            "get": {
                "operationId": "v1.documents.index",
                "description": "<small>Requires an API token with the **Document Reader** role.<\/small>\n\nLists the [documents](\/#documents) available in your account.\n\n## Filtering\n\nThe document list can be filtered by a number of different attributes. The available filter attributes are listed\nunder `filter` in the [Query Parameters](\/operations\/v1.documents.index#Query-Parameters) section of this page.\n\nTo specify filters, use array notation in the request query string to specify one or more `filter` values.\n\nFor example, to filter for archived documents with a name that contains the string \"Arbeitsvertrag\" and that are\nin either the `draft` or `review` stages, the query string should contain:\n\n`filter[archived]=true&filter[query]=Arbeitsvertrag&filter[stages]=draft,review`\n\n### Filtering by metadata\n\nIn addition to filtering by the static list of attributes that are documented for the `filter` query parameter,\nit is also possible to filter by the [metadata](\/#metadata) values that have been associated with your documents.\nTo do this, first use the [List Metadata](\/operations\/v1.metadata.index) endpoint to find the `name` of the\nmetadata field you would like to filter by.\n\nThen construct a filter value containing the value you would like to filter for. How exactly to do this depends\non the metadata's `value_type`. The following table shows the possible values for `value_type` and examples of\nfilter values for each type.\n\n|Value type|Example filter values|\n|----------|---------------------|\n| `number` | `123,456` (between 123 & 456), `123,123` (exactly 123), `123,` (greater than or equal to 123), `,456` (less than or equal to 456)\n| `currency` | Accepts currency code (optional) and numeric value concatenated with a semicolon. e.g. `EUR;1234.56`, `;1234.56`, `1234.56` |\n| `currency_duration` | Accepts currency code (optional), numeric value and interval (optional, one of `monthly` or `yearly`) concatenated with a semicolon. e.g. `EUR;1234.56;monthly`, `;1234.56;yearly`, `1234.56` |\n| `date` | `2025-01-01,2025-01-31` (between the given dates), `2025-01-01,2025-01-01` (on the given date), `2025-01-01,` (on or after the given date), `,2025-01-31` (on or before the given date) |\n| `timestamp` | Same as `date`, but the values may also include a time component: `2025-01-01T11:00:00Z,2025-01-31T23:59:59Z` |\n| `bool` | `true` or `false`\n| `clause` | Same as `bool`\n| `text` | `Example` (matches the value of the field exactly. e.g. `Example` will match `Example` but not `Example text`) |\n| `textarea` | Same as `text`\n| `email` | Same as `text`\n| `select` | Expects a comma-separated string of values from the metadata's `select_values`. e.g. if the field has the select values \"One\", \"Two\" and \"Three\", a filter value of `One,Two` will match any documents with the metadata set to \"One\" or \"Two\" |\n| `duration` | Accepts a PHP-compatible duration specification. e.g. `P6D` (6 days), `P2W` (2 weeks), `P1Y` (1 year), capable of ranges and exact matches (see number) |\n\nOnce you have the name of the metadata and a filter value to filter for, construct the filter parameter for the\nquery string as follows:\n\n`filter[<metadata_name>]=<filter_value>`\n\nFor example, if we have a number-type metadata called `number_of_units` and want to filter for documents where\nthis metadata has a value between 100 and 200, the query string should contain:\n\n`filter[number_of_units]=100,200`\n\n## Sorting\n\nTo specify the order that documents should be returned in, use the `sort_by` and `sort_direction` query string\nparameters.\n\nFor example, to sort by the `name` attribute in ascending order, the query string should contain:\n\n`sort_by=name&sort_direction=asc`",
                "summary": "List documents",
                "tags": [
                    "General"
                ],
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Which page of results to return",
                        "schema": {
                            "type": "string",
                            "default": "1"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "How many results to return per page. Max is `100`",
                        "schema": {
                            "type": "string",
                            "default": "10"
                        }
                    },
                    {
                        "name": "sort_by",
                        "in": "query",
                        "description": "Name of the field to sort the response by. One of: `name`, `stage`, `created_at`, `updated_at`, `archived_at`, `relevance`. In addition to these fields, a [metadata](\/operations\/v1.metadata.index) name may be given here.",
                        "schema": {
                            "type": "string",
                            "default": "updated_at"
                        }
                    },
                    {
                        "name": "sort_direction",
                        "in": "query",
                        "description": "The direction to sort results in. One of: `asc`, `desc`",
                        "schema": {
                            "type": "string",
                            "default": "desc"
                        }
                    },
                    {
                        "name": "filter[archived]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "example": "true"
                    },
                    {
                        "name": "filter[expired]",
                        "in": "query",
                        "description": "Finds documents with an expiration date in the past. Sending `false` has no effect.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "true"
                    },
                    {
                        "name": "filter[query]",
                        "in": "query",
                        "description": "Text provided here will be used to search various places in the document including the name, plaintext content, metadata, parties, etc. If `sort_by` is not provided, matching results will be returned in order of relevance.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[teams]",
                        "in": "query",
                        "description": "Comma-separated list of one or more team UUIDs to match. Matches documents that belong to **any** of the given teams.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "322cecc9-44fe-4f10-b27d-77768abfeba2"
                    },
                    {
                        "name": "filter[team_unassigned]",
                        "in": "query",
                        "description": "Finds documents that are not assigned to any team. May be combined with the `teams` filter to find documents that are in the given `teams` **or** are unassigned. Sending `false` has no effect.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "true"
                    },
                    {
                        "name": "filter[templates]",
                        "in": "query",
                        "description": "Comma-separated list of one or more [template](\/#templates) UUIDs. Matches documents created from **any** of the given templates.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "4df1e60a-0114-4dce-89e7-8c5ad397fcf2"
                    },
                    {
                        "name": "filter[document_users]",
                        "in": "query",
                        "description": "Comma-separated list of document user names to match. Each name must be in the format \"Firstname_Lastname\", with the space between the first name and last name replaced with an underscore. Matches documents with **any** of the given users involved.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "Alex_Newman"
                    },
                    {
                        "name": "filter[tags]",
                        "in": "query",
                        "description": "Comma-separated list of one or more [tag](\/operations\/v1.tags.index) UUIDs to match. The default behavior is to match documents that have **any** of the given tags.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "58ac52bb-8885-4580-88c1-7a7bc772c87d,3213a2cd-7d86-4881-a7c3-53fca9593d6a"
                    },
                    {
                        "name": "filter[tag_and]",
                        "in": "query",
                        "description": "Changes `tags` behavior to only match documents that have **all** of the given tags. Sending `false` has no effect.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "true"
                    },
                    {
                        "name": "filter[excluded_tags]",
                        "in": "query",
                        "description": "Comma-separated list of one or more [tag](\/operations\/v1.tags.index) UUIDs to exclude. Documents with **any** of these tags will be excluded from the result.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "ed8d2db3-0321-4d0d-bae9-31e43a95e6b8"
                    },
                    {
                        "name": "filter[stages]",
                        "in": "query",
                        "description": "Comma-separated list of one or more [document stages](\/schemas\/DocumentStage). Matches documents that are in **any** of the given stages.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "draft,review"
                    },
                    {
                        "name": "filter[origins]",
                        "in": "query",
                        "description": "Comma-separated list of one or more [document origins](\/schemas\/DocumentOrigin). Matches documents with **any** of the given origins.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "template,scratch"
                    },
                    {
                        "name": "filter[discussions]",
                        "in": "query",
                        "description": "Either `has_any` or `has_open`. `has_any` will find documents that have at least one discussion (regardless of current status). `has_open` will find only documents that have at least one open discussion.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "has_any"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `DocumentMinimalResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/DocumentMinimalResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/templates": {
            "get": {
                "operationId": "v1.templates.index",
                "description": "<small>Requires an API token with the **Template Reader** role.<\/small>\n\nLists the [templates](\/#templates) available in your account.\n\n## Filtering\nThe template list can be filtered by a number of different attributes. The available filter attributes are listed\nin the [Query Parameters](\/operations\/v1.templates.index#Query-Parameters) section of this page, under `filter`.\n\nTo specify filters, use array notation in the request query string to specify one or more `filter` values.\n\nFor example, to filter for archived templates with a name that contains the string \"Arbeitsvertrag\", the query\nstring should contain: `filter[archived]=true&filter[query]=Arbeitsvertrag`\n\n## Sorting\n\nTo specify the order that templates should be returned in, use the `sort_by` and `sort_direction` query string\nparameters.\n\nFor example, to sort by the `name` attribute in ascending order, the query string should contain:\n`sort_by=name&sort_direction=asc`",
                "summary": "List templates",
                "tags": [
                    "General"
                ],
                "parameters": [
                    {
                        "name": "sort_by",
                        "in": "query",
                        "description": "Name of the field to sort the response by. Default is `updated_at`",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "enum": [
                                "name",
                                "created_at",
                                "updated_at",
                                "archived_at"
                            ]
                        }
                    },
                    {
                        "name": "sort_direction",
                        "in": "query",
                        "description": "Default is `desc`",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "enum": [
                                "asc",
                                "desc"
                            ]
                        }
                    },
                    {
                        "name": "filter[archived]",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "true",
                                "false"
                            ]
                        }
                    },
                    {
                        "name": "filter[query]",
                        "in": "query",
                        "description": "`query` will be matched against the Template's name",
                        "schema": {
                            "type": "string",
                            "maxLength": 255
                        }
                    },
                    {
                        "name": "filter[locale]",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "pattern": "^[a-z]{2}(?:-[A-Z]{2})?$"
                        },
                        "example": "de-AT"
                    },
                    {
                        "name": "filter[teams]",
                        "in": "query",
                        "description": "Comma-separated list of one or more team UUIDs to match. Matches templates that belong to **any** of the given teams.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "322cecc9-44fe-4f10-b27d-77768abfeba2"
                    },
                    {
                        "name": "filter[team_unassigned]",
                        "in": "query",
                        "description": "Finds templates that not assigned to any team. May be combined with the `teams` filter to find templates that are in the given `teams` **or** are unassigned.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "true"
                            ]
                        }
                    },
                    {
                        "name": "filter[tags]",
                        "in": "query",
                        "description": "Comma-separated list of one or more [tag](\/operations\/v1.tags.index) UUIDs to match. The default behavior is to match templates that have **any** of the given tags.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "58ac52bb-8885-4580-88c1-7a7bc772c87d,3213a2cd-7d86-4881-a7c3-53fca9593d6a"
                    },
                    {
                        "name": "filter[tag_and]",
                        "in": "query",
                        "description": "Changes `tags` behavior to only match templates that have **all** of the given tags.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "true"
                            ]
                        }
                    },
                    {
                        "name": "filter[excluded_tags]",
                        "in": "query",
                        "description": "Comma-separated list of one or more [tag](\/operations\/v1.tags.index) UUIDs to exclude. Templates with **any** of these tags will be excluded from the result.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "ed8d2db3-0321-4d0d-bae9-31e43a95e6b8"
                    },
                    {
                        "name": "filter[status]",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "draft",
                                "published"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `TemplateMinimalResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/TemplateMinimalResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/documents\/{document}\/revisions\/latest\/pdf": {
            "get": {
                "operationId": "v1.documents.revisions.latest.pdf.show",
                "description": "<small>Requires an API token with the **Document Reader** role.<\/small>\n\nThis endpoint provides access to the most recent revision of a [document](\/#documents) in PDF format.\n\nThe `pdf_url` field of the response contains a temporary URL that can be used to fetch the latest revision of the\ndocument as a PDF. The URL is pre-authenticated - i.e. it can be requested without sending any additional HTTP\nheaders.\n\nNote that the `pdf_url` will expire a short time after the response is returned. If the URL has expired, this\nendpoint can be requested again to obtain a new `pdf_url`.\n\nAlternatively, the [Download latest revision PDF](\/operations\/v1.documents.revisions.latest.pdf.download) endpoint can be\nused to fetch the document PDF.",
                "summary": "Show latest revision PDF details",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`DocumentRevisionPdfResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/DocumentRevisionPdfResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/documents\/{document}\/revisions\/latest\/pdf\/download": {
            "get": {
                "operationId": "v1.documents.revisions.latest.pdf.download",
                "description": "<small>Requires an API token with the **Document Reader** role.<\/small>\n\nThis endpoint allows downloading the most recent revision of a [document](\/#documents) as a PDF. The response is\nan HTTP 302 redirect to the actual PDF content.\n\nNote that in order to download the PDF content, the HTTP client used to make the request must be configured to\nfollow redirects. e.g. if using curl on the commandline, the `-L` or `--location` option must be passed.",
                "summary": "Download latest revision PDF",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "302": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/documents\/{document}\/stage-transitions\/review": {
            "post": {
                "operationId": "v1.documents.stage-transitions.review",
                "description": "<small>Requires an API token with the **Document Manager** role.<\/small>\n\nMoves a [document](\/#documents) to the review stage in the document workflow.\n\nRequires that the document's `stage` is currently one of: `draft`, `approved_draft`, `approved_review`, `signing`\nor `done`, and that there are no [checkpoints](https:\/\/help.fynk.com\/en\/articles\/136638-checkpoints-in-fynk)\nthat would block the transition.\n\nNote that if the document is in the process of being signed, or has been signed already, moving back to review\nwill cancel the current signing process and invalidate any existing signatures.",
                "summary": "Move document to review stage",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`DocumentDetailResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/DocumentDetailResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "$ref": "#\/components\/responses\/ChangeNotAllowedException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/documents\/{document}\/stage-transitions\/signing": {
            "post": {
                "operationId": "v1.documents.stage-transitions.signing",
                "description": "<small>Requires an API token with the **Document Manager** role.<\/small>\n\nMoves a [document](\/#documents) to the signing stage in the document workflow and invites the signatories to\nsign the document.\n\nRequires that the document's `stage` is currently one of: `draft`, `approved_draft`, `review` or\n`approved_review`, and that there are no\n[checkpoints](https:\/\/help.fynk.com\/en\/articles\/136638-checkpoints-in-fynk) that would block the transition.\n\n## Conflict responses\n\nThere are a variety of conditions that may cause this request to return a `409 Conflict` response, which are not\nnecessarily under the control of the API client that is making the request. Some examples of things that would\ncause the request to fail in this way include but are not limited to:\n\n- The document being edited in fynk while the request is sent\n- A mandatory [dynamic field](\/#dynamic-fields) not having a value assigned\n- Unresolved proposed changes on the document\n- A signature block not having a [signatory](\/#signatories) assigned to it\n- A signatory not having a signature block assigned to them\n- A [party](\/#parties) involved in signing not having an `entity_name` assigned\n\nIf one of these conditions occurs, the response's `message` field will include a short explanation of the issue.\n\n## Signature type selection logic\n\nThe [signature type](\/#signature-types) used for the signing process will be decided using this priority:\n\n- If the document has a non-null `signature_type` assigned, this type will be used. The `signature_type`\n  parameter to this request may be sent, but the request will be rejected if the value sent does not match the\n  document's assigned `signature_type`.\n- If the document's `signature_type` is null and the `signature_type` parameter is sent in this request, that\n  signature type will be used.\n- If the document's `signature_type` is null and no `signature_type` parameter is sent, the **Default signature\n  type** from your fynk account's general settings will be used.",
                "summary": "Move document to signing stage",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StageTransitionToSigningRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`DocumentDetailResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/DocumentDetailResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "$ref": "#\/components\/responses\/ChangeNotAllowedException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/documents\/{document}\/stage-transitions\/done": {
            "post": {
                "operationId": "v1.documents.stage-transitions.done",
                "description": "<small>Requires an API token with the **Document Manager** role.<\/small>\n\nMoves a [document](\/#documents) to the 'done' stage in the document workflow, for documents that will not be\nsigned through fynk.\n\nRequires that the document's `stage` is currently one of: `draft`, `approved_draft`, `review` or\n`approved_review`, and that there are no [checkpoints](https:\/\/help.fynk.com\/en\/articles\/136638-checkpoints-in-fynk)\nthat would block the transition.\n\n> Transitioning to 'done' by sending this request is only necessary for documents that you do **not** intend to\n> sign through fynk. Documents that go through fynk's signing process will automatically move to the 'done' stage\n> as soon as they are fully signed.\n\n## Conflict responses\n\nThere are a variety of conditions that may cause this request to return a `409 Conflict` response, which are not\nnecessarily under the control of the API client that is making the request. Some examples of things that would\ncause the request to fail in this way include but are not limited to:\n\n- The document being edited in fynk while the request is sent\n- A mandatory [dynamic field](\/#dynamic-fields) not having a value assigned\n- Unresolved proposed changes on the document\n\nIf one of these conditions occurs, the response's `message` field will include a short explanation of the issue.",
                "summary": "Move document to done stage",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`DocumentDetailResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/DocumentDetailResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "$ref": "#\/components\/responses\/ChangeNotAllowedException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/documents\/{document}": {
            "get": {
                "operationId": "v1.documents.show",
                "description": "<small>Requires an API token with the **Document Reader** role.<\/small>\n\nShows details of a [document](\/#documents) along with any associated [dynamic fields](\/#dynamic-fields) and\n[metadata](\/#metadata) values.\n\n> Entries with the `multi_select` value type are only included in the `dynamic_fields` and `metadata_values`\n> lists if you are using API [version](\/#versioning) `2026-04-02` or newer.",
                "summary": "Show document",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`DocumentDetailResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/DocumentDetailResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            },
            "put": {
                "operationId": "v1.documents.update",
                "description": "<small>Requires an API token with the **Document Manager** role.<\/small>\n\nUpdate a [document's](\/#documents) name, its signing settings and\/or its\n[document type](\/#document-types).",
                "summary": "Update document",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateDocumentRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`DocumentDetailResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/DocumentDetailResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/documents\/{document}\/comments": {
            "get": {
                "operationId": "v1.documents.comments.index",
                "description": "<small>Requires an API token with the **Document Reader** role.<\/small>\n\nLists the comments that have been made on a [document](\/#documents).\n\n## Filtering\n\nThe comment list can be filtered by a number of different attributes. The available filter attributes are listed\nunder `filter` in the [Query Parameters](\/operations\/v1.documents.comments.index#Query-Parameters) section of\nthis page.\n\nTo specify filters, use array notation in the request query string to specify one or more `filter` values.\n\nFor example, to filter for externally-visible comments that have not been marked as resolved, the query string\nshould contain:\n\n`filter[scope]=internal_and_external&filter[resolution_status]=open`",
                "summary": "List comments",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[resolution_status]",
                        "in": "query",
                        "schema": {
                            "$ref": "#\/components\/schemas\/CommentResolutionStatusFilter"
                        }
                    },
                    {
                        "name": "filter[scope]",
                        "in": "query",
                        "schema": {
                            "$ref": "#\/components\/schemas\/Scope"
                        }
                    },
                    {
                        "name": "filter[type]",
                        "in": "query",
                        "schema": {
                            "$ref": "#\/components\/schemas\/CommentType"
                        }
                    },
                    {
                        "name": "sort_by",
                        "in": "query",
                        "description": "Name of the field to sort the response by. The default is `updated_at`.",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "enum": [
                                "created_at",
                                "updated_at"
                            ]
                        }
                    },
                    {
                        "name": "sort_direction",
                        "in": "query",
                        "description": "Default is `desc`",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "enum": [
                                "asc",
                                "desc"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `CommentResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/CommentResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/documents\/{document}\/comments\/{comment}": {
            "get": {
                "operationId": "v1.documents.comments.show",
                "description": "<small>Requires an API token with the **Document Reader** role.<\/small>\n\nReturns a single comment on a [document](\/#documents).",
                "summary": "Show comment",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "comment",
                        "in": "path",
                        "required": true,
                        "description": "The comment UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`CommentResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/CommentResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/documents\/{document}\/dynamic-fields": {
            "get": {
                "operationId": "v1.documents.dynamic-fields.index",
                "description": "<small>Requires an API token with the **Document Reader** role.<\/small>\n\nLists a [document's](\/#documents) [dynamic fields](\/#dynamic-fields) and their values.\n\n> Entries with the `multi_select` value type are only included in the response if you are using API\n> [version](\/#versioning) `2026-04-02` or newer.",
                "summary": "List document's dynamic fields",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `DynamicFieldResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/DynamicFieldResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            },
            "put": {
                "operationId": "v1.documents.dynamic-fields.bulk-update",
                "description": "<small>Requires an API token with the **Document Manager** role.<\/small>\n\nUpdates the value of one or more [dynamic fields](\/#dynamic-fields) for a [document](\/#documents).\n\nThe `values` parameter should be an object with up to 20 entries whose keys identify the document's dynamic\nfields and whose values are the new values to set. Valid identifiers to use as keys are a dynamic field's `uuid`,\n`ref_uuid` or `name`. Values should follow the same rules as described for the [update dynamic\nfield](\/operations\/v1.documents.dynamic-fields.update) request.\n\nReturns the dynamic fields that were changed by the request.",
                "summary": "Bulk update dynamic fields",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/BulkUpdateDynamicFieldRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Array of `DynamicFieldResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/DynamicFieldResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/documents\/{document}\/dynamic-fields\/{dynamicField}": {
            "put": {
                "operationId": "v1.documents.dynamic-fields.update",
                "description": "<small>Requires an API token with the **Document Manager** role.<\/small>\n\nUpdates the value of a [dynamic field](\/#dynamic-fields) for a [document](\/#documents).\n\n> Alternatively: if your use case involves updating multiple dynamic fields, and you have all the new values\n> available at once, the [bulk update dynamic fields](\/operations\/v1.documents.dynamic-fields.bulk-update) request\n> is likely to be a better fit.\n\n## Value format\n\nThe content of the `value` parameter depends on the `type` of the dynamic field. The table below lists the\navailable types and shows how values of each type should be sent.\n\n| Descriptive name | API `type` | Example values | Description |\n|------------------|------------|----------------|-------------|\n| Email | `email` | `\"user@example.com\"` | An email address. |\n| Number | `number` | `1234.56` | A numeric value. |\n| Currency | `currency` | `\"EUR;1234.56\"`, `\"EUR;1234\"` | A string containing a currency code and numeric value concatenated with a semicolon. |\n| Currency over time | `currency_duration` | `\"EUR;1234.56;monthly\"`, `\"EUR;123456;yearly\"` | A string containing a currency code, numeric value and period (one of `monthly` or `yearly`) concatenated with a semicolon. |\n| Select | `select` | `\"Blue\"` | One of the values from the field's `select_values` list. |\n| Multi-select | `multi_select` | `[\"Red\",\"Blue\"]` | Array containing one or more values from the field's `select_values` list. |\n| Date | `date` | `\"2025-12-31\"` | A date in the format \"YYYY-MM-DD\". |\n| Yes \/ No | `bool` | `true`, `false` | A boolean value. |\n| Duration | `duration` | `\"P6D\"` (6 days), `\"P2W\"` (2 weeks), `\"PT12H\"` (12 hours) | A string containing a [duration specification](https:\/\/www.php.net\/manual\/en\/dateinterval.construct.php). |\n| Text | `text` | `\"Vienna\"` | Up to 4096 characters of text. |\n| Multi-line text | `textarea` | `\"Another text value\"` | Up to 4096 characters of text. |",
                "summary": "Update dynamic field",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "dynamicField",
                        "in": "path",
                        "required": true,
                        "description": "The dynamic field UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "allOf": [
                                    {
                                        "$ref": "#\/components\/schemas\/UpdateDynamicFieldRequest"
                                    },
                                    {
                                        "type": "object",
                                        "properties": {
                                            "value": {
                                                "description": "The new value for the field",
                                                "example": "EUR;95000;yearly",
                                                "anyOf": [
                                                    {
                                                        "type": "null"
                                                    },
                                                    {
                                                        "type": "array",
                                                        "items": {}
                                                    },
                                                    {
                                                        "type": "boolean"
                                                    },
                                                    {
                                                        "type": "string"
                                                    }
                                                ]
                                            }
                                        }
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`DynamicFieldResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/DynamicFieldResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/documents\/{document}\/file-storage": {
            "get": {
                "operationId": "v1.documents.document-file-storage.index",
                "description": "<small>Requires an API token with the **Document Reader** role.<\/small>\n\nLists all files in the file storage of the given [document](\/#documents).\n\nIf you need to download the content of a stored file, see the [Show\/download stored\nfile](\/operations\/v1.documents.document-file-storage.show) request.",
                "summary": "List stored files",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `StoredFileMinimalResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/StoredFileMinimalResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            },
            "post": {
                "operationId": "v1.documents.document-file-storage.store",
                "description": "<small>Requires an API token with the **Document Manager** role.<\/small>\n\nAssociates a previously uploaded file with the [document](\/#documents) referred to by the URL.\n\nThis endpoint requires a three-step upload process:\n\n1. Generate upload URL: Call the [Create document file storage upload URL](\/operations\/v1.file-uploads.document-file-storage.create) endpoint to get a presigned upload URL\n2. Upload file: Make a POST request to the returned URL with the specified form fields, followed by the file contents in a `file` field\n3. Associate uploaded file with document: Call this endpoint with `file_upload_uuid` set to the `uuid` received in step 1\n\nThe file will be available in the file storage of the document referred to in the URL.\n\nFor a complete guide with examples, see [How to store a file in a document's file storage](\/#how-to-store-a-file-in-a-documents-file-storage).",
                "summary": "Store a file in a document's file storage",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreStoredFileRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "`StoredFileMinimalResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/StoredFileMinimalResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/documents\/{document}\/file-storage\/{storedFile}": {
            "get": {
                "operationId": "v1.documents.document-file-storage.show",
                "description": "<small>Requires an API token with the **Document Reader** role.<\/small>\n\nReturns the details of a single file in the file storage of the given [document](\/#documents).\n\nThe `download_url` field of the response contains a temporary URL that can be used to fetch the file content. The\nURL is pre-authenticated - i.e. it can be requested without sending any additional HTTP headers.\n\nNote that the `download_url` will expire a short time after the response is returned. If the URL has expired,\nthis endpoint can be requested again to obtain a new `download_url`.",
                "summary": "Show\/download stored file",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "storedFile",
                        "in": "path",
                        "required": true,
                        "description": "The stored file UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`StoredFileResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/StoredFileResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/documents\/{document}\/metadata-values": {
            "get": {
                "operationId": "v1.documents.metadata-values.index",
                "description": "<small>Requires an API token with the **Document Reader** role.<\/small>\n\nLists a [document's](\/#documents) associated [metadata](\/#metadata) values.\n\n> Entries with the `multi_select` value type are only included in the response if you are using API\n> [version](\/#versioning) `2026-04-02` or newer.",
                "summary": "List document's metadata values",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `MetadataValueResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/MetadataValueResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            },
            "post": {
                "operationId": "v1.documents.metadata-values.store",
                "description": "<small>Requires an API token with the **Document Manager** role.<\/small>\n\nAdds a [metadata](\/#metadata) field to a [document](\/#documents) and optionally sets its value.\n\n> Alternatively: if your use case involves setting values for multiple metadata fields, and you have all the new\n> values available at once, the [bulk update metadata values](\/operations\/v1.documents.metadata-values.bulk-update)\n> request is likely to be a better fit.\n\n## Value format\n\nThe content of the `value` parameter depends on the `value_type` of the metadata. The table below lists the\navailable types and shows how values of each type should be sent.\n\n| Descriptive name | API `type` | Example values | Description |\n|------------------|------------|----------------|-------------|\n| Email | `email` | `\"user@example.com\"` | An email address. |\n| Number | `number` | `1234.56` | A numeric value. |\n| Currency | `currency` | `\"EUR;1234.56\"`, `\"EUR;1234\"` | A string containing a currency code and numeric value concatenated with a semicolon. |\n| Currency over time | `currency_duration` | `\"EUR;1234.56;monthly\"`, `\"EUR;123456;yearly\"` | A string containing a currency code, numeric value and period (one of `monthly` or `yearly`) concatenated with a semicolon. |\n| Select | `select` | `\"Blue\"` | One of the values from the field's `select_values` list. |\n| Multi-select | `multi_select` | `[\"Red\",\"Blue\"]` | Array containing one or more values from the field's `select_values` list. |\n| Date | `date` | `\"2025-12-31\"` | A date in the format \"YYYY-MM-DD\". |\n| Yes \/ No | `bool` | `true`, `false` | A boolean value. |\n| Duration | `duration` | `\"P6D\"` (6 days), `\"P2W\"` (2 weeks), `\"PT12H\"` (12 hours) | A string containing a [duration specification](https:\/\/www.php.net\/manual\/en\/dateinterval.construct.php). |\n| Text | `text` | `\"Vienna\"` | Up to 4096 characters of text. |\n| Multi-line text | `textarea` | `\"Dublin\"` | Up to 4096 characters of text. |\n| Timestamp | `timestamp` | `\"2025-06-02T14:30:00+00:00\"` | A date\/time value. |\n| Clause | `clause` | `true`, `false` | Indicates presence of a particular clause in the document. |",
                "summary": "Add metadata value to document",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "allOf": [
                                    {
                                        "$ref": "#\/components\/schemas\/StoreMetadataValueRequest"
                                    },
                                    {
                                        "type": "object",
                                        "properties": {
                                            "metadata_uuid": {
                                                "type": "string",
                                                "description": "UUID of the metadata to add a value for",
                                                "example": "7dae3dad-e56d-45e9-86e5-b69dc30597dc"
                                            },
                                            "value": {
                                                "description": "The new value for the field",
                                                "example": "EUR;95000;yearly",
                                                "anyOf": [
                                                    {
                                                        "type": "null"
                                                    },
                                                    {
                                                        "type": "array",
                                                        "items": {}
                                                    },
                                                    {
                                                        "type": "boolean"
                                                    },
                                                    {
                                                        "type": "string"
                                                    }
                                                ]
                                            }
                                        }
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "`MetadataValueResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/MetadataValueResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            },
            "put": {
                "operationId": "v1.documents.metadata-values.bulk-update",
                "description": "<small>Requires an API token with the **Document Manager** role.<\/small>\n\nSets or removes the values of one or more [metadata](\/#metadata) fields for a [document](\/#documents) in a single\nrequest.\n\nThe `changes` parameter is a list of up to 20 objects, each identifying a metadata by its `uuid` or `name`, and\nspecifying an `operation`:\n\n- `set`: adds the metadata to the document (if not already present) and sets its `value`. The `value` follows the\n  same format as the [Add metadata value to document](\/operations\/v1.documents.metadata-values.store) endpoint.\n- `unset`: removes the document's value for the metadata, equivalent to the [Delete metadata\n  value](\/operations\/v1.documents.metadata-values.destroy) endpoint.\n\nReturns the metadata values that were set; metadata values that were unset are not included in the response.",
                "summary": "Bulk update metadata values",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/BulkUpdateMetadataValueRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Array of `MetadataValueResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/MetadataValueResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/documents\/{document}\/metadata-values\/{metadataValue}": {
            "put": {
                "operationId": "v1.documents.metadata-values.update",
                "description": "<small>Requires an API token with the **Document Manager** role.<\/small>\n\nUpdates the value of a [metadata](\/#metadata) field for a [document](\/#documents).\n\n> Alternatively: if your use case involves updating multiple metadata fields, and you have all the new values\n> available at once, the [bulk update metadata values](\/operations\/v1.documents.metadata-values.bulk-update)\n> request is likely to be a better fit.\n\n## Value format\n\nThe content of the `value` parameter must follow the same rules as described in the [Add metadata value to\ndocument](\/operations\/v1.documents.metadata-values.store) documentation.",
                "summary": "Update metadata value",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "metadataValue",
                        "in": "path",
                        "required": true,
                        "description": "The metadata value UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "allOf": [
                                    {
                                        "$ref": "#\/components\/schemas\/UpdateMetadataValueRequest"
                                    },
                                    {
                                        "type": "object",
                                        "properties": {
                                            "value": {
                                                "description": "The new value for the field",
                                                "example": "EUR;95000;yearly",
                                                "anyOf": [
                                                    {
                                                        "type": "null"
                                                    },
                                                    {
                                                        "type": "array",
                                                        "items": {}
                                                    },
                                                    {
                                                        "type": "boolean"
                                                    },
                                                    {
                                                        "type": "string"
                                                    }
                                                ]
                                            }
                                        }
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`MetadataValueResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/MetadataValueResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            },
            "delete": {
                "operationId": "v1.documents.metadata-values.destroy",
                "description": "<small>Requires an API token with the **Document Manager** role.<\/small>\n\nRemoves the value of a [metadata](\/#metadata) field from a [document](\/#documents).\n\nIf the metadata `always_exists`, it will just be unattached from the document and reset to its default value. For\nall other metadata, the value will be deleted.\n\n> Alternatively: if your use case involves removing the values of multiple metadata fields at once, the [bulk\n> update metadata values](\/operations\/v1.documents.metadata-values.bulk-update) request is likely to be a better\n> fit.",
                "summary": "Delete metadata value",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "metadataValue",
                        "in": "path",
                        "required": true,
                        "description": "The metadata value UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/documents\/{document}\/parties": {
            "get": {
                "operationId": "v1.documents.parties.index",
                "description": "<small>Requires an API token with the **Document Reader** role.<\/small>\n\nLists a [document's](\/#documents) [parties](\/#parties).\n\nSee the [Managing parties](\/#managing-parties) guide for information on working with parties.",
                "summary": "List parties",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `DocumentPartyResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/DocumentPartyResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            },
            "post": {
                "operationId": "v1.documents.parties.store",
                "description": "<small>Requires an API token with the **Document Manager** role.<\/small>\n\nAdds a [party](\/#parties) to a [document](\/#documents).\n\n## Adding an internal party\n\nTo add one of your account's internal parties to the document, send the `account_party_uuid` and `reference`\nfields. The rest of the party data will be copied from the respective \"account party\".\n\n## Adding an external party\n\nTo add an external party to the document, send these fields:\n\n- `reference`\n- `entity_name`\n- `address`\n- `scope`\n\n> **Note:** When adding a party that is linked to an account party, only `reference` can be provided. Attempting\n> to set the other fields will cause the request to be rejected with a validation error.",
                "summary": "Add party",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StorePartyRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`DocumentPartyResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/DocumentPartyResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "$ref": "#\/components\/responses\/ChangeNotAllowedException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/documents\/{document}\/parties\/{party}": {
            "put": {
                "operationId": "v1.documents.parties.update",
                "description": "<small>Requires an API token with the **Document Manager** role.<\/small>\n\nUpdates the details of a [party](\/#parties) on a [document](\/#documents).\n\n> **Note:** When updating a party that is linked to an account party (where `is_internal_party` is `true`), only\n> `reference` can be updated. Attempting to update other fields will cause the request to be rejected with a\n> validation error.",
                "summary": "Update party",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "party",
                        "in": "path",
                        "required": true,
                        "description": "The party UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdatePartyRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`DocumentPartyResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/DocumentPartyResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "$ref": "#\/components\/responses\/ChangeNotAllowedException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/documents\/{document}\/users": {
            "get": {
                "operationId": "v1.documents.users.index",
                "description": "<small>Requires an API token with the **Document Reader** role.<\/small>\n\nLists a [document's](\/#documents) [document users](\/#document-users) - everyone who has access to the\ndocument, each with their access level (`role`). Users who are also [signatories](\/#signatories) appear here\nwith `is_signatory` set to `true`; their signing details are available via the\n[List signatories](\/operations\/v1.documents.signatories.index) endpoint.",
                "summary": "List document users",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "role",
                        "in": "query",
                        "description": "Only return document users with this role",
                        "schema": {
                            "$ref": "#\/components\/schemas\/DocumentUserAccessRole"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `DocumentUserResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/DocumentUserResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            },
            "post": {
                "operationId": "v1.documents.users.store",
                "description": "<small>Requires an API token with the **Document Manager** role.<\/small>\n\nGives a person access to a [document](\/#documents) with the specified access level (`role`). By default the\nuser receives an invitation email for the document; pass `invite_method` to instead create a [personal\nlink](\/#shareable-links) for them (returned in the response's `personal_link` field) or to add them\nsilently.\n\nWith `fynk_email`, the invitation email to a user without a fynk account user in your account carries the\ndocument's default text for external collaborator invitations, if one is set on the document or inherited from\nits template. This text is configured in fynk and is not part of the API.\n\n> **Note:** When adding a user whose email corresponds to an existing user in the current fynk account, only\n> `email` and `role` are used. Any additional fields (`first_name`, `last_name`, `title`) will be ignored and\n> the user's information will be populated from their existing profile. Only such users can be given the\n> `owner` role, and they cannot be added with the `personal_link` invite method.\n\n> **Note:** Users without a fynk account user in your account cannot be added while the document is in the\n> `draft` or `approved_draft` stage, regardless of the invite method. Attempting to do so will return a `409`\n> response.\n\nIf the email address already belongs to a document user on this document, the request will be rejected with a\nvalidation error - use the [Update document user](\/operations\/v1.documents.users.update) endpoint to change\ntheir access level instead. This includes [signatories](\/#signatories), who always appear as document users\nas well.",
                "summary": "Add document user",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreDocumentUserRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "`DocumentUserResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/DocumentUserResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "$ref": "#\/components\/responses\/ChangeNotAllowedException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/documents\/{document}\/users\/{documentUser}": {
            "put": {
                "operationId": "v1.documents.users.update",
                "description": "<small>Requires an API token with the **Document Manager** role.<\/small>\n\nUpdates a [document user's](\/#document-users) details and\/or access level (`role`).\n\nChanging the `role` never affects the user's [signatory](\/#signatories) status - a signatory who is demoted\nto `viewer` remains a signatory. Use the signatory endpoints to manage signing.\n\n> **Note:** When updating a user who has an existing user in the current fynk account (`has_account_user` is\n> `true`), only `role` and `party_uuid` can be updated. Attempting to update other fields (`first_name`,\n> `last_name`, `title`) will cause the request to be rejected with a validation error.\n\nA document must always have at least one `owner`; demoting the last owner will return a `409` response.",
                "summary": "Update document user",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "documentUser",
                        "in": "path",
                        "required": true,
                        "description": "The document user UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateDocumentUserRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`DocumentUserResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/DocumentUserResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "$ref": "#\/components\/responses\/ChangeNotAllowedException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            },
            "delete": {
                "operationId": "v1.documents.users.destroy",
                "description": "<small>Requires an API token with the **Document Manager** role.<\/small>\n\nRemoves a [document user](\/#document-users) from a [document](\/#documents) entirely, revoking their access.\n\n> **Note:** This also removes the user's [signatory](\/#signatories) status, if any. To only remove a user\n> from signing while keeping their access to the document, use the\n> [Remove signatory](\/operations\/v1.documents.signatories.destroy) endpoint instead.\n\nA document must always have at least one `owner`; removing the last owner will return a `409` response.",
                "summary": "Remove document user",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "documentUser",
                        "in": "path",
                        "required": true,
                        "description": "The document user UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "409": {
                        "$ref": "#\/components\/responses\/ChangeNotAllowedException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/documents\/{document}\/users\/{documentUser}\/personal-link": {
            "get": {
                "operationId": "v1.documents.users.personal-link.show",
                "description": "<small>Requires an API token with the **Document Reader** role.<\/small>\n\nReturns the [document user's](\/#document-users) active [personal link](\/#shareable-links), if there is one.\nA document user has at most one active personal link at a time.\n\nReturns a `404` response when the user has no active personal link, including when a previous link has\nexpired or was deleted.",
                "summary": "Show personal link",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "documentUser",
                        "in": "path",
                        "required": true,
                        "description": "The document user UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`ShareableLinkResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ShareableLinkResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            },
            "post": {
                "operationId": "v1.documents.users.personal-link.store",
                "description": "<small>Requires an API token with the **Document Manager** role.<\/small>\n\nCreates a [personal link](\/#shareable-links) tied to the [document user](\/#document-users). Anyone who has\nthe link URL can access the document as that user, so treat the URL like a secret. Delivering the link to\nthe user is up to you; fynk sends no email.\n\nA document user has at most one active personal link at a time; if one already exists, a `409` response is\nreturned. Delete the existing link first to create a new one with a fresh URL.\n\n> **Note:** Personal links can only be created for users without a fynk account user in your account\n> (`has_account_user` is `false`), and not while the document is in the `draft` or `approved_draft` stage.\n> Attempting either will return a `409` response.",
                "summary": "Create personal link",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "documentUser",
                        "in": "path",
                        "required": true,
                        "description": "The document user UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StorePersonalLinkRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "`ShareableLinkResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ShareableLinkResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "$ref": "#\/components\/responses\/ShareableLinkChangeNotAllowedException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            },
            "patch": {
                "operationId": "v1.documents.users.personal-link.update",
                "description": "<small>Requires an API token with the **Document Manager** role.<\/small>\n\nUpdates the [document user's](\/#document-users) active [personal link](\/#shareable-links). The link URL\nnever changes; to get a fresh URL, delete the link and create a new one.\n\nReturns a `404` response when the user has no active personal link.",
                "summary": "Update personal link",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "documentUser",
                        "in": "path",
                        "required": true,
                        "description": "The document user UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdatePersonalLinkRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`ShareableLinkResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ShareableLinkResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            },
            "delete": {
                "operationId": "v1.documents.users.personal-link.destroy",
                "description": "<small>Requires an API token with the **Document Manager** role.<\/small>\n\nDeletes the [document user's](\/#document-users) active [personal link](\/#shareable-links), revoking access\nfor everyone who has the URL. The user themselves is not removed from the document; use the [Remove document\nuser](\/operations\/v1.documents.users.destroy) endpoint for that.\n\nReturns a `404` response when the user has no active personal link.",
                "summary": "Delete personal link",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "documentUser",
                        "in": "path",
                        "required": true,
                        "description": "The document user UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/documents\/{document}\/public-link": {
            "get": {
                "operationId": "v1.documents.public-link.show",
                "description": "<small>Requires an API token with the **Document Reader** role.<\/small>\n\nReturns the [document's](\/#documents) active [public link](\/#shareable-links), if there is one. A document\nhas at most one active public link at a time.\n\nReturns a `404` response when the document has no active public link, including when a previous link has\nexpired or was deleted.",
                "summary": "Show public link",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`ShareableLinkResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ShareableLinkResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            },
            "post": {
                "operationId": "v1.documents.public-link.store",
                "description": "<small>Requires an API token with the **Document Manager** role.<\/small>\n\nCreates a [public link](\/#shareable-links) for the [document](\/#documents). Anyone who has the link URL can\nview the document with it, so treat the URL like a secret.\n\nA document has at most one active public link at a time; if one already exists, a `409` response is\nreturned. Delete the existing link first to create a new one with a fresh URL.\n\n> **Note:** Public links cannot be created while the document is in the `draft` or `approved_draft` stage.\n> Attempting to do so will return a `409` response.",
                "summary": "Create public link",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StorePublicLinkRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "`ShareableLinkResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ShareableLinkResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "$ref": "#\/components\/responses\/ShareableLinkChangeNotAllowedException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            },
            "patch": {
                "operationId": "v1.documents.public-link.update",
                "description": "<small>Requires an API token with the **Document Manager** role.<\/small>\n\nUpdates the [document's](\/#documents) active [public link](\/#shareable-links). The link URL never changes;\nto get a fresh URL, delete the link and create a new one.\n\nReturns a `404` response when the document has no active public link.",
                "summary": "Update public link",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdatePublicLinkRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`ShareableLinkResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ShareableLinkResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            },
            "delete": {
                "operationId": "v1.documents.public-link.destroy",
                "description": "<small>Requires an API token with the **Document Manager** role.<\/small>\n\nDeletes the [document's](\/#documents) active [public link](\/#shareable-links), revoking access for everyone\nwho has the URL.\n\nReturns a `404` response when the document has no active public link.",
                "summary": "Delete public link",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/documents\/{document}\/signatories\/order": {
            "put": {
                "operationId": "v1.documents.signatories.order",
                "description": "<small>Requires an API token with the **Document Manager** role.<\/small>\n\nSet the order in which signatures will be collected from the document's [signatories](\/#signatories).\n\nFor this to have an effect, this request must be made before moving the document to the\n[signing stage](\/operations\/v1.documents.stage-transitions.signing), and signing must be started with the\n`sequential_signing` option enabled.",
                "summary": "Set signing order",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/SyncSigningOrderRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Array of `SignatoryResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/SignatoryResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/documents\/{document}\/signatories": {
            "get": {
                "operationId": "v1.documents.signatories.index",
                "description": "<small>Requires an API token with the **Document Reader** role.<\/small>\n\nLists a [document's](\/#documents) [signatories](\/#signatories).\n\nSee the [Assign a signatory](\/#assign-a-signatory) guide for information on working with signatories.",
                "summary": "List signatories",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `SignatoryResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/SignatoryResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            },
            "post": {
                "operationId": "v1.documents.signatories.store",
                "description": "<small>Requires an API token with the **Document Manager** role.<\/small>\n\nAdds a [signatory](\/#signatories) to a [document](\/#documents).\n\n> **Note:** When adding a signatory whose email corresponds to an existing user in the current fynk account,\n> only `party_uuid` and `email` are required. Any additional fields (`first_name`, `last_name`, `mobile_phone`,\n> `title`) will be ignored and the signatory information will be populated from the existing user's profile.",
                "summary": "Add signatory",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreSignatoryRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "`SignatoryResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/SignatoryResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "$ref": "#\/components\/responses\/ChangeNotAllowedException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/documents\/{document}\/signatories\/{signatory}": {
            "put": {
                "operationId": "v1.documents.signatories.update",
                "description": "<small>Requires an API token with the **Document Manager** role.<\/small>\n\nUpdates the details of a [signatory](\/#signatories) on a [document](\/#documents).\n\n> **Note:** When updating a signatory who has an existing user in the current fynk account\n> (`has_account_user` is `true`), only `party_uuid` and `mobile_phone` can be updated.\n> Attempting to update other fields (`first_name`, `last_name`, `title`) will cause\n> the request to be rejected with a validation error.",
                "summary": "Update signatory",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "signatory",
                        "in": "path",
                        "required": true,
                        "description": "The signatory UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateSignatoryRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`SignatoryResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/SignatoryResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "$ref": "#\/components\/responses\/ChangeNotAllowedException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            },
            "delete": {
                "operationId": "v1.documents.signatories.destroy",
                "description": "<small>Requires an API token with the **Document Manager** role.<\/small>\n\nRemoves a [signatory](\/#signatories) from a [document](\/#documents).",
                "summary": "Remove signatory",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "signatory",
                        "in": "path",
                        "required": true,
                        "description": "The signatory UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "409": {
                        "$ref": "#\/components\/responses\/ChangeNotAllowedException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/documents\/{document}\/linked-documents": {
            "get": {
                "operationId": "v1.documents.linked-documents.index",
                "description": "<small>Requires an API token with the **Document Reader** role.<\/small>\n\n[Documents](\/#documents) may be linked in various kinds of relationships. See the [Link\ndocuments](\/operations\/v1.documents.linked-documents.store) documentation for an overview of the possible types\nof relationship.\n\nThis endpoint returns the currently configured relationships between the document specified by the URL and any\nother documents.",
                "summary": "List linked documents",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `DocumentRelationshipResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/DocumentRelationshipResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            },
            "post": {
                "operationId": "v1.documents.linked-documents.store",
                "description": "<small>Requires an API token with the **Document Manager** role.<\/small>\n\nCreates a relationship between the [document](\/#documents) referred to by the URL and another document. Allows\nrepresenting relationships such as parent-child, amendment, renewal, etc. between documents.\n\nThe values that are sent in the request body will be normalised to create a \"document relationship\" where one\nof the documents is the \"controller document\" and the other is the \"peripheral document\". The resulting\nnormalised relationship type will be one of the values defined in the\n[DocumentRelationshipType](\/schemas\/DocumentRelationshipType) enum. The normalised form of the relationship is\nwhat is returned in the response.\n\nThe following table shows how the different relationship types will be normalised and which role each of the\ndocuments will end up playing in the resulting relationship:\n\n| Request `relationship_type` | Normalised type | URL document's role | Other document's role |\n|---------------------|-----------------|-------------------|---------------------|\n| `parent_of` | `parent` | controller_document | peripheral_document |\n| `child_of` | `parent` | peripheral_document | controller_document |\n| `amendment_to` | `amendment` | controller_document | peripheral_document |\n| `amended_by` | `amendment` | peripheral_document | controller_document |\n| `renewal_of` | `renewal` | controller_document | peripheral_document |\n| `renewed_by` | `renewal` | peripheral_document | controller_document |\n| `addition_to` | `addition` | controller_document | peripheral_document |\n| `added_to_by` | `addition` | peripheral_document | controller_document |\n| `replacement_of` | `replacement` | controller_document | peripheral_document |\n| `replaced_by` | `replacement` | peripheral_document | controller_document |\n| `termination_of` | `termination` | controller_document | peripheral_document |\n| `terminated_by` | `termination` | peripheral_document | controller_document |",
                "summary": "Link documents",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreDocumentRelationshipRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "`DocumentRelationshipResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/DocumentRelationshipResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/documents\/{document}\/linked-documents\/{documentRelationship}": {
            "delete": {
                "operationId": "v1.documents.linked-documents.destroy",
                "description": "<small>Requires an API token with the **Document Manager** role.<\/small>\n\nRemoves a relationship between [documents](\/#documents).\n\nThe `documentRelationship` parameter in the URL should be set to the UUID of one of the relationships returned\nby the [List linked documents](\/operations\/v1.documents.linked-documents.index) request.",
                "summary": "Unlink documents",
                "tags": [
                    "Document Operations"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "documentRelationship",
                        "in": "path",
                        "required": true,
                        "description": "The document relationship UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/templates\/{template}": {
            "get": {
                "operationId": "v1.templates.show",
                "description": "<small>Requires an API token with the **Template Reader** role.<\/small>\n\nShows details of a single [template](\/#templates).\n\n> Entries with the `multi_select` value type are only included in the `dynamic_fields` and `metadata_values`\n> lists if you are using API [version](\/#versioning) `2026-04-02` or newer.",
                "summary": "Show template",
                "tags": [
                    "Template Operations"
                ],
                "parameters": [
                    {
                        "name": "template",
                        "in": "path",
                        "required": true,
                        "description": "The template UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`TemplateDetailResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/TemplateDetailResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/global-templates\/{template}": {
            "get": {
                "operationId": "v1.global-templates.show",
                "description": "<small>Requires an API token with one of the following roles: **Template Reader** or **Template Manager**.<\/small>\n\nShows details of a single global template. Global templates are system-wide templates that can be cloned into\nyour account using the [clone endpoint](\/operations\/v1.global-templates.clone).\n\nTo use a global template, you must first clone it into your account, then create documents from the cloned\ntemplate using the existing [create document from template](\/operations\/v1.documents.create-from-template)\nendpoint.",
                "summary": "Show global template",
                "tags": [
                    "Template Operations"
                ],
                "parameters": [
                    {
                        "name": "template",
                        "in": "path",
                        "required": true,
                        "description": "The template UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`GlobalTemplateDetailResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/GlobalTemplateDetailResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/global-templates\/clone": {
            "post": {
                "operationId": "v1.global-templates.clone",
                "description": "<small>Requires an API token with the **Template Manager** role.<\/small>\n\nClones a global template into your account. The cloned template will be published by default so that you can\nimmediately create documents from it using the\n[create document from template](\/operations\/v1.documents.create-from-template) endpoint.\n\nThe `terms_confirmed` field must be set to `true` to acknowledge that you have read and accepted the terms\nassociated with the global template (such as author attribution and licensing requirements).",
                "summary": "Clone global template",
                "tags": [
                    "Template Operations"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/CloneGlobalTemplateRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "`TemplateMinimalResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/TemplateMinimalResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/file-uploads\/document-pdf": {
            "post": {
                "operationId": "v1.file-uploads.document-pdf.create",
                "description": "<small>Requires an API token with the **Document Manager** role.<\/small>\n\nGenerates a presigned URL for securely uploading a PDF file to cloud storage. The uploaded PDF can then be used\nto create a document via the [Create document from PDF](\/operations\/v1.documents.create-from-pdf) endpoint.\n\nThe returned URL expires after a limited time and should be used immediately for upload. Upload the PDF file\nwith a POST request to the returned URL, sending the provided `fields` as form fields in the request body,\nfollowed by the file contents in a `file` field.\n\nFor a complete guide with examples, see [How to create a document from a PDF file](\/#how-to-create-a-document-from-a-pdf-file).",
                "summary": "Create document PDF upload URL",
                "tags": [
                    "File Upload Helpers"
                ],
                "responses": {
                    "201": {
                        "description": "`SignedUploadUrlResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/SignedUploadUrlResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/file-uploads\/document-file-storage": {
            "post": {
                "operationId": "v1.file-uploads.document-file-storage.create",
                "description": "<small>Requires an API token with the **Document Manager** role.<\/small>\n\nGenerates a presigned URL for securely uploading a file to cloud storage. The uploaded file can then be associated with a  document via the [Store a PDF file in a document's file storage](\/operations\/v1.documents.document-file-storage.store) endpoint.\n\nThe returned URL expires after a limited time and should be used immediately for upload. Upload the file with a\nPOST request to the returned URL, sending the provided `fields` as form fields in the request body, followed by\nthe file contents in a `file` field.\n\nThe request accepts a `content_type` string matching one of the rows below, or any `image\/*` MIME type.\n\n| File type              | `content_type`                                                            |\n|------------------------|---------------------------------------------------------------------------|\n| CSV                    | application\/csv, text\/csv                                                 |\n| MS Word (.doc)         | application\/msword                                                        |\n| MS Word (.docx)        | application\/vnd.openxmlformats-officedocument.wordprocessingml.document   |\n| PDF                    | application\/pdf                                                           |\n| RTF                    | application\/rtf                                                           |\n| Excel (.xls)           | application\/vnd.ms-excel                                                  |\n| Excel (.xlsx)          | application\/vnd.openxmlformats-officedocument.spreadsheetml.sheet         |\n| Outlook message (.msg) | application\/vnd.ms-outlook                                                |\n| EML                    | message\/rfc822                                                            |\n| PowerPoint (.ppt)      | application\/vnd.ms-powerpoint                                             |\n| PowerPoint (.pptx)     | application\/vnd.openxmlformats-officedocument.presentationml.presentation |\n| XML                    | application\/xml, text\/xml                                                 |\n| Plain text (.txt)      | text\/plain                                                                |\n| ZIP                    | application\/zip, application\/x-zip, application\/x-zip-compressed          |\n| Images                 | image\/* (e.g. image\/png, image\/jpeg, image\/gif)                           |\n\nFor a complete guide with examples, see [How to store a file in a document's file storage](\/#how-to-store-a-file-in-a-documents-file-storage).",
                "summary": "Create document file storage upload URL",
                "tags": [
                    "File Upload Helpers"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/CreateDocumentFileStorageUploadUrlRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "`SignedUploadUrlResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/SignedUploadUrlResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/document-types": {
            "get": {
                "operationId": "v1.document-types.index",
                "description": "<small>Requires an API token with one of the following roles: **Document Manager** or **Metadata Manager**.<\/small>\n\nLists the [document types](\/#document-types) available in your account, including fynk's system-provided types\nand any custom types defined for your account.\n\nUse the returned `uuid` values when populating `relevant_document_type_uuids` on a [metadata](\/#metadata) field\ndefinition.",
                "summary": "List document types",
                "tags": [
                    "Account"
                ],
                "responses": {
                    "200": {
                        "description": "Array of `DocumentTypeResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/DocumentTypeResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/metadata": {
            "get": {
                "operationId": "v1.metadata.index",
                "description": "<small>Requires an API token with one of the following roles: **Document Reader**, **Document Manager**, **Template Reader**, or **Metadata Manager**.<\/small>\n\nLists available [metadata](\/#metadata) fields that help you enrich your [documents](\/#documents).\n\n## Metadata Types\n\nEach metadata has an associated `type` that defines where its value comes from and what actions can be taken on\nit.\n\n| Type | Description |\n|------|------------ |\n| `account` | Custom metadata fields that are specific to your account. |\n| `system_reference` | Pre-defined useful metadata fields provided by fynk.  |\n| `system_autofilled` | Fields that are automatically filled by the system in response to events, like \"Signing completion date\". |\n| `system_computed` | Fields that are calculated by the system based on other metadata values. e.g. \"Signing duration\" is the difference between \"Signing date\" and \"Signed date\"\n| `system` | Other system-provided metadata fields. |\n\nNote that the `type` is distinct from the `value_type`, which controls which kinds of values may be stored in the\nfield.\n\n> Entries with the `multi_select` value type are only included in the response if you are using API\n> [version](\/#versioning) `2026-04-02` or newer.",
                "summary": "List metadata",
                "tags": [
                    "Account"
                ],
                "responses": {
                    "200": {
                        "description": "Array of `MetadataResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/MetadataResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            },
            "post": {
                "operationId": "v1.metadata.store",
                "description": "<small>Requires an API token with the **Metadata Manager** role.<\/small>\n\nCreates a new account-level [metadata](\/#metadata) field definition.\n\nNote that the `name` and `value_type` sent in this request are fixed at the time of creation and cannot be\nchanged later.",
                "summary": "Create metadata",
                "tags": [
                    "Account"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreMetadataRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "`MetadataResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/MetadataResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/metadata\/{metadata}": {
            "put": {
                "operationId": "v1.metadata.update",
                "description": "<small>Requires an API token with the **Metadata Manager** role.<\/small>\n\nUpdates an account-level [metadata](\/#metadata) field definition.\n\nOnly account-level metadata fields can be updated; system metadata is read-only.\n\nNote that while a metadata's `name` and `value_type` cannot be changed, the `display_name` may be updated via\nthis request.\n\nReturns a `409 Conflict` if a bulk metadata management operation is currently in progress for this metadata\nfield.",
                "summary": "Update metadata",
                "tags": [
                    "Account"
                ],
                "parameters": [
                    {
                        "name": "metadata",
                        "in": "path",
                        "required": true,
                        "description": "The metadata UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateMetadataRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`MetadataResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/MetadataResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            },
            "delete": {
                "operationId": "v1.metadata.destroy",
                "description": "<small>Requires an API token with the **Metadata Manager** role.<\/small>\n\nDeletes an account-level [metadata](\/#metadata) field definition. All metadata values stored on documents for\nthis field are also removed.\n\nOnly account-level metadata fields can be deleted; system metadata cannot be removed.\n\nReturns a `409 Conflict` if a bulk metadata management operation is currently in progress for this metadata\nfield.",
                "summary": "Delete metadata",
                "tags": [
                    "Account"
                ],
                "parameters": [
                    {
                        "name": "metadata",
                        "in": "path",
                        "required": true,
                        "description": "The metadata UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/tags": {
            "get": {
                "operationId": "v1.tags.index",
                "description": "<small>Requires an API token with one of the following roles: **Document Reader**, **Template Reader**, or **Tag Manager**.<\/small>\n\nLists the tags defined for your account.\n\nTags are simple labels that can be assigned to [documents](\/#documents) and [templates](\/#templates).\n\n## Sorting\n\nTo specify the order that tags should be returned in, use the `sort_by` and `sort_direction` query string\nparameters.\n\nFor example, to sort by the `name` attribute in descending order, the query string should contain:\n`sort_by=name&sort_direction=desc`",
                "summary": "List tags",
                "tags": [
                    "Account"
                ],
                "parameters": [
                    {
                        "name": "sort_by",
                        "in": "query",
                        "description": "Name of the field to sort the response by. Default is `name`",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "enum": [
                                "name"
                            ]
                        }
                    },
                    {
                        "name": "sort_direction",
                        "in": "query",
                        "description": "Default is `asc`",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "enum": [
                                "asc",
                                "desc"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `TagResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/TagResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            },
            "post": {
                "operationId": "v1.tags.store",
                "description": "<small>Requires an API token with the **Tag Manager** role.<\/small>\n\nCreates a new tag in your account.\n\nTags are simple labels that can be assigned to [documents](\/#documents) and [templates](\/#templates).",
                "summary": "Create tag",
                "tags": [
                    "Account"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreTagRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "`TagResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/TagResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/tags\/{tag}": {
            "put": {
                "operationId": "v1.tags.update",
                "description": "<small>Requires an API token with the **Tag Manager** role.<\/small>\n\nUpdates the details of a tag in your account.\n\nTags are simple labels that can be assigned to [documents](\/#documents) and [templates](\/#templates).",
                "summary": "Update tag",
                "tags": [
                    "Account"
                ],
                "parameters": [
                    {
                        "name": "tag",
                        "in": "path",
                        "required": true,
                        "description": "The tag UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateTagRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`TagResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/TagResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            },
            "delete": {
                "operationId": "v1.tags.destroy",
                "description": "<small>Requires an API token with the **Tag Manager** role.<\/small>\n\nDeletes a tag from your account.\n\nTags are simple labels that can be assigned to [documents](\/#documents) and [templates](\/#templates).",
                "summary": "Delete tag",
                "tags": [
                    "Account"
                ],
                "parameters": [
                    {
                        "name": "tag",
                        "in": "path",
                        "required": true,
                        "description": "The tag UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/teams": {
            "get": {
                "operationId": "v1.teams.index",
                "description": "<small>Requires an API token with one of the following roles: **Document Reader**, **Document Manager**, or **Template Reader**.<\/small>\n\nLists the teams available in your account.\n\n## Sorting\n\nTo specify the order that teams should be returned in, use the `sort_by` and `sort_direction` query string\nparameters.\n\nFor example, to sort by the `name` attribute in descending order, the query string should contain:\n`sort_by=name&sort_direction=desc`",
                "summary": "List teams",
                "tags": [
                    "Account"
                ],
                "parameters": [
                    {
                        "name": "sort_by",
                        "in": "query",
                        "description": "Name of the field to sort the response by. Default is `name`",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "enum": [
                                "name",
                                "created_at"
                            ]
                        }
                    },
                    {
                        "name": "sort_direction",
                        "in": "query",
                        "description": "Default is `asc`",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "enum": [
                                "asc",
                                "desc"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `TeamResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/TeamResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/me": {
            "get": {
                "operationId": "v1.api-tokens.show-me",
                "description": "<small>This endpoint is available to any valid API token.<\/small>\n\nShows information about the current [API token](\/#authentication).",
                "summary": "Current API token details",
                "tags": [
                    "Auth"
                ],
                "responses": {
                    "200": {
                        "description": "`MeResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/MeResource"
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "documentation": {
                                                    "type": "string",
                                                    "description": "Link to this API documentation",
                                                    "examples": [
                                                        "https:\/\/app.fynk.com\/v1\/docs"
                                                    ]
                                                },
                                                "document_list": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Link to the [List documents](\/operations\/v1.documents.index) endpoint. Null if the token does not have permission to list documents",
                                                    "examples": [
                                                        "https:\/\/app.fynk.com\/v1\/api\/documents"
                                                    ]
                                                },
                                                "template_list": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Link to the [List templates](\/operations\/v1.templates.index) endpoint. Null if the token does not have permission to list templates",
                                                    "examples": [
                                                        "https:\/\/app.fynk.com\/v1\/api\/templates"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "documentation",
                                                "document_list",
                                                "template_list"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "http": {
                "type": "http",
                "scheme": "bearer"
            }
        },
        "schemas": {
            "ApiIntegrationType": {
                "type": "string",
                "enum": [
                    "salesforce",
                    "hubspot",
                    "pipedrive"
                ],
                "title": "ApiIntegrationType"
            },
            "ApiTokenSettingsResource": {
                "type": "object",
                "properties": {
                    "account_default_api_version": {
                        "type": "string",
                        "description": "Requests will use this version unless a `Fynk-Api-Version` header is sent to override it",
                        "examples": [
                            "2025-05-22"
                        ]
                    },
                    "request_api_version": {
                        "type": "string",
                        "description": "The version being used for the current request",
                        "examples": [
                            "2025-05-22"
                        ]
                    },
                    "latest_api_version": {
                        "type": "string",
                        "description": "The newest version available",
                        "examples": [
                            "2025-06-06"
                        ]
                    },
                    "changelog": {
                        "type": "object",
                        "description": "Details of changes between `request_api_version` and `latest_api_version`",
                        "examples": [
                            {
                                "2025-06-06": [
                                    "Renamed `is_internal` field in the SignatoryResource to `has_account_user`"
                                ]
                            }
                        ],
                        "additionalProperties": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    }
                },
                "required": [
                    "account_default_api_version",
                    "request_api_version",
                    "latest_api_version",
                    "changelog"
                ],
                "title": "ApiTokenSettingsResource"
            },
            "BidirectionalDocumentRelationshipType": {
                "type": "string",
                "enum": [
                    "parent_of",
                    "child_of",
                    "amendment_to",
                    "amended_by",
                    "renewal_of",
                    "renewed_by",
                    "addition_to",
                    "added_to_by",
                    "replacement_of",
                    "replaced_by",
                    "termination_of",
                    "terminated_by"
                ],
                "title": "BidirectionalDocumentRelationshipType"
            },
            "BulkUpdateDynamicFieldRequest": {
                "type": "object",
                "properties": {
                    "values": {
                        "type": "object",
                        "description": "New values for up to 20 of the document's dynamic fields.\nEach key must identify a dynamic field on the document - by either its `ref_uuid`, `uuid` or `name`.\nValues expect the same format as the [Update dynamic field](\/operations\/v1.documents.dynamic-fields.update) endpoint.",
                        "example": {
                            "a1b2c3d4-e5f6-7890-abcd-ef1234567890": "EUR;95000;yearly",
                            "My Text Field": "Vienna"
                        },
                        "additionalProperties": {
                            "anyOf": [
                                {
                                    "type": "null"
                                },
                                {
                                    "type": "array",
                                    "items": {}
                                },
                                {
                                    "type": "boolean"
                                },
                                {
                                    "type": "string"
                                }
                            ]
                        }
                    }
                },
                "required": [
                    "values"
                ],
                "title": "BulkUpdateDynamicFieldRequest"
            },
            "BulkUpdateMetadataValueRequest": {
                "type": "object",
                "properties": {
                    "changes": {
                        "type": "array",
                        "description": "A list of up to 20 changes to apply to the document's metadata values.",
                        "items": {
                            "type": "object",
                            "properties": {
                                "identifier": {
                                    "type": "string",
                                    "description": "A metadata's `uuid` or `name`.",
                                    "example": "purchase_price"
                                },
                                "operation": {
                                    "description": "`set` to create or update the value, `unset` to remove it.\n\n| |\n|---|\n| `set` <br\/> Create or update the metadata value |\n| `unset` <br\/> Remove the metadata value (or, for always-exists metadata, detach it) |",
                                    "example": "set",
                                    "$ref": "#\/components\/schemas\/MetadataValueChangeOperation"
                                },
                                "value": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "The new value, for a `set` operation. Follows the same format as the Add\/Update metadata value endpoints.",
                                    "example": "EUR;1000.10"
                                }
                            },
                            "required": [
                                "identifier",
                                "operation"
                            ]
                        }
                    }
                },
                "title": "BulkUpdateMetadataValueRequest"
            },
            "CloneGlobalTemplateRequest": {
                "type": "object",
                "properties": {
                    "global_template_uuid": {
                        "type": "string",
                        "format": "uuid",
                        "description": "UUID of the global template to clone into your account"
                    },
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Optional name for the cloned template. If omitted, the name of the global template will be used",
                        "example": "Employment Contract",
                        "maxLength": 255
                    },
                    "team_uuids": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "UUIDs of the teams to assign to the cloned template",
                        "items": {
                            "type": "string"
                        }
                    },
                    "published": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "description": "Whether to publish the cloned template immediately. Defaults to true",
                        "example": true
                    },
                    "terms_confirmed": {
                        "type": "boolean",
                        "description": "Must be true to confirm acceptance of the global template's terms (author attribution, licensing)"
                    }
                },
                "required": [
                    "global_template_uuid",
                    "terms_confirmed"
                ],
                "title": "CloneGlobalTemplateRequest"
            },
            "CommentResolutionStatusFilter": {
                "type": "string",
                "enum": [
                    "open",
                    "resolved"
                ],
                "title": "CommentResolutionStatusFilter"
            },
            "CommentResource": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string",
                        "examples": [
                            "ebf7f37f-be91-4d71-a204-a73928d70c89"
                        ]
                    },
                    "party_uuid": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "UUID of the [party](\/#parties) the author belongs to",
                        "examples": [
                            "595703a2-b7f6-4772-a4b7-ab2f9fac3a9f"
                        ]
                    },
                    "reply_to_comment_uuid": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "UUID of the comment that this comment is replying to, if any",
                        "examples": [
                            "488dfa4a-b154-45df-877f-994e76738345"
                        ]
                    },
                    "type": {
                        "$ref": "#\/components\/schemas\/CommentType"
                    },
                    "scope": {
                        "description": "Indicates who the comment should be visible to: `internal` only visible to users in your fynk account.\n`internal_and_external` also visible to external users.",
                        "$ref": "#\/components\/schemas\/Scope"
                    },
                    "proposal_status": {
                        "anyOf": [
                            {
                                "description": "Only relevant when `type` is `proposal`",
                                "$ref": "#\/components\/schemas\/ProposalStatus"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "is_resolved": {
                        "type": "boolean",
                        "description": "True if the comment has been marked as resolved"
                    },
                    "html_content": {
                        "type": "string",
                        "description": "The comment itself. May be empty (e.g. a proposal may be made without an accompanying comment)",
                        "examples": [
                            "<p>Hello, world<\/p>"
                        ]
                    },
                    "author_name": {
                        "examples": [
                            "Emily Miller"
                        ],
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "uuid",
                    "party_uuid",
                    "reply_to_comment_uuid",
                    "type",
                    "scope",
                    "proposal_status",
                    "is_resolved",
                    "html_content",
                    "author_name",
                    "created_at",
                    "updated_at"
                ],
                "title": "CommentResource"
            },
            "CommentType": {
                "type": "string",
                "enum": [
                    "comment",
                    "proposal"
                ],
                "title": "CommentType"
            },
            "CreateDocumentFileStorageUploadUrlRequest": {
                "type": "object",
                "properties": {
                    "content_type": {
                        "type": "string",
                        "description": "The MIME type string of the file being uploaded.",
                        "example": "application\/pdf",
                        "maxLength": 255
                    }
                },
                "required": [
                    "content_type"
                ],
                "title": "CreateDocumentFileStorageUploadUrlRequest"
            },
            "CreateDocumentFromPdfRequest": {
                "type": "object",
                "properties": {
                    "file_upload_uuid": {
                        "type": "string",
                        "format": "uuid",
                        "description": "The UUID received in the [Create document PDF upload URL](\/operations\/v1.file-uploads.document-pdf.create) response",
                        "example": "ab2665c1-9a7c-4230-a431-21682eb302aa"
                    },
                    "file_name": {
                        "type": "string",
                        "description": "The name of the PDF file",
                        "example": "NDA_BigCorp.pdf",
                        "maxLength": 255
                    },
                    "initial_stage": {
                        "type": "string",
                        "description": "The new document will be created in this stage. One of: `draft`, `done`",
                        "example": "draft"
                    },
                    "name": {
                        "type": "string",
                        "description": "The new document's name. If omitted, the `pdf_file_name` will be used as the new document's name",
                        "example": "Kundenvertrag Muster GmbH",
                        "maxLength": 255
                    },
                    "template_uuid": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uuid",
                        "description": "Copy document settings from the [template](\/#templates) with this UUID. Checkpoints, document type, metadata, parties, tags, teams, etc. will all be copied.",
                        "example": "4df1e60a-0114-4dce-89e7-8c5ad397fcf2"
                    },
                    "account_party_uuid": {
                        "type": "string",
                        "format": "uuid",
                        "description": "UUID of the party from Settings > My Parties involved in the document"
                    },
                    "ai_analysis_auto_apply": {
                        "type": "boolean",
                        "description": "If true, AI analysis results will be automatically applied to the document. If false (the default), AI analysis results must be manually applied"
                    },
                    "owner_emails": {
                        "type": "array",
                        "description": "Email addresses of the user(s) from your account who should be given ownership of the new document",
                        "items": {
                            "type": "string",
                            "format": "email",
                            "maxLength": 255
                        }
                    },
                    "team_uuids": {
                        "type": "array",
                        "description": "UUIDs of any [teams](\/operations\/v1.teams.index) that should have access to the document",
                        "items": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    "tag_uuids": {
                        "type": "array",
                        "description": "UUIDs of any [tags](\/operations\/v1.tags.index) to add to the document",
                        "items": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                },
                "required": [
                    "file_upload_uuid",
                    "file_name",
                    "initial_stage"
                ],
                "title": "CreateDocumentFromPdfRequest"
            },
            "CreateDocumentFromTemplateRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The new document's name. If omitted, the name of the template will be used as the new document's name",
                        "example": "Kundenvertrag Muster GmbH",
                        "maxLength": 255
                    },
                    "template_uuid": {
                        "type": "string",
                        "format": "uuid",
                        "description": "UUID of the template to use as a basis for the new document"
                    },
                    "initial_stage": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "If set, the document will be moved to this stage after creation.\nThe default is `draft`.\nDepending on the template, moving to `signing` may require that the `dynamic_field_values`, `parties` and\/or `signatories` fields are also provided.",
                        "enum": [
                            "draft",
                            "signing"
                        ],
                        "example": "signing"
                    },
                    "owner_emails": {
                        "type": "array",
                        "description": "Email addresses of the user(s) from your account who should be given ownership of the new document",
                        "items": {
                            "type": "string",
                            "format": "email",
                            "maxLength": 255
                        }
                    },
                    "dynamic_field_values": {
                        "type": "object",
                        "description": "Initial values for the document's dynamic fields.\nEach key must identify a dynamic field on the template by either its `ref_uuid` or its `name`.\nValues accept the same format as the [Update dynamic field](\/operations\/v1.documents.dynamic-fields.update) endpoint.",
                        "example": {
                            "a1b2c3d4-e5f6-7890-abcd-ef1234567890": "EUR;95000;yearly",
                            "My Text Field": "Vienna"
                        },
                        "additionalProperties": {
                            "anyOf": [
                                {
                                    "type": "null"
                                },
                                {
                                    "type": "array",
                                    "items": {}
                                },
                                {
                                    "type": "boolean"
                                },
                                {
                                    "type": "string"
                                }
                            ]
                        }
                    },
                    "parties": {
                        "type": "array",
                        "description": "Party data to update on document creation, keyed by the party's `ref_uuid`, `reference`, or `entity_name` from the template.",
                        "example": {
                            "3b326b6a-65d4-4e1f-9529-f0884e257d79": {
                                "entity_name": "Muster GmbH",
                                "address": "Musterstra\u00dfe 1, 12345 Berlin"
                            }
                        },
                        "items": {
                            "type": "object",
                            "properties": {
                                "entity_name": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "example": "Muster GmbH",
                                    "maxLength": 255
                                },
                                "address": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "example": "Musterstra\u00dfe 1, 12345 Berlin",
                                    "maxLength": 255
                                }
                            }
                        }
                    },
                    "signatories": {
                        "type": "array",
                        "description": "Signatories to add to the document on creation, keyed by their party's `ref_uuid`, `reference`, or `entity_name` from the template.\nCurrently, signatories can only be provided for *external* parties, i.e. those where `is_internal_party` is `false`\nIf an email corresponds to an existing user in the current fynk account, the signatory will be linked to that user and `first_name`, `last_name`, `mobile_phone` and `title` will be populated from the user's profile.",
                        "example": {
                            "c397e454-fdde-457a-9dce-d1036cc15aed": [
                                {
                                    "email": "john@example.com",
                                    "first_name": "John",
                                    "last_name": "Doe"
                                }
                            ]
                        },
                        "items": {
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "format": "email",
                                        "example": "john@example.com",
                                        "maxLength": 255
                                    },
                                    "first_name": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "example": "John",
                                        "maxLength": 255
                                    },
                                    "last_name": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "example": "Doe",
                                        "maxLength": 255
                                    },
                                    "mobile_phone": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "Mobile phone number in E.164 format",
                                        "example": "+447951123456",
                                        "maxLength": 255
                                    },
                                    "title": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "example": "Sales Manager",
                                        "maxLength": 255
                                    }
                                },
                                "required": [
                                    "email"
                                ]
                            }
                        }
                    }
                },
                "required": [
                    "template_uuid",
                    "dynamic_field_values"
                ],
                "title": "CreateDocumentFromTemplateRequest"
            },
            "DocumentDetailResource": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string",
                        "examples": [
                            "4df1e60a-0114-4dce-89e7-8c5ad397fcf2"
                        ]
                    },
                    "name": {
                        "type": "string",
                        "examples": [
                            "Kundenvertrag Muster GmbH"
                        ]
                    },
                    "signature_type": {
                        "anyOf": [
                            {
                                "description": "Controls which [signature type](\/#signature-types) will be used during signing",
                                "$ref": "#\/components\/schemas\/SignatureSecurityLevel"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "sequential_signing": {
                        "type": "boolean",
                        "description": "When true, signatories will sign one at a time, in ascending order by their `signing_order`. When false,\nsignatories may sign in any order"
                    },
                    "origin": {
                        "$ref": "#\/components\/schemas\/DocumentOrigin"
                    },
                    "stage": {
                        "$ref": "#\/components\/schemas\/DocumentStage"
                    },
                    "locale": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "de-AT"
                        ]
                    },
                    "template_uuid": {
                        "type": "string",
                        "description": "UUID of the [template](\/#templates) the document was created from, if any",
                        "examples": [
                            "4df1e60a-0114-4dce-89e7-8c5ad397fcf2"
                        ]
                    },
                    "document_type_uuid": {
                        "type": "string",
                        "description": "UUID of the [document type](\/#document-types) assigned to the document, if any",
                        "examples": [
                            "58ac52bb-8885-4580-88c1-7a7bc772c87d"
                        ]
                    },
                    "external_signatory_invitation_message": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "This text will be displayed in the email notification sent to users when the document is ready for signing"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "archived_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "parties": {
                        "type": "array",
                        "description": "The people and\/or organizations that will be involved in signing the document",
                        "items": {
                            "$ref": "#\/components\/schemas\/DocumentPartySnippetResource"
                        }
                    },
                    "teams": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/TeamSnippetResource"
                        }
                    },
                    "integration_reference": {
                        "description": "Optional, will only be present when the document was created via one of fynk's built-in CRM integrations",
                        "$ref": "#\/components\/schemas\/IntegrationReferenceResource"
                    },
                    "users": {
                        "type": "array",
                        "description": "Everyone who has access to the document, each with their access level (`role`)",
                        "items": {
                            "$ref": "#\/components\/schemas\/DocumentUserResource"
                        }
                    },
                    "signatories": {
                        "type": "array",
                        "description": "These are the users who will sign the document during the `signing` stage",
                        "items": {
                            "$ref": "#\/components\/schemas\/SignatoryResource"
                        }
                    },
                    "dynamic_fields": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/DynamicFieldResource"
                        }
                    },
                    "metadata_values": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/MetadataValueResource"
                        }
                    },
                    "tags": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/TagResource"
                        }
                    }
                },
                "required": [
                    "uuid",
                    "name",
                    "signature_type",
                    "sequential_signing",
                    "origin",
                    "stage",
                    "locale",
                    "template_uuid",
                    "document_type_uuid",
                    "external_signatory_invitation_message",
                    "created_at",
                    "updated_at",
                    "archived_at",
                    "parties"
                ],
                "title": "DocumentDetailResource"
            },
            "DocumentMinimalResource": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string",
                        "examples": [
                            "4df1e60a-0114-4dce-89e7-8c5ad397fcf2"
                        ]
                    },
                    "name": {
                        "type": "string",
                        "examples": [
                            "Kundenvertrag Muster GmbH"
                        ]
                    },
                    "origin": {
                        "$ref": "#\/components\/schemas\/DocumentOrigin"
                    },
                    "stage": {
                        "$ref": "#\/components\/schemas\/DocumentStage"
                    },
                    "locale": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "de-AT"
                        ]
                    },
                    "template_uuid": {
                        "type": "string",
                        "description": "UUID of the [template](\/#templates) the document was created from, if any",
                        "examples": [
                            "4df1e60a-0114-4dce-89e7-8c5ad397fcf2"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "archived_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "parties": {
                        "type": "array",
                        "description": "The people and\/or organizations that will be involved in signing the document",
                        "items": {
                            "$ref": "#\/components\/schemas\/DocumentPartySnippetResource"
                        }
                    },
                    "links": {
                        "type": "object",
                        "properties": {
                            "show": {
                                "type": "string",
                                "description": "Link to [Show document](\/operations\/v1.documents.show)",
                                "examples": [
                                    "https:..."
                                ]
                            },
                            "latest_revision_pdf": {
                                "type": "string",
                                "description": "Link to [show latest revision PDF details](\/operations\/v1.documents.revisions.latest.pdf.show)",
                                "examples": [
                                    "https:..."
                                ]
                            },
                            "latest_revision_pdf_download": {
                                "type": "string",
                                "description": "Link to [download latest revision PDF](\/operations\/v1.documents.revisions.latest.pdf.download)",
                                "examples": [
                                    "https:..."
                                ]
                            }
                        },
                        "required": [
                            "show",
                            "latest_revision_pdf",
                            "latest_revision_pdf_download"
                        ]
                    }
                },
                "required": [
                    "uuid",
                    "name",
                    "origin",
                    "stage",
                    "locale",
                    "template_uuid",
                    "created_at",
                    "updated_at",
                    "archived_at",
                    "parties",
                    "links"
                ],
                "title": "DocumentMinimalResource"
            },
            "DocumentOrigin": {
                "type": "string",
                "enum": [
                    "signed_pdf",
                    "signed_pdf_external_account",
                    "template",
                    "scratch",
                    "onboarding",
                    "pdf"
                ],
                "title": "DocumentOrigin"
            },
            "DocumentPartyResource": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string",
                        "examples": [
                            "595703a2-b7f6-4772-a4b7-ab2f9fac3a9f"
                        ]
                    },
                    "ref_uuid": {
                        "type": "string",
                        "description": "If the document containing this party was created from a template, this identifier will be the same as\nthe `ref_uuid` of the corresponding party in the source template.",
                        "examples": [
                            "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
                        ]
                    },
                    "reference": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "A generic reference for the party",
                        "examples": [
                            "Employer"
                        ]
                    },
                    "entity_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The actual name of the party. May be null if the party was created via a Template's \"set later\" option",
                        "examples": [
                            "Demo Inc."
                        ]
                    },
                    "address": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "1 Oxford Road\nHenley Bridge\nHB1 1PQ"
                        ]
                    },
                    "scope": {
                        "description": "When this is `internal_and_external`, collaborators from this party may change the party's information",
                        "$ref": "#\/components\/schemas\/Scope"
                    },
                    "is_internal_party": {
                        "type": "boolean",
                        "description": "Indicates whether this party is linked to an account party (internal) or is standalone (external)"
                    },
                    "is_ready_for_signing": {
                        "type": "boolean",
                        "description": "`true` indicates that an external party has indicated they are ready to sign"
                    },
                    "ready_for_signing_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "signatories": {
                        "type": "array",
                        "description": "These are the users who will sign on behalf of this party during the `signing` stage",
                        "items": {
                            "$ref": "#\/components\/schemas\/SignatorySnippetResource"
                        }
                    }
                },
                "required": [
                    "uuid",
                    "ref_uuid",
                    "reference",
                    "entity_name",
                    "address",
                    "scope",
                    "is_internal_party",
                    "is_ready_for_signing",
                    "ready_for_signing_at",
                    "created_at",
                    "updated_at"
                ],
                "title": "DocumentPartyResource"
            },
            "DocumentPartySnippetResource": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string",
                        "examples": [
                            "595703a2-b7f6-4772-a4b7-ab2f9fac3a9f"
                        ]
                    },
                    "ref_uuid": {
                        "type": "string",
                        "description": "If the document containing this party was created from a template, this identifier will be the same as\nthe `ref_uuid` of the corresponding party in the source template.",
                        "examples": [
                            "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
                        ]
                    },
                    "reference": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "A generic reference for the party",
                        "examples": [
                            "Employer"
                        ]
                    },
                    "entity_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The actual name of the party. May be null if the party was created via a Template's \"set later\" option",
                        "examples": [
                            "Demo Inc."
                        ]
                    },
                    "address": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "1 Oxford Road\nHenley Bridge\nHB1 1PQ"
                        ]
                    },
                    "scope": {
                        "description": "When this is `internal_and_external`, collaborators from this party may change the party's information",
                        "$ref": "#\/components\/schemas\/Scope"
                    },
                    "is_internal_party": {
                        "type": "boolean",
                        "description": "Indicates whether this party is linked to an account party (internal) or is standalone (external)"
                    },
                    "is_ready_for_signing": {
                        "type": "boolean",
                        "description": "`true` indicates that an external party has indicated they are ready to sign"
                    },
                    "ready_for_signing_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "uuid",
                    "ref_uuid",
                    "reference",
                    "entity_name",
                    "address",
                    "scope",
                    "is_internal_party",
                    "is_ready_for_signing",
                    "ready_for_signing_at",
                    "created_at",
                    "updated_at"
                ],
                "title": "DocumentPartySnippetResource"
            },
            "DocumentRelationshipResource": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string",
                        "examples": [
                            "c9872112-75dd-4d57-93ea-b8a305eabadb"
                        ]
                    },
                    "controller_document": {
                        "$ref": "#\/components\/schemas\/DocumentMinimalResource"
                    },
                    "peripheral_document": {
                        "$ref": "#\/components\/schemas\/DocumentMinimalResource"
                    },
                    "relationship_type": {
                        "$ref": "#\/components\/schemas\/DocumentRelationshipType"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "uuid",
                    "controller_document",
                    "peripheral_document",
                    "relationship_type",
                    "created_at"
                ],
                "title": "DocumentRelationshipResource"
            },
            "DocumentRelationshipType": {
                "type": "string",
                "enum": [
                    "parent",
                    "amendment",
                    "renewal",
                    "addition",
                    "replacement",
                    "termination"
                ],
                "title": "DocumentRelationshipType"
            },
            "DocumentRevisionPdfResource": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string",
                        "description": "The document revision's UUID",
                        "examples": [
                            "be3b5af6-519b-4943-8bb7-1bffae50a91b"
                        ]
                    },
                    "document_name": {
                        "type": "string",
                        "description": "The name of the document",
                        "examples": [
                            "Kundenvertrag Muster GmbH"
                        ]
                    },
                    "pdf_url": {
                        "type": "string",
                        "description": "Document PDF can be downloaded from this URL. Note that this URL will expire after a short time",
                        "examples": [
                            "https:..."
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the revision was created"
                    }
                },
                "required": [
                    "uuid",
                    "document_name",
                    "pdf_url",
                    "created_at"
                ],
                "title": "DocumentRevisionPdfResource"
            },
            "DocumentStage": {
                "type": "string",
                "enum": [
                    "draft",
                    "approved_draft",
                    "review",
                    "approved_review",
                    "signing",
                    "done"
                ],
                "title": "DocumentStage"
            },
            "DocumentTypeResource": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string",
                        "examples": [
                            "58ac52bb-8885-4580-88c1-7a7bc772c87d"
                        ]
                    },
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Vendor Contract"
                        ]
                    }
                },
                "required": [
                    "uuid",
                    "name"
                ],
                "title": "DocumentTypeResource"
            },
            "DocumentUserAccessRole": {
                "type": "string",
                "description": "The representation of a document user's access level in the external API. Internally the access level is held in the document user's roles (where a plain viewer simply has no role); the external API always exposes it as one of these three values.\n",
                "enum": [
                    "owner",
                    "collaborator",
                    "viewer"
                ],
                "title": "DocumentUserAccessRole"
            },
            "DocumentUserInviteMethod": {
                "type": "string",
                "description": "How a newly added document user is given access to the document.\n| |\n|---|\n| `fynk_email` <br\/> The user receives a fynk invitation email (the default). |\n| `personal_link` <br\/> A personal link is created for the user; delivering it is up to the API consumer. |\n| `none` <br\/> The user is added silently. |",
                "enum": [
                    "fynk_email",
                    "personal_link",
                    "none"
                ],
                "title": "DocumentUserInviteMethod"
            },
            "DocumentUserResource": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string",
                        "examples": [
                            "76b8e0ad-e9cd-4c21-98b1-cd0003423ec2"
                        ]
                    },
                    "first_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Emily"
                        ]
                    },
                    "last_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Miller"
                        ]
                    },
                    "email": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "miller@example.com"
                        ]
                    },
                    "title": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Sales Manager"
                        ]
                    },
                    "party_uuid": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "UUID of the [party](\/#parties) the user belongs to, if any",
                        "examples": [
                            "595703a2-b7f6-4772-a4b7-ab2f9fac3a9f"
                        ]
                    },
                    "has_account_user": {
                        "type": "boolean",
                        "description": "`true` if the document user has a fynk user belonging to your account"
                    },
                    "role": {
                        "description": "The user's access level on the document",
                        "$ref": "#\/components\/schemas\/DocumentUserAccessRole"
                    },
                    "is_signatory": {
                        "type": "boolean",
                        "description": "`true` if the user is also a [signatory](\/#signatories) of the document. Use the signatory endpoints\nto manage this"
                    },
                    "personal_link": {
                        "description": "The user's [personal link](\/#shareable-links). Only included in the response of the [Add document\nuser](\/operations\/v1.documents.users.store) endpoint when `invite_method` was `personal_link`",
                        "$ref": "#\/components\/schemas\/ShareableLinkResource"
                    }
                },
                "required": [
                    "uuid",
                    "first_name",
                    "last_name",
                    "email",
                    "title",
                    "party_uuid",
                    "has_account_user",
                    "role",
                    "is_signatory"
                ],
                "title": "DocumentUserResource"
            },
            "DynamicFieldAutofillType": {
                "type": "string",
                "enum": [
                    "document_created_date",
                    "document_review_date",
                    "document_signing_date"
                ],
                "title": "DynamicFieldAutofillType"
            },
            "DynamicFieldFormatResource": {
                "type": "object",
                "properties": {
                    "decimals": {
                        "type": "integer",
                        "examples": [
                            2
                        ]
                    },
                    "decimal_separator": {
                        "type": "string",
                        "examples": [
                            "."
                        ]
                    },
                    "thousands_separator": {
                        "type": "string",
                        "examples": [
                            ","
                        ]
                    }
                },
                "required": [
                    "decimals",
                    "decimal_separator",
                    "thousands_separator"
                ],
                "title": "DynamicFieldFormatResource"
            },
            "DynamicFieldResource": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string",
                        "examples": [
                            "7dae3dad-e56d-45e9-86e5-b69dc30597dc"
                        ]
                    },
                    "ref_uuid": {
                        "type": "string",
                        "description": "A static reference identifier, allowing dynamic fields in documents to be matched their corresponding\nfield in the document's source template.",
                        "examples": [
                            "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
                        ]
                    },
                    "type": {
                        "$ref": "#\/components\/schemas\/MultiFieldType"
                    },
                    "name": {
                        "type": "string",
                        "examples": [
                            "Gross salary"
                        ]
                    },
                    "scope": {
                        "$ref": "#\/components\/schemas\/Scope"
                    },
                    "settings": {
                        "anyOf": [
                            {
                                "$ref": "#\/components\/schemas\/MultiFieldSettingsResource"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "autofill_type": {
                        "anyOf": [
                            {
                                "$ref": "#\/components\/schemas\/DynamicFieldAutofillType"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "format": {
                        "anyOf": [
                            {
                                "description": "Provides information about how currency values should be formatted",
                                "$ref": "#\/components\/schemas\/DynamicFieldFormatResource"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "select_values": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "When `type` is \"select\" or \"multi_select\", defines the possible values for `value`",
                        "items": {
                            "type": "string"
                        }
                    },
                    "is_mandatory": {
                        "type": "boolean"
                    },
                    "question": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "What is the employee's gross salary in EUR?"
                        ]
                    },
                    "question_external": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Question variant for external users"
                    },
                    "value": {
                        "description": "The field's value, if it has been set",
                        "examples": [
                            "EUR;95000;yearly"
                        ],
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            },
                            {
                                "type": "boolean"
                            },
                            {
                                "type": "array",
                                "items": {}
                            }
                        ]
                    },
                    "order": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    }
                },
                "required": [
                    "uuid",
                    "ref_uuid",
                    "type",
                    "name",
                    "scope",
                    "settings",
                    "autofill_type",
                    "format",
                    "select_values",
                    "is_mandatory",
                    "question",
                    "question_external",
                    "value",
                    "order"
                ],
                "title": "DynamicFieldResource"
            },
            "GlobalTemplateDetailResource": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string",
                        "examples": [
                            "4df1e60a-0114-4dce-89e7-8c5ad397fcf2"
                        ]
                    },
                    "name": {
                        "type": "string",
                        "examples": [
                            "Employment Contract"
                        ]
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "locale": {
                        "type": "string",
                        "examples": [
                            "de-AT"
                        ]
                    },
                    "global_template_author_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "John Doe"
                        ]
                    },
                    "global_template_attribution_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "global_template_license_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "MIT"
                        ]
                    },
                    "global_template_license_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "parties": {
                        "type": "array",
                        "description": "The initial set of parties included in documents created from this template",
                        "items": {
                            "$ref": "#\/components\/schemas\/TemplatePartySnippetResource"
                        }
                    }
                },
                "required": [
                    "uuid",
                    "name",
                    "description",
                    "locale",
                    "global_template_author_name",
                    "global_template_attribution_url",
                    "global_template_license_name",
                    "global_template_license_url",
                    "created_at",
                    "updated_at",
                    "parties"
                ],
                "title": "GlobalTemplateDetailResource"
            },
            "IntegrationReferenceResource": {
                "type": "object",
                "properties": {
                    "integration_type": {
                        "description": "Indicates which type of CRM integration the document is linked to",
                        "examples": [
                            "pipedrive"
                        ],
                        "$ref": "#\/components\/schemas\/ApiIntegrationType"
                    },
                    "object_type": {
                        "type": "string",
                        "description": "Indicates which type of CRM object the document is linked to. Values will vary depending on the `integration_type`",
                        "examples": [
                            "Opportunity"
                        ]
                    },
                    "external_id": {
                        "type": "string",
                        "description": "The external system's ID for the specific CRM object that the document is linked to",
                        "examples": [
                            "000000000000Abc"
                        ]
                    },
                    "external_name": {
                        "type": "string",
                        "description": "The external system's name for the specific CRM object that the document is linked to",
                        "examples": [
                            "Example Opportunity"
                        ]
                    }
                },
                "required": [
                    "integration_type",
                    "object_type",
                    "external_id",
                    "external_name"
                ],
                "title": "IntegrationReferenceResource"
            },
            "MeResource": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string",
                        "examples": [
                            "19378802-b5df-466f-abd4-2df0d1d01537"
                        ]
                    },
                    "name": {
                        "type": "string",
                        "examples": [
                            "fynk API token"
                        ]
                    },
                    "expires_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "2025-08-24T14:15:22Z"
                        ]
                    },
                    "account": {
                        "$ref": "#\/components\/schemas\/MinimalAccountResource"
                    },
                    "settings": {
                        "$ref": "#\/components\/schemas\/ApiTokenSettingsResource"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "uuid",
                    "name",
                    "expires_at",
                    "account",
                    "settings",
                    "created_at",
                    "updated_at"
                ],
                "title": "MeResource"
            },
            "MetadataResource": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string",
                        "examples": [
                            "7dae3dad-e56d-45e9-86e5-b69dc30597dc"
                        ]
                    },
                    "type": {
                        "$ref": "#\/components\/schemas\/MetadataType"
                    },
                    "value_type": {
                        "description": "Controls the kinds of values that can be assigned to the metadata",
                        "$ref": "#\/components\/schemas\/MultiFieldType"
                    },
                    "name": {
                        "type": "string",
                        "examples": [
                            "discount_rate"
                        ]
                    },
                    "display_name": {
                        "type": "string",
                        "examples": [
                            "Discount Rate"
                        ]
                    },
                    "settings": {
                        "anyOf": [
                            {
                                "$ref": "#\/components\/schemas\/MultiFieldSettingsResource"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "select_values": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "When `value_type` is `select`, defines the possible values for the metadata's value",
                        "items": {
                            "type": "string"
                        }
                    },
                    "always_exists": {
                        "type": "boolean"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "The discount rate applied to the company valuation in a follow-on financing round."
                        ]
                    },
                    "keywords": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Keywords to help with metadata identification.",
                        "examples": [
                            "discount, rate, valuation"
                        ]
                    },
                    "prompt": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "An AI prompt used for metadata extraction.",
                        "examples": [
                            "Extract the discount rate percentage from the document."
                        ]
                    },
                    "is_contract_value": {
                        "type": "boolean",
                        "description": "If true, this metadata will be included in the calculated \"contract value\" if it is present in a document. Only relevant when the value type is one of: `currency`, `currency_duration`"
                    },
                    "relevant_document_type_uuids": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "UUIDs of document types this metadata is relevant for. `null` means not relevant to any. `[]` means relevant to all.",
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "required": [
                    "uuid",
                    "type",
                    "value_type",
                    "name",
                    "display_name",
                    "settings",
                    "select_values",
                    "always_exists",
                    "description",
                    "keywords",
                    "prompt",
                    "is_contract_value",
                    "relevant_document_type_uuids"
                ],
                "title": "MetadataResource"
            },
            "MetadataType": {
                "type": "string",
                "enum": [
                    "system_autofilled",
                    "system_computed",
                    "system",
                    "system_reference",
                    "account"
                ],
                "title": "MetadataType"
            },
            "MetadataValueChangeOperation": {
                "type": "string",
                "description": "The operations that can be applied to a documents metadata value as part of a bulk change.\n| |\n|---|\n| `set` <br\/> Create or update the metadata value |\n| `unset` <br\/> Remove the metadata value (or, for always-exists metadata, detach it) |",
                "enum": [
                    "set",
                    "unset"
                ],
                "title": "MetadataValueChangeOperation"
            },
            "MetadataValueComputedStatus": {
                "type": "string",
                "enum": [
                    "missing_information",
                    "conflicting_information",
                    "not_applicable",
                    "computed"
                ],
                "title": "MetadataValueComputedStatus"
            },
            "MetadataValueResource": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string",
                        "examples": [
                            "4ed6c60b-bc4f-4390-bbf5-ed384e3443c9"
                        ]
                    },
                    "metadata": {
                        "$ref": "#\/components\/schemas\/MetadataResource"
                    },
                    "reference_dynamic_field_uuid": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "7dae3dad-e56d-45e9-86e5-b69dc30597dc"
                        ]
                    },
                    "value_source": {
                        "$ref": "#\/components\/schemas\/MetadataValueSource"
                    },
                    "value": {
                        "description": "The metadata's value",
                        "examples": [
                            "EUR;95000;yearly"
                        ],
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            },
                            {
                                "type": "boolean"
                            },
                            {
                                "type": "array",
                                "items": {}
                            }
                        ]
                    },
                    "value_currency_monthly": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "value_currency_yearly": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "computed_status": {
                        "anyOf": [
                            {
                                "$ref": "#\/components\/schemas\/MetadataValueComputedStatus"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "computed_value": {
                        "examples": [
                            "EUR;95000;yearly"
                        ],
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            },
                            {
                                "type": "boolean"
                            },
                            {
                                "type": "array",
                                "items": {}
                            }
                        ]
                    },
                    "is_attached": {
                        "type": "boolean"
                    },
                    "computed_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "uuid",
                    "metadata",
                    "reference_dynamic_field_uuid",
                    "value_source",
                    "value",
                    "value_currency_monthly",
                    "value_currency_yearly",
                    "computed_status",
                    "computed_value",
                    "is_attached",
                    "computed_at"
                ],
                "title": "MetadataValueResource"
            },
            "MetadataValueSource": {
                "type": "string",
                "enum": [
                    "user",
                    "ai_analysis",
                    "computed",
                    "autofilled",
                    "dynamic_field",
                    "linked_document"
                ],
                "title": "MetadataValueSource"
            },
            "MinimalAccountResource": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string",
                        "examples": [
                            "d6af2944-82e4-4791-8bec-41765215900f"
                        ]
                    },
                    "name": {
                        "type": "string",
                        "examples": [
                            "Demo Inc."
                        ]
                    }
                },
                "required": [
                    "uuid",
                    "name"
                ],
                "title": "MinimalAccountResource"
            },
            "MultiFieldSettingsResource": {
                "type": "object",
                "properties": {
                    "currencies": {
                        "type": "array",
                        "description": "For `currency` or `currency_duration` fields, defines the currencies that can be assigned to the field's\nvalues",
                        "examples": [
                            [
                                "EUR",
                                "USD"
                            ]
                        ],
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "required": [
                    "currencies"
                ],
                "title": "MultiFieldSettingsResource"
            },
            "MultiFieldType": {
                "type": "string",
                "enum": [
                    "id",
                    "uuid",
                    "bool",
                    "date",
                    "duration",
                    "email",
                    "list",
                    "number",
                    "currency",
                    "currency_duration",
                    "clause",
                    "select",
                    "multi_select",
                    "text",
                    "textarea",
                    "timestamp",
                    "array",
                    "enum"
                ],
                "title": "MultiFieldType"
            },
            "ProposalStatus": {
                "type": "string",
                "enum": [
                    "open",
                    "accepted",
                    "rejected"
                ],
                "title": "ProposalStatus"
            },
            "Scope": {
                "type": "string",
                "enum": [
                    "internal",
                    "internal_and_external"
                ],
                "title": "Scope"
            },
            "ShareableLinkResource": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string",
                        "examples": [
                            "5cbe6ed1-49a9-40dc-a1c4-9e5a3c9a08f0"
                        ]
                    },
                    "url": {
                        "type": "string",
                        "description": "The link URL. Treat it like a secret: anyone who has the URL can access the document with it",
                        "examples": [
                            "https:app.fynk.com\/share\/5cbe6ed1-49a9-40dc-a1c4-9e5a3c9a08f0?token=..."
                        ]
                    },
                    "expires_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the link stops working. `null` means the link never expires",
                        "examples": [
                            "2026-10-19T12:00:00Z"
                        ]
                    },
                    "message": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "A personal message shown when the link is opened. Always `null` for public links",
                        "examples": [
                            "Hi Emily, please review the updated contract."
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "uuid",
                    "url",
                    "expires_at",
                    "message",
                    "created_at"
                ],
                "title": "ShareableLinkResource"
            },
            "SignatoryResource": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string",
                        "examples": [
                            "76b8e0ad-e9cd-4c21-98b1-cd0003423ec2"
                        ]
                    },
                    "first_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Emily"
                        ]
                    },
                    "last_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Miller"
                        ]
                    },
                    "email": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "miller@example.com"
                        ]
                    },
                    "mobile_phone": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Mobile phone number, in E.164 format",
                        "examples": [
                            "+447951123456"
                        ]
                    },
                    "title": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Sales Manager"
                        ]
                    },
                    "profile_photo_url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "https:\/\/ui-avatars.com\/api\/?name=EM"
                        ]
                    },
                    "signing_order": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "When sequential signing is enabled, signatories will sign in ascending order of their `signing_order`"
                    },
                    "has_account_user": {
                        "type": "boolean",
                        "description": "`true` if the signatory has a fynk user belonging to your account"
                    },
                    "party_uuid": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "UUID of the party that the signatory signs for",
                        "examples": [
                            "595703a2-b7f6-4772-a4b7-ab2f9fac3a9f"
                        ]
                    }
                },
                "required": [
                    "uuid",
                    "first_name",
                    "last_name",
                    "email",
                    "mobile_phone",
                    "title",
                    "profile_photo_url",
                    "signing_order",
                    "has_account_user",
                    "party_uuid"
                ],
                "title": "SignatoryResource"
            },
            "SignatorySnippetResource": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string",
                        "examples": [
                            "76b8e0ad-e9cd-4c21-98b1-cd0003423ec2"
                        ]
                    },
                    "first_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Emily"
                        ]
                    },
                    "last_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Miller"
                        ]
                    },
                    "email": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "miller@example.com"
                        ]
                    },
                    "mobile_phone": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Mobile phone number, in E.164 format",
                        "examples": [
                            "+447951123456"
                        ]
                    },
                    "title": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Sales Manager"
                        ]
                    },
                    "profile_photo_url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "https:\/\/ui-avatars.com\/api\/?name=EM"
                        ]
                    },
                    "signing_order": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "When sequential signing is enabled, signatories will sign in ascending order of their `signing_order`"
                    },
                    "has_account_user": {
                        "type": "boolean",
                        "description": "`true` if the signatory has a fynk user belonging to your account"
                    }
                },
                "required": [
                    "uuid",
                    "first_name",
                    "last_name",
                    "email",
                    "mobile_phone",
                    "title",
                    "profile_photo_url",
                    "signing_order",
                    "has_account_user"
                ],
                "title": "SignatorySnippetResource"
            },
            "SignatureSecurityLevel": {
                "type": "string",
                "enum": [
                    "aes",
                    "qes",
                    "ses"
                ],
                "title": "SignatureSecurityLevel"
            },
            "SignedUploadUrlResource": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string",
                        "description": "UUID to be used when referring to the uploaded file in later requests",
                        "examples": [
                            "ab2665c1-9a7c-4230-a431-21682eb302aa"
                        ]
                    },
                    "url": {
                        "type": "string",
                        "description": "The URL to upload the file contents to",
                        "examples": [
                            "https:\/\/s3.eu-central-1.amazonaws.com\/..."
                        ]
                    },
                    "method": {
                        "type": "string",
                        "description": "The HTTP method to use when uploading. Always POST.",
                        "examples": [
                            "POST"
                        ]
                    },
                    "fields": {
                        "type": "object",
                        "description": "Form fields to send in the body of the POST request, before the file contents",
                        "additionalProperties": {
                            "type": "string"
                        }
                    },
                    "expires_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "File must be uploaded before this time",
                        "examples": [
                            "2019-08-24T14:15:22Z"
                        ]
                    }
                },
                "required": [
                    "uuid",
                    "url",
                    "method",
                    "fields",
                    "expires_at"
                ],
                "title": "SignedUploadUrlResource"
            },
            "StageTransitionToSigningRequest": {
                "type": "object",
                "properties": {
                    "signature_type": {
                        "anyOf": [
                            {
                                "description": "See note in the request's description",
                                "$ref": "#\/components\/schemas\/SignatureSecurityLevel"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "sequential_signing": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "description": "If true, signatures will be requested in the order defined by the signatories' `signing_order`. If this\nparameter is not sent, the value from the document will be used. Must be true when `signature_type` is\n`qes`"
                    },
                    "message": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Message to include in the email sent to the document's signatories. This is included in addition to the\ndefault email text provided by fynk. If `message` is not provided, the document's\n`external_signatory_invitation_message` will be used",
                        "maxLength": 65535
                    }
                },
                "title": "StageTransitionToSigningRequest"
            },
            "StoreDocumentRelationshipRequest": {
                "type": "object",
                "properties": {
                    "other_document_uuid": {
                        "type": "string",
                        "format": "uuid",
                        "description": "UUID of the document to link to",
                        "example": "848b471e-2f1d-47c3-8c25-ad3f292097aa"
                    },
                    "relationship_type": {
                        "description": "The type of relationship between the documents",
                        "example": "parent_of",
                        "$ref": "#\/components\/schemas\/BidirectionalDocumentRelationshipType"
                    }
                },
                "required": [
                    "other_document_uuid",
                    "relationship_type"
                ],
                "title": "StoreDocumentRelationshipRequest"
            },
            "StoreDocumentUserRequest": {
                "type": "object",
                "properties": {
                    "email": {
                        "type": "string",
                        "format": "email",
                        "description": "The user's email address",
                        "example": "miller@example.com",
                        "maxLength": 255
                    },
                    "role": {
                        "description": "The user's access level on the document. Note that only users with a fynk account user in your\naccount can become an `owner`",
                        "$ref": "#\/components\/schemas\/DocumentUserAccessRole"
                    },
                    "invite_method": {
                        "description": "How the user is given access to the document. `fynk_email` (the default) sends the user an\ninvitation email. `personal_link` creates a [personal link](\/#shareable-links) for the user and\nreturns it in the response; delivering the link is up to you. `none` adds the user silently.\nNote that `personal_link` is only available for users without a fynk account user in your account\n\n| |\n|---|\n| `fynk_email` <br\/> The user receives a fynk invitation email (the default). |\n| `personal_link` <br\/> A personal link is created for the user; delivering it is up to the API consumer. |\n| `none` <br\/> The user is added silently. |",
                        "default": "fynk_email",
                        "$ref": "#\/components\/schemas\/DocumentUserInviteMethod"
                    },
                    "party_uuid": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uuid",
                        "description": "UUID of the [party](\/#parties) the user belongs to",
                        "example": "595703a2-b7f6-4772-a4b7-ab2f9fac3a9f"
                    },
                    "first_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Ignored when the email corresponds to an existing user in the current fynk account",
                        "example": "Emily",
                        "maxLength": 255
                    },
                    "last_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Ignored when the email corresponds to an existing user in the current fynk account",
                        "example": "Miller",
                        "maxLength": 255
                    },
                    "title": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Ignored when the email corresponds to an existing user in the current fynk account",
                        "example": "Sales Manager",
                        "maxLength": 255
                    }
                },
                "required": [
                    "email",
                    "role"
                ],
                "title": "StoreDocumentUserRequest"
            },
            "StoreMetadataRequest": {
                "type": "object",
                "properties": {
                    "value_type": {
                        "description": "Controls what kinds of values may be stored in the field. Cannot be changed after creation",
                        "example": "text",
                        "$ref": "#\/components\/schemas\/MultiFieldType"
                    },
                    "display_name": {
                        "type": "string",
                        "description": "The display name shown in the UI.",
                        "example": "Discount Rate",
                        "maxLength": 255
                    },
                    "name": {
                        "type": "string",
                        "description": "The programmatic name. Cannot be changed after creation. Must be lowercase alphanumeric with underscores only. Must be unique within the account and must not conflict with system metadata names.",
                        "pattern": "^[a-z0-9_]+$",
                        "example": "discount_rate",
                        "maxLength": 255
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "A description of the metadata field.",
                        "example": "The discount rate applied to the company valuation in a follow-on financing round.",
                        "maxLength": 1024
                    },
                    "prompt": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "An AI prompt used for metadata extraction.",
                        "example": "Extract the discount rate percentage from the document.",
                        "maxLength": 1024
                    },
                    "keywords": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Keywords to help with metadata identification.",
                        "example": "discount, rate, valuation",
                        "maxLength": 1024
                    },
                    "is_contract_value": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "description": "Whether this is a contract value field. Can only be `true` when `value_type` is `currency` or `currency_duration`."
                    },
                    "select_values": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "The possible values when `value_type` is `select` or `multi_select`.",
                        "items": {
                            "type": "string",
                            "minLength": 1
                        }
                    },
                    "relevant_document_type_uuids": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "UUIDs of document types this metadata is relevant for. `null` means not relevant to any document types. `[]` (empty array) means relevant to all document types.",
                        "items": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                },
                "required": [
                    "value_type",
                    "display_name",
                    "name"
                ],
                "title": "StoreMetadataRequest"
            },
            "StoreMetadataValueRequest": {
                "type": "object",
                "title": "StoreMetadataValueRequest"
            },
            "StorePartyRequest": {
                "type": "object",
                "properties": {
                    "reference": {
                        "type": "string",
                        "description": "A generic reference for the party",
                        "example": "Employer",
                        "maxLength": 255
                    },
                    "account_party_uuid": {
                        "type": "string",
                        "format": "uuid",
                        "description": "UUID of a party from Settings > My Parties. When this is provided, `reference` is the only other field that can be sent."
                    },
                    "entity_name": {
                        "type": "string",
                        "description": "The actual name of the party. i.e. name of the company or person. Must be non-null in order for the document to [proceed to the signing stage](\/operations\/v1.documents.stage-transitions.signing)",
                        "example": "Demo Inc.",
                        "maxLength": 255
                    },
                    "address": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The party's address",
                        "example": "1 Oxford Road\nHenley Bridge\nHB1 1PQ",
                        "maxLength": 255
                    },
                    "scope": {
                        "description": "When this is `internal_and_external`, collaborators from this party may change the party's information. Required when `account_party_uuid` is not sent",
                        "$ref": "#\/components\/schemas\/Scope"
                    }
                },
                "required": [
                    "reference"
                ],
                "title": "StorePartyRequest"
            },
            "StorePersonalLinkRequest": {
                "type": "object",
                "properties": {
                    "expires_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the link stops working. Defaults to 3 months from now; pass `null` for a link that never expires",
                        "example": "2026-10-19T12:00:00Z"
                    },
                    "message": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "A personal message shown to the user when they open the link",
                        "example": "Hi Emily, please review the updated contract.",
                        "maxLength": 65535
                    }
                },
                "title": "StorePersonalLinkRequest"
            },
            "StorePublicLinkRequest": {
                "type": "object",
                "properties": {
                    "expires_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the link stops working. Defaults to 3 months from now; pass `null` for a link that never expires",
                        "example": "2026-10-19T12:00:00Z"
                    }
                },
                "title": "StorePublicLinkRequest"
            },
            "StoreSignatoryRequest": {
                "type": "object",
                "properties": {
                    "party_uuid": {
                        "type": "string",
                        "format": "uuid",
                        "description": "UUID of the [party](\/#parties) the signatory will be signing for",
                        "example": "595703a2-b7f6-4772-a4b7-ab2f9fac3a9f"
                    },
                    "email": {
                        "type": "string",
                        "format": "email",
                        "description": "The signatory's email address",
                        "example": "miller@example.com",
                        "maxLength": 255
                    },
                    "first_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "Emily",
                        "maxLength": 255
                    },
                    "last_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "Miller",
                        "maxLength": 255
                    },
                    "mobile_phone": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Mobile phone number, in E.164 format, as shown in the example",
                        "example": "+447951123456",
                        "maxLength": 255
                    },
                    "title": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "Sales Manager",
                        "maxLength": 255
                    }
                },
                "required": [
                    "party_uuid",
                    "email"
                ],
                "title": "StoreSignatoryRequest"
            },
            "StoreStoredFileRequest": {
                "type": "object",
                "properties": {
                    "file_upload_uuid": {
                        "type": "string",
                        "format": "uuid",
                        "description": "The UUID received in the [Create document file storage upload URL](\/operations\/v1.file-uploads.document-file-storage.create) response",
                        "example": "d16017e0-f60d-45b6-98cf-b1f41d0747fa"
                    },
                    "file_name": {
                        "type": "string",
                        "description": "The name of the file being uploaded",
                        "example": "NDA_BigCorp.pdf",
                        "maxLength": 255
                    }
                },
                "required": [
                    "file_upload_uuid",
                    "file_name"
                ],
                "title": "StoreStoredFileRequest"
            },
            "StoreTagRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "The name of the tag.",
                        "example": "Warranty",
                        "maxLength": 40
                    },
                    "color": {
                        "type": "string",
                        "description": "The color of the tag as a hex string.",
                        "pattern": "^#[0-9a-f]{6}$",
                        "example": "#615fff"
                    }
                },
                "required": [
                    "name",
                    "color"
                ],
                "title": "StoreTagRequest"
            },
            "StoredFileMinimalResource": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string",
                        "description": "UUID of the uploaded file.",
                        "examples": [
                            "c3f8ca57-b1a4-4560-b3fe-5f3fffb333dd"
                        ]
                    },
                    "sha256": {
                        "type": "string",
                        "description": "SHA256 hash of the uploaded file.",
                        "examples": [
                            "697651f6ceea8a931289ff64cb62f78ceea5d36f7e84590fe9d5920b2dce52cf"
                        ]
                    },
                    "file_name": {
                        "type": "string",
                        "description": "Name of the uploaded file.",
                        "examples": [
                            "NDA_BigCorp.pdf"
                        ]
                    },
                    "file_size": {
                        "type": "integer",
                        "description": "Size of the uploaded file in bytes.",
                        "examples": [
                            544600
                        ]
                    },
                    "mime_type": {
                        "type": "string",
                        "description": "MIME type of the uploaded file.",
                        "examples": [
                            "application\/pdf"
                        ]
                    }
                },
                "required": [
                    "uuid",
                    "sha256",
                    "file_name",
                    "file_size",
                    "mime_type"
                ],
                "title": "StoredFileMinimalResource"
            },
            "StoredFileResource": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string",
                        "description": "UUID of the uploaded file.",
                        "examples": [
                            "c3f8ca57-b1a4-4560-b3fe-5f3fffb333dd"
                        ]
                    },
                    "sha256": {
                        "type": "string",
                        "description": "SHA256 hash of the uploaded file.",
                        "examples": [
                            "697651f6ceea8a931289ff64cb62f78ceea5d36f7e84590fe9d5920b2dce52cf"
                        ]
                    },
                    "file_name": {
                        "type": "string",
                        "description": "Name of the uploaded file.",
                        "examples": [
                            "NDA_BigCorp.pdf"
                        ]
                    },
                    "file_size": {
                        "type": "integer",
                        "description": "Size of the uploaded file in bytes.",
                        "examples": [
                            544600
                        ]
                    },
                    "mime_type": {
                        "type": "string",
                        "description": "MIME type of the uploaded file.",
                        "examples": [
                            "application\/pdf"
                        ]
                    },
                    "download_url": {
                        "type": "string",
                        "description": "The file can be downloaded from this URL. Note that this URL will expire after a short time",
                        "examples": [
                            "https:..."
                        ]
                    }
                },
                "required": [
                    "uuid",
                    "sha256",
                    "file_name",
                    "file_size",
                    "mime_type",
                    "download_url"
                ],
                "title": "StoredFileResource"
            },
            "SyncSigningOrderRequest": {
                "type": "object",
                "properties": {
                    "signing_order": {
                        "type": "array",
                        "description": "The UUIDs of the document's signatories, in the order in which they should sign",
                        "items": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                },
                "required": [
                    "signing_order"
                ],
                "title": "SyncSigningOrderRequest"
            },
            "TagResource": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string",
                        "examples": [
                            "58ac52bb-8885-4580-88c1-7a7bc772c87d"
                        ]
                    },
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Warranty"
                        ]
                    },
                    "color": {
                        "type": "string",
                        "description": "Hex color code for the color that the tag has been assigned",
                        "examples": [
                            "#615fff"
                        ]
                    }
                },
                "required": [
                    "uuid",
                    "name",
                    "color"
                ],
                "title": "TagResource"
            },
            "TeamResource": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string",
                        "examples": [
                            "281b685e-4b29-4618-8231-3822537b139d"
                        ]
                    },
                    "name": {
                        "type": "string",
                        "examples": [
                            "HR"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "uuid",
                    "name",
                    "created_at",
                    "updated_at"
                ],
                "title": "TeamResource"
            },
            "TeamSnippetResource": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string",
                        "examples": [
                            "281b685e-4b29-4618-8231-3822537b139d"
                        ]
                    },
                    "name": {
                        "type": "string",
                        "examples": [
                            "HR"
                        ]
                    }
                },
                "required": [
                    "uuid",
                    "name"
                ],
                "title": "TeamSnippetResource"
            },
            "TemplateDetailResource": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string",
                        "examples": [
                            "4df1e60a-0114-4dce-89e7-8c5ad397fcf2"
                        ]
                    },
                    "name": {
                        "type": "string",
                        "examples": [
                            "Employment Contract"
                        ]
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Template for an employment contract"
                        ]
                    },
                    "locale": {
                        "type": "string",
                        "examples": [
                            "de-AT"
                        ]
                    },
                    "published": {
                        "type": "boolean"
                    },
                    "signature_type": {
                        "anyOf": [
                            {
                                "description": "Controls which [signature type](https:help.fynk.com\/en\/articles\/126836-signature-types) will be used when signing documents created from this template",
                                "$ref": "#\/components\/schemas\/SignatureSecurityLevel"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "sequential_signing": {
                        "type": "boolean",
                        "description": "When true, require setting a `signing_order` for signatories"
                    },
                    "external_signatory_invitation_message": {
                        "type": "string",
                        "description": "This text will be displayed in the email notification sent to users when documents created from this template are ready for signing"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "archived_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "parties": {
                        "type": "array",
                        "description": "The initial set of people and\/or organizations that will be included as parties in documents created from this template",
                        "items": {
                            "$ref": "#\/components\/schemas\/TemplatePartySnippetResource"
                        }
                    },
                    "teams": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/TeamSnippetResource"
                        }
                    },
                    "signatories": {
                        "type": "array",
                        "description": "These signatories will be copied into any documents created from this template",
                        "items": {
                            "$ref": "#\/components\/schemas\/SignatoryResource"
                        }
                    },
                    "dynamic_fields": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/DynamicFieldResource"
                        }
                    },
                    "metadata_values": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/MetadataValueResource"
                        }
                    },
                    "tags": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/TagResource"
                        }
                    }
                },
                "required": [
                    "uuid",
                    "name",
                    "description",
                    "locale",
                    "published",
                    "signature_type",
                    "sequential_signing",
                    "external_signatory_invitation_message",
                    "created_at",
                    "updated_at",
                    "archived_at",
                    "parties"
                ],
                "title": "TemplateDetailResource"
            },
            "TemplateMinimalResource": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string",
                        "examples": [
                            "4df1e60a-0114-4dce-89e7-8c5ad397fcf2"
                        ]
                    },
                    "name": {
                        "type": "string",
                        "examples": [
                            "Employment Contract"
                        ]
                    },
                    "locale": {
                        "type": "string",
                        "examples": [
                            "de-AT"
                        ]
                    },
                    "published": {
                        "type": "boolean"
                    },
                    "signature_type": {
                        "anyOf": [
                            {
                                "$ref": "#\/components\/schemas\/SignatureSecurityLevel"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "sequential_signing": {
                        "type": "boolean",
                        "description": "When true, require setting an order for signatures"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "archived_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "parties": {
                        "type": "array",
                        "description": "The initial set of people and\/or organizations that will be included as parties in documents created from this template",
                        "items": {
                            "$ref": "#\/components\/schemas\/TemplatePartySnippetResource"
                        }
                    },
                    "links": {
                        "type": "object",
                        "properties": {
                            "show": {
                                "type": "string",
                                "examples": [
                                    "https:..."
                                ]
                            }
                        },
                        "required": [
                            "show"
                        ]
                    }
                },
                "required": [
                    "uuid",
                    "name",
                    "locale",
                    "published",
                    "signature_type",
                    "sequential_signing",
                    "created_at",
                    "updated_at",
                    "archived_at",
                    "parties",
                    "links"
                ],
                "title": "TemplateMinimalResource"
            },
            "TemplatePartySnippetResource": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string",
                        "examples": [
                            "595703a2-b7f6-4772-a4b7-ab2f9fac3a9f"
                        ]
                    },
                    "ref_uuid": {
                        "type": "string",
                        "description": "A static reference identifier, allowing parties in documents to be matched their corresponding party in\nthe document's source template.",
                        "examples": [
                            "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
                        ]
                    },
                    "reference": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "A generic reference for the party",
                        "examples": [
                            "Employer"
                        ]
                    },
                    "entity_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The actual name of the party. i.e. name of the company or person. May be null if the party was created via the Template's \"set later\" option",
                        "examples": [
                            "Demo Inc."
                        ]
                    },
                    "address": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "1 Oxford Road\nHenley Bridge\nHB1 1PQ"
                        ]
                    },
                    "scope": {
                        "description": "When this is `internal_and_external`, collaborators from the party may change the party's information in documents created from the template",
                        "$ref": "#\/components\/schemas\/Scope"
                    },
                    "is_internal_party": {
                        "type": "boolean",
                        "description": "Indicates whether this party is linked to an account party (internal) or is standalone (external)"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "uuid",
                    "ref_uuid",
                    "reference",
                    "entity_name",
                    "address",
                    "scope",
                    "is_internal_party",
                    "created_at",
                    "updated_at"
                ],
                "title": "TemplatePartySnippetResource"
            },
            "UpdateDocumentRequest": {
                "type": "object",
                "properties": {
                    "document_type_uuid": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uuid",
                        "description": "UUID of the [document type](\/#document-types) to assign to the document. Pass `null` to remove the\ncurrent document type. Use the [List document types](\/operations\/v1.document-types.index) endpoint to\ndiscover the document type UUIDs available in your account",
                        "example": "58ac52bb-8885-4580-88c1-7a7bc772c87d"
                    },
                    "external_signatory_invitation_message": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Optional text to display in the email notification sent to users when the document is ready for signing",
                        "maxLength": 65535
                    },
                    "name": {
                        "type": "string",
                        "description": "Must be a non-empty string.",
                        "example": "Kundenvertrag Muster GmbH",
                        "maxLength": 255
                    },
                    "sequential_signing": {
                        "type": "boolean",
                        "description": "When true, signatories will sign in ascending order of their `signing_order`. Cannot be changed if signing has started"
                    },
                    "signature_type": {
                        "description": "Controls which [signature type](\/#signature-types) will be used during signing. Cannot be changed if signing has started or if the value is inherited from a [template](\/#templates)",
                        "$ref": "#\/components\/schemas\/SignatureSecurityLevel"
                    }
                },
                "title": "UpdateDocumentRequest"
            },
            "UpdateDocumentUserRequest": {
                "type": "object",
                "description": "All fields are optional. Only the fields to be updated need to be provided.",
                "properties": {
                    "role": {
                        "description": "The user's access level on the document. Note that only users with a fynk account user in your\naccount can become an `owner`",
                        "$ref": "#\/components\/schemas\/DocumentUserAccessRole"
                    },
                    "party_uuid": {
                        "type": "string",
                        "format": "uuid",
                        "description": "UUID of the [party](\/#parties) the user belongs to",
                        "example": "595703a2-b7f6-4772-a4b7-ab2f9fac3a9f"
                    },
                    "first_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Cannot be updated if the document user's `has_account_user` field is true",
                        "example": "Emily",
                        "maxLength": 255
                    },
                    "last_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Cannot be updated if the document user's `has_account_user` field is true",
                        "example": "Miller",
                        "maxLength": 255
                    },
                    "title": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Cannot be updated if the document user's `has_account_user` field is true",
                        "example": "Sales Manager",
                        "maxLength": 255
                    }
                },
                "title": "UpdateDocumentUserRequest"
            },
            "UpdateDynamicFieldRequest": {
                "type": "object",
                "title": "UpdateDynamicFieldRequest"
            },
            "UpdateMetadataRequest": {
                "type": "object",
                "properties": {
                    "display_name": {
                        "type": "string",
                        "description": "The display name shown in the UI.",
                        "example": "Discount Rate",
                        "maxLength": 255
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "A description of the metadata field.",
                        "example": "The discount rate applied to the company valuation in a follow-on financing round.",
                        "maxLength": 1024
                    },
                    "prompt": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "An AI prompt used for metadata extraction.",
                        "example": "Extract the discount rate percentage from the document.",
                        "maxLength": 1024
                    },
                    "keywords": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Keywords to help with metadata identification.",
                        "example": "discount, rate, valuation",
                        "maxLength": 1024
                    },
                    "is_contract_value": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "description": "Whether this is a contract value field. Can only be `true` when `value_type` is `currency` or `currency_duration`."
                    },
                    "select_values": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "The possible values when `value_type` is `select` or `multi_select`.",
                        "items": {
                            "type": "string",
                            "minLength": 1
                        }
                    },
                    "relevant_document_type_uuids": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "UUIDs of document types this metadata is relevant for. `null` means not relevant to any document types. `[]` (empty array) means relevant to all document types.",
                        "items": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                },
                "title": "UpdateMetadataRequest"
            },
            "UpdateMetadataValueRequest": {
                "type": "object",
                "title": "UpdateMetadataValueRequest"
            },
            "UpdatePartyRequest": {
                "type": "object",
                "description": "All fields are optional. Only the fields to be updated need to be provided.",
                "properties": {
                    "reference": {
                        "type": "string",
                        "description": "A generic reference for the party",
                        "example": "Employer",
                        "maxLength": 255
                    },
                    "entity_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The actual name of the party. i.e. name of the company or person. Must be non-null in order for the document to [proceed to the signing stage](\/operations\/v1.documents.stage-transitions.signing)",
                        "example": "Demo Inc.",
                        "maxLength": 255
                    },
                    "address": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The party's address",
                        "example": "1 Oxford Road\nHenley Bridge\nHB1 1PQ",
                        "maxLength": 255
                    },
                    "scope": {
                        "description": "When this is `internal_and_external`, collaborators from this party may change the party's information",
                        "$ref": "#\/components\/schemas\/Scope"
                    }
                },
                "title": "UpdatePartyRequest"
            },
            "UpdatePersonalLinkRequest": {
                "type": "object",
                "properties": {
                    "expires_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the link stops working. Pass `null` for a link that never expires",
                        "example": "2026-10-19T12:00:00Z"
                    },
                    "message": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "A personal message shown to the user when they open the link. Pass `null` to remove the message",
                        "example": "Hi Emily, please review the updated contract.",
                        "maxLength": 65535
                    }
                },
                "title": "UpdatePersonalLinkRequest"
            },
            "UpdatePublicLinkRequest": {
                "type": "object",
                "properties": {
                    "expires_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the link stops working. Pass `null` for a link that never expires",
                        "example": "2026-10-19T12:00:00Z"
                    }
                },
                "title": "UpdatePublicLinkRequest"
            },
            "UpdateSignatoryRequest": {
                "type": "object",
                "description": "All fields are optional. Only the fields to be updated need to be provided.",
                "properties": {
                    "party_uuid": {
                        "type": "string",
                        "format": "uuid",
                        "description": "UUID of the [party](\/#parties) the signatory will be signing for",
                        "example": "595703a2-b7f6-4772-a4b7-ab2f9fac3a9f"
                    },
                    "first_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Cannot be updated if the signatory's `has_account_user` field is true",
                        "example": "Emily",
                        "maxLength": 255
                    },
                    "last_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Cannot be updated if the signatory's `has_account_user` field is true",
                        "example": "Miller",
                        "maxLength": 255
                    },
                    "mobile_phone": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Mobile phone number, in E.164 format, as shown in the example",
                        "example": "+447951123456",
                        "maxLength": 255
                    },
                    "title": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Cannot be updated if the signatory's `has_account_user` field is true",
                        "example": "Sales Manager",
                        "maxLength": 255
                    }
                },
                "title": "UpdateSignatoryRequest"
            },
            "UpdateTagRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "The name of the tag.",
                        "example": "Warranty",
                        "maxLength": 40
                    },
                    "color": {
                        "type": "string",
                        "description": "The color of the tag as a hex string.",
                        "pattern": "^#[0-9a-f]{6}$",
                        "example": "#615fff"
                    }
                },
                "title": "UpdateTagRequest"
            }
        },
        "responses": {
            "AuthenticationException": {
                "description": "Unauthenticated",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            },
            "ChangeNotAllowedException": {
                "description": "The resource's current state prevents the requested change",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "A human-readable description of the problem.",
                                    "example": "These mandatory dynamic fields have no value: Start date, Contract volume."
                                },
                                "error_type": {
                                    "type": "string",
                                    "description": "An identifier for the type of error that occurred.",
                                    "example": "mandatory_dynamic_field_without_value"
                                }
                            },
                            "required": [
                                "message",
                                "error_type"
                            ]
                        }
                    }
                }
            },
            "ValidationException": {
                "description": "Validation error",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Errors overview."
                                },
                                "errors": {
                                    "type": "object",
                                    "description": "A detailed description of each field that failed validation.",
                                    "additionalProperties": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            "required": [
                                "message",
                                "errors"
                            ]
                        }
                    }
                }
            },
            "AuthorizationException": {
                "description": "Authorization error",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            },
            "ModelNotFoundException": {
                "description": "Not found",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            },
            "ShareableLinkChangeNotAllowedException": {
                "description": "The resource's current state prevents the requested change",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "A human-readable description of the problem.",
                                    "example": "These mandatory dynamic fields have no value: Start date, Contract volume."
                                },
                                "error_type": {
                                    "type": "string",
                                    "description": "An identifier for the type of error that occurred.",
                                    "example": "mandatory_dynamic_field_without_value"
                                }
                            },
                            "required": [
                                "message",
                                "error_type"
                            ]
                        }
                    }
                }
            }
        }
    }
}