---
title: "Generate lead magnet"
method: POST
path: "/api/agent/lead-magnets"
tags: ["Lead Magnets"]
---

# Generate lead magnet

`POST /api/agent/lead-magnets`

## Request body

- CreateLeadMagnetRequest
  - `topic` string, required
  - `type` 'checklist' | 'swipe_file' | 'framework', required
  - `niche` string
  - `language` 'en' | 'pt' | 'de' | 'es' | 'fr' | 'it'
  - `platform` 'twitter' | 'linkedin'
  - `generate_images` boolean
  - `auto_publish` boolean

## Response `200`

Generation queued. Poll GET /api/agent/lead-magnets/{id} with the same Authorization: Bearer <AGENT_API_KEY> header for status.

- CreateLeadMagnetResponse
  - `id` string, uuid, required
  - `status` 'generating', required
  - `type` string, required
  - `topic` string, required
  - `credits_charged` number, required
  - `auto_publish` boolean, required

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `402` — Insufficient credits
- `409` — Conflict
- `429` — Rate limit exceeded
- `500` — Internal server error
- `501` — Feature not implemented
- `503` — Failed to queue generation

## Changes

- **2026-03-01** `2df2182b5901` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/citedy/apis/citedy-agent-api/changes/api/agent/lead-magnets/post.md)

---

[API](https://skmtc.dev/citedy/apis/citedy-agent-api.md) · [All operations](https://skmtc.dev/citedy/apis/citedy-agent-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/citedy/citedy-agent-api/revisions/b5785d3fe446/schema)
