> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orbit.devotel.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent Marketplace API

> Browse and install pre-built AI agents from the Orbit marketplace. Developer endpoints to submit your own templates for moderation.

# Agent Marketplace API

A curated catalog of pre-built [AI agents](/api-reference/agents) — customer support, lead qualification, appointment booking, FAQ, etc. Install one to your org with a single call; configure prompts and tools afterwards. Tenants can also submit their own templates back to the public catalog for moderator review.

**Base path:** `/api/v1/agents/marketplace`

**Authentication:** API key (`X-API-Key`) or session JWT.

## Browse and install

| Method | Path                                 | Purpose                       |
| ------ | ------------------------------------ | ----------------------------- |
| `GET`  | `/agents/marketplace`                | Browse available templates    |
| `GET`  | `/agents/marketplace/{slug}`         | Get a single template by slug |
| `POST` | `/agents/marketplace/{slug}/install` | Fork a template into your org |

The list endpoint accepts the `category`, `channel`, `search`, `featured`, and
`limit` query parameters. Templates are addressed by their `slug` (kebab/underscore-cased),
not a numeric id. `install` forks the template into your org as a new, fully editable
agent and requires the `owner` or `admin` role.

## Submit and moderate

| Method | Path                                  | Purpose                                                    |
| ------ | ------------------------------------- | ---------------------------------------------------------- |
| `POST` | `/agents/marketplace/publish`         | Submit a new template for review                           |
| `GET`  | `/agents/marketplace/pending`         | View the moderation queue (platform moderator)             |
| `POST` | `/agents/marketplace/{slug}/moderate` | Approve or reject a submission (platform moderator)        |
| `GET`  | `/admin/marketplace/pending`          | Same queue via the admin console (cookie session)          |
| `POST` | `/admin/marketplace/{slug}/moderate`  | Same approve/reject via the admin console (cookie session) |

The moderation queue and approve/reject actions are reachable under **two prefixes**
that behave identically — pick whichever matches how you authenticate:

* `/agents/marketplace/*` uses the standard API auth (`X-API-Key` or session JWT).
* `/admin/marketplace/*` uses the admin-console cookie session.

Either way, moderation is **platform-moderator only**. A regular tenant `owner` cannot
list or approve pending submissions on either prefix.

`POST /agents/marketplace/publish` requires the `owner` or `admin` role and takes a
flat template definition (no `listing` wrapper, no `agent_id`, no `pricing`):

```bash theme={null}
curl -X POST https://api.orbit.devotel.io/api/v1/agents/marketplace/publish \
  -H "X-API-Key: dv_live_sk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "slug": "my-custom-agent",
    "name": "My Custom Agent",
    "category": "customer_support",
    "description": "A brief description of what this agent does",
    "system_prompt": "You are a helpful assistant for ...",
    "model": "claude-sonnet-4-6",
    "temperature": 0.7,
    "tools_config": ["crm_lookup", "order_status"],
    "conversation_starters": ["How can I help?"],
    "channels": ["whatsapp", "sms"],
    "tags": ["support"]
  }'
```

Required fields are `slug`, `name`, `category`, and `system_prompt`; the rest default
(`description=""`, `model="claude-sonnet-4-6"`, `temperature=0.7`, empty
`tools_config`/`conversation_starters`/`channels`/`tags`). `suggested_handoff` is optional.
A duplicate `slug` returns `409 Conflict`.

<Note>
  Submissions land with `status: pending` and are invisible to the public catalog until a
  platform moderator approves them. The moderation queue (`GET .../marketplace/pending`)
  and the approve/reject endpoint (`POST .../marketplace/{slug}/moderate`) are
  platform-moderator only. They are reachable under both the `/agents/marketplace` prefix
  (API-key or session JWT) and the `/admin/marketplace` prefix (admin-console cookie
  session), and behave identically — neither prefix lets a tenant owner moderate.
  Moderation sets `status` to `approved` (template becomes visible)
  or `rejected` (kept for audit) — `notes` are **required** when rejecting. There is no
  tenant self-publish: a tenant can submit, but only a moderator can approve.
</Note>

## See also

* [AI Agents API](/api-reference/agents)
* [Agent Marketplace guide](/agents/marketplace)
