---
title: "Link a workspace to T3 Connect (idempotent; supports Idempotency-Key)"
method: PUT
path: "/v1/workspaces/{workspace_id}/t3-link"
tags: ["Integrations"]
---

# Link a workspace to T3 Connect (idempotent; supports Idempotency-Key)

`PUT /v1/workspaces/{workspace_id}/t3-link`

## Request

- Base URL: `https://api.shardflux.dev`
- URL: `https://api.shardflux.dev/v1/workspaces/{workspace_id}/t3-link`
- Auth: HTTP bearer

Makes the workspace’s T3 Code reachable from the T3 app with your T3 Connect sign-in, also while the workspace parks or suspends. Answers at once: linked, linking (the link completes in the background; GET /integrations/t3 shows it), or needs_sign_in. With your session, needs_sign_in carries sign_in, your T3 Connect sign-in to approve. With an API key the link uses the sign-in of the member who created the key; when they have none, needs_sign_in comes without sign_in and the link waits: it continues by itself once that member signs in with their session (POST /integrations/t3/sign-in). account names the T3 Connect account. Needs exec, files and pty in the workspace’s project. 409 t3_linked_by_other_member while another member’s sign-in links it, 409 workspace_deleted, 409 not_supported_for_mode for file-first workspaces.

## Path parameters

- `workspace_id` string, uuid, required

## Response `200`

Default Response

- object
  - `status` union, required
    - 'linked'
    - 'linking'
    - 'needs_sign_in'
  - `label` string, required: The environment name T3 shows.
  - `account` string: The T3 Connect account the workspace is linked with.
  - `sign_in` object: Your T3 Connect sign-in: open verification_uri and confirm user_code. Linking continues by itself once it is approved.
    - `flow_id` string, uuid, required: UUIDv7, lowercase canonical form.
    - `verification_uri` string, required
    - `user_code` string, required
    - `expires_at` string, date-time, required: RFC 3339 UTC timestamp with Z.

## Other responses

- `4XX`: Default Response
- `5XX`: Default Response

---

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