---
title: "Add a plugin or connect it [write]"
method: POST
path: "/plugins/{name}/add"
---

# Add a plugin or connect it \[write\]

`POST /plugins/{name}/add`

## Request

- Base URL: `https://api.agentsky.dev/v1`
- URL: `https://api.agentsky.dev/v1/plugins/{name}/add`
- Auth: HTTP bearer

Runs the source's own add: tool:<id> is switched on in the workspace's default environment; skill:<id> attaches to every new session; bundle:<name> is switched back on, or installed from `source` or the marketplace that lists it; app:<slug> starts connecting (`success_url`/`error_url` default to the consumer app's own callback) and answers `next.url`, the address the person opens to sign in; with `task_id` and `request_id` instead, `next.url` is the once-only connect link of that task's connect_app request, as POST /connectors/links (404 when the task has no such open request, 403 request_not_yours, 422 wrong_app when it asks for another app); chat:<platform> starts the chat-app connect (`agent_id` or `session_id` chooses who answers, `app` a registered app) and answers the pairing page as `next.url`; mac:<id> and browser:<scope> answer `next.steps`, and mac:meetings with `agent_id` adds its follow-up routine for that agent, paused (one already there is left as it is). A merged product's first id connects its app and names its chat app's pairing in `next.steps`; a bundle names one app per category it still needs. When a person must finish, the answer is 202 with status needs_you; otherwise 200 added. 403 plugin_blocked when an admin blocked it; 403 person_required for apps and chat apps under a workspace key. A custom MCP server is added with POST /plugins {mcp_url}.

## Path parameters

- `name` string, required

## Request body

- object
  - `success_url` string
  - `error_url` string
  - `source` string
  - `mcp_tokens` object
  - `agent_id` string
  - `session_id` string
  - `label` string
  - `app` string
  - `task_id` string: app only, with request_id: the task whose connect_app request this answers
  - `request_id` string: app only, with task_id: answers next.url, a link the person the request is addressed to opens once, within fifteen minutes, without signing in

## Response `200`

Added

- PluginAddAnswer
  - `plugin_id` string, required
  - `status` 'added' | 'needs_you', required
  - `next` object: What a person must finish, one step per part
    - `url` string
    - `steps` string[]
  - `result` unknown, required

## Other responses

- `202`: A person must finish: open next.url or follow next.steps
- `default`: Error — { error: { code, message, request_id } }

## Changes

- **2026-11-02** `e5e8f0229a99`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/agentsky/apis/agentsky-developer-api/changes/plugins/:name/add/post.md)

---

[API](https://skmtc.dev/agentsky/apis/agentsky-developer-api.md) - [All operations](https://skmtc.dev/agentsky/apis/agentsky-developer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agentsky/apis/agentsky-developer-api/revisions/0d435187cd55?raw)
