curl --request DELETE \
--url https://api.stigg.io/api/v1/contracts/{id}/subscriptions/{subscriptionId} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.stigg.io/api/v1/contracts/{id}/subscriptions/{subscriptionId}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.stigg.io/api/v1/contracts/{id}/subscriptions/{subscriptionId}', 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://api.stigg.io/api/v1/contracts/{id}/subscriptions/{subscriptionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.stigg.io/api/v1/contracts/{id}/subscriptions/{subscriptionId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.stigg.io/api/v1/contracts/{id}/subscriptions/{subscriptionId}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stigg.io/api/v1/contracts/{id}/subscriptions/{subscriptionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"contractId": "contract-acme-2026",
"billingId": "ct_1a2b3c4d",
"id": "3452155b-deca-4d7f-91e5-82d486dc8bb0",
"refId": "contract-acme-2026",
"poNumber": "PO-4821",
"externalId": "contract-acme-2026",
"customerExternalId": "customer-acme",
"name": "PO-4821",
"state": "ACTIVE",
"billingState": "ACTIVE",
"activationStartDate": "2026-01-01T00:00:00.000Z",
"activationEndDate": "2026-12-31T00:00:00.000Z",
"createdAt": "2025-12-15T09:30:00.000Z",
"nextInvoice": {
"invoiceId": "a3f1c2de-5b47-4c8e-9f10-2d6b8e4a7c31",
"amount": {
"amount": 4900,
"currency": "usd"
},
"dueDate": "2026-08-01T00:00:00.000Z",
"periodStart": "2026-07-01T00:00:00.000Z",
"periodEnd": "2026-08-01T00:00:00.000Z"
},
"latestInvoice": {
"billingId": "inv_abc123",
"status": "OPEN",
"createdAt": "2026-07-01T00:00:00.000Z",
"total": 4900,
"amountDue": 4900,
"currency": "usd",
"pdfUrl": null,
"requiresAction": false,
"billingReason": null
},
"subscriptions": [
{
"subscriptionId": "subscription-acme-platform",
"planDisplayName": "Enterprise Platform",
"productDisplayName": "Revvenu"
}
]
}
}{
"message": "<string>",
"code": "BadUserInput",
"reason": "<string>"
}{
"message": "<string>",
"code": "Unauthenticated"
}{
"message": "<string>",
"code": "IdentityForbidden"
}{
"message": "<string>",
"code": "CustomerNotFound"
}{
"message": "<string>",
"code": "RateLimitExceeded"
}Detach subscription from contract
Detaches a single subscription from the contract. The subscription itself is left untouched and stays active — only its link to the contract is removed. Idempotent: detaching a subscription that is not attached succeeds and changes nothing.
curl --request DELETE \
--url https://api.stigg.io/api/v1/contracts/{id}/subscriptions/{subscriptionId} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.stigg.io/api/v1/contracts/{id}/subscriptions/{subscriptionId}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.stigg.io/api/v1/contracts/{id}/subscriptions/{subscriptionId}', 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://api.stigg.io/api/v1/contracts/{id}/subscriptions/{subscriptionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.stigg.io/api/v1/contracts/{id}/subscriptions/{subscriptionId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.stigg.io/api/v1/contracts/{id}/subscriptions/{subscriptionId}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stigg.io/api/v1/contracts/{id}/subscriptions/{subscriptionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"contractId": "contract-acme-2026",
"billingId": "ct_1a2b3c4d",
"id": "3452155b-deca-4d7f-91e5-82d486dc8bb0",
"refId": "contract-acme-2026",
"poNumber": "PO-4821",
"externalId": "contract-acme-2026",
"customerExternalId": "customer-acme",
"name": "PO-4821",
"state": "ACTIVE",
"billingState": "ACTIVE",
"activationStartDate": "2026-01-01T00:00:00.000Z",
"activationEndDate": "2026-12-31T00:00:00.000Z",
"createdAt": "2025-12-15T09:30:00.000Z",
"nextInvoice": {
"invoiceId": "a3f1c2de-5b47-4c8e-9f10-2d6b8e4a7c31",
"amount": {
"amount": 4900,
"currency": "usd"
},
"dueDate": "2026-08-01T00:00:00.000Z",
"periodStart": "2026-07-01T00:00:00.000Z",
"periodEnd": "2026-08-01T00:00:00.000Z"
},
"latestInvoice": {
"billingId": "inv_abc123",
"status": "OPEN",
"createdAt": "2026-07-01T00:00:00.000Z",
"total": 4900,
"amountDue": 4900,
"currency": "usd",
"pdfUrl": null,
"requiresAction": false,
"billingReason": null
},
"subscriptions": [
{
"subscriptionId": "subscription-acme-platform",
"planDisplayName": "Enterprise Platform",
"productDisplayName": "Revvenu"
}
]
}
}{
"message": "<string>",
"code": "BadUserInput",
"reason": "<string>"
}{
"message": "<string>",
"code": "Unauthenticated"
}{
"message": "<string>",
"code": "IdentityForbidden"
}{
"message": "<string>",
"code": "CustomerNotFound"
}{
"message": "<string>",
"code": "RateLimitExceeded"
}Authorizations
Server API Key
Headers
Account ID — optional when authenticating with a user JWT (Bearer token); falls back to the user's first membership. Ignored for API-key auth.
Environment ID — required when authenticating with a user JWT (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the key).
Path Parameters
The unique identifier of the entity
1 - 255The ref ID of the subscription to detach from the contract
1 - 255^[a-zA-Z0-9][a-zA-Z0-9_|.-]*$Response
The contract, including its remaining attached subscriptions.
Response object
A billing contract as reported by the connected billing provider.
Show child attributes
Show child attributes
