Request Structure

This topic describes the structure of NovoOne API requests.

Request example

We take the Update Feature Code Setting API as an example to show you how an API request is structured and what each element represents.

PUT /uc-cconfig/api/v1/feature-codes HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer {access_token}
Content-Type: application/json
x-tenant-code: {tenant_name}
{
  "recordingEnabled": false,
  "voicemailLeaveEnabled": true,
  "transferDigitTimeout": 8,
  "forwardNoAnswerEnabled": false
}
Element Description
PUT Specify the request method.

For more information, see Request method.

/uc-cconfig/api/v1/feature-codes Specify the API endpoint used to update feature code settings for a tenant.

For more information, see Endpoint.

HTTP/1.1 Specify the HTTP protocol version.
Host: api.cn.novoone.com Specify the NovoOne API domain.

For more information, see Base URL.

Authorization: Bearer {access_token} Specify the access token used to authenticate the request.

For more information, see Authenticate header.

Content-Type: application/json Specify the media type of the request body.

For more information, see Content Type header.

x-tenant-code: {tenant_name} Specify the target tenant for the request.

For more information, see Tenant Code header.

{
  "recordingEnabled": false,
  "voicemailLeaveEnabled": true,
  "transferDigitTimeout": 8,
  "forwardNoAnswerEnabled": false
}

Specify the data sent to the API server.

For more information, see Request body.

Request method

Request method specifies the operation to perform in an API request. NovoOne API supports the following request methods:

HTTP Method Description
GET Query information.
POST Add an object or perform specific operations.
PUT Update configurations.
DELETE Delete one or more objects.

Request URL

Request URL consists of the base URL and endpoint:
{base_url}/{endpoint}
Element Description
{base_url}

Base URL specifies the domain of the NovoOne API.

https://api.{novoone_domain}
Note:
  • The NovoOne API is served over HTTPS on TCP port 443.

    This requires that all API requests must use https:// rather than http://, and that the network hosting third‑party applications must allow outbound connections to remote TCP port 443.

  • The variable {novoone_domain} must be the domain for a specific region (e.g., cn.novoone.com), rather than the unified NovoOne portal domain.
  • Only system resources that you have permission to manage on the portal interface within the region specified by the base URL can be managed via the API.
{endpoint} Endpoint identifies the API endpoint to which the request is sent.
  • Endpoint format for authorization requests:
    /api/v1/oauth2/token
  • Endpoint format for other requests:
    /{service_module}/api/v1/**
    Note: For easier management, NovoOne API is organized into multiple service modules, such as auto provisioning, call control, platform user management, and more. The variable {service_module} indicates the target module.
    For a list of all supported NovoOne API endpoints, see List of API Endpoints.

Request header

HTTP request header may include the following fields.

Field Description
Authenticate

The Authorization header carries the access token used to authenticate the request.

Note:
  • You can query the access token using the Get an Access Token interface.
  • Some API endpoints do not require a token. Refer to the specific API descriptions for details.

Header Field Format:

Authorization: Bearer {access_token}
Header Field Example:
Authorization: Bearer eyJraWQiOiJyZWdpb24ta2V5LTEiLCJhbGciOiJSUzI1NiJ9.eyJzdWI2cDLT4i
Content-Type For POST and PUT requests, Content-Type header specifies the media type of the request body.
  • For form-encoded requests, specify application/x-www-form-urlencoded.
  • For JSON requests, specify application/json.
x-tenant-code x-tenant-code header specifies the target tenant when the API request manages tenant resources, such as emergency contacts, feature codes, and tenant users.
Note: You can query the tenant name using the Query Tenants interface.
Header Field Format
x-tenant-code: {tenant_name}
Header Field Example
x-tenant-code: tenant_sample

Request body

Request body contains the data sent to the API server. It is typically used in POST or PUT requests to create or update resources.
Note: When a request body is present, you need to specify the corresponding Content-Type header field to indicate the data format.

NovoOne API supports the following data formats for POST or PUT requests.

Request Example
Form-encoded requests

Body Format

key1=value1&key2=value2&key3=value3
Body Example
username=admin&password=123456
JSON requests

Body Format

{
  "key1": "value1",
  "key2": "value2"
}
Body Example
{
  "username": "admin",
  "password": "123456"
}