Document

Delete a document

  • Sandbox: available
  • Staging: available
  • Production: unknown
DELETE
/document/{id}

Deletes a document and its stored file. This cannot be undone.

Auth: bearer token. The document is read and deleted with your token, so you need read and delete access to the DocumentReference.

Behaviour

  • The stored file is deleted first, then the DocumentReference.
  • If deleting the stored file fails, the DocumentReference is still deleted.
  • Public links to the document stop working.

Example

curl -X DELETE 'https://api.sandbox.ovok.com/document/c3499c27-2973-0a7f-807e-fb8676a92dcb' \  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'
{ "message": "Document deleted successfully" }

Authorization

bearer
headerAuthorizationBearer <JWT>

Path Parameters

id*string

The id of the DocumentReference resource

Formatuuid

Response Body

Confirmation message.

application/json
  1. response
message*string

Always Document deleted successfully.

Example Request
curl -X DELETE 'https://api.sandbox.ovok.com/document/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "message": "string"}

Update document metadata PATCH

Changes a document's file name, content type or public status, without uploading a new file. **Auth:** bearer token. The document is read and updated with your token, so you need update access to the DocumentReference. ## Behaviour - Every field is optional. Fields you leave out keep their value. - `contentType` must be one of the allowed types listed under `POST /document`. It changes both the DocumentReference and the stored file's content type. - `isPublic: true` gives a private document a public token. `isPublic: false` removes the public token, so existing public links stop working. Setting the status it already has changes nothing. - The response has the same shape as a search entry, without `uploadOptions`. ## Example ```bash curl -X PATCH 'https://api.sandbox.ovok.com/document/c3499c27-2973-0a7f-807e-fb8676a92dcb' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \ -H 'Content-Type: application/json' \ -d '{ "fileName": "updated-image.png", "isPublic": false }' ```

Get example email template params GET

Returns one example set of params for every email template, keyed by template name. Use it to preview what a template receives. For the types, nullability and audience of each param, use `GET /v1/email/templates` instead. **Auth:** bearer token. Any signed-in user can call it. The response is the same for every project. ## Behaviour - The response is an object with one key per template name. Each value is an example of the params that template receives when it is sent. - The values are fixed sample data, not data from your project. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/email/templates' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```