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

# Update Presence

Use this API to update presence data for existing users on a document within an organization.

# Endpoint

`POST https://api.velt.dev/v2/presence/update`

# Headers

**x-velt-api-key** `string` *required*

Your API key.

**x-velt-auth-token** `string` *required*

Your [Auth Token](https://velt.dev/docs/security/auth-tokens.md).

# Body

#### Params

**data** `object` *required*

**properties**

**organizationId** `string` *required*

Organization ID

**documentId** `string` *required*

Document ID

**users** `object[]` *required*

Array of user objects to update. Each must include `userId`.

**properties**

**userId** `string` *required*

Unique identifier for the user to update.

**name** `string`

Updated display name of the user.

**email** `string`

Updated email address of the user.

**status** `string`

Updated presence status of the user (e.g., `"online"`, `"away"`, `"offline"`).

## **Example Requests**

#### Update a user's presence status

```JSON theme={null}
{
  "data": {
    "organizationId": "org-123",
    "documentId": "doc-456",
    "users": [
      {
        "userId": "user-1",
        "status": "away"
      }
    ]
  }
}
```

#### Update multiple users

```JSON theme={null}
{
  "data": {
    "organizationId": "org-123",
    "documentId": "doc-456",
    "users": [
      {
        "userId": "user-1",
        "status": "online",
        "name": "Updated Name"
      },
      {
        "userId": "user-2",
        "status": "away"
      }
    ]
  }
}
```

# Response

#### Success Response

```JSON theme={null}
{
  "result": {
    "status": "success",
    "message": "Presence updated successfully.",
    "data": {
      "success": true
    }
  }
}
```

#### Failure Response

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

```js theme={null}
{
  "result": {
    "status": "success",
    "message": "Presence updated successfully.",
    "data": {
      "success": true
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.