---
title: "Get a consent link for an existing Layout account"
method: POST
path: "/users/{userId}/connect"
tags: ["Users"]
---

# Get a consent link for an existing Layout account

`POST /users/{userId}/connect`

## Request

- Base URL: `https://api.layout.link/v1`
- URL: `https://api.layout.link/v1/users/{userId}/connect`
- Auth: HTTP bearer

Returns a link to the Layout consent screen for someone who already has a Layout account. Nothing is attached until they approve.

## Path parameters

- `userId` string, required

## Headers

- `Layout-Version` '2026-10-01'
- `Idempotency-Key` string

## Request body

- ConnectRequest
  - `returnUrl` string, uri: https only. Where to send the person after they decide.
  - `connectDelivery` 'developer': Return the link instead of Layout texting it to the person.

## Response `200`

A consent link, or already connected.

- ConnectLink
  - `next` 'connect' | 'awaiting_user_approval'
  - `connectUrl` string, uri: Present when `next` is `connect`. Open it in the person's browser.
  - `expiresInSec` integer
  - `awaitingApproval` object: Present when Layout texted the person the approval link.
    - `phoneHint` string
    - `expiresInSec` integer, required
  - `connected` true: Already connected to this person; no link is issued.
  - `id` string
  - `status` string

## Other responses

- `400`: `unsupported_version`: the Layout-Version header names no version this API answers.
- `401`: Secret not recognised, malformed, or rotated.
- `403`: Application not permitted. Usually production on an unapproved application.
- `404`: No such user for this application.
- `409`: `idempotency_conflict`: the Idempotency-Key was already used with a different request. `in_progress`: the first request with that key is still running; retry after `Retry-After`.
- `429`: A per-minute ceiling.
- `500`: Layout failed to answer. Retry with backoff.
- `503`: Layout or a dependency could not be reached. Retry with backoff.

---

[API](https://skmtc.dev/layout/apis/layout-partner-api.md) · [All operations](https://skmtc.dev/layout/apis/layout-partner-api/llms.txt) · [OpenAPI document](https://skmtc.dev/layout/apis/layout-partner-api/revisions/7ff4ba01bf56?raw)
