API reference
Connect links
Hosted pages your customers open to connect their own accounts without a Dashboard login.
POST/connect-links
Create a hosted connect link
- Scope accounts:manage
A link your customer opens to connect (or, with purpose reconnect and accountId, reconnect) their own accounts into one brand, without a Dashboard login. Send redirectUri (and state) to end on your page with status, accountIds, brandId, state and error; without one the link ends on the connect host's result page (/done?connect=<result>&platform=<platform>, with connected and skipped counts on success). A reconnect link signed in with a different account ends with account_mismatch and stays usable. A link stops working when it expires, is revoked, or its creator loses the connect right: a member removed or demoted, or a key revoked, expired or past its rotation overlap. The url carries the link token once; there is no list endpoint, so keep the id to revoke it.
curl -X POST https://api.relayport.dev/connect-links \
-H "Authorization: Bearer $RELAYPORT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"brandId": "<uuid>",
"platforms": ["<string>"],
"purpose": "connect"
}'Parameters
X-Api-VersionstringheaderThe API version. API keys answer in the version they were created with unless this header asks for another; the current version is 2026-12-01.
One of
2026-12-01X-Workspace-Idstring (uuid)headerThe workspace of the request. Required with a session; with an API key it may be left out and must match the key's workspace when sent.
Idempotency-KeystringheaderOnly blocks a second request with the same key while the first runs (409 IdempotencyInProgress). The response carries a secret, so it is never stored or replayed: a retry with the same key runs again and issues a new secret.
X-Requested-WithstringheaderRequired on every write made with a signed-in session; without it the request is 403 CsrfRejected. API keys do not send it.
One of
XMLHttpRequest
Request body
brandIdstring (uuid)requiredplatformsstring[]requiredpurposestringrequiredOne of
connectreconnectaccountIdstring (uuid)redirectUristringstatestringexpiresInDaysinteger
Responses
201Created
dataConnectLinkIssuedrequiredidstring (uuid)requiredurlstringrequiredexpiresAtstring (date-time)required
400InvalidJsonWorkspaceRequired
401InvalidApiKeyUnauthenticated
403CsrfRejectedForbiddenWorkspaceSuspended
404NotFound
409IdempotencyInProgress
413PayloadTooLarge
422CapabilityUnavailableIdempotencyKeyReusedUnsupportedPlatformValidationError
429RateLimited
503RateLimiterUnavailable
DELETE/connect-links/{id}
Revoke a connect link
- Scope accounts:manage
A sign-in already in flight on the link ends with invalid_state.
curl -X DELETE https://api.relayport.dev/connect-links/{id} \
-H "Authorization: Bearer $RELAYPORT_API_KEY"Parameters
X-Api-VersionstringheaderThe API version. API keys answer in the version they were created with unless this header asks for another; the current version is 2026-12-01.
One of
2026-12-01X-Workspace-Idstring (uuid)headerThe workspace of the request. Required with a session; with an API key it may be left out and must match the key's workspace when sent.
X-Requested-WithstringheaderRequired on every write made with a signed-in session; without it the request is 403 CsrfRejected. API keys do not send it.
One of
XMLHttpRequestidstring (uuid)pathrequired
Responses
204No Content
No fields.