Skip to main content
POST
/
v1
/
posts
/
schedule
Schedule a new post
curl --request POST \
  --url https://api.yalg.ai/v1/posts/schedule \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "postId": "018f9f40-7d7b-7712-9b0f-2e5d9fd5df3f"
}
'
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "content": "Placeholder content - will be generated by AI",
  "authorId": "987fcdeb-51a2-43d7-8f9e-123456789abc",
  "anecdoteIds": [
    "anecdote-uuid"
  ],
  "status": "scheduled",
  "scheduledAt": "2024-01-16T09:00:00Z",
  "isActive": true,
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-15T10:30:00Z"
}

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.

Body

application/json
date
string
required

Date for the scheduled post in YYYY-MM-DD format

Example:

"2024-01-16"

time
string
required

Time for the scheduled post in HH:MM format (24-hour)

Example:

"09:00"

postId
string<uuid>
required

UUID of the post to schedule

Example:

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

Response

Post scheduled successfully