POST
/

Use this API to add Users to:

  1. Organization: This will provide them access to all the documents in the organization. It will also show users in the contact list of the organization.
  2. Document: This will provide them access to the specified document. It will also show users in the contact list of the document. If you pass the documentId, then the users will be added to the document.
If organization does not exist, it will be created.
If User’s initial is not provided in the User object, then it will be automatically created using the name field.

Endpoint

https://addusers.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

1. Add users to a specific organization

{
  "data": {
    "organizationId": "yourOrganizationId",
    "users": [
      {
        "userId": "yourUserId1",
        "name": "User Name",
        "email": "user@email.com"
      }
    ]
  }
}

2. Add users to a specific document within an organization

{
  "data": {
    "organizationId": "yourOrganizationId",
    "documentId": "yourDocumentId",
    "users": [
      {
        "userId": "yourUserId1",
        "name": "User Name",
        "email": "user@email.com"
      }
    ]
  }
}

Response

Success Response

{
  "result": {
    "status": "success",
    "message": "User(s) processed successfully.",
    "data": {
      "yourUserId1": {
        "success": true,
        "id": "4c250058149d6c9fb8c894c9ef29c790",
        "message": "User added."
      }
    }
  }
}

Failure Response

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