Update subscription

Pause/resume shipments and update subscription metadata.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Overview

Update a subscription owned by the authenticated customer: pause or resume shipments (suspend + shipments_suspended_until), and set domains, ip_addresses, or merge metadata. Returns the customer resource with a fresh JWT.

Example:

curl --request PUT \
  --url 'https://www.pelcro.com/api/v1/sdk/subscription/4055?site_id=1232' \
  --header 'Authorization: Bearer <JWT>' \
  --header 'Content-Type: application/json' \
  --data '{ "suspend": true, "shipments_suspended_until": "2026-08-01" }'

Notes

  • Protected — requires the customer's JWT.
  • An unknown/unowned subscription returns 404; validation failures (e.g. suspend without shipments_suspended_until) are 400.
Path Params
string
required

ID of the subscription to update.

Query Params
int32
required

The unique identifier of the site associated with your account.

Body Params
boolean

a flag that indicates whether to suspend the subscription or unsuspend it

date

the date for the subscription suspension.

domains
array of strings

Email domains that will allow end-users with these domains to be members of this subscription upon registration/login. This attribute can only be set when the subscription plan type is membership.

domains
ip_addresses
array of strings

IP addresses that will identify end-users as members of this subscription upon registration/login. This attribute can only be set when the subscription plan type is membership. Two format are accepted for strings:

A single public IP address
This should be a valid public IP address following the standard IPv4 format (e.g., 192.168.1.100).

A range of public IP addresses
This should be a range of public IP addresses following the CIDR notation (e.g., 198.51.100.0/24).

You can use this tool calculate the appropriate CIDR notation for your needs.

ip_addresses
metadata
array of objects

Set of key-value pairs that can be saved on subscription level. This can be useful for storing additional information about the object in a structured format.

metadata
Responses

Language
Credentials
Query
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json