new_releases Updates: Check the
release notes for new features and product updates.
Method: phones.agentEvents.create
Stay organized with collections
Save and categorize content based on your preferences.
Sends an event from the agent to a user.
Agent events can be used to indicate that the agent has read a message from the user or that the agent is in the process of typing (which adds a human element to the RBM experience). If RBM can't reach the user, the RBM platform returns 404 NOT_FOUND
.
Unlike agent messages, agent events cannot be revoked after sending.
HTTP request
POST https://rcsbusinessmessaging.googleapis.com/v1/{parent=phones/*}/agentEvents
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters |
parent |
string
"phones/{E.164}", where {E.164} is the user's phone number in E.164 format. For example, for a user with the US phone number +1-222-333-4444, the value would be phones/+12223334444, and the resulting endpoint would be https://rcsbusinessmessaging.googleapis.com/v1/phones/+12223334444/agentEvents.
|
Query parameters
Parameters |
eventId |
string
The ID of the event, assigned by the agent. This must be a UUID, as defined in https://tools.ietf.org/html/rfc4122. The RBM platform ignores any agent message sent with an ID that was used by an earlier message or event sent from the same agent.
|
agentId |
string
Required. The agent's unique identifier.
|
Request body
The request body contains an instance of AgentEvent
.
Response body
If successful, the response body contains a newly created instance of AgentEvent
.
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/rcsbusinessmessaging
For more information, see the OAuth 2.0 Overview.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-04-27 UTC.
[null,null,["Last updated 2025-04-27 UTC."],[[["\u003cp\u003eAgent events are used to signal that an agent has read a user's message or is currently typing, adding a human touch to the interaction.\u003c/p\u003e\n"],["\u003cp\u003eAgent events cannot be revoked once sent, unlike agent messages, which means they are a permanent record of the interaction.\u003c/p\u003e\n"],["\u003cp\u003eTo send an agent event, use a \u003ccode\u003ePOST\u003c/code\u003e request to the specified URL, including the user's E.164 formatted phone number in the path.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eeventId\u003c/code\u003e and \u003ccode\u003eagentId\u003c/code\u003e are required as query parameters when sending an event, and \u003ccode\u003eeventId\u003c/code\u003e needs to be a UUID according to RFC4122 standards.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful agent event requests will return a new instance of the sent AgentEvent in the response body.\u003c/p\u003e\n"]]],[],null,["# Method: phones.agentEvents.create\n\nSends an event from the agent to a user.\n\nAgent events can be used to indicate that the agent has read a message from the user or that the agent is in the process of typing (which adds a human element to the RBM experience). If RBM can't reach the user, the RBM platform returns `404 NOT_FOUND`.\n\nUnlike agent messages, agent events cannot be revoked after sending.\n\n### HTTP request\n\n`POST https://rcsbusinessmessaging.googleapis.com/v1/{parent=phones/*}/agentEvents`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `parent` | `string` \"phones/{E.164}\", where {E.164} is the user's phone number in E.164 format. For example, for a user with the US phone number +1-222-333-4444, the value would be phones/+12223334444, and the resulting endpoint would be \u003chttps://rcsbusinessmessaging.googleapis.com/v1/phones/+12223334444/agentEvents\u003e. |\n\n### Query parameters\n\n| Parameters ||\n|-----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `eventId` | `string` The ID of the event, assigned by the agent. This must be a UUID, as defined in \u003chttps://tools.ietf.org/html/rfc4122\u003e. The RBM platform ignores any agent message sent with an ID that was used by an earlier message or event sent from the same agent. |\n| `agentId` | `string` Required. The agent's unique identifier. |\n\n### Request body\n\nThe request body contains an instance of [AgentEvent](/business-communications/rcs-business-messaging/reference/rest/v1/phones.agentEvents#AgentEvent).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [AgentEvent](/business-communications/rcs-business-messaging/reference/rest/v1/phones.agentEvents#AgentEvent).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/rcsbusinessmessaging`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2)."]]