# Fetch a connect request

GET

/v1/connections/requests/{requestId}

```sh
curl --request GET \
  --url https://example.com/v1/connections/requests/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
  --header 'Authorization: Bearer <token>'
```

A member’s request is the member’s alone; the company’s is a tenant admin’s. Anyone else gets the `404` of a request that doesn’t exist.

## Authorizations

- **[bearerAuth](https://docs.kindgi.com/reference/api.md#bearerauth)**

## Parameters

### Path Parameters

**requestId**

required

string format: uuid

The connect request id (a UUID).

## Responses

### 200

The request.

application/json

A connect: the owner goes to `connectUrl`, consents at the app, and comes back. A run that needs a connection it lacks waits on one.

object

**requestId**

required

string format: uuid

**envName**

required

string

**appId**

required

string format: uuid

**app**

required

The app’s entry id.

string

**owner**

required

Who owns a connection: one member (`kind: member`, with their `userId`), or the company (`kind: company`, the workspace’s own account).

object

**kind**

required

string

Allowed values: member company

**userId**

The member. Present when `kind` is `member`.

string

**permissions**

required

The permissions asked for: the ones needed, and the ones already granted.

Array\<string>

**says**

required

What each asks for, in plain words.

Array\<string>

**reconnects**

The connection it connects again; the same account is required.

string format: uuid

**label**

The name asked for the connection it makes. A reconnect keeps the connection’s.

string

**runId**

The run that waits for it.

string

**name**

The tool’s name for the connection, when a run waits.

string

**startedBy**

Who started it last: `<kind>:<id>`. Only they may finish it.

string

**state**

required

string

Allowed values: pending connected declined expired failed

**failure**

Why it failed: `account-mismatch`, `app-refused`, `store-write-failed`.

string

**missing**

The permissions the app granted less than asked.

Array\<string>

**installations**

A GitHub App’s, while it’s `pending`: the app’s installations the person’s GitHub account reaches, when the finish found several and none was picked. They pick one and start again with `installationId`, or install the app on another account with `newInstallation`.

Array\<object>

A GitHub App installation the person can reach.

object

**installationId**

required

string

**account**

required

The account it’s on: its login, or the enterprise’s slug.

object

**id**

required

The account’s stable id at the app.

string

**label**

required

What people see: an email address, a login.

string

**connectionId**

The connection it made.

string format: uuid

**connectUrl**

required

Where the owner starts.

string format: uri

**expiresAt**

required

string format: date-time

**createdAt**

required

string format: date-time

**createdBy**

required

string

##### Example

```json
{
  "owner": {
    "kind": "member"
  },
  "state": "pending"
}
```

### 400

`requestId` is not a UUID (`bad-input`).

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

### 401

Missing / malformed / expired / revoked bearer token.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

### 404

No request with that id, or not the caller’s (`connection-request-not-found`).

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

### 503

The database was too busy to answer in time (`database-busy`); `Retry-After` (whole seconds) says when to try again.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

## See also

- [`POST /v1/connections/requests/{requestId}/start`: Start a connect request](https://docs.kindgi.com/reference/api/operations/connectionsrequestsstart.md)
- [Error code `bad-input`](https://docs.kindgi.com/reference/errors.md#bad-input)
- [Error code `connection-request-not-found`](https://docs.kindgi.com/reference/errors.md#connection-request-not-found)
- [Error code `database-busy`](https://docs.kindgi.com/reference/errors.md#database-busy)
- [Every error code](https://docs.kindgi.com/reference/errors.md)
