---
title: "Create user credential connect link"
method: POST
path: "/v1/projects/{project_id}/user-credentials/{credential_id}/connect-links"
tags: ["user-credentials"]
---

# Create user credential connect link

`POST /v1/projects/{project_id}/user-credentials/{credential_id}/connect-links`

## Request

- Base URL: `https://api.connic.co`
- URL: `https://api.connic.co/v1/projects/{project_id}/user-credentials/{credential_id}/connect-links`
- Auth: HTTP bearer

Creates a single-use connect link for an end user, valid for 10 minutes.

Send the user to `url`. For an `oauth` credential they sign in with the provider; for a
`token` credential they paste their API token. The token is stored under `user_id`. Use
the same ID that your middleware sets in the context path named by `credential.user`.
The browser then returns to `return_url` with `connic_oauth=connected`, `denied`, or
`failed` added to the query. `return_url` must match one of the credential's return
URLs; without it, connic shows a confirmation page.

Required permission: `oauth_apps.connect`.

## Path parameters

- `project_id` string, uuid, required
- `credential_id` string, uuid, required

## Request body

- ConnectLinkCreate: End user to create a connect link for.
  - `user_id` string, required: Your ID for the end user, up to 255 characters. Use the value your middleware sets at the context path named by `credential.user`.
  - `return_url` string, nullable: Where the browser returns after connecting, with `connic_oauth` set to `connected`, `denied` or `failed`. Must match one of the credential's `return_urls`; omit to show a connic confirmation page.

## Response `201`

Successful Response

- ConnectLinkResponse: Single-use connect link for an end user.
  - `url` string, required: Single-use URL to send the end user to.
  - `expires_at` string, required: When the link expires, 10 minutes after creation.

## Other responses

- `401`: Missing or invalid API key.
- `403`: The API key lacks the required permission or access to the environment.
- `404`: The resource does not exist in this project.
- `422`: Validation Error
- `429`: Rate limit exceeded.

## Changes

- **2026-11-21** `93c92c49aafa`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/connic/apis/connic-api/changes/v1/projects/:project_id/user-credentials/:credential_id/connect-links/post.md)

---

[API](https://skmtc.dev/connic/apis/connic-api.md) - [All operations](https://skmtc.dev/connic/apis/connic-api/llms.txt) - [OpenAPI document](https://skmtc.dev/connic/apis/connic-api/revisions/da5f0d500a9d?raw)
