> ## Documentation Index
> Fetch the complete documentation index at: https://upstash-bulkdlqdelete.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Messages

<Info>
  You can run the async code by importing `Client` from `upstash_qstash.asyncio`
  and awaiting the methods.
</Info>

Messages are removed from the database shortly after they're delivered, so you
will not be able to retrieve a message after. This endpoint is intended to be used
for accessing messages that are in the process of being delivered/retried.

#### Retrieve a message

```python
from upstash_qstash import Client

client = Client("<QSTASH_TOKEN>")
messages = client.messages()
msg = messages.get("msg_id")
```

#### Cancel/delete a message

```python
from upstash_qstash import Client

client = Client("<QSTASH_TOKEN>")
messages = client.messages()
msg = messages.delete("msg_id")
```
