---
title: "Create blog post"
method: POST
path: "/blogposts"
tags: ["Blog Post"]
---

# Create blog post

`POST /blogposts`

Creates a new blog post in the space specified by the spaceId.

By default this will create the blog post as a non-draft, unless the status is specified as draft.
If creating a non-draft, the title must not be empty.

Currently only supports the storage representation specified in the body.representation enums below

## Query parameters

- `private` boolean

## Request body

- object
  - `spaceId` string, required — ID of the space
  - `status` 'current' | 'draft' — The status of the blog post, specifies if the blog post will be created as a new blog post or a draft
  - `title` string — Title of the blog post, required if creating non-draft.
  - `body` union
    - BlogPostBodyWrite
      - `representation` 'storage' | 'atlas_doc_format' | 'wiki' — Type of content representation used for the value field.
      - `value` string — Body of the blog post, in the format found in the representation field.
    - BlogPostNestedBodyWrite — Body of the blog post. Only one body format should be specified as the property for this object, e.g. `storage`.
      - `storage` BlogPostBodyWrite
        - `representation` 'storage' | 'atlas_doc_format' | 'wiki' — Type of content representation used for the value field.
        - `value` string — Body of the blog post, in the format found in the representation field.
      - `atlas_doc_format` BlogPostBodyWrite
        - `representation` 'storage' | 'atlas_doc_format' | 'wiki' — Type of content representation used for the value field.
        - `value` string — Body of the blog post, in the format found in the representation field.
      - `wiki` BlogPostBodyWrite
        - `representation` 'storage' | 'atlas_doc_format' | 'wiki' — Type of content representation used for the value field.
        - `value` string — Body of the blog post, in the format found in the representation field.
  - `createdAt` string — Created date of the blog post in the format of "yyyy-MM-ddTHH:mm:ss.SSSZ".

## Response `200`

Returned if the blog post was created successfully.

- object
  - `id` string — ID of the blog post.
  - `status` 'current' | 'draft' | 'historical' | 'trashed' | 'deleted' | 'any' — The status of the content.
  - `title` string — Title of the blog post.
  - `spaceId` string — ID of the space the blog post is in.
  - `authorId` string — The account ID of the user who created this blog post originally.
  - `createdAt` string, date-time — Date and time when the blog post was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ".
  - `version` Version
    - `createdAt` string, date-time — Date and time when the version was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ".
    - `message` string — Message associated with the current version.
    - `number` integer — The version number.
    - `minorEdit` boolean — Describes if this version is a minor version. Email notifications and activity stream updates are not created for minor versions.
    - `authorId` string — The account ID of the user who created this version.
  - `body` BodySingle — Contains fields for each representation type requested.
    - `storage` BodyType
      - `representation` string — Type of content representation used for the value field.
      - `value` string — Body of the content, in the format found in the representation field.
    - `atlas_doc_format` BodyType
      - `representation` string — Type of content representation used for the value field.
      - `value` string — Body of the content, in the format found in the representation field.
    - `view` BodyType
      - `representation` string — Type of content representation used for the value field.
      - `value` string — Body of the content, in the format found in the representation field.
  - `labels` object
    - `results` Label[]
      - `id` string — ID of the label.
      - `name` string — Name of the label.
      - `prefix` string — Prefix of the label.
    - `meta` OptionalFieldMeta
      - `hasMore` boolean — Indicates if there are more available results that can be fetched.
      - `cursor` string — A token that can be used in the query parameter of the endpoint returned in the `_links` property to retrieve the next set of results.
    - `_links` OptionalFieldLinks
      - `self` string — A relative URL that can be used to fetch results beyond what this include parameter retrieves.
  - `properties` object
    - `results` ContentProperty[]
      - `id` string — ID of the property
      - `key` string — Key of the property
      - `value` unknown
      - `version` Version
        - `createdAt` string, date-time — Date and time when the version was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ".
        - `message` string — Message associated with the current version.
        - `number` integer — The version number.
        - `minorEdit` boolean — Describes if this version is a minor version. Email notifications and activity stream updates are not created for minor versions.
        - `authorId` string — The account ID of the user who created this version.
    - `meta` OptionalFieldMeta
      - `hasMore` boolean — Indicates if there are more available results that can be fetched.
      - `cursor` string — A token that can be used in the query parameter of the endpoint returned in the `_links` property to retrieve the next set of results.
    - `_links` OptionalFieldLinks
      - `self` string — A relative URL that can be used to fetch results beyond what this include parameter retrieves.
  - `operations` object
    - `results` Operation[]
      - `operation` string — The type of operation.
      - `targetType` string — The type of entity the operation type targets.
    - `meta` OptionalFieldMeta
      - `hasMore` boolean — Indicates if there are more available results that can be fetched.
      - `cursor` string — A token that can be used in the query parameter of the endpoint returned in the `_links` property to retrieve the next set of results.
    - `_links` OptionalFieldLinks
      - `self` string — A relative URL that can be used to fetch results beyond what this include parameter retrieves.
  - `likes` object
    - `results` Like[]
      - `accountId` string — Account ID.
    - `meta` OptionalFieldMeta
      - `hasMore` boolean — Indicates if there are more available results that can be fetched.
      - `cursor` string — A token that can be used in the query parameter of the endpoint returned in the `_links` property to retrieve the next set of results.
    - `_links` OptionalFieldLinks
      - `self` string — A relative URL that can be used to fetch results beyond what this include parameter retrieves.
  - `versions` object
    - `results` Version[]
      - `createdAt` string, date-time — Date and time when the version was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ".
      - `message` string — Message associated with the current version.
      - `number` integer — The version number.
      - `minorEdit` boolean — Describes if this version is a minor version. Email notifications and activity stream updates are not created for minor versions.
      - `authorId` string — The account ID of the user who created this version.
    - `meta` OptionalFieldMeta
      - `hasMore` boolean — Indicates if there are more available results that can be fetched.
      - `cursor` string — A token that can be used in the query parameter of the endpoint returned in the `_links` property to retrieve the next set of results.
    - `_links` OptionalFieldLinks
      - `self` string — A relative URL that can be used to fetch results beyond what this include parameter retrieves.
  - `isFavoritedByCurrentUser` boolean — Whether the blog post has been favorited by the current user.
  - `_links` object
    - `webui` string — Web UI link of the content.
    - `editui` string — Edit UI link of the content.
    - `tinyui` string — Web UI link of the content.
    - `base` string — Base url of the Confluence site.

## Other responses

- `400` — Returned if invalid values were passed in for any of the enums, a REQUIRED parameter was missing, or if the given title is a duplicate in the space
- `401` — Returned if the authentication credentials are incorrect or missing from the request
- `404` — Returned if: - The provided space does not exist - The user does not have permissions to view the space - The user does not have the needed permissions to create a blog post in the provided space
- `413` — Returned if the request is too large in size (over 5 MB)

---

[API](https://skmtc.net/atlassian/apis/the-confluence-cloud-rest-api-v2.md) · [All operations](https://skmtc.net/atlassian/apis/the-confluence-cloud-rest-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/atlassian/the-confluence-cloud-rest-api-v2/revisions/c4bd1ed570f2/schema)
