VocalDocscontracts 1.65.0

Read a Message with its content

GET /v1/messages/{message_id}

PropertyValue
Operationget_message
GroupMessages
Scopemessages:read
Route classread
IdempotencyNo Idempotency-Key
AuditAn audited content read channels.message.read
Released in1.60.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Answers a Message with its recipient and text (1.60.0), an audited content read (channels.md section 8).

Request

Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the messages:read scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.

curl "$VOCAL_API/v1/messages/msg_..." \
  -H "Authorization: Bearer $VOCAL_API_KEY"

Parameters

NameInTypeRequiredDescription
message_idpathMessageIdyesThe id of a Message: msg_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log.

Responses

StatusContent typeShapeError codes
200application/jsonMessage
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden
404application/jsonErrorEnvelopenot_found
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 200 answer

The shape is Message.

FieldTypeRequiredDescription
actionMessagingActionyes
channelMessageChannelyes
connection_idConnectionIdyes
contentMessageContent or nullyesThe recipient and text: answered by the single read, an audited content read; null in a list.
created_atTimestampyes
deferred_untilTimestamp or nullyesWhen a deferred Message is sent; null otherwise.
delivered_atTimestamp or nullyes
directionMessageDirectionyes
environmentEnvironmentyes
error_codeToolErrorCode or nullyes
idMessageIdyes
notification_rule_idNotificationRuleId or nullyes
object"message"yes
organization_idOrganizationIdyes
related_call_idCallId or nullyes
run_idRunId or nullyes
segmentsinteger or nullyesThe SMS segments counted; null for other channels.
sent_atTimestamp or nullyes
statusMessageStatusyes
thread_idnullyesReserved for conversation Channels; always null.
toolUpstreamToolNameyes
trigger_event_idTriggerEventId or nullyes
updated_atTimestampyes
vendor_message_idstring or nullyes