Newsletter programs: update, delete
The Newsletter Verbs update, delete as MCP do programs, with inputs, result, refusals and an example.
Reference for Newsletter, one group of Newsletter programs.
Newsletter.update
Changes the given properties of a Newsletter. Verb page.
do: return await $.Newsletter.update(input)Emits Newsletter.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Newsletter. |
name | string | What subscribers see it called. | |
from | Mailbox | The broadcast Mailbox each issue sends from. | |
topic | string | The topic a Contact subscribes to, recorded with their Consent. | |
offer | Offer | The Offer whose Subscription unlocks paid issues and the archive. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
newsletter | Newsletter | required | The Newsletter. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
{
"name": "do",
"arguments": {
"code": "return await $.Newsletter.update({ id: 'newsletter_FLjN3aQujc', name: 'Leaseline notes' })"
}
}Newsletter.delete
Deletes a Newsletter: a soft delete that keeps its history, undone by Thing.restore. Verb page.
do: return await $.Newsletter.delete(input)Emits Newsletter.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Newsletter. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
newsletter | Newsletter | required | The Newsletter. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
{
"name": "do",
"arguments": {
"code": "return await $.Newsletter.delete({ id: 'newsletter_FLjN3aQujc' })"
}
}