Skip to main content
GET
/
v1
/
anecdotes
/
story-type
/
{storyType}
Get anecdotes by story type
curl --request GET \
  --url https://api.yalg.ai/v1/anecdotes/story-type/{storyType} \
  --header 'x-api-key: <api-key>'
{
  "data": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "title": "Leading My First Team",
      "storyType": "professional_stories",
      "content": "When I was promoted to team lead...",
      "createdAt": "2024-01-15T10:30:00Z"
    }
  ],
  "total": 8,
  "page": 1,
  "limit": 10,
  "totalPages": 1
}

Authorizations

x-api-key
string
header
default:yalg_live_your_api_key
required

YALG Developer API key. Send it in the x-api-key header from a server-side environment only.

Path Parameters

storyType
enum<string>
required

Story type to filter by

Available options:
professional_stories,
personal_stories,
lesson_learned
Example:

"lesson"

Query Parameters

page
number

Page number (default: 1)

Example:

1

limit
number

Number of anecdotes per page (default: 10)

Example:

10

Response

Story type anecdotes retrieved successfully