User API icon

User API

The Vonage Business Cloud User API enables you to retrieve information about users

COMMUNITYBEARER0 INSTALLS
API Docs
OpenAPI Specificationv3.0
{
  "openapi": "3.0.0",
  "servers": [
    {
      "url": "https://api.vonage.com/t/vbc.prod/provisioning"
    }
  ],
  "info": {
    "contact": {
      "name": "Vonage Business Cloud Support",
      "url": "https://businesssupport.vonage.com/contactus"
    },
    "description": "The Vonage Business Cloud User API enables you to retrieve information about users.\n\nYour application must subscribe to the Provisioning API suite to use this API.\n",
    "termsOfService": "https://www.vonage.com/business/legal-policy-center/business-cloud/tos",
    "title": "User API",
    "version": "1.11.8",
    "x-origin": [
      {
        "format": "openapi",
        "url": "https://raw.githubusercontent.com/nexmo/api-specification/master/definitions/vonage-business-cloud/user.yml",
        "version": "3.0"
      }
    ],
    "x-providerName": "vonage.com",
    "x-serviceName": "user",
    "x-logo": {
      "url": "https://api.apis.guru/v2/cache/logo/https_apis.guru_assets_images_no-logo.svg"
    }
  },
  "paths": {
    "/api/accounts/{account_id}/users": {
      "get": {
        "operationId": "UserCtrl.getUsers",
        "parameters": [
          {
            "$ref": "#/components/parameters/AccountID"
          },
          {
            "description": "Number of records per page",
            "example": 10,
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "Current page number",
            "example": 10,
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "Filter by first name",
            "example": "John",
            "in": "query",
            "name": "first_name",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by last name",
            "example": "Smith",
            "in": "query",
            "name": "last_name",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by login name",
            "example": "jsmith",
            "in": "query",
            "name": "login_name",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by email address",
            "example": "john.smith@example.com",
            "in": "query",
            "name": "email",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsersHalResponse"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorsResponse"
                }
              }
            },
            "description": "Invalid parameters given"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get account users data by account ID"
      }
    },
    "/api/accounts/{account_id}/users/{user_id}": {
      "get": {
        "operationId": "UserCtrl.getUserByID",
        "parameters": [
          {
            "$ref": "#/components/parameters/AccountID"
          },
          {
            "description": "The Vonage Business Cloud user ID",
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserHalResponse"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "User not found"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get user data by account ID and user ID"
      }
    }
  },
  "components": {
    "parameters": {
      "AccountID": {
        "description": "The Vonage Business Cloud account ID",
        "example": 451496,
        "in": "path",
        "name": "account_id",
        "required": true,
        "schema": {
          "type": "string"
        }
      }
    },
    "schemas": {
      "Contact": {
        "properties": {
          "type": {
            "description": "Contact type",
            "example": "Home",
            "type": "string"
          },
          "value": {
            "description": "Contact value",
            "example": "14155550100",
            "type": "string"
          }
        },
        "type": "object"
      },
      "DID": {
        "properties": {
          "custom_tag": {
            "description": "Custom tag associated with the phone number",
            "example": "My Tag",
            "type": "string"
          },
          "phone_number": {
            "description": "Phone number",
            "example": "14155550100",
            "type": "string"
          }
        },
        "type": "object"
      },
      "DetailedInvalidParam": {
        "properties": {
          "name": {
            "description": "Invalid property name",
            "type": "string"
          },
          "reason": {
            "description": "Invalid property reason",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ErrorResponse": {
        "properties": {
          "msg": {
            "description": "Error message",
            "type": "string"
          },
          "status": {
            "description": "Http Response Code",
            "type": "number"
          }
        },
        "type": "object"
      },
      "FirstHref": {
        "description": "URL to the first page of records",
        "properties": {
          "href": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "LastHref": {
        "description": "URL to the last page of records",
        "properties": {
          "href": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Links": {
        "properties": {
          "first": {
            "$ref": "#/components/schemas/FirstHref"
          },
          "next": {
            "$ref": "#/components/schemas/NextHref"
          },
          "prev": {
            "$ref": "#/components/schemas/PrevHref"
          },
          "self": {
            "$ref": "#/components/schemas/SelfHref"
          }
        },
        "type": "object"
      },
      "NextHref": {
        "description": "URL to the next page of records",
        "properties": {
          "href": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "PrevHref": {
        "description": "URL to the previous page of records",
        "properties": {
          "href": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "SelfHref": {
        "description": "URL to the current page of records",
        "properties": {
          "href": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "User": {
        "properties": {
          "contact_numbers": {
            "description": "Collection of contact objects",
            "items": {
              "$ref": "#/components/schemas/Contact"
            },
            "type": "array"
          },
          "email": {
            "description": "Email address of the user",
            "example": "john.smith@example.com",
            "type": "string"
          },
          "extensions": {
            "description": "Collection of extension objects",
            "items": {
              "$ref": "#/components/schemas/UserExtension"
            },
            "type": "array"
          },
          "first_name": {
            "description": "First name of the user",
            "example": "John",
            "type": "string"
          },
          "id": {
            "description": "Unique identifier of the user",
            "example": 869048,
            "type": "number"
          },
          "last_name": {
            "description": "Last name of the user",
            "example": "Smith",
            "type": "string"
          },
          "login_name": {
            "description": "Login name of the user",
            "example": "jsmith",
            "type": "string"
          }
        },
        "type": "object"
      },
      "UserEmbeddedObject": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/User"
          }
        },
        "type": "object"
      },
      "UserExtension": {
        "properties": {
          "dids": {
            "description": "Collection of phone numbers assigned to the extension",
            "items": {
              "$ref": "#/components/schemas/DID"
            },
            "type": "array"
          },
          "extension_number": {
            "description": "Extension number",
            "example": "789",
            "type": "string"
          }
        },
        "type": "object"
      },
      "UserHalResponse": {
        "properties": {
          "_embedded": {
            "$ref": "#/components/schemas/UserEmbeddedObject"
          },
          "_links": {
            "$ref": "#/components/schemas/Links"
          },
          "page": {
            "description": "Current page number",
            "example": 1,
            "type": "number"
          },
          "page_size": {
            "description": "Number of records per page",
            "example": 10,
            "type": "number"
          },
          "total_items": {
            "description": "Total number of records",
            "example": 100,
            "type": "number"
          },
          "total_pages": {
            "description": "Total number of pages",
            "example": 10,
            "type": "number"
          }
        },
        "type": "object"
      },
      "UsersEmbeddedObject": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/User"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "UsersHalResponse": {
        "properties": {
          "_embedded": {
            "$ref": "#/components/schemas/UsersEmbeddedObject"
          },
          "_links": {
            "$ref": "#/components/schemas/Links"
          },
          "page": {
            "description": "Current page number",
            "example": 1,
            "type": "number"
          },
          "page_size": {
            "description": "Number of records per page",
            "example": 10,
            "type": "number"
          },
          "total_items": {
            "description": "Total number of records",
            "example": 100,
            "type": "number"
          },
          "total_pages": {
            "description": "Total number of pages",
            "example": 10,
            "type": "number"
          }
        },
        "type": "object"
      },
      "ValidationErrorsResponse": {
        "properties": {
          "instance": {
            "description": "Error Track ID",
            "type": "string"
          },
          "invalid_parameters": {
            "description": "Invalid parameters and their reason for failing",
            "items": {
              "$ref": "#/components/schemas/DetailedInvalidParam"
            },
            "type": "array"
          },
          "status": {
            "description": "Error status code",
            "type": "number"
          },
          "title": {
            "description": "Error title",
            "type": "string"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "bearerFormat": "OAuth",
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}