Skip to main content

<?php

 

    $endpoint = "/restapi/v1.0/account/~/extension/425746071";

    $body = [

        "costCenter" => [

            "id" => 303070 

        ]

    ];

    try {

        $response = $platform->patch($endpoint, $body);

        return $response->json();

    } catch (\RingCentral\SDK\Http\ApiException $e) {

        echo "Failed to update cost center for extension " . $e->getMessage() . "\n";

        return null;

    }

?>

 

But I am getting Resource not found. 425746071 is a valid extensionID and 303070  is a valid costcenterID. My app has Edit Extensions rights

That endpoint does not support PATCH method, it is a PUT method. But it does not take the costCenter param in the request body either.

Try with this API instead.