# Dev.to

1 endpoints.

## Connect a Dev.to account as a posting channel

```http
POST https://orbitwrite.com/api/v1/integrations/devto/channels
```

Adds a Dev.to account to the workspace's channels, so articles can be published to it. Dev.to has no OAuth flow: the person generates an API key on Dev.to (Settings → Extensions → DEV Community API Keys) and this call takes it. The key is checked against Dev.to, the account it belongs to becomes the channel, and the key is stored encrypted as that channel's credential — it is never returned by any read. A key Dev.to refuses is a 400. Requires `account:connect`.

**Authentication:** bearer token or session cookie.

### Query parameters

- `organizationId` (string, optional) — Session callers only — an API key already determines the workspace.

### Request body (`application/json`)

- `apiKey` (string, required) — A Dev.to API key, generated on Dev.to under Settings → Extensions → DEV Community API Keys. The account it belongs to becomes the channel; the key is stored encrypted and never returned.

### Responses

#### 200

The account is connected

- `channel` (ConnectedDevtoChannel, required)
  - `id` (string, required)
  - `displayHandle` (string, required) — The Dev.to username.
  - `name` (string, required)
  - `created` (boolean, required)
  - `restored` (boolean, required)
  - `becamePrimary` (boolean, required)

#### 400

Invalid request

- `error` (string, required)
- `issues` (any[], optional)

#### 401

Not signed in

- `error` (string, required)
- `issues` (any[], optional)

#### 403

Not a member of the organization

- `error` (string, required)
- `issues` (any[], optional)

#### 404

The resource does not exist

- `error` (string, required)
- `issues` (any[], optional)

#### 429

Rate limit exceeded

- `error` (string, required)
- `issues` (any[], optional)

#### 502

Dev.to unreachable while checking the key

- `error` (string, required)
- `issues` (any[], optional)
