REST Resource: phones.agentEvents

  • AgentEvent represents an event sent from an agent to a user, containing details about the event's type and status.

  • The eventType field defines the type of agent event, which can include IS_TYPING or READ, while TYPE_UNSPECIFIED means it was not specified.

  • The messageId field indicates which user message the agent event corresponds to, and is specifically used for READ type events.

  • The sendTime field, formatted as a Timestamp, signifies when the event was dispatched to the user, accepting RFC 3339 formats.

  • The create method within phones.agentEvents allows for the sending of an event from the agent to the user.

Resource: AgentEvent

An event from the agent to the user.

JSON representation
{
  "name": string,
  "eventType": enum (AgentEvent.EventType),
  "messageId": string,
  "sendTime": string
}
Fields
name

string

This field is set by the RBM platform. Do not include it when creating an agent event. The field resolves "phones/{E.164}/agentEvents/{eventId}", where {E.164} is the user's phone number in E.164 format and {eventId} is the agent-assigned ID of the agent event.

eventType

enum (AgentEvent.EventType)

The type of the agent event.

messageId

string

The ID of the user message that the agent event pertains to. This field is only applicable for agent events of type READ.

sendTime

string (Timestamp format)

This field is set by the RBM platform. Do not include it when creating an agent message. The field resolves the time when the event is sent to the user.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

AgentEvent.EventType

Type of an agent event.

Enums
TYPE_UNSPECIFIED Not specified.
IS_TYPING The agent is typing.
READ The message sent by a user has been read by the agent.

Methods

create

Sends an event from the agent to a user.