Resolving Complex Wix Blog API Integration Challenges: A Comprehensive Technical Guide
- Benjamin Mikus
- Nov 9
- 6 min read

The "Missing Owner" Error
Problem
When attempting to create blog posts via the Wix Blog API, many developers encounter a "missing owner error" that prevents post creation entirely. This often occurs when trying to use member IDs from the Members Area app or when structuring the owner field as a nested object.
The Solution
The fix is straightforward: remove the owner field entirely and use memberId as a direct field instead.
Before (Incorrect):
draftPost: {
owner: { memberId: "..." }, // This causes the error
title: blog.Title,
...
}
After (Correct): draftPost: {
memberId: "62fad1e2-8804-4787-89cf-203f0e42b1b3", // Direct field
title: blog.Title,
...
}
Why This Works
The Wix Blog API v3 expects memberId as a direct field, not nested under an owner object. The API's validation schema looks for a top-level memberId property, and providing it in a nested structure causes parsing failures.
Understanding Member IDs
The member ID represents the blog post author, but it's important to understand what this actually means:
It's the site/app member ID, not a Members Area user
It represents content attribution rather than an actual logged-in user
For automated workflows, you can hardcode a valid member ID
Blog posts simply need a valid member reference; it doesn't have to represent a real person
Finding a Member ID:
Option 1: Hardcode a valid ID (recommended for automation)
memberId: "62fad1e2-8804-4787-89cf-203f0e42b1b3"Option 2: Retrieve dynamically via API
GET https://www.wixapis.com/members/v1/members
Headers: Authorization, wix-site-id
Image Display Issues
The Problem
Images in Wix blog posts can fail in multiple ways:
Broken images appearing at the top of posts
Images not displaying at all
The heroImage field creating empty image elements
External URLs not rendering properly with IST tokens
The Three-Part Solution
Fixing image display requires three coordinated steps: uploading images to Wix's Media Manager, removing the problematic heroImage field, and embedding images as RichContent nodes.
Step 1: Upload Images to Wix Media Manager
Before referencing images in blog posts, upload them to Wix's media system to get a valid media ID.
Headers:
- Authorization: IST.{your-token}
- Content-Type: application/json
- wix-site-id: {your-site-id}
Body:
{
"url": "https://external-image-url.jpg",
"mediaType": "IMAGE",
"displayName": "blog-image.jpg",
"mimeType": "image/jpeg"
}
Response:
{
"file": {
"id": "62fad1_abc123...",
"url": "https://static.wixstatic.com/media/62fad1_abc123..."
}
}
Why this is necessary:
External URLs don't work reliably with IST tokens
Uploading creates a proper Wix media ID that's guaranteed to work
Images become first-class Wix assets with CDN support
Step 2: Remove the heroImage Field
Don't use the heroImage field at all when creating posts with IST authentication.
Before (Problematic):
heroImage: {
type: "SITE",
siteData: { url: imageUrl }
},
...
}
After (Remove it):
draftPost: {
title: blog.Title,
...
}
Why remove it:
heroImage with external URLs creates broken image elements
IST tokens have limitations with this field
Inline images via RichContent work more reliably
Step 3: Add Image as First RichContent Node
Insert the image as the first element in your content structure using the Wix media ID.const richContentNodes = [];
if (wixImageId) {
richContentNodes.push({
type: "IMAGE",
nodes: [],
imageData: {
containerData: {
width: { size: "CONTENT" },
alignment: "CENTER"
},
image: {
src: { id: wixImageId }, // Use Wix media ID, not external URL
width: 900,
height: 600
},
altText: blog.Title
}
});
}
// Then add your text content
const contentNodes = parseMarkdownToRicos(blog.Body);
richContentNodes.push(...contentNodes);
This ensures:
Image appears right after the title
Uses a reliable Wix media ID
Proper IMAGE node structure prevents broken displays
Structured Output Parser Errors
Problem
When using AI to generate blog content, you might encounter: "Model output doesn't fit required format" This happens when the AI's output structure doesn't match what your parser expects.
Before (Problematic):
{
"output": {
"Title": "...",
"Meta Description": "...",
"Slug": "...",
"Body": "..."
}
}
]
After (Fixed):
{
"Title": "...",
"Meta Description": "...",
"Slug": "...",
"Body": "..."
}
Why it works:
Simpler structure is easier to parse
No nested arrays to navigate
Direct field access
Matches expected schema exactly
Field Length Limits and Safety Checks
The Problem
The Wix API returns "Bad request - please check your parameters" when:
Content fields are too long
Required fields are missing
RichContent is empty
The Solution
Implement comprehensive validation and truncation before sending to the API.
if (richContentNodes.length === 0) {
richContentNodes.push({
type: "PARAGRAPH",
nodes: [{
type: "TEXT",
textData: {
text: blog.Body || "Content unavailable",
decorations: []
}
}],
paragraphData: {}
});
}
// 2. Apply field length limits
const draftPost = {
title: (blog.Title || "Untitled").substring(0, 200), // Max 200
slug: (blog.Slug || "untitled").substring(0, 100), // Max 100
memberId: "62fad1e2-8804-4787-89cf-203f0e42b1b3",
seoData: {
title: (blog.Title || "Untitled").substring(0, 200), // Max 200
description: (blog["Meta Description"] || "").substring(0, 320) // Max 320
},
richContent: {
nodes: richContentNodes
}
};
Wix API Field Limits
Field | Maximum Length |
title | 200 characters |
slug | 100 characters |
seoData.description | 320 characters |
Why these checks matter:
Prevents API rejection errors
Handles missing or malformed data gracefully
Ensures content always meets Wix requirements
Auto-Publishing vs. Draft Status
Problem
Posts were saving as drafts instead of publishing automatically.
Solution
Add publish: true to the API request. return [
{
json: {
draftPost: draftPost,
publish: true // This publishes immediately
}
}
];
How it works:
publish: true → Post goes live immediately
publish: false or omitted → Post stays as draft
Choose based on your workflow needs
Complete Working Configuration
Authentication Setup
Required Headers:
Authorization: IST.{your-instance-token}
Content-Type: application/json
wix-site-id: {your-wix-site-id}Where to find credentials:
IST Token: Wix Dashboard → Settings → API Keys → Create Instance Token
Site ID: Wix Dashboard → Settings → Business Info → Site ID
Token limitations to know:
Using IST (Instance Token), not OAuth
Some fields like heroImage don't work reliably
Best for server-to-server integrations
Complete Request Example
POST https://www.wixapis.com/blog/v3/posts Headers:
{
"Authorization": "IST.your-token-here",
"Content-Type": "application/json",
"wix-site-id": "your-site-id"
}
Body:
{
"draftPost": {
"memberId": "62fad1e2-8804-4787-89cf-203f0e42b1b3",
"title": "Your Blog Post Title",
"slug": "your-blog-post-slug",
"seoData": {
"title": "SEO Title",
"description": "SEO description for search engines"
},
"richContent": {
"nodes": [
{
"type": "IMAGE",
"nodes": [],
"imageData": {
"containerData": {
"width": { "size": "CONTENT" },
"alignment": "CENTER"
},
"image": {
"src": { "id": "wix-media-id-here" },
"width": 900,
"height": 600
},
"altText": "Image description"
}
},
{
"type": "PARAGRAPH",
"nodes": [{
"type": "TEXT",
"textData": {
"text": "Your paragraph content here",
"decorations": []
}
}],
"paragraphData": {}
}
]
}
},
"publish": true
}
Key Takeaways
Use memberId directly - Don't nest it under an owner object
Upload images first - Get Wix media IDs before creating posts
Skip heroImage - Use RichContent IMAGE nodes instead
Validate field lengths - Truncate to prevent API errors
Include safety checks - Handle missing data with defaults
Set publish status - Add publish: true for immediate publication
Common Troubleshooting
"Missing owner error"
Check that you're using memberId as a direct field
Verify the member ID is valid for your site
Images not showing
Confirm images were uploaded to Wix Media Manager first
Use the Wix media ID, not external URLs
Remove any heroImage field
"Bad request" errors
Check field lengths against limits
Ensure richContent has at least one node
Verify all required fields are present
Posts staying as drafts
Add publish: true to the request
Check that your IST token has publishing permissions
This comprehensive fix addresses all major issues encountered when integrating with the Wix Blog API v3, providing a reliable foundation for automated blog publishing systems.
References
Wix Blog API Documentation - Create Posthttps://dev.wix.com/api/rest/blog/posts/create-post
Wix Authentication Guidehttps://dev.wix.com/api/rest/getting-started/authentication
Wix Site Members Overviewhttps://support.wix.com/en/article/about-site-members
Wix Media Manager Upload Documentationhttps://dev.wix.com/api/rest/media/site-media/upload-files
Wix Developer Forum - API Discussionshttps://www.wix.com/forum/wix-api-developer-forum
OpenAI Structured Outputs Guidehttps://platform.openai.com/docs/guides/structured-outputs
Wix Blog Post Object Specificationhttps://dev.wix.com/api/rest/blog/posts/post-object



Comments