Download your chat upload
- Sandbox: available
- On your own host? Choose https://{host} in the playground.
Answers a link that downloads one of your own chat uploads, for example to check it before you send it.
Behaviour
- The link works for an hour and needs no bearer. The file comes as the type it was uploaded as.
- Anyone else's upload answers 404, as does an upload whose file is gone.
Example
curl 'https://api.sandbox.ovok.com/v1/chat/attachments/<attachmentId>' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'bearerAuthorizationBearer <JWT>attachmentId*stringAn attachment id, from POST /v1/chat/attachments.
^[A-Za-z0-9\-.]{1,64}$A link that downloads the file for the next hour.
application/json- response
url*stringDownloads the file; needs no bearer.
expiresAt*stringWhen the link stops working.
curl -X GET 'https://api.sandbox.ovok.com/v1/chat/attachments/string'{ "url": "string", "expiresAt": "string"}Upload a chat attachment POST
Starts an upload of a file to send in chat: a PDF, PNG, JPEG or WebP of up to 10 MB. Ovok keeps it private; your access policy needs no document rights. ## Behaviour - The answer names the attachment (`id`) and where to upload its file: `POST` it to `upload.url` within ten minutes as multipart form data, every one of `upload.fields` first and the file last as `file`. - Then send it with a message: `POST /v1/chat/threads/<threadId>/messages` with `attachments: ["<id>"]`. One upload can go into any number of your threads. - Only you can send your upload. Everyone who can read a message it went out with can download it. ## Example ```bash curl -X POST 'https://api.sandbox.ovok.com/v1/chat/attachments' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \ -H 'Content-Type: application/json' \ -d '{ "fileName": "Flu vaccination 2026.pdf", "contentType": "application/pdf" }' ```
Request consent signature POST
Requests an e-signature for a FHIR `Consent`: Ovok renders the consent text as a PDF, uploads it to the e-signature service (Documenso) with the verifier as the signer, and returns the document metadata. **Auth:** bearer token. Every FHIR read runs with your token, so you must be able to read the Consent and the resources it points to. ## Behaviour - The Consent must have: - `patient` referencing a `Patient`; - a `provision.data` reference to a `Composition` that holds the consent text; - a `verification` entry whose `verifiedWith` references a `Patient` or `RelatedPerson`, with `verified` not `true`. - The text comes from the Composition section coded `main-content`. It is a Handlebars template filled with `patient`, `signer` and `organization` (the display names of the patient, the verifier and the project). - The signer's email is the first `email` entry in the verifier's `telecom`. - The document language comes from the Composition's CMS language coding when it is one of `en`, `de`, `fr`, `es`, `it`, `pl`; otherwise `de`. - On success an identifier with system `https://app.documenso.com` and the new document ID is added to the Consent. Each call creates a new signature document and adds another identifier. - The response holds `numberOfPages`, `title`, `author`, `subject`, `documentId` and `email` (the signer's address). ## Example ```bash curl -X POST 'https://api.sandbox.ovok.com/consent/signature/c3499c27-2973-0a7f-807e-fb8676a92dcb' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```