# Posting and Micropub

Page: https://microblog.dev/api/posting/
API base URL: https://micro.blog

Endpoints for publishing, replying, uploading media, and querying Micropub resources.

## Endpoints
### GET /micropub

URL: `https://micro.blog/micropub`

Handles Micropub configuration, source, category, contact, and syndication queries.




Query parameters:
- `q` (string, required): Search query or Micropub query type.
  Example: `source`
- `mp-destination` (string, optional): Micropub destination site URL or hostname.
  Example: `vincent-test.micro.blog`
- `mp-channel` (string, optional): Micropub source channel, for example `pages`.
  Example: `pages`
- `filter` (string, optional): Text filter for Micropub source or contact queries.
  Example: `Vincent`



Header parameters:
- `Authorization` (string, required): Bearer token for authentication. Format: `Bearer {token}`.
  Example: `Bearer EF7BB9BCAC1F6D561C93`




Example request:

```sh
curl -X GET "https://micro.blog/micropub" \
  --header "Authorization: Bearer EF7BB9BCAC1F6D561C93"
```

Response:
- Status: 200
- Content-Type: `application/json`
- Description: Returns a JSON response for the requested resource.
Example response:

```json
{
  "media-endpoint": "https://micro.blog/micropub/media",
  "destination": [
    {
      "uid": "https://vincent.micro.blog/",
      "name": "vincent.micro.blog",
      "microblog-audio": true,
      "microblog-default": true,
      "microblog-title": "Vincent's Blog"
    }
  ],
  "post-types": [
    {
      "type": "note",
      "name": "Post",
      "properties": [
        "content",
        "published",
        "post-status",
        "category"
      ]
    }
  ],
  "channels": [
    {
      "uid": "default",
      "name": "Posts"
    }
  ],
  "syndicate-to": []
}
```

### POST /micropub

URL: `https://micro.blog/micropub`

Creates, updates, or deletes content through Micropub.




Query parameters:
- `action` (string, optional): Micropub action, for example `delete`.
  Example: `delete`
- `url` (string, optional): URL to look up or modify.
  Example: `http://gluon.micro.blog/2019/12/16/hello-world.html`
- `h` (string, optional): Micropub object type. Use `entry` for posts.
  Example: `entry`
- `content` (string, optional): Reply text.
  Example: `@vincent Thanks for the update.`
- `name` (string, optional): Title or notebook name, depending on the endpoint.
  Example: `This is a title`
- `photo` (string, optional): Photo URL for a Micropub post.
  Example: `https://gluon.micro.blog/uploads/2019/9931898b67.jpg`
- `bookmark-of` (string, optional): URL being bookmarked.
  Example: `https://micro.blog/rom/21700756`
- `mp-destination` (string, optional): Micropub destination site URL or hostname.
  Example: `https://example.micro.blog/`
- `mp-channel` (string, optional): Micropub source channel, for example `pages`.
  Example: `pages`
- `site_id` (string, optional): Site URL or identifier for the destination site.
  Example: `https://gluon-the-second.micro.blog/`



Header parameters:
- `Authorization` (string, required): Bearer token for authentication. Format: `Bearer {token}`.
  Example: `Bearer EF7BB9BCAC1F6D561C93`




Example request:

```sh
curl -X POST "https://micro.blog/micropub" \
  --header "Authorization: Bearer EF7BB9BCAC1F6D561C93"
```

Response:
- Status: 200
- Content-Type: `application/json`
- Description: Returns an empty JSON object on success.
Example response:

```json
{}
```

### GET /micropub/media

URL: `https://micro.blog/micropub/media`

Returns Micropub media endpoint configuration or uploaded media.




Query parameters:
- `q` (string, required): Search query or Micropub query type.
  Example: `config`
- `mp-destination` (string, optional): Micropub destination site URL or hostname.
  Example: `https://vincent.micro.blog/`



Header parameters:
- `Authorization` (string, required): Bearer token for authentication. Format: `Bearer {token}`.
  Example: `Bearer EF7BB9BCAC1F6D561C93`




Example request:

```sh
curl -X GET "https://micro.blog/micropub/media" \
  --header "Authorization: Bearer EF7BB9BCAC1F6D561C93"
```

Response:
- Status: 200
- Content-Type: `application/json`
- Description: Returns a JSON response for the requested resource.
Example response:

```json
{
  "items": [
    {
      "url": "https://vincent.micro.blog/uploads/2026/photo.jpg",
      "published": "2026-04-26T12:00:00+00:00",
      "alt": "Photo description",
      "microblog-ai": false,
      "microblog-id": 12345,
      "sizes": {
        "large": "https://vincent.micro.blog/uploads/2026/photo.jpg"
      },
      "cdn": {
        "large": "https://cdn.uploads.micro.blog/12345/photo.jpg"
      }
    }
  ]
}
```

### POST /micropub/media

URL: `https://micro.blog/micropub/media`

Uploads media or deletes an uploaded media file through the Micropub media endpoint.




Query parameters:
- `action` (string, optional): Micropub action, for example `delete`.
  Example: `delete`
- `mp-destination` (string, optional): Micropub destination site URL or hostname.
  Example: `https://vincent.micro.blog/`
- `url` (string, optional): URL to look up or modify.
  Example: `https://vincent.micro.blog/uploads/2023/dd2f2731d0.jpg`



Header parameters:
- `Authorization` (string, required): Bearer token for authentication. Format: `Bearer {token}`.
  Example: `Bearer EF7BB9BCAC1F6D561C93`
- `Content-Type` (string, required): Request content type.
  Example: `multipart/form-data`



Body parameters:
- `file` (string, optional): File upload field for media uploads.
  Example: `@/path/to/file.jpg`


Example request:

```sh
curl -X POST "https://micro.blog/micropub/media" \
  --header "Authorization: Bearer EF7BB9BCAC1F6D561C93" \
  --header "Content-Type: multipart/form-data" \
  --form "file=@/path/to/file.jpg"
```

Response:
- Status: 200
- Content-Type: `application/json`
- Description: Returns a JSON response for the requested resource.
Example response:

```json
{
  "url": "https://vincent.micro.blog/uploads/2026/photo.jpg",
  "poster": ""
}
```

### POST /micropub/media/append

URL: `https://micro.blog/micropub/media/append`

Appends a base64-encoded chunk to a large media upload. Micro.blog clients use this before marking the upload as finished.






Header parameters:
- `Authorization` (string, required): Bearer token for authentication. Format: `Bearer {token}`.
  Example: `Bearer EF7BB9BCAC1F6D561C93`
- `Content-Type` (string, required): Request content type.
  Example: `multipart/form-data`



Body parameters:
- `file_id` (integer, required): Client-generated upload identifier shared by all chunks for the same file.
  Example: `12345`
- `file_name` (string, optional): Original file name. The Micro.blog app includes this with chunk requests.
  Example: `video.mov`
- `file_type` (string, optional): MIME type for the uploaded file.
  Example: `video/quicktime`
- `file_data` (string, required): Base64-encoded chunk data, optionally prefixed with a data URL header.
  Example: `data:;base64,AAAA`
- `mp-destination` (string, optional): Micropub destination site URL or hostname.
  Example: `https://example.micro.blog/`


Example request:

```sh
curl -X POST "https://micro.blog/micropub/media/append" \
  --header "Authorization: Bearer EF7BB9BCAC1F6D561C93" \
  --form "file_id=12345" \
  --form "file_name=video.mov" \
  --form "file_type=video/quicktime" \
  --form "file_data=data:;base64,AAAA"
```

Response:
- Status: 200
- Content-Type: `application/json`
- Description: Returns an empty JSON object on success.
Example response:

```json
{}
```

### POST /micropub/media/finished

URL: `https://micro.blog/micropub/media/finished`

Marks a chunked media upload as finished and queues server-side processing.






Header parameters:
- `Authorization` (string, required): Bearer token for authentication. Format: `Bearer {token}`.
  Example: `Bearer EF7BB9BCAC1F6D561C93`
- `Content-Type` (string, required): Request content type.
  Example: `multipart/form-data`



Body parameters:
- `file_id` (integer, required): Client-generated upload identifier used for the appended chunks.
  Example: `12345`
- `file_name` (string, required): Original file name.
  Example: `video.mov`
- `mp-destination` (string, optional): Micropub destination site URL or hostname.
  Example: `https://example.micro.blog/`


Example request:

```sh
curl -X POST "https://micro.blog/micropub/media/finished" \
  --header "Authorization: Bearer EF7BB9BCAC1F6D561C93" \
  --form "file_id=12345" \
  --form "file_name=video.mov"
```

Response:
- Status: 200
- Content-Type: `application/json`
- Description: Returns an empty JSON object on success.
Example response:

```json
{}
```

### GET /micropub/media/waiting

URL: `https://micro.blog/micropub/media/waiting`

Returns processing state and the final URL for a chunked media upload.




Query parameters:
- `file_id` (integer, required): Upload file identifier.
  Example: `12345`



Header parameters:
- `Authorization` (string, required): Bearer token for authentication. Format: `Bearer {token}`.
  Example: `Bearer EF7BB9BCAC1F6D561C93`




Example request:

```sh
curl -X GET "https://micro.blog/micropub/media/waiting?file_id=12345" \
  --header "Authorization: Bearer EF7BB9BCAC1F6D561C93"
```

Response:
- Status: 200
- Content-Type: `application/json`
- Description: Returns whether processing is still running and, when available, the uploaded media URL.
Example response:

```json
{
  "is_processing": false,
  "url": "https://vincent.micro.blog/uploads/2026/video.mp4"
}
```

### POST /posts/reply

URL: `https://micro.blog/posts/reply`

Creates a reply to a Micro.blog post or mention.




Query parameters:
- `id` (integer, required): Identifier for the resource.
  Example: `28150987`
- `content` (string, required): Reply text.
  Example: `@vincent testing a reply with a [link](https://gluon.app)`
- `text` (string, optional): Text content.
  Example: `Draft note text`



Header parameters:
- `Authorization` (string, required): Bearer token for authentication. Format: `Bearer {token}`.
  Example: `Bearer EF7BB9BCAC1F6D561C93`




Example request:

```sh
curl -X POST "https://micro.blog/posts/reply?id=28150987&content=%40vincent+testing+a+reply+with+a+%5Blink%5D%28https%3A%2F%2Fgluon.app%29" \
  --header "Authorization: Bearer EF7BB9BCAC1F6D561C93"
```

Response:
- Status: 200
- Content-Type: `application/json`
- Description: Returns an empty JSON object on success.
Example response:

```json
{}
```

