Overview
Base URL: https://b.afsapp.lol/.netlify/functions
Format: JSON
Authentication: Bearer Token (JWT)
This API allows you to manage blog posts with Lemmy authentication. All requests and responses use JSON format.
Authentication
Most endpoints require authentication using a Bearer token obtained from the login endpoint.
Header Format: Authorization: Bearer <your_token>
Login with Lemmy credentials to obtain an access token.
Request Body
Field | Type | Description |
---|---|---|
instance | string | Lemmy instance domain (e.g., "lemmy.ml") |
username | string | Your Lemmy username |
password | string | Your Lemmy password |
Response
Example Response
Get current user information and session details.
Response
Posts
Endpoints for managing blog posts.
List all published posts with pagination and filtering.
Query Parameters
Parameter | Type | Description |
---|---|---|
page | number | Page number (default: 1) |
limit | number | Posts per page (default: 10, max: 50) |
search | string | Search in title and description |
tag | string | Filter by tag |
author | string | Filter by author |
Get a specific post by its slug.
Query Parameters
Parameter | Type | Description |
---|---|---|
slug | string | The post slug identifier |
Create a new blog post.
Request Body
Field | Type | Description |
---|---|---|
title | string | Post title (required) |
content | string | Post content in Markdown (required) |
description | string | Brief description (optional) |
tags | array/string | Tags for categorization (optional) |
isDraft | boolean | Save as draft (default: false) |
Update an existing post. Only the author can update their own posts.
Delete a post. Only the author can delete their own posts.
User
Endpoints for user profile and statistics.
Get user profile with blog statistics.
Get all posts by the authenticated user.
Examples
Login Example
Create Post Example
Rate Limits
Authenticated requests: 100 requests per hour
Unauthenticated requests: 20 requests per hour
Rate limit headers are included in all responses.