# Method: phones.agentMessages.delete

Revokes an agent message that has been sent but not yet delivered.

If the RCS for Business platform successfully revokes a message, then the message is deleted from the user's message queue and is never delivered (200 OK).

A 404 Not Found response means the revocation attempt has failed because the message was delivered.

There is a small chance that the agent may initiate a revocation while the RCS for Business platform is in the process of delivering the message. In these rare cases, the agent receives a DELIVERED user event for the message shortly after initiating the revocation request.

### HTTP request

`DELETE https://rcsbusinessmessaging.googleapis.com/v1/{name=phones/*/agentMessages/*}`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` "phones/{E.164}/agentMessages/{messageId}", where {E.164} is the user's phone number in E.164 format and {messageId} is the agent-assigned ID of the agent message that should be revoked. For example, with the US phone number +1-222-333-4444 and an agent message with the ID "12345xyz", the resulting endpoint would be <https://rcsbusinessmessaging.googleapis.com/v1/phones/+12223334444/agentMessages/12345xyz>. |

### Query parameters

| Parameters ||
|---|---|
| `agentId` | `string` Required. The agent's unique identifier. |

### Request body

The request body must be empty.

### Response body

If successful, the response body is an empty JSON object.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/rcsbusinessmessaging`

For more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).