Skip to main content
POST
/
api
/
v2
/
public
/
connect-url
curl -X POST "https://app.refold.ai/api/v2/public/connect-url" \
  -H "Authorization: Bearer YOUR_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "company": "Acme Inc.",
    "plan": "enterprise"
  }'
{
  "hosted_url": "https://app.refold.ai/connect/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.REDACTED_TOKEN.SIGNATURE"
}
Create a hosted Connect URL. The request body is stashed (keyed by the session token, with a 3-day TTL) and a URL of the form {app_url}/connect/{token} is returned. Redirect your user there to launch the hosted Connect experience; the hosted page reads your stashed properties back via Get Hosted Properties. Any JSON you put in the body is preserved verbatim — use it to pass context (company name, plan, theming, etc.) to the hosted page.

Authentication

Authorization
string
required
Session token for the linked account. This endpoint accepts session-token auth only — an API key is rejected.Format: Bearer YOUR_SESSION_TOKEN
Issue a token with Generate Session Token.

Query Parameters

linked_account_id
string
The linked account the hosted page should act on.
config_id
string
Optional config to scope the hosted page to. When set, it is appended to the returned URL as ?config_id=....

Body Parameters

body
object
Arbitrary JSON properties to stash for the hosted page. Returned verbatim by Get Hosted Properties.

Response

hosted_url
string
The hosted Connect URL to redirect the user to.
{
  "hosted_url": "https://app.refold.ai/connect/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.REDACTED_TOKEN.SIGNATURE"
}
curl -X POST "https://app.refold.ai/api/v2/public/connect-url" \
  -H "Authorization: Bearer YOUR_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "company": "Acme Inc.",
    "plan": "enterprise"
  }'