POST
/
v2
/
organizations
/
documents
/
get

Use this API to retrieve specific documents or all documents from an organization.

Prior to using this API, you must:

  • Deploy v3.0.61 or higher of the Velt SDK.
  • Enable advanced queries option in the console

Endpoint

POST https://api.velt.dev/v2/organizations/documents/get

Headers

x-velt-api-key
string
required

Your API key.

x-velt-auth-token
string
required

Body Example

Params

data
object
required

Example Requests

1. Get all documents from organization

{
  "data": {
    "organizationId": "yourOrganizationId",
    "pageSize": 20,
    "pageToken": "8740648311207869"
  }
}

2. Get specific documents from organization

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

Response

Success Response

{
  "result": {
    "status": "success",
    "message": "Document(s) retrieved successfully.",
    "data": [
      {
        "documentName": "yourDocumentName",
        "disabled": false,
        "accessType": "public",
        "id": "yourDocumentId",
      }
    ],
    "pageToken": "nextPageToken"
  }
}

Failure Response

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