Skip to main content
PUT
/
user
/
update-rcextension
Update a user's Ring Central extension
curl --request PUT \
  --url http://localhost:2000/user/update-rcextension \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{}'
import requests

url = "http://localhost:2000/user/update-rcextension"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({})
};

fetch('http://localhost:2000/user/update-rcextension', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_PORT => "2000",
  CURLOPT_URL => "http://localhost:2000/user/update-rcextension",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => json_encode([
    
  ]),
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "http://localhost:2000/user/update-rcextension"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.put("http://localhost:2000/user/update-rcextension")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
require 'uri'
require 'net/http'

url = URI("http://localhost:2000/user/update-rcextension")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
{
  "message": "<string>",
  "data": {}
}
Admin-only endpoint to update the Ring Central extension stored in a user’s personal information.

Request

Headers

NameTypeRequiredDescription
AuthorizationstringYesBearer token
Content-TypestringYesapplication/json

Request Body

{
  "payload": {
    "userId": "64b7f1a2e4b0a5d3f9c12345",
    "rcExtension": "1234"
  }
}

Request Body Schema

FieldTypeRequiredDescription
payloadobjectYesUpdate payload
payload.userIdstringYesUser ID to update
payload.rcExtensionstringYesNew extension number

Response

200 OK - Successfully updated RC extension

{
  "message": "RingCentral extension updated successfully",
  "data": {}
}

400 Bad Request

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request body"
  }
}

401 Unauthorized

{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Missing or invalid token or insufficient permissions"
  }
}

404 Not Found

{
  "error": {
    "code": "USER_NOT_FOUND",
    "message": "User not found"
  }
}

500 Internal Server Error

{
  "error": {
    "code": "SERVER_ERROR",
    "message": "Internal server error"
  }
}

Example

curl -X PUT 'http://localhost:2000/user/update-rcextension' \
  -H 'Authorization: Bearer your-jwt-token' \
  -H 'Content-Type: application/json' \
  -d '{
    "payload": {
      "userId": "64b7f1a2e4b0a5d3f9c12345",
      "rcExtension": "1234"
    }
  }'

Notes

  • This is an admin-only endpoint - requires administrative privileges
  • The extension must be unique across the system
  • Extension numbers should be 2-10 digits long
  • The user ID must be a valid MongoDB ObjectId
  • Only administrators can update other users’ extensions

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
payload
object

Response

Successfully updated RC extension

message
string
data
object