---
title: "Activate/configure one plug for a connected account"
method: PATCH
path: "/connections/{accountId}/plugs"
tags: ["Connections"]
---

# Activate/configure one plug for a connected account

`PATCH /connections/{accountId}/plugs`

## Request

- Base URL: `https://api.misar.io/post`
- URL: `https://api.misar.io/post/connections/{accountId}/plugs`
- Auth: API key in header `Authorization`

Rate limit: 30 requests/minute.

## Request body

- PlugUpsertRequest
  - `plugKey` string, required
  - `activated` boolean, required
  - `config` object

## Response `200`

Updated plug config.

- PlugUpsertResponse
  - `config` PlugConfig, required
    - `id` string, uuid
    - `plug_key` string
    - `config` object
    - `activated` boolean
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `400`: Validation failed, or `plugKey` is not a valid plug for this account's platform.
- `401`: Missing, malformed, revoked, or invalid API key/session.
- `402`: Plan limit: no active plan (any write; `reason: "no_active_plan"`), a monthly allowance is spent, or the feature is not on the caller's plan. Detect by `code: "plan_limit_exceeded"`.
- `403`: The API key lacks the scope this operation requires (`code: "insufficient_scope"`, `required_scope`).
- `404`: Connected account not found (or not owned by the caller).
- `429`: Per-user, per-route rate limit exceeded for this endpoint.

---

[API](https://skmtc.dev/misarpost/apis/misarpost-api.md) · [All operations](https://skmtc.dev/misarpost/apis/misarpost-api/llms.txt) · [OpenAPI document](https://skmtc.dev/misarpost/apis/misarpost-api/revisions/deec26db1305?raw)
