curl --request PUT \
--url https://api.salesbricks.com/api/v2/subscriptions/{subscription_id}/pause \
--header 'Content-Type: application/json' \
--header 'X-SALESBRICKS-KEY: <api-key>' \
--data '
{
"paused_at": "2023-11-07T05:31:56Z",
"scheduled_resume_at": "2023-11-07T05:31:56Z",
"pause_reason": "<string>"
}
'import requests
url = "https://api.salesbricks.com/api/v2/subscriptions/{subscription_id}/pause"
payload = {
"paused_at": "2023-11-07T05:31:56Z",
"scheduled_resume_at": "2023-11-07T05:31:56Z",
"pause_reason": "<string>"
}
headers = {
"X-SALESBRICKS-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-SALESBRICKS-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
paused_at: '2023-11-07T05:31:56Z',
scheduled_resume_at: '2023-11-07T05:31:56Z',
pause_reason: '<string>'
})
};
fetch('https://api.salesbricks.com/api/v2/subscriptions/{subscription_id}/pause', 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.salesbricks.com/api/v2/subscriptions/{subscription_id}/pause",
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([
'paused_at' => '2023-11-07T05:31:56Z',
'scheduled_resume_at' => '2023-11-07T05:31:56Z',
'pause_reason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-SALESBRICKS-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.salesbricks.com/api/v2/subscriptions/{subscription_id}/pause"
payload := strings.NewReader("{\n \"paused_at\": \"2023-11-07T05:31:56Z\",\n \"scheduled_resume_at\": \"2023-11-07T05:31:56Z\",\n \"pause_reason\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-SALESBRICKS-KEY", "<api-key>")
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("https://api.salesbricks.com/api/v2/subscriptions/{subscription_id}/pause")
.header("X-SALESBRICKS-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"paused_at\": \"2023-11-07T05:31:56Z\",\n \"scheduled_resume_at\": \"2023-11-07T05:31:56Z\",\n \"pause_reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesbricks.com/api/v2/subscriptions/{subscription_id}/pause")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-SALESBRICKS-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"paused_at\": \"2023-11-07T05:31:56Z\",\n \"scheduled_resume_at\": \"2023-11-07T05:31:56Z\",\n \"pause_reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"subscription_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pause_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paused_at": "2023-11-07T05:31:56Z",
"scheduled_resume_at": "2023-11-07T05:31:56Z",
"resumed_at": "2023-11-07T05:31:56Z",
"extension_days": 123,
"is_active": true
}{
"error": {
"code": "ERR_BAD_REQUEST",
"message": "Bad request — the input payload is malformed, missing required fields, or contains invalid data.",
"details": {
"fields": {
"paused_at": [
"This field is required."
]
}
}
}
}{
"error": {
"code": "ERR_NOT_FOUND",
"message": "Subscription not found — no subscription matches the given `subscription_id`."
}
}Update a subscription pause
Update a subscription pause (upcoming or active).
For upcoming pauses (not yet started):
- Can update
paused_at,scheduled_resume_at, andpause_reason
For active pauses (already started):
- Can only update
scheduled_resume_atandpause_reason - Cannot change
paused_atsince the pause has already started
If scheduled_resume_at is updated, the subscription end date will be adjusted accordingly.
curl --request PUT \
--url https://api.salesbricks.com/api/v2/subscriptions/{subscription_id}/pause \
--header 'Content-Type: application/json' \
--header 'X-SALESBRICKS-KEY: <api-key>' \
--data '
{
"paused_at": "2023-11-07T05:31:56Z",
"scheduled_resume_at": "2023-11-07T05:31:56Z",
"pause_reason": "<string>"
}
'import requests
url = "https://api.salesbricks.com/api/v2/subscriptions/{subscription_id}/pause"
payload = {
"paused_at": "2023-11-07T05:31:56Z",
"scheduled_resume_at": "2023-11-07T05:31:56Z",
"pause_reason": "<string>"
}
headers = {
"X-SALESBRICKS-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-SALESBRICKS-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
paused_at: '2023-11-07T05:31:56Z',
scheduled_resume_at: '2023-11-07T05:31:56Z',
pause_reason: '<string>'
})
};
fetch('https://api.salesbricks.com/api/v2/subscriptions/{subscription_id}/pause', 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.salesbricks.com/api/v2/subscriptions/{subscription_id}/pause",
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([
'paused_at' => '2023-11-07T05:31:56Z',
'scheduled_resume_at' => '2023-11-07T05:31:56Z',
'pause_reason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-SALESBRICKS-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.salesbricks.com/api/v2/subscriptions/{subscription_id}/pause"
payload := strings.NewReader("{\n \"paused_at\": \"2023-11-07T05:31:56Z\",\n \"scheduled_resume_at\": \"2023-11-07T05:31:56Z\",\n \"pause_reason\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-SALESBRICKS-KEY", "<api-key>")
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("https://api.salesbricks.com/api/v2/subscriptions/{subscription_id}/pause")
.header("X-SALESBRICKS-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"paused_at\": \"2023-11-07T05:31:56Z\",\n \"scheduled_resume_at\": \"2023-11-07T05:31:56Z\",\n \"pause_reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesbricks.com/api/v2/subscriptions/{subscription_id}/pause")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-SALESBRICKS-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"paused_at\": \"2023-11-07T05:31:56Z\",\n \"scheduled_resume_at\": \"2023-11-07T05:31:56Z\",\n \"pause_reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"subscription_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pause_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paused_at": "2023-11-07T05:31:56Z",
"scheduled_resume_at": "2023-11-07T05:31:56Z",
"resumed_at": "2023-11-07T05:31:56Z",
"extension_days": 123,
"is_active": true
}{
"error": {
"code": "ERR_BAD_REQUEST",
"message": "Bad request — the input payload is malformed, missing required fields, or contains invalid data.",
"details": {
"fields": {
"paused_at": [
"This field is required."
]
}
}
}
}{
"error": {
"code": "ERR_NOT_FOUND",
"message": "Subscription not found — no subscription matches the given `subscription_id`."
}
}Authorizations
API key for authentication
Path Parameters
^([a-zA-Z\d\-]+)$Body
Input serializer for updating a subscription pause (upcoming or active).
For upcoming pauses: Can update paused_at, scheduled_resume_at, pause_reason For active pauses: Can only update scheduled_resume_at, pause_reason
Response
Output serializer for pause subscription response.
ID of the subscription.
ID of the pause record.
When the pause started.
When the subscription is scheduled to automatically resume (set at pause time).
When the subscription was actually resumed (null if still paused).
Number of days the subscription end date was extended.
Whether the pause is currently active.