XML-RPC
View .mdXML-RPC endpoint for MetaWeblog and Micro.blog-compatible clients. Use your Micro.blog username or email address with an app token as the password.
Supported methods
Posts
-
metaWeblog.newPost -
microblog.newPost -
metaWeblog.editPost -
microblog.editPost -
metaWeblog.deletePost -
microblog.deletePost -
metaWeblog.getPost -
microblog.getPost -
metaWeblog.getRecentPosts -
microblog.getPosts
Categories
-
metaWeblog.getCategories -
microblog.getCategories
Media
-
metaWeblog.newMediaObject -
microblog.newMediaObject
Pages
-
microblog.getPages -
microblog.getPage -
microblog.newPage -
microblog.editPage -
microblog.deletePage
https://micro.blog
/xmlrpc
Accepts XML-RPC MetaWeblog and Micro.blog API method calls.
Example Request
curl -X POST "https://micro.blog/xmlrpc" \
--header "Content-Type: text/xml" \
--data-binary @request.xml
Examples
Create a published post
Call metaWeblog.newPost with a site ID, username, app token, and content struct. Use 0 for the site ID to post to the user’s default site.
curl -X POST "https://micro.blog/xmlrpc" \
--header "Content-Type: text/xml" \
--data-binary @- <<'XML'
<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>metaWeblog.newPost</methodName>
<params>
<param><value><string>0</string></value></param>
<param><value><string>USERNAME</string></value></param>
<param><value><string>APP_TOKEN</string></value></param>
<param>
<value>
<struct>
<member>
<name>title</name>
<value><string>Hello from XML-RPC</string></value>
</member>
<member>
<name>description</name>
<value><string>This post was published with the MetaWeblog API.</string></value>
</member>
<member>
<name>categories</name>
<value>
<array>
<data>
<value><string>API</string></value>
</data>
</array>
</value>
</member>
<member>
<name>post_status</name>
<value><string>publish</string></value>
</member>
</struct>
</value>
</param>
</params>
</methodCall>
XML
Create a draft post
Set post_status to draft. Other values are treated as published posts.
curl -X POST "https://micro.blog/xmlrpc" \
--header "Content-Type: text/xml" \
--data-binary @- <<'XML'
<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>microblog.newPost</methodName>
<params>
<param><value><string>0</string></value></param>
<param><value><string>USERNAME</string></value></param>
<param><value><string>APP_TOKEN</string></value></param>
<param>
<value>
<struct>
<member>
<name>description</name>
<value><string>Draft text for later.</string></value>
</member>
<member>
<name>post_status</name>
<value><string>draft</string></value>
</member>
</struct>
</value>
</param>
</params>
</methodCall>
XML
Schedule a post
Include dateCreated or date_created in the content struct to set the post date. Future dates are scheduled.
curl -X POST "https://micro.blog/xmlrpc" \
--header "Content-Type: text/xml" \
--data-binary @- <<'XML'
<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>metaWeblog.newPost</methodName>
<params>
<param><value><string>0</string></value></param>
<param><value><string>USERNAME</string></value></param>
<param><value><string>APP_TOKEN</string></value></param>
<param>
<value>
<struct>
<member>
<name>description</name>
<value><string>This post will publish in the future.</string></value>
</member>
<member>
<name>dateCreated</name>
<value><dateTime.iso8601>20260501T09:00:00</dateTime.iso8601></value>
</member>
</struct>
</value>
</param>
</params>
</methodCall>
XML
Edit an existing post
Call metaWeblog.editPost or microblog.editPost with the post ID, username, app token, and replacement content.
curl -X POST "https://micro.blog/xmlrpc" \
--header "Content-Type: text/xml" \
--data-binary @- <<'XML'
<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>metaWeblog.editPost</methodName>
<params>
<param><value><int>12345</int></value></param>
<param><value><string>USERNAME</string></value></param>
<param><value><string>APP_TOKEN</string></value></param>
<param>
<value>
<struct>
<member>
<name>title</name>
<value><string>Updated title</string></value>
</member>
<member>
<name>description</name>
<value><string>Updated post text.</string></value>
</member>
</struct>
</value>
</param>
</params>
</methodCall>
XML
Delete a post
Use microblog.deletePost with the post ID, username, and app token.
curl -X POST "https://micro.blog/xmlrpc" \
--header "Content-Type: text/xml" \
--data-binary @- <<'XML'
<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>microblog.deletePost</methodName>
<params>
<param><value><int>12345</int></value></param>
<param><value><string>USERNAME</string></value></param>
<param><value><string>APP_TOKEN</string></value></param>
</params>
</methodCall>
XML
Upload media for a post
Upload bytes with metaWeblog.newMediaObject or microblog.newMediaObject. The response includes a url that can be inserted into a later post.
curl -X POST "https://micro.blog/xmlrpc" \
--header "Content-Type: text/xml" \
--data-binary @- <<'XML'
<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>metaWeblog.newMediaObject</methodName>
<params>
<param><value><string>0</string></value></param>
<param><value><string>USERNAME</string></value></param>
<param><value><string>APP_TOKEN</string></value></param>
<param>
<value>
<struct>
<member>
<name>name</name>
<value><string>photo.jpg</string></value>
</member>
<member>
<name>type</name>
<value><string>image/jpeg</string></value>
</member>
<member>
<name>bits</name>
<value><base64>/9j/4AAQSkZJRgABAQAAAQABAAD...</base64></value>
</member>
</struct>
</value>
</param>
</params>
</methodCall>
XML
Header Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Content-Type
|
string | Required | Request content type. |
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
xml
|
string | Required |
Raw XML-RPC request body.
Example:
<methodCall>...</methodCall>
|
Response
200 OK text/xmlReturns an XML-RPC method response or fault.
Example Response
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
<param>
<value><int>12345</int></value>
</param>
</params>
</methodResponse>