> ## Documentation Index
> Fetch the complete documentation index at: https://upstash-vector.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>

Note: Messages are removed from the database shortly after they're delivered, so you
may not be able to retrieve a message after.

#### 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")
```
