Blogs
A WordPress site, a Shopify store or a Wix or Webflow site connects to a profile like any other account (acc_…). The difference is what it takes: blog articles, not posts. All the content lives on the site; Marsial keeps no copy.
Connect the site
Section titled “Connect the site”Wix, Webflow and WordPress.com use the same flow as social networks (Connecting accounts): GET /v1/connect/{platform} and send the user to the URL.
Shopify has no store picker: add shop with the store’s .myshopify.com domain (or just its prefix).
curl "https://api.marsial.dev/v1/connect/shopify?profileId=prf_8f2k4d&redirectUrl=https%3A%2F%2Fapp.acme.com%2Fconnected&shop=acme" \ -H "Authorization: Bearer $MARSIAL_API_KEY"const res = await fetch('https://api.marsial.dev/v1/connect/shopify?profileId=prf_8f2k4d&redirectUrl=https%3A%2F%2Fapp.acme.com%2Fconnected&shop=acme', { headers: { Authorization: `Bearer ${process.env.MARSIAL_API_KEY}`, },});const { data } = await res.json();import os, requests
res = requests.get( "https://api.marsial.dev/v1/connect/shopify?profileId=prf_8f2k4d&redirectUrl=https%3A%2F%2Fapp.acme.com%2Fconnected&shop=acme", headers={"Authorization": f"Bearer {os.environ['MARSIAL_API_KEY']}"},)data = res.json()["data"]Self-hosted WordPress has no OAuth. The user creates an Application Password in WordPress (Users → Profile → Application Passwords) and your server sends it with their username. Marsial checks that the site answers and that the user can publish and upload images.
curl -X POST "https://api.marsial.dev/v1/connect/wordpress" \ -H "Authorization: Bearer $MARSIAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "profileId": "prf_8f2k4d", "siteUrl": "https://blog.acme.com", "username": "editor", "applicationPassword": "abcd efgh ijkl mnop qrst uvwx" }'const res = await fetch('https://api.marsial.dev/v1/connect/wordpress', { method: 'POST', headers: { Authorization: `Bearer ${process.env.MARSIAL_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "profileId": "prf_8f2k4d", "siteUrl": "https://blog.acme.com", "username": "editor", "applicationPassword": "abcd efgh ijkl mnop qrst uvwx" }),});const { data } = await res.json();import os, requests
res = requests.post( "https://api.marsial.dev/v1/connect/wordpress", headers={"Authorization": f"Bearer {os.environ['MARSIAL_API_KEY']}"}, json={ "profileId": "prf_8f2k4d", "siteUrl": "https://blog.acme.com", "username": "editor", "applicationPassword": "abcd efgh ijkl mnop qrst uvwx" },)data = res.json()["data"]Pick the blog
Section titled “Pick the blog”Each site has one or more blogs. WordPress and Wix have one (1); a Shopify store can have several, and on Webflow each CMS collection with a rich text field is a blog.
curl "https://api.marsial.dev/v1/accounts/acc_3k9x2m/blogs" \ -H "Authorization: Bearer $MARSIAL_API_KEY"const res = await fetch('https://api.marsial.dev/v1/accounts/acc_3k9x2m/blogs', { headers: { Authorization: `Bearer ${process.env.MARSIAL_API_KEY}`, },});const { data } = await res.json();import os, requests
res = requests.get( "https://api.marsial.dev/v1/accounts/acc_3k9x2m/blogs", headers={"Authorization": f"Bearer {os.environ['MARSIAL_API_KEY']}"},)data = res.json()["data"]Write an article
Section titled “Write an article”Without isPublished, the article stays a draft. With isPublished: true it goes live now, or at publishDate when that is in the future.
curl -X POST "https://api.marsial.dev/v1/accounts/acc_3k9x2m/blogs/1/articles" \ -H "Authorization: Bearer $MARSIAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "title": "Our autumn collection", "bodyHtml": "<p>The first pieces land next month.</p>", "excerpt": "An early look at what is arriving.", "tags": [ "autumn", "new arrivals" ], "image": { "url": "https://cdn.acme.com/autumn.jpg", "altText": "Wool coats on a rail" }, "isPublished": true, "publishDate": "2026-11-03T09:00:00+01:00" }'const res = await fetch('https://api.marsial.dev/v1/accounts/acc_3k9x2m/blogs/1/articles', { method: 'POST', headers: { Authorization: `Bearer ${process.env.MARSIAL_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "title": "Our autumn collection", "bodyHtml": "<p>The first pieces land next month.</p>", "excerpt": "An early look at what is arriving.", "tags": [ "autumn", "new arrivals" ], "image": { "url": "https://cdn.acme.com/autumn.jpg", "altText": "Wool coats on a rail" }, "isPublished": true, "publishDate": "2026-11-03T09:00:00+01:00" }),});const { data } = await res.json();import os, requests
res = requests.post( "https://api.marsial.dev/v1/accounts/acc_3k9x2m/blogs/1/articles", headers={"Authorization": f"Bearer {os.environ['MARSIAL_API_KEY']}"}, json={ "title": "Our autumn collection", "bodyHtml": "<p>The first pieces land next month.</p>", "excerpt": "An early look at what is arriving.", "tags": [ "autumn", "new arrivals" ], "image": { "url": "https://cdn.acme.com/autumn.jpg", "altText": "Wool coats on a rail" }, "isPublished": True, "publishDate": "2026-11-03T09:00:00+01:00" },)data = res.json()["data"]| Field | What it is |
|---|---|
title |
Required on create. |
bodyHtml |
The article as HTML. |
handle |
URL slug. Made from the title when omitted. Shopify never changes it afterwards. |
excerpt |
Summary for listings. |
tags |
Replaces the whole list. Missing ones are created. |
author |
WordPress: a user id. Shopify: a display name. Webflow: the author item id. |
image |
Featured image from a public URL; upload it first with POST /v1/media/upload-url. |
seo |
Search engine title and description. Shopify and Wix only. |
fields |
Webflow only: the collection’s own fields, by slug. |
Change, unpublish and delete
Section titled “Change, unpublish and delete”PATCH changes only what you send. isPublished: false takes a published or scheduled article back to draft.
curl -X PATCH "https://api.marsial.dev/v1/accounts/acc_3k9x2m/blogs/1/articles/1842" \ -H "Authorization: Bearer $MARSIAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "isPublished": false }'const res = await fetch('https://api.marsial.dev/v1/accounts/acc_3k9x2m/blogs/1/articles/1842', { method: 'PATCH', headers: { Authorization: `Bearer ${process.env.MARSIAL_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "isPublished": false }),});const { data } = await res.json();import os, requests
res = requests.patch( "https://api.marsial.dev/v1/accounts/acc_3k9x2m/blogs/1/articles/1842", headers={"Authorization": f"Bearer {os.environ['MARSIAL_API_KEY']}"}, json={ "isPublished": False },)data = res.json()["data"]GET /v1/accounts/{id}/blogs/{blogId}/articles lists published, scheduled and draft articles (on WordPress, pending and private ones too), with status and the url on the site. DELETE removes it from the site as well.
In the dashboard, the Blog tab under Posts does the same: pick the site and blog, write, schedule and publish.
© 2026 Marsial by TWOFACES ·marsial.dev ·Dashboard ·soporte@twofacesco.com