> For the complete documentation index, see [llms.txt](https://docs.sigrex.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sigrex.io/api-reference/reference/account/friends.md).

# Friends

## Get all friendships by status

> Returns every friendship of the authenticated user with the given status, both sent and received.

```json
{"openapi":"3.0.0","info":{"title":"Sigrex API","version":"2.1.0"},"tags":[{"name":"friends"}],"servers":[{"url":"https://api.sigrex.io"}],"security":[{"ApiKey":[],"Signature":[],"Timestamp":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"api-key","description":"Your public API key"},"Signature":{"type":"apiKey","in":"header","name":"signature","description":"HMAC SHA256 or ML-DSA44 signature of the request"},"Timestamp":{"type":"apiKey","in":"header","name":"timestamp","description":"Unix timestamp used for request signing"}},"schemas":{"ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}}},"responses":{"Unauthorized":{"description":"Missing or invalid credentials (API key, timestamp, signature, IP, permissions or bearer token)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"RateLimited":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"InternalError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/api/v2/account/friend/all/{status}":{"get":{"summary":"Get all friendships by status","description":"Returns every friendship of the authenticated user with the given status, both sent and received.","tags":["friends"],"parameters":[{"in":"path","name":"status","required":true,"schema":{"type":"string","enum":["pending","accepted","rejected"]},"description":"Friendship status"}],"responses":{"200":{"description":"List of friendships","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Friend"}}}}},"400":{"description":"Invalid status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```

## GET /api/v2/account/friend/{status}/{side}

> Get paginated friendships by status and side

```json
{"openapi":"3.0.0","info":{"title":"Sigrex API","version":"2.1.0"},"tags":[{"name":"friends"}],"servers":[{"url":"https://api.sigrex.io"}],"security":[{"ApiKey":[],"Signature":[],"Timestamp":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"api-key","description":"Your public API key"},"Signature":{"type":"apiKey","in":"header","name":"signature","description":"HMAC SHA256 or ML-DSA44 signature of the request"},"Timestamp":{"type":"apiKey","in":"header","name":"timestamp","description":"Unix timestamp used for request signing"}},"schemas":{"ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}}},"responses":{"Unauthorized":{"description":"Missing or invalid credentials (API key, timestamp, signature, IP, permissions or bearer token)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"RateLimited":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"InternalError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/api/v2/account/friend/{status}/{side}":{"get":{"summary":"Get paginated friendships by status and side","tags":["friends"],"parameters":[{"in":"path","name":"status","required":true,"schema":{"type":"string","enum":["pending","accepted","rejected"]},"description":"Friendship status"},{"in":"path","name":"side","required":true,"schema":{"type":"string","enum":["sent","received","both"]},"description":"Requests sent by the user, received by the user, or both"},{"in":"query","name":"page","description":"Page number (1-indexed)","required":true,"schema":{"type":"integer"}},{"in":"query","name":"limit","required":true,"schema":{"type":"integer"},"description":"Page size, max 100 (larger values are capped to 100)"}],"responses":{"200":{"description":"Paginated list of friendships","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Friend"}}}}}}},"400":{"description":"Invalid status or side, or missing or invalid page or limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```

## Get paginated rejected friend requests

> Returns friend requests received by the authenticated user that were rejected.

```json
{"openapi":"3.0.0","info":{"title":"Sigrex API","version":"2.1.0"},"tags":[{"name":"friends"}],"servers":[{"url":"https://api.sigrex.io"}],"security":[{"ApiKey":[],"Signature":[],"Timestamp":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"api-key","description":"Your public API key"},"Signature":{"type":"apiKey","in":"header","name":"signature","description":"HMAC SHA256 or ML-DSA44 signature of the request"},"Timestamp":{"type":"apiKey","in":"header","name":"timestamp","description":"Unix timestamp used for request signing"}},"schemas":{"ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}}},"responses":{"Unauthorized":{"description":"Missing or invalid credentials (API key, timestamp, signature, IP, permissions or bearer token)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"RateLimited":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"InternalError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/api/v2/account/friend/rejected":{"get":{"summary":"Get paginated rejected friend requests","description":"Returns friend requests received by the authenticated user that were rejected.","tags":["friends"],"parameters":[{"in":"query","name":"page","description":"Page number (1-indexed)","required":true,"schema":{"type":"integer"}},{"in":"query","name":"limit","required":true,"schema":{"type":"integer"},"description":"Page size, max 100 (larger values are capped to 100)"}],"responses":{"200":{"description":"Paginated list of rejected friend requests","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Friend"}}}}}}},"400":{"description":"Missing or invalid page or limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sigrex.io/api-reference/reference/account/friends.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
