Skip to content

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.

Text
npx startup-builder do Message.update --json '<input>' [--try | --send | --do]

Emits Message.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Message.
mediumstringOne of email, sms, voice, or chat.
directionstringOne of inbound or outbound.
bodytextWhat it says.
fromstringThe sender: an address, a number, or a Channel id.
tostringThe recipient: an address, a number, or a Person id.
subjectstringThe subject line, for email.
purposestringWhy it goes out, such as onboarding; consent and suppression rules read it.

Returns

OutputTypeRequiredDescription
messageMessagerequiredThe Message.

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

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

Text
npx startup-builder do Message.delete --json '<input>' [--try | --send | --do]

Emits Message.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Message.

Returns

OutputTypeRequiredDescription
messageMessagerequiredThe Message.

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

Terminal
npx startup-builder do Message.delete --json '{"id":"message_3Dg8ysSOyQ"}'