Créer un post avec l'API beehiiv

Crée un post à partir de HTML et renvoie son id ; uniquement sur les plans Pro et Enterprise. status draft, la valeur par défaut, l'enregistre seulement ; confirmed l'envoie et le publie tout de suite ou à scheduled_at. beehiiv construit le post en arrière-plan, donc Get post peut répondre 202 un instant.

Identifiant
beehiiv_create_post

L'appel

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>"
  }
}

Votre système envoie l'id de la connexion de votre client et les arguments de la tool. Les headers sont les mêmes que pour toute l'API Connect : le token de votre produit et celui de votre client.

Paramètres

Les descriptions des paramètres suivent la documentation officielle de l'app, en anglais.

ParamètreTypeObligatoireDescription
publicationIdstringOuiId of the publication, from List publications.
titlestringOuiTitle of the post.
subtitlestringNonSubtitle of the post.
body_contentstringOuiContent as raw HTML. beehiiv removes style and link tags, so style the elements with inline style attributes.
statusstringNondraft only saves the post. confirmed sends and publishes it right away, or at scheduled_at. The default is draft.Valeurs : draft, confirmed
scheduled_atstringNonWhen to publish a confirmed post, for example 2026-11-05T12:00:00Z.
thumbnail_image_urlstringNonURL of the thumbnail image.
content_tagsarrayNonContent tags of the post.
recipientsobjectNonWho 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_settingsobjectNonEmail 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_settingsobjectNonWeb options: the slug of the post URL, hide_from_feed, and whether the title, subtitle and thumbnail show on the web.
seo_settingsobjectNonSearch and social metadata of the web version.
social_sharestringNonSocial share buttons of the post.Valeurs : comments_and_likes_only, with_comments_and_likes, top, none
email_capture_type_overridestringNonHow the web version asks visitors for their email.Valeurs : none, gated, popup
custom_link_tracking_enabledbooleanNontrue turns on custom link tracking.
utm_params_enabledbooleanNonWhether UTM parameters go on the links. Without it, the setting of the publication applies.
utm_sourcestringNonutm_source of the links.
utm_mediumstringNonutm_medium of the links.
utm_campaignstringNonutm_campaign of the links.

Connexions possibles

Votre client connecte son compte beehiiv une seule fois, avec l'un des modes ci-dessous. La même connexion sert à toutes les tools du toolkit.

Clé d'API

Votre client colle la clé de l'app sur un écran de Connect, ou votre système envoie la clé avec POST /api/customer-toolkits, sans écran.

La réponse

En cas de succès, Connect conserve le statut et le corps de la réponse de l'app. Les erreurs HTTP renvoyées par l'app utilisent l'objet {error, api_error} ; l'authentification ou la validation peuvent échouer avant l'exécution. Le header X-Toolkit-Execution-Id identifie l'exécution enregistrée, consultable avec GET /api/tools/executions/{uuid}.

Prête pour les agents IA

L'input de cette tool est un JSON Schema, disponible via GET /api/tools/beehiiv_create_post. Il devient la définition de tool de votre agent sans conversion.

Autres tools beehiiv

Voir les 12 tools

Toolkits de la même catégorie

Voir les 100 toolkits

Voyez Connect appliqué à votre produit.

Essayez-le pendant 15 jours sans carte, ou présentez votre cas à notre équipe.