> ## 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

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

```typescript
import { Client } from "@upstash/qstash";

const client = new Client({ token: "<QSTASH_TOKEN>" });
const messages = client.messages();
const msg = await messages.get("msgId");
```

#### Cancel/delete a message

```typescript
import { Client } from "@upstash/qstash";

const client = new Client({ token: "<QSTASH_TOKEN>" });
const messages = client.messages();
const msg = await messages.delete("msgId");
```
