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. Pass expiry_days (max 21) to control how long the links stay valid; defaults to 7 days. Pass short_link: true to also receive a branded gro1.io short link for the customer-facing link (short_portal_link); omitted by default. The admin-impersonation link is never shortened. Pass tab to deep-link the portal to a specific tab (appended as &tab=<value>).
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body
Section titled “Request Body ”object
Responses
Section titled “ Responses ”Magic portal links generated successfully
object
Customer-facing magic login link to the subscription portal
Admin-impersonation magic login link (records the dashboard user as the actor in portal activity)
Branded gro1.io short link that redirects to portal_link. Only present when short_link=true was requested
ISO 8601 timestamp at which the generated links expire
Subscription has no associated profile or account has no Shopify shop domain
Example
{ "error": "Subscription has no associated profile"}