---
title: "Connect with key"
method: POST
path: "/api/integration/{integrationID}/connect/key"
tags: ["integration"]
---

# Connect with key

`POST /api/integration/{integrationID}/connect/key`

## Request

- Base URL: `https://opencode.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://opencode.ai/api/integration/{integrationID}/connect/key`
- Auth: none required

Run a key authentication method and store the resulting credential.

## Path parameters

- `integrationID` string, required

## Query parameters

- `location` object, nullable
  - `directory` string, nullable

## Request body

- object
  - `key` string, required
  - `answer` FormAnswer
  - `label` string, nullable

## Response `204`

<No Content>

## Other responses

- `400`: InvalidRequestError
- `401`: UnauthorizedError
- `404`: IntegrationNotFoundError | LocationNotFoundError

---

[API](https://skmtc.dev/kaaass/apis/opencode.md) - [All operations](https://skmtc.dev/kaaass/apis/opencode/llms.txt) - [OpenAPI document](https://skmtc.dev/kaaass/apis/opencode/revisions/4e083d954707?raw)
