---
search:
  tags:
    - End users
    - POST
seo:
  description: >-
    A hosted link that connects one integration for the end user.… Reference for
    the POST /api/v2/end-users/{endUserId}/connect-links endpoint in the Anlyon
    API.
sidebar:
  label: Create a connect link
  badge: POST
title: Create a connect link
type: openapi-operation
---
A hosted link that connects one integration for the end user. Send them to `url`: a page that names your workspace, then the provider's consent for an OAuth integration, or a form where they paste their own key for an API-key integration (checked with the provider and stored encrypted; you never see it). Afterwards the browser goes to `redirectUrl` with `anlyon_status` (`pending_confirmation`, `connected`, `declined` or `error`), `integration`, and, while the grant waits for confirmation, `anlyon_flow`. The end-user id is never in that URL. Confirm the flow from your server with `POST /api/v2/end-users/{endUserId}/connections/confirm`.

A redirect is required: `redirectUrl` must fall under one of the environment's allowed redirect URLs (exact origin and path prefix), or the environment's default redirect URL is used; with neither, the answer is `400 REDIRECT_URL_REQUIRED`. Only an environment with confirmation off may leave it out: the end user then sees Anlyon's own page, and the account is theirs at once. The link works once, for 10 minutes; a key link takes up to 5 refused keys before it is used up. At most 10 links per minute per end user, and 300 per environment.

An OAuth integration Anlyon does not offer through its own app, or whose app this deployment does not have, is connected through the environment's own app: add it with `PUT /api/v2/environments/{environmentId}/oauth-apps/{integration}`. Until then the answer is `400 OWN_OAUTH_APP_REQUIRED`.

`POST /api/v2/end-users/{endUserId}/connect-links`
