Website API: articles, images and categories
The APIs your website exposes so SigoMark can publish articles, upload images and read your news categories
Overview
SigoMark calls your website through 3 APIs. All three use the same key.
| API | Required | Purpose |
|---|---|---|
POST /api/articles (or the URL you configure) |
Yes | Receive approved articles |
POST /api/upload-image |
No | Receive article images so they live on your own site |
GET /api/categories |
No | Return your news categories so reviewers can pick one per article |
upload-image and categories must be on the same domain as the article URL. If the article URL is https://example.com/api/articles, SigoMark calls https://example.com/api/upload-image and https://example.com/api/categories.
Authentication
Every request carries this header:
X-Api-Key: <the key you set in SigoMark>
Return 401 when the key is missing or wrong.
Creating the API key
The key is created and kept by your website; SigoMark only uses it to call your site. If you don't have one yet:
- Generate a long random string, e.g. run
openssl rand -hex 32(Mac/Linux) or use a password generator, at least 32 characters. - Store it in your website's configuration (environment variable or config file) so the site can compare it with the
X-Api-Keyheader. - Paste the same string into SigoMark.
Setting it in SigoMark
👉 Open Projects on the dashboard → click Edit on the project → Publish to website (article API, images):
- Article API Endpoint: the article URL, e.g.
https://example.com/api/articles. - API Key Ref: paste the key above (or
env:VARIABLE_NAMEif the key lives in an environment variable on the SigoMark server).
This is NOT a key from the SigoMark API Keys page. That page issues keys for your systems to call the SigoMark API (see Developers).
1. Articles: POST /api/articles
JSON body:
{
"title": "Article title",
"slug": "article-title",
"content": "---\ntitle: ...\ncategory: Project news\n---\n\nMarkdown content...",
"keyword": "main keyword",
"coverImage": "https://example.com/uploads/cover.jpg",
"category": "Project news",
"projectId": 14,
"guideId": 123
}
content: Markdown with front matter at the top (title,desc,keyword,category…).slug: the same slug must overwrite the existing post. SigoMark may resend an article when it retries or when a video is attached later.category: the chosen category name. It is only sent when the article has a category, and SigoMark also writes it into thecategory:front-matter line.coverImage: the first image in the article. It may be empty.
Respond 2xx with:
{ "id": "123", "url": "https://example.com/news/article-title" }
SigoMark stores url as the published link. For 4xx/5xx responses, the error message appears in the article's publish log.
2. Images: POST /api/upload-image (optional)
Before publishing, SigoMark sends OPTIONS /api/upload-image:
- Your site returns
404: SigoMark skips this step and images keep their SigoMark link. - Your site has the API: SigoMark uploads each image and replaces its link in the article with the URL your site returns.
The request is multipart/form-data with the image in the file field (jpg/png/webp).
Respond with:
{ "isSuccess": true, "result": "https://example.com/uploads/2026/11/image.jpg" }
3. News categories: GET /api/categories (optional)
SigoMark calls this when you click Get categories from website on the dashboard's News categories page.
Respond with:
{
"categories": [
{ "slug": "project-news", "name": "Project news", "count": 42 },
{ "slug": "market", "name": "Market", "count": 17 }
]
}
name: required. SigoMark sends this name back in thecategoryfield when publishing.slug: recommended. If it is missing, SigoMark builds a slug from the name.count: the number of posts in the category. It is only displayed.- Removed categories: when a category disappears from your list, SigoMark hides it. Articles already assigned to it keep it.
- Limit: up to 200 categories.
When publishing, read category (or the category: front-matter line) to file the post under the right category.
Testing
- Publishing: open an approved article, click Publish now, then check the article's publish log.
- Categories: open News categories and click Get categories from website. On failure the page shows the HTTP status so you can check your API.