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

# Anecdotes

> Create and manage source stories for YALG content generation.

Anecdotes are source stories YALG can transform into posts, scripts, carousels, and other creative assets.

## Create a text anecdote

Use a text anecdote when your integration already has structured story content.

```bash theme={null}
curl https://api.yalg.ai/v1/anecdotes \
  -H "x-api-key: $YALG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "How I learned to delegate",
    "content": "Last year I realized I was blocking my team by holding too much context.",
    "storyType": "professional_stories",
    "tags": ["leadership", "teamwork"]
  }'
```

## Upload an audio anecdote

Use audio when your product records voice notes or interviews.

```bash theme={null}
curl https://api.yalg.ai/v1/anecdotes/audio \
  -H "x-api-key: $YALG_API_KEY" \
  -F "audio=@story.m4a" \
  -F "title=Delegation lesson" \
  -F "tags=leadership,teamwork"
```

## Batch import anecdotes

Batch import accepts spreadsheet files for migrating existing story libraries.

```bash theme={null}
curl https://api.yalg.ai/v1/anecdotes/batch \
  -H "x-api-key: $YALG_API_KEY" \
  -F "file=@anecdotes.xlsx"
```

## Export anecdotes

Use exports to sync YALG back into your own system:

* `GET /v1/anecdotes/export/csv`
* `GET /v1/anecdotes/export/voice`

## Generate from an anecdote

After an anecdote exists, create a content workflow from it:

* `POST /v1/anecdotes/{id}/post`
* `POST /v1/post-generation/from-anecdote`

<Note>
  Requests are scoped to the API key owner. You do not need to send `authorId`.
</Note>
