Create blog fuel anecdote
curl --request POST \
--url https://api.yalg.ai/v1/blog/anecdotes \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"title": "A story about trust",
"content": "The best product insight came from watching a user hesitate for five seconds."
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'A story about trust',
content: 'The best product insight came from watching a user hesitate for five seconds.'
})
};
fetch('https://api.yalg.ai/v1/blog/anecdotes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.yalg.ai/v1/blog/anecdotes"
payload = {
"title": "A story about trust",
"content": "The best product insight came from watching a user hesitate for five seconds."
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "018f9f53-7a79-703c-993f-588d176bf5a6",
"title": "A story about trust",
"content": "The best product insight came from watching a user hesitate for five seconds.",
"createdAt": "2026-06-20T17:24:39.000Z",
"updatedAt": "2026-06-20T17:24:39.000Z"
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request",
"code": "validation_failed"
}{
"statusCode": 401,
"message": "Invalid or missing API key",
"error": "Unauthorized",
"code": "unauthorized"
}{
"statusCode": 403,
"message": "Access denied",
"error": "Forbidden",
"code": "forbidden"
}{
"statusCode": 409,
"message": "Resource conflict",
"error": "Conflict",
"code": "conflict"
}{
"statusCode": 429,
"message": "Rate limit exceeded",
"error": "Too Many Requests",
"code": "rate_limit_exceeded",
"retryAfter": 60
}{
"statusCode": 500,
"message": "Internal server error",
"error": "Internal Server Error",
"code": "internal_server_error"
}Blog
Create blog fuel anecdote
Create blog fuel anecdote through the YALG API. Requests are scoped to the authenticated API key owner; cross-owner resource IDs return 404.
POST
/
v1
/
blog
/
anecdotes
Create blog fuel anecdote
curl --request POST \
--url https://api.yalg.ai/v1/blog/anecdotes \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"title": "A story about trust",
"content": "The best product insight came from watching a user hesitate for five seconds."
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'A story about trust',
content: 'The best product insight came from watching a user hesitate for five seconds.'
})
};
fetch('https://api.yalg.ai/v1/blog/anecdotes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.yalg.ai/v1/blog/anecdotes"
payload = {
"title": "A story about trust",
"content": "The best product insight came from watching a user hesitate for five seconds."
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "018f9f53-7a79-703c-993f-588d176bf5a6",
"title": "A story about trust",
"content": "The best product insight came from watching a user hesitate for five seconds.",
"createdAt": "2026-06-20T17:24:39.000Z",
"updatedAt": "2026-06-20T17:24:39.000Z"
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request",
"code": "validation_failed"
}{
"statusCode": 401,
"message": "Invalid or missing API key",
"error": "Unauthorized",
"code": "unauthorized"
}{
"statusCode": 403,
"message": "Access denied",
"error": "Forbidden",
"code": "forbidden"
}{
"statusCode": 409,
"message": "Resource conflict",
"error": "Conflict",
"code": "conflict"
}{
"statusCode": 429,
"message": "Rate limit exceeded",
"error": "Too Many Requests",
"code": "rate_limit_exceeded",
"retryAfter": 60
}{
"statusCode": 500,
"message": "Internal server error",
"error": "Internal Server Error",
"code": "internal_server_error"
}Authorizations
ApiKeyAuthbearer
YALG Developer API key. Send it in the x-api-key header from a server-side environment only.
Body
application/json
Short internal title for the source anecdote.
Required string length:
1 - 300Example:
"The onboarding lesson"
Raw story, note, transcript, or observation to use as blog fuel.
Minimum string length:
1Example:
"A customer got stuck on step one, which showed us the product was explaining itself too late."
Optional labels used to organize and retrieve blog fuel anecdotes.
Maximum array length:
20Example:
["onboarding", "product"]
Response
Created successfully. Create blog fuel anecdote.