# Connections

OAuth connections that the vault mints, and the injection rules that use them

Source: https://slashinfra.com/docs/api-reference/control/connections
Last modified: 2026-11-30T16:36:19.000Z

OAuth connections that the vault mints, and the injection rules that use them

Resource, request and plan limits are listed on [Limits](https://slashinfra.com/docs/reference/limits).

[Download OpenAPI specification](https://slashinfra.com/docs/control.openapi.json) · Version 0.1.0

[GETList connections](https://slashinfra.com/docs/api-reference/control/connections#getConnections)[POSTStart a connection](https://slashinfra.com/docs/api-reference/control/connections#postConnections)[DELETEDelete a connection](https://slashinfra.com/docs/api-reference/control/connections#deleteConnectionsById)[GETGet a connection](https://slashinfra.com/docs/api-reference/control/connections#getConnectionsById)

### List connections

GET

/connections

Returns every OAuth connection of the organization with its provider, account and refresh state; the tokens stay in the vault and never appear in an answer. An injection rule names a connection as `connection:<id>`.

#### Authorization

`apiKey`

header`Authorization``Bearer <token>`

An API key (`si_` and 43 base64url characters), sent as `Authorization: Bearer si_...`; see [Using the API](https://slashinfra.com/docs/reference/api).

#### Response Body

Every connection of the organization, newest first; `[]` when there are none.

`application/json`

- response

- response
- …

Every connection of the organization, newest first; `[]` when there are none.

`[index: integer]?`

One connection of the organization, which holds no token.

Example Request

```
curl -X GET 'https://api.slashinfra.com/connections'
```

Example ResponseSchema

```
[  {    "account": "ada",    "created_ms": 1767225600000,    "id": "conn_6f1c0f0e8a",    "provider": "github",    "status": "active"  }]
```

### Start a connection

POST

/connections

Starts a connection flow for one provider: OAuth2 gets an authorize URL built with PKCE, and the GitHub App gets its install URL. The provider sends the person back to `GET /connections/callback`, which stores the connection.

#### Authorization

`apiKey`

header`Authorization``Bearer <token>`

An API key (`si_` and 43 base64url characters), sent as `Authorization: Bearer si_...`; see [Using the API](https://slashinfra.com/docs/reference/api).

#### Request Body

The provider to connect.

- body

- body
- …

The provider to connect.

`provider*`string

The provider id of the registry, such as `github`; a provider whose kind is not enabled answers 400 `provider_unavailable`.

#### Response Body

The authorize URL of the provider; the connection exists only after its callback.

`application/json`

- response

- response
- …

The authorize URL of the provider; the connection exists only after its callback.

`authorize_url*`string

The URL to send the person to; its signed `state` names the organization, the provider, a ten-minute expiry and a single-use nonce.

`id*`string

The id that the connection gets when the flow finishes: `GET /connections/:id` answers 404 `connection_not_found` until then, so a client polls it to learn when the person approved.

Example Request

```
curl -X POST 'https://api.slashinfra.com/connections' \  -H 'Content-Type: application/json' \  -d '{  "provider": "github"}'
```

Example ResponseSchema

```
{  "authorize_url": "https://github.com/login/oauth/authorize?response_type=code&client_id=...&state=...",  "id": "conn_6f1c0f0e8a"}
```

### Delete a connection

DELETE

/connections/{id}

Deletes the connection and its tokens; an active SVM whose rules reference `connection:<id>` answers 409 `connection_in_use`, so remove those rules first. Profiles do not block the delete.

#### Authorization

`apiKey`

header`Authorization``Bearer <token>`

An API key (`si_` and 43 base64url characters), sent as `Authorization: Bearer si_...`; see [Using the API](https://slashinfra.com/docs/reference/api).

#### Path Parameters

`id*`string

The connection id, `conn_` and ten id symbols.

Length`1 <= length`

#### Response Body

The connection and its tokens are deleted, with no body.

`response?`string`text/plain`

The connection and its tokens are deleted, with no body.

Example Request

```
curl -X DELETE 'https://api.slashinfra.com/connections/conn_6f1c0f0e8a'
```

Example ResponseSchema

```
"string"
```

### Get a connection

GET

/connections/{id}

Returns one connection and the rules that attach it to an SVM: the provider's `inject` list, expanded with `secret_id` = `connection:<id>`. Submit those rules in `POST /svms` or a profile.

#### Authorization

`apiKey`

header`Authorization``Bearer <token>`

An API key (`si_` and 43 base64url characters), sent as `Authorization: Bearer si_...`; see [Using the API](https://slashinfra.com/docs/reference/api).

#### Path Parameters

`id*`string

The connection id, `conn_` and ten id symbols.

Length`1 <= length`

#### Response Body

One connection with the rules that attach it to an SVM: the preset expansion of its provider.

`application/json`

- response

- response
- …

One connection with the rules that attach it to an SVM: the preset expansion of its provider.

`account*`string

The account at the provider, for display.

`created_ms*`integer

The creation time in milliseconds since the Unix epoch.

`env*`

The environment that the rules need: `GH_TOKEN=injected` for GitHub, so `gh` sends a header for the vault to replace.

`id*`string

The connection id: `conn_` and ten symbols of the SVM id alphabet.

`provider*`string

The provider id of the vault registry.

`secret_id*`string

The reference that an injection rule names: `connection:<id>`.

`secret_injections*`array<>

The expanded `inject` rules of the provider, with `secret_id` set to this connection: submit them in a create or a profile.

`status*`string

`active` after the callback, or `error` after a refresh failed; a token that is still valid keeps working.

Value in`"active"``"error"`

Example Request

```
curl -X GET 'https://api.slashinfra.com/connections/conn_6f1c0f0e8a'
```

Example ResponseSchema

```
{  "account": "ada",  "created_ms": 1767225600000,  "env": {    "GH_TOKEN": "injected"  },  "id": "conn_6f1c0f0e8a",  "provider": "github",  "secret_id": "connection:conn_6f1c0f0e8a",  "secret_injections": [    {      "domain": "api.openai.com",      "header": "authorization",      "placeholder": "__TELEGRAM_BOT_TOKEN__",      "secret_id": "sec_6f1c0f0e8a",      "value_format": "raw",      "value_prefix": "Bearer "    }  ],  "status": "active"}
```

GET

/connections

Example Request

```
curl -X GET 'https://api.slashinfra.com/connections'
```

```
[
{
"account": "ada",
"created_ms": 1767225600000,
"id": "conn_6f1c0f0e8a",
"provider": "github",
"status": "active"
}
]
```

POST

/connections

Example Request

```
curl -X POST 'https://api.slashinfra.com/connections' \
-H 'Content-Type: application/json' \
-d '{
"provider": "github"
}'
```

```
{
"authorize_url": "https://github.com/login/oauth/authorize?response_type=code&client_id=...&state=...",
"id": "conn_6f1c0f0e8a"
}
```

DELETE

/connections/{id}

Example Request

```
curl -X DELETE 'https://api.slashinfra.com/connections/conn_6f1c0f0e8a'
```

```
"string"
```

GET

/connections/{id}

Example Request

```
curl -X GET 'https://api.slashinfra.com/connections/conn_6f1c0f0e8a'
```

```
{
"account": "ada",
"created_ms": 1767225600000,
"env": {
"GH_TOKEN": "injected"
},
"id": "conn_6f1c0f0e8a",
"provider": "github",
"secret_id": "connection:conn_6f1c0f0e8a",
"secret_injections": [
{
"domain": "api.openai.com",
"header": "authorization",
"placeholder": "__TELEGRAM_BOT_TOKEN__",
"secret_id": "sec_6f1c0f0e8a",
"value_format": "raw",
"value_prefix": "Bearer "
}
],
"status": "active"
}
```
