Skip to main content
POST
Create a new anecdote

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.

Query Parameters

autoFill
boolean
required

autoFill parameter.

Example:

"example"

Body

application/json
content
string
required

The full content/story of the anecdote

Example:

"Last year, I was tasked with leading a cross-functional team for the first time. Initially, I struggled with delegation and tried to micromanage every detail..."

title
string

Title of the anecdote (optional when autoFill is enabled)

Maximum string length: 200
Example:

"How I Learned to Lead a Team"

type
enum<string>
default:voice

Type of anecdote

Available options:
text,
voice
Example:

"voice"

transcript
string

Transcript of the voice anecdote (for voice type anecdotes)

Example:

"So I was reflecting on my journey from junior developer to tech lead..."

audioPath
string

Path to the audio file on disk (for voice type anecdotes)

Maximum string length: 500
Example:

"/uploads/audio/anecdote-001.mp3"

storyType
enum<string>

Type of story/anecdote (optional when autoFill is enabled)

Available options:
professional_stories,
personal_stories,
lesson_learned
Example:

"professional_stories"

authorId
string<uuid>

UUID of the user who created this anecdote (will be set from authentication token if not provided)

Example:

"123e4567-e89b-12d3-a456-426614174000"

tags
string[]

Tags for categorizing and searching the anecdote (optional when autoFill is enabled)

Example:
contentScopes
enum<string>[]

Content formats where this anecdote can be used. Use all to make it available everywhere.

Available options:
all,
linkedin_post,
facebook_post,
youtube_script,
blog_article,
short,
carousel
Example:
mood
enum<string>

Mood or tone of the anecdote

Available options:
inspiring,
humorous,
reflective,
educational
Maximum string length: 50
Example:

"reflective"

context
enum<string>

Context where this anecdote took place

Available options:
work,
startup,
client meeting,
conference,
personal
Maximum string length: 100
Example:

"startup"

lessonLearned
string

The key lesson or takeaway from this anecdote

Example:

"Effective leadership requires trust, clear communication, and empowering team members to make decisions."

linkedinAngle
string

How this anecdote could be positioned for LinkedIn posting

Example:

"Share this as a leadership lesson with focus on team empowerment and growth mindset."

priority
number
default:1

Priority level for using this anecdote (1 = highest priority, 5 = lowest)

Required range: 1 <= x <= 5
Example:

1

isFavorite
boolean
default:false

Whether this anecdote is marked as favorite

Example:

false

timeSensitive
boolean
default:false

Whether this anecdote is time-sensitive (contains time-bound information like recent events, dates, achievements that should only be used once)

Example:

false

Response

Anecdote created successfully