Cancel Service
curl --request POST \
--url https://brokers.newyorkcityservers.com/api/v1/services/{service_number}/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cancellation_reason": "Customer no longer needs the service"
}
'import requests
url = "https://brokers.newyorkcityservers.com/api/v1/services/{service_number}/cancel"
payload = { "cancellation_reason": "Customer no longer needs the service" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({cancellation_reason: 'Customer no longer needs the service'})
};
fetch('https://brokers.newyorkcityservers.com/api/v1/services/{service_number}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://brokers.newyorkcityservers.com/api/v1/services/{service_number}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'cancellation_reason' => 'Customer no longer needs the service'
]),
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 := "https://brokers.newyorkcityservers.com/api/v1/services/{service_number}/cancel"
payload := strings.NewReader("{\n \"cancellation_reason\": \"Customer no longer needs the service\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://brokers.newyorkcityservers.com/api/v1/services/{service_number}/cancel")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cancellation_reason\": \"Customer no longer needs the service\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://brokers.newyorkcityservers.com/api/v1/services/{service_number}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cancellation_reason\": \"Customer no longer needs the service\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"request_id": "REQ-002386",
"type": "cancellation",
"request_status": "accepted",
"service_number": 1001,
"cancellation_reason": "Customer no longer needs the service",
"submitted_date": "2026-06-21T15:00:00.000Z"
}
}{
"success": true,
"data": {
"request_id": "REQ-002386",
"request_status": "nycservers_review",
"message": "There was a setup issue. Your request has been escalated for NYCS review. No need to resubmit."
}
}{
"success": false,
"error": {
"code": "missing_parameter",
"message": "Missing or invalid cancellation_reason in request body",
"details": {
"required_fields": [
"cancellation_reason"
]
}
}
}{
"success": false,
"error": {
"code": "authentication_failed",
"message": "Invalid API key"
}
}{
"success": false,
"error": {
"code": "insufficient_permissions",
"message": "IP address not whitelisted"
}
}{
"success": false,
"error": {
"code": "not_found",
"message": "Service not found or access denied"
}
}{
"success": false,
"error": {
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded"
}
}{
"success": false,
"error": {
"code": "server_error",
"message": "Internal server error"
}
}Cancel Service
Submit immediate cancellation for a service
POST
/
v1
/
services
/
{service_number}
/
cancel
Cancel Service
curl --request POST \
--url https://brokers.newyorkcityservers.com/api/v1/services/{service_number}/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cancellation_reason": "Customer no longer needs the service"
}
'import requests
url = "https://brokers.newyorkcityservers.com/api/v1/services/{service_number}/cancel"
payload = { "cancellation_reason": "Customer no longer needs the service" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({cancellation_reason: 'Customer no longer needs the service'})
};
fetch('https://brokers.newyorkcityservers.com/api/v1/services/{service_number}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://brokers.newyorkcityservers.com/api/v1/services/{service_number}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'cancellation_reason' => 'Customer no longer needs the service'
]),
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 := "https://brokers.newyorkcityservers.com/api/v1/services/{service_number}/cancel"
payload := strings.NewReader("{\n \"cancellation_reason\": \"Customer no longer needs the service\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://brokers.newyorkcityservers.com/api/v1/services/{service_number}/cancel")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cancellation_reason\": \"Customer no longer needs the service\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://brokers.newyorkcityservers.com/api/v1/services/{service_number}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cancellation_reason\": \"Customer no longer needs the service\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"request_id": "REQ-002386",
"type": "cancellation",
"request_status": "accepted",
"service_number": 1001,
"cancellation_reason": "Customer no longer needs the service",
"submitted_date": "2026-06-21T15:00:00.000Z"
}
}{
"success": true,
"data": {
"request_id": "REQ-002386",
"request_status": "nycservers_review",
"message": "There was a setup issue. Your request has been escalated for NYCS review. No need to resubmit."
}
}{
"success": false,
"error": {
"code": "missing_parameter",
"message": "Missing or invalid cancellation_reason in request body",
"details": {
"required_fields": [
"cancellation_reason"
]
}
}
}{
"success": false,
"error": {
"code": "authentication_failed",
"message": "Invalid API key"
}
}{
"success": false,
"error": {
"code": "insufficient_permissions",
"message": "IP address not whitelisted"
}
}{
"success": false,
"error": {
"code": "not_found",
"message": "Service not found or access denied"
}
}{
"success": false,
"error": {
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded"
}
}{
"success": false,
"error": {
"code": "server_error",
"message": "Internal server error"
}
}Submit a cancellation for one service in your broker account. A successful response means that the API accepted the request, and the service will be cancelled.
This request starts a real cancellation workflow that removes client’s ability to access the service immediately.
Accepted Response
The normal response is HTTP200. The cancellation continues asynchronously.
Errors
| HTTP status | Error code | Message or cause |
|---|---|---|
400 | invalid_parameter | service_number does not start with a numeric value. The message is Invalid service number. |
400 | invalid_request | The body is not valid JSON. The message is Invalid JSON in request body. |
400 | missing_parameter | cancellation_reason is missing, is not a string, or contains only spaces. |
400 | invalid_state | The service status is cancelled. The response details contain current_status: "cancelled". |
400 | service_pending_provisioning | The service status is pending. Wait for provisioning to finish. |
401 | authentication_failed | The Bearer token is missing, invalid, inactive, or expired. |
403 | insufficient_permissions | The request IP is not allowed, or the key does not have admin:full. |
404 | not_found | The service does not exist in this broker account. The message is Service not found or access denied. |
429 | rate_limit_exceeded | The key reached its rate limit. Use the Retry-After response header. |
500 | server_error | The API could not create, queue, or accept the cancellation request, or an internal operation failed. |
Authorizations
Send the API key in the Authorization bearer header. Production keys begin with sk_live_.
Path Parameters
Public service number parsed as a base-10 integer.
Body
application/json
Nonblank cancellation reason; surrounding whitespace is removed.
Minimum string length:
1Last modified on August 2, 2026
⌘I

