> ## 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.

# Add Presence

Use this API to add users to the presence list for a document within an organization.

# Endpoint

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

# 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 add to presence.

**properties**

**userId** `string` *required*

Unique identifier for the user.

**name** `string`

Display name of the user.

**email** `string`

Email address of the user.

**status** `string`

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

## **Example Requests**

#### Add a single user to presence

```JSON theme={null}
{
  "data": {
    "organizationId": "org-123",
    "documentId": "doc-456",
    "users": [
      {
        "userId": "user-1",
        "name": "User Name",
        "email": "user@example.com",
        "status": "online"
      }
    ]
  }
}
```

#### Add multiple users to presence

```JSON theme={null}
{
  "data": {
    "organizationId": "org-123",
    "documentId": "doc-456",
    "users": [
      {
        "userId": "user-1",
        "name": "User Name",
        "email": "user@example.com"
      },
      {
        "userId": "user-2",
        "name": "Another User",
        "email": "another@example.com",
        "status": "away"
      }
    ]
  }
}
```

# Response

#### Success Response

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

#### Failure Response

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

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


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