> ## Documentation Index
> Fetch the complete documentation index at: https://velt-mintlify-e6426361.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update documents (v2)

> Update document metadata such as title, description, and custom fields using the Velt v2 REST API to keep collaboration resources in sync with your app.

Use this API to update metadata of documents within an organization.

# Endpoint

`POST https://api.velt.dev/v2/organizations/documents/update`

# Headers

<ParamField header="x-velt-api-key" type="string" required>
  Your API key.
</ParamField>

<ParamField header="x-velt-auth-token" type="string" required>
  Your [Auth Token](/security/auth-tokens).
</ParamField>

# Body

#### Params

<ParamField body="data" type="object" required>
  <Expandable title="properties">
    <ParamField body="organizationId" type="string" required>
      Organization ID
    </ParamField>

    <ParamField body="documents" type="Document[]" required>
      Array of Document objects
    </ParamField>
  </Expandable>
</ParamField>

## **Example Requests**

```JSON theme={null}
{
  "data": {
    "organizationId": "yourOrganizationId",
    "documents": [
      {
        "documentId": "yourDocumentId",
        "documentName": "Your Document Name"
      }
    ]
  }
}
```

# Response

#### Success Response

```JSON theme={null}
{
  "result": {
    "status": "success",
    "message": "Document(s) updated successfully.",
    "data": {
      "yourDocumentId": {
        "success": true,
        "id": "8121657101517513",
        "message": "Updated Successfully"
      }
    }
  }
}
```

#### Failure Response

```JSON theme={null}
{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "INVALID_ARGUMENT"
  }
}
```

<ResponseExample>
  ```js theme={null}
  {
    "result": {
      "status": "success",
      "message": "Document(s) updated successfully.",
      "data": {
        "yourDocumentId": {
          "success": true,
          "id": "8121657101517513",
          "message": "Updated Successfully"
        }
      }
    }
  }
  ```
</ResponseExample>
