2020-01-01 22:37:59 +01:00
---
2022-11-20 07:34:38 +01:00
title: endorsements API methods
description: Feature other profiles on your own profile. See also accounts/:id/{pin,unpin}
2020-01-01 22:37:59 +01:00
menu:
docs:
weight: 90
2022-11-20 07:34:38 +01:00
name: endorsements
2020-01-01 22:37:59 +01:00
parent: methods-accounts
2022-11-20 07:34:38 +01:00
identifier: methods-endorsements
aliases: [
"/methods/endorsements",
"/api/methods/endorsements",
"/methods/accounts/endorsements",
]
2020-01-01 22:37:59 +01:00
---
2022-11-20 07:34:38 +01:00
< style >
#TableOfContents ul ul ul {display: none}
< / style >
## View currently featured profiles {#get}
```http
2022-12-14 22:55:30 +01:00
GET /api/v1/endorsements HTTP/1.1
2022-11-20 07:34:38 +01:00
```
2020-01-01 22:37:59 +01:00
Accounts that the user is currently featuring on their profile.
2022-11-20 07:34:38 +01:00
**Returns:** Array of [Account ]({{< relref "entities/account" >}} )\
2020-01-01 22:37:59 +01:00
**OAuth:** User token + `read:accounts` \
2020-12-27 07:03:55 +01:00
**Version history:**\
2023-08-21 16:40:12 +02:00
2.5.0 - added
2022-11-20 07:34:38 +01:00
#### Request
##### Headers
Authorization
: {{< required > }} Provide this header with `Bearer <user token>` to gain authorized access to this API method.
##### Query parameters
max_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
since_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
limit
2022-12-14 22:55:30 +01:00
: Integer. Maximum number of results to return. Defaults to 40 accounts. Max 80 accounts.
2022-11-20 07:34:38 +01:00
#### Response
##### 200: OK
Sample call with limit=2.
```json
2020-01-01 22:37:59 +01:00
[
{
"id": "952529",
"username": "alayna",
"acct": "alayna@desvox.es",
"display_name": "Alayna Desirae",
"locked": true,
"bot": false,
"created_at": "2019-10-26T23:12:06.570Z",
"note": "experiencing ________ difficulties< br > 22y/o INFP in Oklahoma",
"url": "https://desvox.es/users/alayna",
"avatar": "https://files.mastodon.social/accounts/avatars/000/952/529/original/6534122046d050d5.png",
"avatar_static": "https://files.mastodon.social/accounts/avatars/000/952/529/original/6534122046d050d5.png",
"header": "https://files.mastodon.social/accounts/headers/000/952/529/original/496f1f817e042ade.png",
"header_static": "https://files.mastodon.social/accounts/headers/000/952/529/original/496f1f817e042ade.png",
"followers_count": 0,
"following_count": 0,
"statuses_count": 955,
"last_status_at": "2019-11-23T07:05:50.682Z",
"emojis": [],
"fields": []
},
{
"id": "832844",
"username": "a9",
"acct": "a9@broadcast.wolfgirl.engineering",
"display_name": "vivienne :collar: ",
"locked": true,
"bot": false,
"created_at": "2019-06-12T18:55:12.053Z",
"note": "borderline nsfw, considered a schedule I drug by nixon< br > waiting for the year of the illumos desktop",
"url": "https://broadcast.wolfgirl.engineering/users/a9",
"avatar": "https://files.mastodon.social/accounts/avatars/000/832/844/original/ae1de0b8fb63d1c6.png",
"avatar_static": "https://files.mastodon.social/accounts/avatars/000/832/844/original/ae1de0b8fb63d1c6.png",
"header": "https://files.mastodon.social/accounts/headers/000/832/844/original/5088e4a16e6d8736.png",
"header_static": "https://files.mastodon.social/accounts/headers/000/832/844/original/5088e4a16e6d8736.png",
"followers_count": 43,
"following_count": 67,
"statuses_count": 5906,
"last_status_at": "2019-11-23T05:23:47.911Z",
"emojis": [
{
"shortcode": "collar",
"url": "https://files.mastodon.social/custom_emojis/images/000/106/920/original/80953b9cd96ec4dc.png",
"static_url": "https://files.mastodon.social/custom_emojis/images/000/106/920/static/80953b9cd96ec4dc.png",
"visible_in_picker": true
}
],
"fields": []
}
]
```
2022-11-20 07:34:38 +01:00
Because AccountPin IDs are generally not exposed via any API responses, you will have to parse the HTTP `Link` header to load older or newer results. See [Paginating through API responses ]({{<relref "api/guidelines#pagination">}} ) for more information.
```http
2022-12-14 22:55:30 +01:00
Link: < https: / / mastodon . example / api / v1 / endorsements ? limit = 2&max_id=832844 > ; rel="next", < https: / / mastodon . example / api / v1 / endorsements ? limit = 2&since_id=952529 > ; rel="prev"
2022-11-20 07:34:38 +01:00
```
2020-01-01 22:37:59 +01:00
2022-11-20 07:34:38 +01:00
##### 401: Unauthorized
2020-01-01 22:37:59 +01:00
2022-11-20 07:34:38 +01:00
Invalid or missing Authorization header.
```json
2020-01-01 22:37:59 +01:00
{
"error": "The access token is invalid"
}
```
2022-11-20 07:34:38 +01:00
---
## See also
{{< page-relref ref = "methods/accounts#pin" caption = "POST /api/v1/accounts/:id/pin" > }}
{{< page-relref ref = "methods/accounts#unpin" caption = "POST /api/v1/accounts/:id/unpin" > }}
2020-01-01 22:37:59 +01:00
2022-11-20 07:34:38 +01:00
{{< caption-link url = "https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v1/endorsements_controller.rb" caption = "app/controllers/api/v1/endorsements_controller.rb" > }}