---
source_url: https://www.pubnub.com/docs/sdks/rest-api/remove-action
title: Remove action
---

# Remove action

> For AI agents: documentation index at https://www.pubnub.com/llms-full.txt

Allows users to remove their previously-posted message actions, by specifying the parent message, and the single timetoken of the action(s) they wish to delete. It is technically possible to delete more than one action if the same UUID/userId posted different actions on the same parent message at the same time. If all goes well, the action(s) are deleted from the database, and one or more `Action remove event` messages are published on the same channel as the parent message.

| Path Parameters |
| --- |
| `sub_key`string—**REQUIRED**Your app's subscribe key from Admin Portal.Example: sub-c-50264475-1902-558x-d213-7p19052012n2 |
| `channel`string—**REQUIRED**The channel ID to perform the operation on.Example: myChannel |
| `message_timetoken`string—**REQUIRED**The publish timetoken of a parent message.Example: 15610547826970040 |
| `action_timetoken`string—**REQUIRED**The publish timetoken of the action.Example: 15610547826970040 |

| Query Parameters |
| --- |
| `auth`stringString which is either the auth key (Access Manager legacy) or a valid token (Access Manager) used to authorize the operation if access control is enabled.Example: myAuth / p0thisAkFl043rhDdHRsCkNyZXisRGNoYW6hanNlY3JldAFDZ3Jwsample3KgQ3NwY6BDcGF0pERjaGFuoENnctokenVzcqBDc3BjoERtZXRhoENzaWdYIGOAeTyWGJI |
| `uuid`string—**REQUIRED**A UTF-8 encoded string of up to 92 characters used to identify the client.Example: myUniqueUserId |
| `signature`stringSignature used to verify that the request was signed with the secret key associated with the subscribe key.If Access Manager is enabled, either a valid authorization token or a signature are required.Check Access Manager documentation for details on how to compute the signature. |
| `timestamp`integerUnix epoch timestamp used as a nonce for signature computation. Must have no more than ± 60 seconds offset from NTP.Required if the signature parameter is supplied. |

| Responses |
| --- |
| `200`The action was removed.Schema — OPTIONALstatus integer — OPTIONALdata object — OPTIONAL | Schema—**OPTIONAL** | `status`integer—**OPTIONAL** | `data`object—**OPTIONAL** |
| Schema—**OPTIONAL** |
| `status`integer—**OPTIONAL** |
| `data`object—**OPTIONAL** |
| `207`The action was deleted but the action-deletion message was not published.Schema — OPTIONALstatus integer — OPTIONALerror object — OPTIONALmessage string — OPTIONALsource string — OPTIONAL | Schema—**OPTIONAL** | `status`integer—**OPTIONAL** | `error`object—**OPTIONAL**message string — OPTIONALsource string — OPTIONAL | `message`string—**OPTIONAL** | `source`string—**OPTIONAL** |
| Schema—**OPTIONAL** |
| `status`integer—**OPTIONAL** |
| `error`object—**OPTIONAL**message string — OPTIONALsource string — OPTIONAL | `message`string—**OPTIONAL** | `source`string—**OPTIONAL** |
| `message`string—**OPTIONAL** |
| `source`string—**OPTIONAL** |
| `400`Wrong uuid specified for the given message action.Schema — OPTIONALstatus integer — OPTIONALerror object — OPTIONALmessage string — OPTIONALsource string — OPTIONAL | Schema—**OPTIONAL** | `status`integer—**OPTIONAL** | `error`object—**OPTIONAL**message string — OPTIONALsource string — OPTIONAL | `message`string—**OPTIONAL** | `source`string—**OPTIONAL** |
| Schema—**OPTIONAL** |
| `status`integer—**OPTIONAL** |
| `error`object—**OPTIONAL**message string — OPTIONALsource string — OPTIONAL | `message`string—**OPTIONAL** | `source`string—**OPTIONAL** |
| `message`string—**OPTIONAL** |
| `source`string—**OPTIONAL** |
| `403`The client isn't authorized to perform this operation.Schema — OPTIONALstatus integer — OPTIONALerror object — OPTIONALsource string — OPTIONALmessage string — OPTIONAL | Schema—**OPTIONAL** | `status`integer—**OPTIONAL** | `error`object—**OPTIONAL**source string — OPTIONALmessage string — OPTIONAL | `source`string—**OPTIONAL** | `message`string—**OPTIONAL** |
| Schema—**OPTIONAL** |
| `status`integer—**OPTIONAL** |
| `error`object—**OPTIONAL**source string — OPTIONALmessage string — OPTIONAL | `source`string—**OPTIONAL** | `message`string—**OPTIONAL** |
| `source`string—**OPTIONAL** |
| `message`string—**OPTIONAL** |

sub_key
*
Type:
string
Your app's subscribe key from
[Admin Portal](https://admin.pubnub.com)
.
channel
*
Type:
string
The channel ID to perform the operation on.
message_timetoken
*
Type:
string
The publish timetoken of a parent message.
action_timetoken
*
Type:
string
The publish timetoken of the action.
auth
Type:
string
String which is either the auth key (Access Manager legacy) or a valid token (
[Access Manager](https://www.pubnub.com/docs/security/access-control/overview.md)
) used to authorize the operation if access control is enabled.
uuid
*
Type:
string
A UTF-8 encoded string of up to 92 characters used to
[identify the client](https://www.pubnub.com/docs/architecture/core-concepts.md)
.
signature
Type:
string
Signature used to verify that the request was signed with the secret key

associated with the subscribe key.

If Access Manager is enabled, either a valid authorization token or a signature are required.

Check
[Access Manager documentation](https://www.pubnub.com/docs/sdks/rest-api/access-manager-introduction.md)
for details on how to compute the signature.
timestamp
Type:
integer
Unix epoch timestamp used as a nonce for signature computation. Must

have no more than ± 60 seconds offset from NTP.

Required if the
signature
parameter is supplied.
status
Type:
integer
Example:
200
data
Type:
object
Example:
{}
status
Type:
integer
error
Type:
object
Example Response

```
{
  "status": 207,
  "error": {
    "source": "actions",
    "message": "Deleted but failed to publish removed events."
  }
}
```

status
Type:
integer
error
Type:
object
Example Response

```
{
  "status": 400,
  "error": {
    "source": "actions",
    "message": "Not deleting message action: wrong uuid specified"
  }
}
```

status
Type:
integer
Example:
403
error
Type:
object
