Extensions

Publish an extension version

Publishes one version from its manifest and returns it with status 201, creating the extension named by the manifest on its first version.

POST
/v1/extensions

Publishes one version from its manifest and returns it with status 201, creating the extension named by the manifest on its first version. A hosted manifest carries its bundle. Publishing a version again with the same manifest and bundle returns it; a different one conflicts, so bump the manifest's version. Only a person can publish, not an API key.

Authorization

apiKey
headerx-api-key<token>

Request Body

application/json
  1. body
manifest*
bundle?string|null

Response Body

PublishExtensionVersionResponse

application/json
  1. response
extension*
version*
Example Request
import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.extensions.publish({  "manifest": {    "name": "example",    "displayName": "example",    "version": "example",    "runtime": "hosted",    "events": [      "mailbox.message.received"    ],    "permissions": [      "read"    ]  }});
Example Response
{  "extension": {    "id": "string",    "name": "string",    "displayName": "string",    "description": "string",    "runtime": "hosted",    "latestVersion": {      "id": "string",      "version": "string"    },    "createdAt": "string",    "updatedAt": "string"  },  "version": {    "id": "string",    "version": "string",    "runtime": "hosted",    "bundle": {      "sha256": "string",      "sizeBytes": -9007199254740991    },    "publishedAt": "string",    "manifest": {      "name": "string",      "displayName": "string",      "description": "string",      "version": "string",      "runtime": "hosted",      "events": [        "mailbox.message.received"      ],      "permissions": [        "read"      ]    }  }}

Related documentation