---
title: "Install an extension"
method: POST
path: "/v1/extension-installations"
tags: ["Extension installations"]
---

# Install an extension

`POST /v1/extension-installations`

## Request

- Base URL: `https://api.samva.dev`
- URL: `https://api.samva.dev/v1/extension-installations`
- Auth: API key in header `x-api-key`

Installs a published version with a scope, permissions, and a send mode, and returns it with status 201. The installation acts on your grants narrowed to these; a webhook installation's API key and webhook secret are returned once. Only a person can install, not an API key.

## Request body

- InstallExtensionPayload
  - `extension` string, required
  - `version` string, nullable
  - `mailboxIds` MailboxId[], nullable
  - `namespaceId` string
  - `permissions` string[], nullable
  - `sendMode` 'send' | 'approval', nullable
  - `webhookUrl` string, nullable

## Response `201`

InstallExtensionResponse

- InstallExtensionResponse
  - `installation` ExtensionInstallation, required
    - `id` string, required
    - `extensionId` string, required
    - `name` string, required
    - `displayName` string, required
    - `version` ExtensionVersionRef, required
      - `id` string, required
      - `version` string, required
    - `runtime` 'hosted' | 'webhook', required
    - `status` 'active' | 'disabled', required
    - `createdAt` string, required
    - `events` string[], required
    - `permissions` string[], required
    - `sendMode` 'send' | 'approval', required
    - `scope` object, required
      - `mailboxIds` MailboxId[], nullable, required
      - `namespaceId` string, required
    - `webhook` object, nullable, required
      - `endpointId` string, required
      - `url` string, required
    - `updatedAt` string, required
    - `disabledAt` string, nullable, required
  - `credentials` object, nullable, required
    - `apiKey` string, required
    - `webhookSecret` string, required

## Other responses

- `401`: UnauthorizedError
- `403`: ForbiddenError
- `404`: ResourceNotFoundError
- `409`: ConflictError
- `422`: ValidationError
- `500`: InternalError
- `504`: GatewayTimeoutError

---

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