Additional Information
Best Practices
- Always share Google Docs with “Anyone with the link”
- Test with drafts first before publishing live content
- Use descriptive titles and slugs for better SEO
- Include alt text for images for accessibility
- Set appropriate categories and tags to organize content
Create WordPress Post
Create or update a blog post or page on your WordPress site from a Google Docs document.Headers
Header | Value |
---|---|
Content-Type | application/json |
Request Body
The request body should contain the Google Docs URL and any additional parameters to customize the post.Required Parameters
Parameter | Type | Description |
---|---|---|
google_docs_url | string | URL of the Google Doc. Must be shared with “anyone with link” |
Optional Parameters
Parameter | Type | Default | Description |
---|---|---|---|
title | string | Google Docs title | Post title |
slug | string | Auto-generated | Custom URL slug |
tags | string | - | Comma-separated list of tags |
categories | string | - | Comma-separated list of categories |
state | string | draft | Post status: publish or draft |
author | string | API token creator | Author username or full name |
date | string | Current time | Publish date in YYYY-MM-DD HH:MM:SS format |
excerpt | string | - | Post excerpt for SEO |
post_type | string | post | Type: post or page |
featured_image_url | string | - | URL of featured image |
featured_image_alt_text | string | - | Alt text for featured image |
featured_image_caption | string | - | Caption for featured image |
Export Settings
Control how your content is processed:Parameter | Type | Default | Description |
---|---|---|---|
export_settings.compress_images | boolean | true | Compress images before upload |
export_settings.demote_headings | boolean | false | Demote headings by one level |
export_settings.convert_to_webp | boolean | true | Convert images to WebP format |
export_settings.first_image_as_featured_image | boolean | true | Set first image as featured image |
export_settings.add_no_follow_to_external_links | boolean | true | Add nofollow to external links |
export_settings.bold_as_strong | boolean | false | Convert bold text to strong tag |
export_settings.wp_content_editor | string | classic | Content editor: classic or gutenberg_editor |
SEO Plugin Settings
Yoast SEO Settings
Parameter | Type | Description |
---|---|---|
yoast_settings.yoast_focuskw | string | Focus keyword |
yoast_settings.yoast_metadesc | string | Meta description |
yoast_settings.yoast_title | string | SEO title |
yoast_settings.yoast_canonical | string | Canonical URL |
RankMath Settings
Parameter | Type | Description |
---|---|---|
rankmath_settings.rank_math_focus_keyword | string | Focus keyword |
Newspack Settings
Parameter | Type | Description |
---|---|---|
newspack_settings.newspack_article_summary | string | Article summary |
newspack_settings.newspack_article_summary_title | string | Summary title |
newspack_settings.newspack_post_subtitle | string | Post subtitle |
Advanced Custom Fields (ACF)
Parameter | Type | Description |
---|---|---|
acf_field_name | string | Custom field value (supports URLs for images) |
Example Requests
Basic Request
Complete Request with All Options
Scheduled Post Request
Response Examples
Success Response (200 OK)
Error Responses
Bad Request (400)cURL Examples
Basic cURL Request
Advanced cURL Request with SEO
Authorizations
API token obtained from Docswrite dashboard
Query Parameters
Your personal API token
Body
Post creation parameters
URL of the Google Doc (must be shared with 'anyone with link')
"https://docs.google.com/document/d/1aBcDeFg/edit"
Post title (defaults to Google Docs title)
"My Blog Post"
Custom URL slug (auto-generated if not provided)
"my-blog-post"
Comma-separated list of tags
"technology, wordpress, automation"
Comma-separated list of categories
"Technology, Tutorials"
Post publication status
draft
, publish
Author username or full name
"John Doe"
Publication date in YYYY-MM-DD HH:MM:SS format
"2024-04-01 09:00:00"
Post excerpt for SEO
"This is a brief description of the post content."
Type of content to create
post
, page
URL of the featured image
"https://example.com/image.jpg"
Alt text for the featured image
"Description of the featured image"
Caption for the featured image
"Image caption text"