POST
/

Use this API to update the access type for a single or multiple documents at once.

You can update the default access type for all the documents associated with your API Key in console.

Endpoint

https://updateaccessfordocuments.api.velt.dev

Headers

x-velt-api-key
string
required

Your API key.

x-velt-auth-token
string
required

Body Example

Params

data
object
required

Example Requests

{
  "data": {
    "organizationId": "yourOrganizationId",
    "documentIds": ["yourDocumentId1, yourDocumentId2"],
    "accessType": "organizationPrivate"
  }
}

Response

Success Response

{
  "result": {
    "status": "success",
    "message": "Updated access for documents successfully.",
    "data": {
      "yourDocumentId": {
        "success": true,
        "accessType": "organizationPrivate",
        "message": "Document access type updated."
      }
    }
  }
}

Failure Response

{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "INVALID_ARGUMENT"
  }
}