# Users and Relationships

Page: https://microblog.dev/api/users/
API base URL: https://micro.blog

Endpoints for user search, following, relationship checks, discovery suggestions, and user logs.

## Endpoints
### POST /users/follow

URL: `https://micro.blog/users/follow`

Follows a Micro.blog user or feed URL.




Query parameters:
- `username` (string, optional): Micro.blog username.
  Example: `vincent`
- `feed_url` (string, optional): Feed URL.
  Example: `https://example.com/feed.json`



Header parameters:
- `Authorization` (string, required): Bearer token for authentication. Format: `Bearer {token}`.
  Example: `Bearer EF7BB9BCAC1F6D561C93`




Example request:

```sh
curl -X POST "https://micro.blog/users/follow" \
  --header "Authorization: Bearer EF7BB9BCAC1F6D561C93"
```

Response:
- Status: 200
- Content-Type: `application/json`
- Description: Returns an empty JSON object on success.
Example response:

```json
{}
```

### GET /users/is_following

URL: `https://micro.blog/users/is_following`

Checks whether the authenticated user follows another user.




Query parameters:
- `username` (string, required): Micro.blog username.
  Example: `vincent`



Header parameters:
- `Authorization` (string, required): Bearer token for authentication. Format: `Bearer {token}`.
  Example: `Bearer EF7BB9BCAC1F6D561C93`




Example request:

```sh
curl -X GET "https://micro.blog/users/is_following?username=vincent" \
  --header "Authorization: Bearer EF7BB9BCAC1F6D561C93"
```

Response:
- Status: 200
- Content-Type: `application/json`
- Description: Returns a JSON response.
Example response:

```json
{
  "is_following": true,
  "is_you": false
}
```

### GET /users/discover/{username}

URL: `https://micro.blog/users/discover/{username}`

Returns suggested users based on a user's follows.


Path parameters:
- `username` (string, required): Micro.blog username.
  Example: `vincent`





Header parameters:
- `Authorization` (string, required): Bearer token for authentication. Format: `Bearer {token}`.
  Example: `Bearer EF7BB9BCAC1F6D561C93`




Example request:

```sh
curl -X GET "https://micro.blog/users/discover/{username}" \
  --header "Authorization: Bearer EF7BB9BCAC1F6D561C93"
```

Response:
- Status: 200
- Content-Type: `application/json`
- Description: Returns an array of suggested users.
Example response:

```json
[
  {
    "name": "Vincent",
    "url": "https://vincent.micro.blog/",
    "avatar": "https://avatars.micro.blog/avatars/2026/123.jpg",
    "username": "vincent",
    "is_following": true,
    "is_you": false
  }
]
```

### GET /users/following/{username}

URL: `https://micro.blog/users/following/{username}`

Returns users followed by the given username.


Path parameters:
- `username` (string, required): Micro.blog username.
  Example: `vincent`





Header parameters:
- `Authorization` (string, required): Bearer token for authentication. Format: `Bearer {token}`.
  Example: `Bearer EF7BB9BCAC1F6D561C93`




Example request:

```sh
curl -X GET "https://micro.blog/users/following/{username}" \
  --header "Authorization: Bearer EF7BB9BCAC1F6D561C93"
```

Response:
- Status: 200
- Content-Type: `application/json`
- Description: Returns an array of followed users.
Example response:

```json
[
  {
    "name": "Vincent",
    "url": "https://vincent.micro.blog/",
    "avatar": "https://avatars.micro.blog/avatars/2026/123.jpg",
    "username": "vincent",
    "is_following": true,
    "is_you": false
  }
]
```

### GET /users/search

URL: `https://micro.blog/users/search`

Searches Micro.blog users.




Query parameters:
- `q` (string, required): Search query or Micropub query type.
  Example: `Vincent`



Header parameters:
- `Authorization` (string, required): Bearer token for authentication. Format: `Bearer {token}`.
  Example: `Bearer EF7BB9BCAC1F6D561C93`




Example request:

```sh
curl -X GET "https://micro.blog/users/search?q=Vincent" \
  --header "Authorization: Bearer EF7BB9BCAC1F6D561C93"
```

Response:
- Status: 200
- Content-Type: `application/json`
- Description: Returns an array of matching users.
Example response:

```json
[
  {
    "name": "Vincent",
    "url": "https://vincent.micro.blog/",
    "avatar": "https://avatars.micro.blog/avatars/2026/123.jpg",
    "username": "vincent",
    "bio": "Writing about Micro.blog and the web.",
    "is_following": true,
    "is_you": false
  }
]
```

### GET /users/logs

URL: `https://micro.blog/users/logs`

Returns recent account log messages.






Header parameters:
- `Authorization` (string, required): Bearer token for authentication. Format: `Bearer {token}`.
  Example: `Bearer EF7BB9BCAC1F6D561C93`




Example request:

```sh
curl -X GET "https://micro.blog/users/logs" \
  --header "Authorization: Bearer EF7BB9BCAC1F6D561C93"
```

Response:
- Status: 200
- Content-Type: `application/json`
- Description: Returns a JSON response.
Example response:

```json
[
  {
    "date": "2026-04-26T12:00:00+00:00",
    "message": "Publishing complete",
    "is_error": false
  }
]
```

### GET /users/logs/errors

URL: `https://micro.blog/users/logs/errors`

Returns recent account error log messages.






Header parameters:
- `Authorization` (string, required): Bearer token for authentication. Format: `Bearer {token}`.
  Example: `Bearer EF7BB9BCAC1F6D561C93`




Example request:

```sh
curl -X GET "https://micro.blog/users/logs/errors" \
  --header "Authorization: Bearer EF7BB9BCAC1F6D561C93"
```

Response:
- Status: 200
- Content-Type: `application/json`
- Description: Returns a JSON response.
Example response:

```json
[
  {
    "date": "2026-04-26T12:00:00+00:00",
    "message": "Could not refresh feed",
    "is_error": true
  }
]
```

### POST /users/unfollow

URL: `https://micro.blog/users/unfollow`

Unfollows a Micro.blog user.




Query parameters:
- `username` (string, required): Micro.blog username.
  Example: `vincent`



Header parameters:
- `Authorization` (string, required): Bearer token for authentication. Format: `Bearer {token}`.
  Example: `Bearer EF7BB9BCAC1F6D561C93`




Example request:

```sh
curl -X POST "https://micro.blog/users/unfollow?username=vincent" \
  --header "Authorization: Bearer EF7BB9BCAC1F6D561C93"
```

Response:
- Status: 200
- Content-Type: `application/json`
- Description: Returns an empty JSON object on success.
Example response:

```json
{}
```

