Plugins

Install a plugin

Installs a plugin's bundle in one write and records the plugin on each type. Needs schema.write, write on each type and edge type name, and connectors.manage for a connector. An app can't install guidance.

POST
/plugins

Authorization

bearerAuth
headerAuthorizationBearer <token>

Authenticate with an API key (marfa_k1_…) or an OAuth access token (marfa_at_…).

Header parameters

X-Marfa-Instance-Id?string

The ID of the instance you expect, as GET / returns it. If another instance answers at this address, Marfa returns 409 instance_changed and doesn't write. Leave it out to send the request to whichever instance answers.

Match^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Request body

application/json
  1. body

A plugin's bundle, <name>.plugin.json: its identity, version, types and edge types.

format*1

The bundle format.

Value in1
name*string

The plugin's name: lowercase words and numbers joined by hyphens.

Match^[a-z][a-z0-9]*(-[a-z0-9]+)*$
Lengthlength <= 64
title*string

The name people see for the plugin.

Length1 <= length <= 100
description*string

What the plugin adds, in a sentence.

Length1 <= length <= 300
mark*string

The icon the plugin is shown by, an Iconify icon ID.

maker*string

Who made the plugin.

Length1 <= length <= 64
marfa*string

The oldest Marfa release the plugin works with.

Match^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$
version*string

The plugin's version. 0.0.0 is a bundle built from a source folder with no version.

Match^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$
types*array<>

The type definitions the plugin installs, each as POST /types takes it, with its guidance.

edge_types*array<>

The edge types the plugin installs, each as POST /edge-types takes it.

connector?

The plugin's connector, which Marfa checks and records when it installs the plugin.

Response body

About errors

Returns the plugin after a newer version only added to it, or as it is when this version is already installed.

application/json
  1. response

The installed plugin, and what installing did.

name*string

The plugin's name: lowercase words and numbers joined by hyphens.

Match^[a-z][a-z0-9]*(-[a-z0-9]+)*$
Lengthlength <= 64
title*string

The name people see for the plugin.

Length1 <= length <= 100
description*string

What the plugin adds, in a sentence.

Length1 <= length <= 300
mark*string

The icon the plugin is shown by, an Iconify icon ID.

maker*string

Who made the plugin.

Length1 <= length <= 64
marfa*string

The oldest Marfa release the plugin works with.

Match^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$
version*string

The plugin's version. 0.0.0 is a bundle built from a source folder with no version.

Match^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$
types*array<string>

The IDs of the types the plugin installed, at any version.

edge_types*array<string>

The IDs of the edge types any installed version of the plugin brought that the instance still holds.

connector*|

The installed version's connector, as its bundle gave it, or null.

connector_host*|

The ID of the connector host the plugin's connector is assigned to, or null.

fingerprint*string

The SHA-256 of the bundle's bytes as the install that wrote this version received them, in lowercase hexadecimal.

Match^[0-9a-f]{64}$
installed_at*string

When the plugin was first installed.

Formatdate-time
installed_by*|

The sign-in that first installed the plugin, or null when it is not known.

updated_at*string

When the installed version last changed.

Formatdate-time
outcome*string

installed for a new plugin, updated for a newer version, or unchanged when this version is already installed.

Value in"installed""updated""unchanged"

Returns the newly installed plugin.

application/json
  1. response

The installed plugin, and what installing did.

name*string

The plugin's name: lowercase words and numbers joined by hyphens.

Match^[a-z][a-z0-9]*(-[a-z0-9]+)*$
Lengthlength <= 64
title*string

The name people see for the plugin.

Length1 <= length <= 100
description*string

What the plugin adds, in a sentence.

Length1 <= length <= 300
mark*string

The icon the plugin is shown by, an Iconify icon ID.

maker*string

Who made the plugin.

Length1 <= length <= 64
marfa*string

The oldest Marfa release the plugin works with.

Match^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$
version*string

The plugin's version. 0.0.0 is a bundle built from a source folder with no version.

Match^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$
types*array<string>

The IDs of the types the plugin installed, at any version.

edge_types*array<string>

The IDs of the edge types any installed version of the plugin brought that the instance still holds.

connector*|

The installed version's connector, as its bundle gave it, or null.

connector_host*|

The ID of the connector host the plugin's connector is assigned to, or null.

fingerprint*string

The SHA-256 of the bundle's bytes as the install that wrote this version received them, in lowercase hexadecimal.

Match^[0-9a-f]{64}$
installed_at*string

When the plugin was first installed.

Formatdate-time
installed_by*|

The sign-in that first installed the plugin, or null when it is not known.

updated_at*string

When the installed version last changed.

Formatdate-time
outcome*string

installed for a new plugin, updated for a newer version, or unchanged when this version is already installed.

Value in"installed""updated""unchanged"
  • validation_error: the bundle has a key it does not hold, a field of the wrong shape, an ID named twice, a connector section PluginConnector or a mapping save refuses, or a refused edge type. details.errors names each.
  • missing_required_field, invalid_schema, inheritance_violation, property_shadows_field: a type is refused as POST /types refuses it. details.type_id names it.
application/json
  1. response

An error response.

error*

What went wrong.

unauthorized: the request has no credential, or its credential is not valid. For a key that has expired, details.expired_at says when it expired.

application/json
  1. response

An error response.

error*

What went wrong.

  • forbidden: no schema.write, no connectors.manage for a connector (details.required_scope), a type under core, system, marfa, app or user (details.namespace), or app guidance.
  • type_not_permitted: no write on a type of the bundle, or on a parent outside it that isn't shipped or under common.
  • edge_type_not_permitted: no write on an edge type name of the bundle.
application/json
  1. response

An error response.

error*

What went wrong.

request_timeout: the request body didn't arrive whole within 180 seconds. Nothing changed, and Marfa closed the connection. Send the request again. A body larger than about 21 MiB can't arrive in that time over a 1 Mbit/s link, so send it in smaller requests.

application/json
  1. response

An error response.

error*

What went wrong.

  • plugin_needs_newer_server: it needs a later Marfa.
  • plugin_version_older: a later version is installed.
  • type_exists: it holds a type it did not install.
  • plugin_narrows: a type or its connector narrows. See details.changes.
  • connector_source_held: its connector's source is held.
  • plugin_child_conflict: a type below clashes.
  • conflict: an edge type is held in another shape.
application/json
  1. response

An error response.

error*

What went wrong.

contract_mismatch: X-Marfa-Contract names another contract version than this instance speaks, or is not a whole number. Nothing was done.

application/json
  1. response

An error response.

error*

What went wrong.

request_too_large: the request body is larger than this instance accepts.

application/json
  1. response

An error response.

error*

What went wrong.

rate_limited: you sent too many requests. Wait for the number of seconds in Retry-After, then try again.

application/json
  1. response

An error response.

error*

What went wrong.

internal_error: Marfa failed in a way it didn't expect, and the request may not have completed. Read what you changed before you repeat a write.

application/json
  1. response

An error response.

error*

What went wrong.

write_contention: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again. While a restore runs, details.reason is restore_running.

application/json
  1. response

An error response.

error*

What went wrong.

insufficient_storage: the disk that holds the instance's data has no room for the request, or the request would leave less free than the instance keeps in reserve. Nothing changed, unless details.write_outcome is unknown, which means the write may have landed: read what you changed before you repeat it. Free space on the disk, then try the request again.

application/json
  1. response

An error response.

error*

What went wrong.

curl -X POST 'http://localhost:8600/plugins' \  -H 'Content-Type: application/json' \  -d '{  "format": 1,  "name": "string",  "title": "string",  "description": "string",  "mark": "string",  "maker": "string",  "marfa": "string",  "version": "string",  "types": [    {      "property1": null,      "property2": null    }  ],  "edge_types": [    {      "property1": null,      "property2": null    }  ]}'
About errors
{  "name": "tickets",  "title": "Tickets",  "description": "Tickets for tracking work.",  "mark": "lucide:ticket",  "maker": "Marfa",  "marfa": "0.0.90",  "version": "1.2.0",  "types": [    "common.ticket",    "common.ticket.spike"  ],  "edge_types": [    "blocks"  ],  "connector": null,  "connector_host": null,  "fingerprint": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",  "installed_at": "2026-11-21T10:00:00.000Z",  "installed_by": {    "kind": "key",    "id": "01a1011b-b5e5-7be6-8f3b-77492475b5a4",    "name": "laptop"  },  "updated_at": "2026-11-21T12:00:00.000Z",  "outcome": "updated"}