---
title: "Get Message Links"
url: "https://docs.yoagent.dev/reference/rest-api/operations/getmessagelinks"
---

# Get Message Links

GET

/v0/messages/{message_id}/links

```sh
curl -s "https://api.yoagent.dev/v0/messages/msg_01je56wqswfmn9pgbc1wq8tjgq/links" \
  -H "Authorization: Bearer $YOAGENT_KEY"
```

```js
const response = await fetch("https://api.yoagent.dev/v0/messages/msg_01je56wqswfmn9pgbc1wq8tjgq/links", {
  headers: {
    Authorization: `Bearer ${process.env.YOAGENT_KEY}`,
  },
});
if (!response.ok) throw new Error(await response.text());
const data = await response.json();
```

```python
import os

import requests

response = requests.get(
    "https://api.yoagent.dev/v0/messages/msg_01je56wqswfmn9pgbc1wq8tjgq/links",
    headers={"Authorization": f"Bearer {os.environ['YOAGENT_KEY']}"},
    timeout=60,
)
response.raise_for_status()
data = response.json()
```

- api.yoagent.dev/v0/messages/{message_id}/links

Links found in a message, with their kind (verify, reset, unsubscribe, other); filter by `kind`.

## Authorizations

- **[ApiKey](https://docs.yoagent.dev/reference/rest-api#apikey)**

## Parameters

### Path Parameters

**message_id**

required

_Message Id_

string

/^msg\_\[0-7]\[0-9a-hjkmnp-tv-z]{25}$/

### Query Parameters

**kind**

_Kind_

Any of:

**LinkKind**

_LinkKind_

What a link is for, guessed from its text and URL.

string

Allowed values: verify reset unsubscribe other

**null**

null

Only the links of this kind.

## Responses

### 200

Successful Response

application/json

_LinkList_

Links of a message.

object

**message_id**

required

_Message Id_

string

/^msg\_\[0-7]\[0-9a-hjkmnp-tv-z]{25}$/

**links**

required

_Links_

Array\<object>

_Link_

A link found in a message when it arrived: its URL, its text and what it is for.

object

**url**

required

_Url_

string

**text**

required

_Text_

string

**kind**

required

_LinkKind_

What a link is for, guessed from its text and URL.

string

Allowed values: verify reset unsubscribe other

#### Example

```json
{
  "message_id": "msg_01je56wqswfmn9pgbc1wq8tjgq",
  "links": [
    {
      "url": "https://example.com/sign-in?code=482913",
      "text": "Sign in",
      "kind": "verify"
    }
  ]
}
```

### default

An error (400, 401, 403, 404, 405, 409, 413, 429, 500, 503), in the one shape every call answers: [Errors](https://docs.yoagent.dev/reference/conventions#errors).
