# Create Embedded Connect Link

Create a single-use link for an end user to connect an app account. Requires the embedded:create permission and an explicitly configured single-app integration or access to any app.

`POST https://connect.mindcloud.co/v2/embedded/end-users/:endUserId/connect-links`

Permissions: `embedded:create`.

## Parameters

### Path

- `endUserId` (string, required): The MindCloud userId saved for your signed-in application user.

### Body

- `app` (string): A published app, by its id or slug from List Universal Apps.
  The published app to connect, by its id or slug.
- `appRef` (string): The older name of app, still accepted. Send one of the two.
  The older name of app, still accepted.
- `connectionId` (string): An exact public connection ID owned by this end user. SDK accounts update in place. Provisioned accounts without an installation create a new SDK account; reload connections and use its new ID.
  The exact public connection ID owned by this end user. SDK accounts update in place. Provisioned accounts without an installation create a new SDK account; reload connections and use its new ID.

## Example request

```bash
curl --request POST \
  --url 'https://connect.mindcloud.co/v2/embedded/end-users/enduser_GhSUEYhipn4g/connect-links' \
  --header 'Authorization: Bearer $MINDCLOUD_API_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
  "app": "slack",
  "appRef": "slack",
  "connectionId": "Cn6vH3jW8qYt"
}'
```

## Response fields

- `url` (string): Show this URL only to the person it is for: the end user, for an Embedded link; the person who created the API key, signed in to MindCloud, for Create Connect Link (only they can open it). The link lasts fifteen minutes and works once.
- `appName` (string): The app the user will connect.
- `expiresOn` (date): When the connection link expires.
- `singleUse` (boolean): Always true. Request a new link if this one was consumed.

## Example response

```json
{
  "success": true,
  "data": {
    "url": "https://app.mindcloud.co/embedded-install#t=<token>&channel=api",
    "appName": "Slack",
    "expiresOn": "2026-10-01T12:15:00.000Z",
    "singleUse": true
  }
}
```

## Errors

- 403 App access denied or API_KEY_PERMISSION_DENIED: `FORBIDDEN` / `EMBEDDED_API_CATALOG_NOT_ENABLED` "Configure this app or turn on "Allow users to connect any app via API" in Embedded API Setup."
- 404 End user not found: `NOT_FOUND` / `END_USER_NOT_FOUND` "No end user with this id belongs to the company of this API key."
- 429 Link budget exceeded: `RATE_LIMITED` "More than 10 connect links were created for this end user in one minute. Retry in one minute."
- 503 Connection setup unavailable: `UNAVAILABLE` / `TEMPORARILY_UNAVAILABLE` "The connection could not be prepared. Retry the request."
