Skip to main content
POST
Create WordPress Post

Additional Information

Best Practices

  1. Always share Google Docs with “Anyone with the link”
  2. Test with drafts first before publishing live content
  3. Use descriptive titles and slugs for better SEO
  4. Include alt text for images for accessibility
  5. 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

Request Body

The request body should contain the Google Docs URL and any additional parameters to customize the post.

Required Parameters

Optional Parameters

Export Settings

Control how your content is processed:

SEO Plugin Settings

Yoast SEO Settings

RankMath Settings

Newspack Settings

Advanced Custom Fields (ACF)

Example Requests

Basic Request

Complete Request with All Options

Scheduled Post Request

Response Examples

Success Response (200 OK)

Error Responses

Bad Request (400)
Unauthorized (401)
Rate Limited (429)

cURL Examples

Basic cURL Request

Advanced cURL Request with SEO

Authorizations

token
string
query
required

API token obtained from Docswrite dashboard

Query Parameters

token
string
required

Your personal API token

Body

application/json

Post creation parameters

google_docs_url
string<uri>
required

URL of the Google Doc (must be shared with 'anyone with link')

Example:

"https://docs.google.com/document/d/1aBcDeFg/edit"

title
string

Post title (defaults to Google Docs title)

Example:

"My Blog Post"

slug
string

Custom URL slug (auto-generated if not provided)

Example:

"my-blog-post"

tags
string

Comma-separated list of tags

Example:

"technology, wordpress, automation"

categories
string

Comma-separated list of categories

Example:

"Technology, Tutorials"

state
enum<string>
default:draft

Post publication status

Available options:
draft,
publish
author
string

Author username or full name

Example:

"John Doe"

date
string<date-time>

Publication date in YYYY-MM-DD HH:MM:SS format

Example:

"2024-04-01 09:00:00"

excerpt
string

Post excerpt for SEO

Example:

"This is a brief description of the post content."

post_type
enum<string>
default:post

Type of content to create

Available options:
post,
page

URL of the featured image

Example:

"https://example.com/image.jpg"

Alt text for the featured image

Example:

"Description of the featured image"

Caption for the featured image

Example:

"Image caption text"

export_settings
object
yoast_settings
object
rankmath_settings
object
newspack_settings
object

Response

Post creation initiated successfully

error
boolean
Example:

false

message
string
Example:

"Post added to queue"

data
object