Skip to main content
POST
Needs billing:create. Only a workspace owner has a plan here; a teammate gets 403. See Permissions.
Makes a link for the owner to open in the browser. The person pays, changes or cancels on that page. stripe pages need no PostSyncer sign-in; app pages ask the person to sign in. expires_at is when a payment page stops working (24 hours); it is null for the others. A billing portal link is good for a short visit, so make it when the person is ready to open it. plan is a key from plans in Get billing, like pro-v2. cycle is monthly or yearly. One person makes 10 links an hour. The 11th makes nothing and answers 429 with error: rate_limited, a Retry-After header and the wait in the message. A link refused for another reason doesn’t count.

Errors

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
purpose
enum<string>
required

What the link is for.

Available options:
upgrade,
change_plan,
extra_accounts,
credits,
card_and_invoices,
cancel
plan
string

For upgrade, and needed then: a plan key from plans in GET /billing, like pro-v2.

cycle
enum<string>

For upgrade, and needed then.

Available options:
monthly,
yearly

Response

The link.

A link for the owner to open in the browser.

purpose
enum<string>
required
Available options:
upgrade,
change_plan,
extra_accounts,
credits,
card_and_invoices,
cancel
url
string
required

Give it to the person to open.

opens
enum<string>
required

stripe: Stripe's payment page or billing portal, which needs no PostSyncer sign-in. app: a page of the PostSyncer app, where the person signs in.

Available options:
stripe,
app
expires_at
string<date-time> | null
required

When the link stops working: a payment page lasts 24 hours. null for the others (Stripe's billing portal link is good for a short visit, so make it when the person is ready).