Message commands: update, delete
The Message Verbs update, delete as CLI commands, with inputs, result, refusals and an example.
Reference for Message, one group of Message commands.
Message.update
Changes the given properties of a Message. Verb page.
npx startup-builder do Message.update --json '<input>' [--try | --send | --do]Emits Message.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Message. |
medium | string | One of email, sms, voice, or chat. | |
direction | string | One of inbound or outbound. | |
body | text | What it says. | |
from | string | The sender: an address, a number, or a Channel id. | |
to | string | The recipient: an address, a number, or a Person id. | |
subject | string | The subject line, for email. | |
purpose | string | Why it goes out, such as onboarding; consent and suppression rules read it. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
message | Message | required | The Message. |
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
npx startup-builder do Message.update --json '{"id": "message_3Dg8ysSOyQ", "medium": "email"}'Message.delete
Deletes a Message: a soft delete that keeps its history, undone by Thing.restore. Verb page.
npx startup-builder do Message.delete --json '<input>' [--try | --send | --do]Emits Message.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Message. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
message | Message | required | The Message. |
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
npx startup-builder do Message.delete --json '{"id": "message_3Dg8ysSOyQ"}'