Skip to content

Mapping.create

POST /{namespace}/mappings

Creates a Mapping.

Mode
do
Event
Mapping.created

Create makes a new Mapping from the inputs below. It is inherited: every Noun has get, list, create, update and delete.

Inputs

InputTypeRequiredDescription
verbstringThe Verb it serves, such as Meeting.book; a Verb has many Mappings, ranked.
fieldsjsonEach outside field or event and the Noun property or Event it maps to.
directionstringboth still keeps db.sb the record; the outside tool never becomes a second one.
converttextHow a value changes on the way, such as cents to money or a picklist to closed values.
rankintegerOrder tried when the preferred Mapping fails or finds nothing; the Policy orders it by cost per accepted result.
preferredbooleanTrue for the Mapping a Verb tries first.
doorstringHow the outside endpoint is classed; an unclassed write is one-way and waits its delay window.
sourceSourceA Source reaches the registry’s Nouns and Verbs through its Mappings, one per Verb it serves.

Outputs

OutputTypeRequiredDescription
mappingMappingrequiredThe Mapping.

Effects

  • Emits Mapping.created.
  • Two-way: try, send, do.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.Mapping.create

When it waits

GateDefault
Decision classLow: two-way, nothing at stake
Delay windowNone: it runs once review passes.
LimitThe call Limit of the Permission it runs under.
Over the LimitIt waits pending for an Approval from the Founder. Approved, it runs; refused, it ends refused with limit-exceeded; unanswered by its deadline, it ends canceled.