Create auth link
Connections
Create auth link
Create a shareable OAuth link that connects an external account to your Markifact team.
POST
Create auth link
Creates an OAuth link for a user to connect an account. When the user completes the flow, Markifact stores the connection in your team workspace.
By default, the resulting connection is shared with the workspace, so other team members can see and use it. Set
Best practices for
a successful redirect would look like:
Your redirect handler should read
is_private to true if the connection should only be visible and usable by the user who created the API key.
Endpoint
Request Body
Best practices for external_id
external_id is how you tie a resulting connection back to a record in your own system. It is stored on the created connection and returned unchanged in both the connection responses and the redirect parameters.
- Use a stable, unique ID from your system — your customer, workspace, store, or account ID. Avoid values that change over time so lookups stay reliable.
- Keep it opaque. Don’t put PII or secrets in it (no emails, names, tokens). It is echoed back in the redirect URL query string, so it can land in browser history, referrer headers, and logs.
- Use it to look connections up later with
GET /v1/connections?external_id=...orGET /v1/connections/{external_id}?lookup_by=external_id, instead of storing Markifact connection IDs yourself. - Treat lookups as potentially returning multiple connections.
external_idis not unique — a customer may reconnect or connect more than one account, so a singleexternal_idcan map to several connections. - Set it at creation time. It can only be provided when the link is created; it is not editable afterwards.
Example Request
Response
Response Fields
Auth links expire 24 hours after creation, or as soon as a connection is
successfully created — whichever comes first. Each link can be used to create
one connection; generate a new link if it expires or has already been used.
Redirect URL Parameters
If you provideredirect_url, Markifact redirects the user’s browser back to that URL after the OAuth provider returns to Markifact. The redirect URL must use HTTPS.
Markifact preserves any query parameters already on your URL and appends result metadata. Treat this browser redirect as a user-experience handoff, not as your only source of truth. For server-side confirmation, call the auth link status endpoint using the id returned when you created the link.
Success Redirect
When OAuth succeeds, Markifact stores the connection in your workspace, marks the auth link as connected, and redirects with:
Example final redirect:
Error Redirect
When OAuth fails, is denied by the user, or cannot be completed, Markifact redirects with:
Error redirects do not consume the auth link. The user can retry the same link until it expires.
Existing Query Parameters
Existing query parameters on yourredirect_url are preserved. If your URL already contains one of Markifact’s parameter names, Markifact avoids overwriting it by adding a markifact_ prefix.
For example, if you create a link with:
markifact_status when present, otherwise read status.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Example:
"ga4"
Example:
"https://example.com/oauth/callback"
Maximum string length:
255Example:
"customer_123"
Whether the created connection should be private to the API-key user. Defaults to false, meaning shared with the workspace so other team members can see and use it.

