---
title: "Create connect code"
method: POST
path: "/api/v1/warehouse-connect/code"
tags: ["Projects"]
---

# Create connect code

`POST /api/v1/warehouse-connect/code`

Creates a short-lived, single-use connect code the Lightdash CLI can use
to deposit warehouse credentials on behalf of the current user

## Response `200`

Success

- ApiWarehouseConnectCodeResponse
  - `results` WarehouseConnectCode, required
    - `expiresAt` string, date-time, required
    - `code` string, required
  - `status` 'ok', required

## Other responses

- `default` — Error

---

[API](https://skmtc.net/lightdash/apis/lightdash-api.md) · [All operations](https://skmtc.net/lightdash/apis/lightdash-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lightdash/lightdash-api/versions/40c933755c9a/schema)
