Skip to content

Contact programs: subscribe, suppress, unsubscribe

The Contact Verbs subscribe, suppress, unsubscribe as MCP do programs, with inputs, result, refusals and an example.

Reference for Contact, one group of Contact programs.

Contact.subscribe

Subscribe records a Contact’s chosen topics and frequency from the hosted preference page, with Consent for each topic. Verb page.

Text
do: return await $.Contact.subscribe(input)

Emits Contact.subscribed.

Inputs

InputTypeRequiredDescription
contactContactrequiredThe Contact.
topicsstring[]requiredThe topics the Contact chose.

Returns

OutputTypeRequiredDescription
contactContactrequiredThe Contact, with their topics.

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 $.Contact.subscribe({ contact: 'contact_WsrosCQi6J', topics: ['Example topics'] })"
  }
}

Contact.suppress

Suppress records a Suppression for a Contact’s address, which every Startup honors forever. Verb page.

Text
do: return await $.Contact.suppress(input)

Emits Contact.suppressed.

Inputs

InputTypeRequiredDescription
contactContactrequiredThe Contact who opts out.

Returns

OutputTypeRequiredDescription
contactContactrequiredThe suppressed Contact.

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 $.Contact.suppress({ contact: 'contact_WsrosCQi6J' })"
  }
}

Contact.unsubscribe

Unsubscribe stops commercial Messages to a Contact in one click, for one topic or all, honored at once. Verb page.

Text
do: return await $.Contact.unsubscribe(input)

Emits Contact.unsubscribed.

Inputs

InputTypeRequiredDescription
contactContactrequiredThe Contact.
topicstringOne topic; omitted, every commercial topic.

Returns

OutputTypeRequiredDescription
contactContactrequiredThe Contact, unsubscribed.

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 $.Contact.unsubscribe({ contact: 'contact_WsrosCQi6J' })"
  }
}