> ## 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.

# Posts

> Create, schedule, publish, and manage YALG posts through the API.

Posts are LinkedIn-ready content records that can be drafted, scheduled, published, or enriched with media.

## Create a draft

```bash theme={null}
curl https://api.yalg.ai/v1/posts \
  -H "x-api-key: $YALG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "A useful lesson I learned about delegation...",
    "tags": ["leadership"]
  }'
```

## Schedule a post

```bash theme={null}
curl https://api.yalg.ai/v1/posts/schedule \
  -H "x-api-key: $YALG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "postId": "123e4567-e89b-12d3-a456-426614174000",
    "date": "2026-07-01",
    "time": "09:00"
  }'
```

## Publish or mark published

Use YALG publishing when available:

```http theme={null}
POST /v1/posts/{id}/publish
```

Use mark-published when another system published the post and YALG should record the outcome:

```http theme={null}
PATCH /v1/posts/{id}/mark-published
```

## Manage media

Posts support image, video, and carousel media operations:

* `PATCH /v1/posts/{id}/upload-image`
* `PATCH /v1/posts/{id}/upload-video`
* `PATCH /v1/posts/{id}/upload-carousel`
* `GET /v1/posts/{id}/image`
* `GET /v1/posts/{id}/video`
* `GET /v1/posts/{id}/carousel`
* `DELETE /v1/posts/{id}/image`
* `DELETE /v1/posts/{id}/video`
* `DELETE /v1/posts/{id}/carousel`

## Regenerate tags

```http theme={null}
PATCH /v1/posts/{id}/regenerate-tags
```

Use this after changing post content or importing content from another system.
