> For the complete documentation index, see [llms.txt](https://docs.caturra.social/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.caturra.social/api/v1/endpoints/user.md).

# User

## Get User

<mark style="color:blue;">`GET`</mark> `/user/{UUID}` or `/user/@{username}`

### Notes

* If left empty, it will get the owner of the token's info
  * You will only receive the email of the token owner if you have the <mark style="color:yellow;">`user.email`</mark> scope
  * It will return `NULL` for both `email` and `email_verified`&#x20;
* When requesting a specific user, the `email` and `email_verified` will not be returned
* `avatar` currently returns a Gravatar URL; you can follow their docs for further customisation

### Scopes

> <mark style="color:yellow;">`user.get`</mark>, <mark style="color:yellow;">`user.email`</mark>

### Response

{% tabs %}
{% tab title="200" %}
{% code fullWidth="false" %}

```json
{
    "uuid": "string",
    "username": "string",
    "display_name": "string",
    "avatar": "string",
    "email": "string",
    "email_verified": "boolean",
    "badge": ["array"],
    "bio": "string",
    "follow_count": int,
    "following_count": int,
    "joined": timestamp
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Get User Posts

<mark style="color:blue;">`GET`</mark> `/user/{UUID}/posts/{page}`

### Scopes

> <mark style="color:yellow;">`user.get`</mark>, <mark style="color:yellow;">`post.get`</mark>

### Response

{% tabs %}
{% tab title="200" %}

```json
{
    "user": "string",
    "posts": [
        {"post object"},
        {"post object"},
        {"post object"}
    ]
}
```

{% endtab %}
{% endtabs %}

## Follow/Unfollow

<mark style="color:yellow;">`POST`</mark> `/user/{UUID}/follow`

### Scopes

> <mark style="color:yellow;">`user.get`</mark>, <mark style="color:yellow;">`user.follow`</mark>

### Response

{% tabs %}
{% tab title="200" %}

```json
{
    "action": "followed",
    "uuid": "string"
}
```

```json
{
    "action": "unfollowed",
    "uuid": "string"
}
```

{% endtab %}
{% endtabs %}

## Get Following

<mark style="color:blue;">`GET`</mark> `/user/{UUID}/following`

### Scopes

> <mark style="color:yellow;">`user.get`</mark>, <mark style="color:yellow;">`user.following.get`</mark>

### Response

{% tabs %}
{% tab title="200" %}

```json
{
    "following": ["array"]
}
```

{% endtab %}
{% endtabs %}

## Get Followers

<mark style="color:blue;">`GET`</mark> `/user/{UUID}/followers`

### Scopes

> <mark style="color:yellow;">`user.get`</mark>, <mark style="color:yellow;">`user.followers.get`</mark>

### Response

{% tabs %}
{% tab title="200" %}

```json
{
    "followers": ["array"]
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.caturra.social/api/v1/endpoints/user.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
