Skip to content

Generate a magic login portal link for a subscription

POST
/api/subscriptions/{id}/portal-link

Generates a one-time magic login link that authenticates the subscription owner directly into the customer portal for the given subscription. Returns a customer-facing link and an admin-impersonation link, both expiring after 7 days.

id
string

Magic portal links generated successfully

object
portal_link
required

Customer-facing magic login link to the subscription portal

string
admin_portal_link
required

Admin-impersonation magic login link (records the dashboard user as the actor in portal activity)

string
expires_at
required

ISO 8601 timestamp at which the generated links expire

string format: date-time

Subscription has no associated profile or account has no Shopify shop domain

Example
{
"error": "Subscription has no associated profile"
}