REST API Documentation

Complete reference for the GitFables REST API endpoints, authentication, and usage examples.

1

Authentication

All API requests require authentication using an API key.

Add your API key to the Authorization header:

auth-header.txt
Bash
Authorization: Bearer your-api-key

API Authentication Header Example

You can obtain your API key from your GitFables dashboard.

2

Story Endpoints

Manage stories through these REST endpoints.

GET
/api/stories

List all stories

POST
/api/stories

Generate a new story

GET
/api/stories/:id

Get a specific story

PUT
/api/stories/:id

Update a story

DELETE
/api/stories/:id

Delete a story

3

Template Endpoints

Manage story templates through these REST endpoints.

GET
/api/templates

List all templates

POST
/api/templates

Create a new template

GET
/api/templates/:id

Get a specific template

PUT
/api/templates/:id

Update a template

DELETE
/api/templates/:id

Delete a template

4

Rate Limiting

The API is rate limited to 100 requests per minute per API key.

Check your current rate limit status in the response headers:

X-RateLimit-LimitMaximum number of requests per minute
X-RateLimit-RemainingNumber of requests remaining in the current window
X-RateLimit-ResetTime when the rate limit will reset