Mettre à jour un post avec l'API beehiiv
Met à jour un post ; uniquement sur les plans Pro et Enterprise. Seuls les champs envoyés changent, et body_content remplace tout le contenu. scheduled_at ne peut plus changer une fois le post envoyé.
- Identifiant
- beehiiv_update_post
L'appel
POST https://connect.reportei.com/api/tools/beehiiv_update_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>",
"postId": "<postId>"
}
}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ètre | Type | Obligatoire | Description |
|---|---|---|---|
| publicationId | string | Oui | Id of the publication, from List publications. |
| postId | string | Oui | Id of the post, from List posts or Create post. |
| title | string | Non | Title of the post. |
| subtitle | string | Non | Subtitle of the post. |
| body_content | string | Non | New content as raw HTML, replacing the current one. beehiiv removes style and link tags, so style the elements with inline style attributes. |
| status | string | Non | confirmed sends and publishes the post right away, or at scheduled_at.Valeurs : draft, confirmed |
| scheduled_at | string | Non | When to publish, for example 2026-11-05T12:00:00Z. |
| thumbnail_image_url | string | Non | URL of the thumbnail image. |
| content_tags | array | Non | Content tags of the post. |
| recipients | object | Non | Who gets it on each channel, with tier_ids free, premium or all. Leave a channel out to skip it. |
| email_settings | object | Non | Email options: email_subject_line, 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 | Non | 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 | Non | Search and social metadata of the web version. |
| social_share | string | Non | Social share buttons of the post.Valeurs : comments_and_likes_only, with_comments_and_likes, top, none |
| email_capture_type_override | string | Non | How the web version asks visitors for their email.Valeurs : none, gated, popup |
| custom_link_tracking_enabled | boolean | Non | true turns on custom link tracking. |
| utm_params_enabled | boolean | Non | Whether UTM parameters go on the links. |
| utm_source | string | Non | utm_source of the links. |
| utm_medium | string | Non | utm_medium of the links. |
| utm_campaign | string | Non | utm_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_update_post. Il devient la définition de tool de votre agent sans conversion.
Autres tools beehiiv
- Lister les publicationsGETListe les publications accessibles avec la API key, avec id, name et organization_name. expand stats ajoute les abonnements actifs, les taux moyens d'ouverture et de clic et les totaux envoyés. Paginez avec page et limit, jusqu'à 100 ; la réponse contient total_pages.
- Lister les abonnementsGETListe les abonnements (abonnés) d'une publication, éventuellement pour un seul email, statut ou tier. Paginez avec limit, jusqu'à 100, et cursor : la réponse contient has_more et next_cursor.
- Obtenir un abonnementGETRenvoie un abonnement avec email, status, created, subscription_tier, les champs utm et referral_code.
- Créer un abonnementPOSTAbonne un email à une publication et renvoie l'abonnement avec son id. Avec le double opt-in sur la publication, ou double_opt_override activé, la personne confirme par email avant de devenir active.
- Mettre à jour un abonnementPATCHMet à jour un abonnement. Seuls les champs envoyés changent. unsubscribe true désabonne la personne de la publication.
- Créer un tag d'abonnementPOSTAjoute des tags à un abonnement. Un tag qui n'existe pas encore dans la publication est créé.
- Lister les postsGETListe les posts d'une publication avec id, title, subtitle, status, publish_date et web_url. expand stats ajoute les statistiques email et web de chaque post. Paginez avec page et limit, jusqu'à 100 ; la réponse contient total_pages.
- Obtenir un postGETRenvoie un post ; expand stats ajoute ses statistiques email et web. Un post créé à l'instant peut répondre 202 pendant que beehiiv le construit, et 404 avec POST_CREATION_FAILED quand la création a échoué.
Voyez Connect appliqué à votre produit.
Essayez-le pendant 15 jours sans carte, ou présentez votre cas à notre équipe.
