Crear post en beehiiv, con una API
Crea un post a partir de HTML y devuelve su id; solo en los planes Pro y Enterprise. status draft, el valor por defecto, solo lo guarda; confirmed lo envía y publica de inmediato o en scheduled_at. beehiiv construye el post en segundo plano, así que Get post puede responder 202 por un momento.
- Identificador
- beehiiv_create_post
La llamada
POST https://connect.reportei.com/api/tools/beehiiv_create_post/execute
Authorization: Bearer <merchant token>
x-customer-token: <customer token>
Content-Type: application/json
Accept: application/json
{
"customer_toolkit": "<connection UUID>",
"arguments": {
"publicationId": "<publicationId>",
"title": "<title>",
"body_content": "<body_content>"
}
}Tu sistema envía el id de la conexión de tu cliente y los argumentos de la tool. Los headers son los mismos de toda la API de Connect: el token de tu producto y el token de tu cliente.
Parámetros
Las descripciones de los parámetros siguen la documentación oficial de la app, en inglés.
| Parámetro | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| publicationId | string | Sí | Id of the publication, from List publications. |
| title | string | Sí | Title of the post. |
| subtitle | string | No | Subtitle of the post. |
| body_content | string | Sí | Content as raw HTML. beehiiv removes style and link tags, so style the elements with inline style attributes. |
| status | string | No | draft only saves the post. confirmed sends and publishes it right away, or at scheduled_at. The default is draft.Valores: draft, confirmed |
| scheduled_at | string | No | When to publish a confirmed post, for example 2026-11-05T12:00:00Z. |
| thumbnail_image_url | string | No | URL of the thumbnail image. |
| content_tags | array | No | Content tags of the post. |
| recipients | object | No | Who gets it on each channel, with tier_ids free, premium or all. Without recipients, only the free tier gets it, on web and email; leave a channel out to skip it. |
| email_settings | object | No | Email options: email_subject_line (the default is the title), email_preview_text, reply_to_address (a verified reply-to address of the publication) and whether the title, subtitle and byline show in the email. |
| web_settings | object | No | Web options: the slug of the post URL, hide_from_feed, and whether the title, subtitle and thumbnail show on the web. |
| seo_settings | object | No | Search and social metadata of the web version. |
| social_share | string | No | Social share buttons of the post.Valores: comments_and_likes_only, with_comments_and_likes, top, none |
| email_capture_type_override | string | No | How the web version asks visitors for their email.Valores: none, gated, popup |
| custom_link_tracking_enabled | boolean | No | true turns on custom link tracking. |
| utm_params_enabled | boolean | No | Whether UTM parameters go on the links. Without it, the setting of the publication applies. |
| utm_source | string | No | utm_source of the links. |
| utm_medium | string | No | utm_medium of the links. |
| utm_campaign | string | No | utm_campaign of the links. |
Conexiones posibles
Tu cliente conecta su cuenta de beehiiv una sola vez, con uno de los modos de abajo. La misma conexión sirve para todas las tools del toolkit.
Clave de API
Tu cliente pega la clave de la app en una pantalla de Connect, o tu sistema envía la clave con POST /api/customer-toolkits, sin pantalla.
La respuesta
Si la llamada tiene éxito, Connect conserva el status y el cuerpo de la respuesta de la app. Los errores HTTP devueltos por la app usan el objeto {error, api_error}; la autenticación o validación pueden fallar antes de la ejecución. El header X-Toolkit-Execution-Id identifica la ejecución registrada, disponible en GET /api/tools/executions/{uuid}.
Lista para agentes de IA
El input de esta tool es un JSON Schema, disponible en GET /api/tools/beehiiv_create_post. Se convierte en la definición de tool de tu agente sin conversión.
Otras tools de beehiiv
- Listar publicacionesGETLista las publicaciones a las que llega la API key, con id, name y organization_name. expand stats añade suscripciones activas, tasas medias de apertura y clic y totales enviados. Pagina con page y limit, hasta 100; la respuesta trae total_pages.
- Listar suscripcionesGETLista las suscripciones (suscriptores) de una publicación, opcionalmente solo de un email, estado o tier. Pagina con limit, hasta 100, y cursor: la respuesta trae has_more y next_cursor.
- Obtener suscripciónGETDevuelve una suscripción con email, status, created, subscription_tier, los campos utm y referral_code.
- Crear suscripciónPOSTSuscribe un email a una publicación y devuelve la suscripción con su id. Con double opt-in en la publicación, o double_opt_override activado, la persona confirma por email antes de quedar activa.
- Actualizar suscripciónPATCHActualiza una suscripción. Solo cambian los campos enviados. unsubscribe true da de baja a la persona de la publicación.
- Crear etiqueta de suscripciónPOSTAñade etiquetas a una suscripción. Una etiqueta que aún no existe en la publicación se crea.
- Listar postsGETLista los posts de una publicación con id, title, subtitle, status, publish_date y web_url. expand stats añade las estadísticas de email y web de cada post. Pagina con page y limit, hasta 100; la respuesta trae total_pages.
- Obtener postGETDevuelve un post; expand stats añade sus estadísticas de email y web. Un post creado hace un momento puede responder 202 mientras beehiiv lo construye, y 404 con POST_CREATION_FAILED cuando la creación falló.
Toolkits de la misma categoría
Ver los 100 toolkitsMira Connect aplicado a tu producto.
Pruébalo durante 15 días sin tarjeta, o cuéntale tu caso a nuestro equipo.
