Resume a paused subscription
curl --request POST \
--url https://api.salesbricks.com/api/v2/subscriptions/{subscription_id}/resume \
--header 'Content-Type: application/json' \
--header 'X-SALESBRICKS-KEY: <api-key>' \
--data '
{
"should_notify_customer": false
}
'import requests
url = "https://api.salesbricks.com/api/v2/subscriptions/{subscription_id}/resume"
payload = { "should_notify_customer": False }
headers = {
"X-SALESBRICKS-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-SALESBRICKS-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({should_notify_customer: false})
};
fetch('https://api.salesbricks.com/api/v2/subscriptions/{subscription_id}/resume', 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}/resume",
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([
'should_notify_customer' => false
]),
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}/resume"
payload := strings.NewReader("{\n \"should_notify_customer\": false\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.salesbricks.com/api/v2/subscriptions/{subscription_id}/resume")
.header("X-SALESBRICKS-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"should_notify_customer\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesbricks.com/api/v2/subscriptions/{subscription_id}/resume")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-SALESBRICKS-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"should_notify_customer\": false\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",
"pause_duration_days": 123,
"ends_at": "2023-12-25"
}{
"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`."
}
}Subscriptions
Resume a paused subscription
Resume a paused subscription. The resume date is automatically set to today in the subscription’s timezone. This will adjust the subscription end date based on actual pause duration.
- If resumed early (before scheduled
scheduled_resume_at): reducesends_atby unused days - If resumed on schedule: no change to
ends_at
POST
/
subscriptions
/
{subscription_id}
/
resume
Resume a paused subscription
curl --request POST \
--url https://api.salesbricks.com/api/v2/subscriptions/{subscription_id}/resume \
--header 'Content-Type: application/json' \
--header 'X-SALESBRICKS-KEY: <api-key>' \
--data '
{
"should_notify_customer": false
}
'import requests
url = "https://api.salesbricks.com/api/v2/subscriptions/{subscription_id}/resume"
payload = { "should_notify_customer": False }
headers = {
"X-SALESBRICKS-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-SALESBRICKS-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({should_notify_customer: false})
};
fetch('https://api.salesbricks.com/api/v2/subscriptions/{subscription_id}/resume', 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}/resume",
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([
'should_notify_customer' => false
]),
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}/resume"
payload := strings.NewReader("{\n \"should_notify_customer\": false\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.salesbricks.com/api/v2/subscriptions/{subscription_id}/resume")
.header("X-SALESBRICKS-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"should_notify_customer\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesbricks.com/api/v2/subscriptions/{subscription_id}/resume")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-SALESBRICKS-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"should_notify_customer\": false\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",
"pause_duration_days": 123,
"ends_at": "2023-12-25"
}{
"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
Pattern:
^([a-zA-Z\d\-]+)$Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Input serializer for resuming a paused subscription.
Whether to notify the customer about the subscription resumption.
Response
Output serializer for resume 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).
Actual number of days the subscription was paused.
The subscription end date (adjusted based on pause duration).