> ## Documentation Index
> Fetch the complete documentation index at: https://docs.twixb.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API Reference

> Complete reference for all twixb API endpoints.

# API Reference

Base URL: `https://twixb.com/api/v1`

All requests require the `X-API-Key` header. See [Authentication](/guides/authentication) for details.

## Endpoints

### Newsfeeds

| Method | Endpoint             | Description                                        |
| ------ | -------------------- | -------------------------------------------------- |
| GET    | `/v1/newsfeeds`      | [List newsfeeds](/api-reference/newsfeeds-list)    |
| POST   | `/v1/newsfeeds`      | [Create newsfeed](/api-reference/newsfeeds-create) |
| GET    | `/v1/newsfeeds/{id}` | [Get newsfeed](/api-reference/newsfeeds-get)       |
| PUT    | `/v1/newsfeeds/{id}` | [Update newsfeed](/api-reference/newsfeeds-update) |
| DELETE | `/v1/newsfeeds/{id}` | [Delete newsfeed](/api-reference/newsfeeds-delete) |

### Sources

| Method | Endpoint                    | Description                                            |
| ------ | --------------------------- | ------------------------------------------------------ |
| GET    | `/v1/sources/{newsfeed_id}` | [List sources](/api-reference/sources-list)            |
| POST   | `/v1/sources/{newsfeed_id}` | [Add source](/api-reference/sources-add)               |
| POST   | `/v1/sources/validate`      | [Validate source URL](/api-reference/sources-validate) |
| DELETE | `/v1/sources/{source_id}`   | [Delete source](/api-reference/sources-delete)         |

### Posts

| Method | Endpoint                           | Description                                     |
| ------ | ---------------------------------- | ----------------------------------------------- |
| GET    | `/v1/posts/newsfeed/{newsfeed_id}` | [List posts](/api-reference/posts-list)         |
| GET    | `/v1/posts/{post_id}`              | [Get post](/api-reference/posts-get)            |
| PUT    | `/v1/posts/{post_id}/read`         | [Mark read](/api-reference/posts-mark-read)     |
| PUT    | `/v1/posts/{post_id}/unread`       | [Mark unread](/api-reference/posts-mark-unread) |
| PUT    | `/v1/posts/{post_id}/hide`         | [Hide post](/api-reference/posts-hide)          |

### Lists

| Method | Endpoint                              | Description                                          |
| ------ | ------------------------------------- | ---------------------------------------------------- |
| GET    | `/v1/lists`                           | [List all lists](/api-reference/lists-list)          |
| POST   | `/v1/lists`                           | [Create list](/api-reference/lists-create)           |
| GET    | `/v1/lists/{list_id}`                 | [Get list](/api-reference/lists-get)                 |
| POST   | `/v1/lists/{list_id}/items`           | [Add to list](/api-reference/lists-add-item)         |
| DELETE | `/v1/lists/{list_id}/items/{post_id}` | [Remove from list](/api-reference/lists-remove-item) |
