Firsty

Search...

Search...

SubscriptionsExperimental

Request a subscription action

Request asynchronous suspension, resumption, termination, or a plan change. All timings, including now, return acceptance rather than completion. Poll the subscription or consume lifecycle webhooks to observe the result. A pending subscription accepts only terminate with when now, which cancels it immediately and returns 200. Multiple actions may be scheduled in chronological order, such as suspension at period end followed by resumption on a chosen date. Actions must be scheduled at least 24 hours before a pending termination; exactly 24 hours is allowed. A termination cannot be scheduled less than 24 hours after an earlier pending action. Only one plan change may be pending at a time; cancel it before requesting another. When applied, plan changes preserve the subscription reference, enrollment start, status, renewal schedule, and future actions. The current period ends and a new period starts, ending at the original renewal boundary. Period-end actions use the next future renewal boundary, even if renewal is overdue. Termination cancels any remaining pending actions.

post/profiles/{profileReference}/subscriptions/{subscriptionReference}/actions

Authorization

Authorization: Bearer {token} — an OAuth2 access token from the client-credentials flow. How authentication works

Path parameters

profileReferencestringrequired

Profile reference

subscriptionReferencestringrequired

The subscription's reference.

Headers

X-Idempotency-Keystring

Optional idempotency key for requests that change state. If provided, duplicate requests with the same key within 48 hours will return the cached original response without duplicating side effects.

Behavior:

  • Same key + same method, path and request body → returns cached response (prevents duplicate operations)
  • Same key + different method, path or request body → returns 422 error
  • Same key + in-flight request → returns 423 error
  • Keys are held for at least 48 hours; use a fresh key for every new request

Request Body Matching: Request bodies are compared by their JSON content. Object key order, including in nested objects, and whitespace do not affect matching. This means:

  • {"a":1,"b":2} and {"b":2,"a":1} are treated as identical ✓
  • Whitespace differences are ignored ✓
  • The method and the full path, query included, must match as well; headers are not compared

Best Practices:

  • Use UUIDs or client-generated unique strings
  • Store keys on your side to support retries
  • Don't reuse keys across different operations

Request body

application/json · required

Plan changeobject
Show properties
actionany
Status changeobject
Show properties
actionany
Optionssuspendresumeterminate

Responses

200Terminate with when now on a pending or already terminated subscription; the subscription is terminated and no pending action is createdapplication/json
Show response body
dataobject
Show properties
subscriptionReferencestring

Subscription reference, stable across plan changes.

profileReferencestring

Profile reference

esimReferencestring

eSIM reference

subscriptionPlanReferencestring

Subscription-plan reference.

statusstring

pending until the eSIM has network service; a pending subscription has no period or packages.

Optionspendingactivesuspendedterminated
startedAtstring | null · date-time

Start of the first period; null while the subscription has not started.

lastRenewedAtstring · date-timeoptional

Last calendar renewal processing time; omitted before the first renewal and unchanged by plan changes.

nextRenewalAtstring | null · date-time

Null while the subscription is pending or suspended and once it is terminated.

terminatedAtstring · date-timeoptional
currentPeriodobject | null

Null while the subscription has not started.

Show properties
periodNumberinteger
subscriptionPlanReferencestring

Subscription-plan reference.

revisioninteger
startsAtstring · date-time
endsAtstring · date-time
scheduledActionsarray of SubscriptionScheduledAction

Pending actions ordered by effectiveAt; empty when no actions are pending.

Show properties
actionReferencestring · uuid

Reference of a scheduled subscription action.

actionstring
Optionssuspendresumeterminatechange_plan
effectiveAtstring · date-time
createdAtstring · date-time
subscriptionPlanReferencestringoptional

Subscription-plan reference.

202Action accepted for asynchronous execution; current subscription with pending scheduled actionsapplication/json
Show response body
dataobject
Show properties
subscriptionReferencestring

Subscription reference, stable across plan changes.

profileReferencestring

Profile reference

esimReferencestring

eSIM reference

subscriptionPlanReferencestring

Subscription-plan reference.

statusstring

pending until the eSIM has network service; a pending subscription has no period or packages.

Optionspendingactivesuspendedterminated
startedAtstring | null · date-time

Start of the first period; null while the subscription has not started.

lastRenewedAtstring · date-timeoptional

Last calendar renewal processing time; omitted before the first renewal and unchanged by plan changes.

nextRenewalAtstring | null · date-time

Null while the subscription is pending or suspended and once it is terminated.

terminatedAtstring · date-timeoptional
currentPeriodobject | null

Null while the subscription has not started.

Show properties
periodNumberinteger
subscriptionPlanReferencestring

Subscription-plan reference.

revisioninteger
startsAtstring · date-time
endsAtstring · date-time
scheduledActionsarray of SubscriptionScheduledAction

Pending actions ordered by effectiveAt; empty when no actions are pending.

Show properties
actionReferencestring · uuid

Reference of a scheduled subscription action.

actionstring
Optionssuspendresumeterminatechange_plan
effectiveAtstring · date-time
createdAtstring · date-time
subscriptionPlanReferencestringoptional

Subscription-plan reference.

400Bad request - invalid parameters401Unauthorized - missing or invalid API key404Resource not found409The subscription is terminated, the subscription is pending and the request is not terminate with when now, an action is already pending at the requested time, or the requested action violates the 24-hour gap before termination. Plan changes also conflict when another plan change is pending, the target is the current plan, or the target has a different renewal cadence. 422Idempotency key was previously used for a different request423A request with this idempotency key is still being processed