Skip to content

Integration programs: create, get

The Integration Verbs create, get as MCP do programs, with inputs, result, refusals and an example.

Reference for Integration, one group of Integration programs.

Integration.create

Creates an Integration. Verb page.

Text
do: return await $.Integration.create(input)

Emits Integration.created.

Inputs

InputTypeRequiredDescription
acquiredstringrequiredOne of owned, wrapped, or recruited.
termstextThe terms the Startup holds the right to use and resell it under.
scopestringrequiredOne of studio, startup, or customer.
syncstringWhich side leads a sync connector: platform or provider.
modestringrequiredHow records move: mirror writes db.sb out to the outside tool; import turns edits there into Changes. db.sb is the record in both.
venuestringThe id of the ad, social or app-store venue the account is on, when it is on one.
accountstringThe outside account’s own id, such as an ad account, a workspace or a repository.
grantsstring[]The outside permissions the account holder approved: the narrowest set its Verbs need.
connectedByPartyWho approved the connection; a Human’s own account is used only under that Human’s Mandate.
environmentstringA test Integration reaches only the upstream’s test account, as a Stripe test account does.
expiresAtdatetimeWhen access lapses unless refreshed.
refreshedAtdatetimeWhen the platform last renewed the outside token.
lastErrorstringThe error slug of the last failed call or refresh, cleared by the next success.
cursorstringWhere the last sync run stopped, so the next run reads only what changed.
systemSystemAn Integration connects an outside Source to one System, with credentials at Studio, Startup or Customer scope.
sourceSourcean Integration binds one wrapped Source to a System with credentials.

Returns

OutputTypeRequiredDescription
integrationIntegrationrequiredThe Integration.

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.None.

Example

JSON
{
  "name": "do",
  "arguments": {
    "code": "return await $.Integration.create({ acquired: 'owned', scope: 'studio', mode: 'mirror' })"
  }
}

Integration.get

Returns one Integration by id. Verb page.

Text
do: return await $.Integration.get(input)

Reads only: it emits no Event.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Integration.
atstringA time or Version name: the record as it stood then. Unset: as it stands now.

Returns

OutputTypeRequiredDescription
integrationIntegrationrequiredThe Integration.

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.None.

Example

JSON
{
  "name": "do",
  "arguments": {
    "code": "return await $.Integration.get({ id: 'integration_alVwjQcmRy' })"
  }
}