> ## Documentation Index
> Fetch the complete documentation index at: https://developers.hubspot.jp/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Publish, schedule or unpublish a blog post

> Either schedules or cancels publishing based on the POSTed JSON. Note that this endpoint must always be used to publish a blog post. Use the Create or Update endpoints to set the publish_date, but then use this endpoint to trigger the actual publish event.

export const ScopesList = ({scopes = [], description = "この API には、次のいずれかのスコープが必要です。"}) => {
  if (!scopes || scopes.length === 0) {
    return null;
  }
  const sortedScopes = scopes.sort((a, b) => a.localeCompare(b));
  return <div>
      <div className="text-sm mb-2">{description}</div>
      <div>
        {sortedScopes.map((scope, index) => <div key={index}>
            <code>
              <span className="text-xs">{scope}</span>
            </code>
          </div>)}
      </div>
    </div>;
};

<Accordion title="Scope requirements">
  <ScopesList scopes={['content']} />
</Accordion>


## OpenAPI

````yaml specs/legacy/v2/blog-posts-v2.json POST /content/api/v2/blog-posts/{blog_post_id}/publish-action
openapi: 3.0.1
info:
  title: Blog Posts API - V2
  version: v2
  description: >-
    Use the blog posts API to create, manage, and publish blog posts on your
    website.
  x-hubspot-api-use-case: Retrieve all blog posts created this year as a part of a content audit.
servers:
  - url: https://api.hubapi.com
security: []
tags:
  - name: Blog Posts
paths:
  /content/api/v2/blog-posts/{blog_post_id}/publish-action:
    post:
      tags:
        - Blog Posts
      summary: Publish, schedule or unpublish a blog post
      description: >-
        Either schedules or cancels publishing based on the POSTed JSON. Note
        that this endpoint must always be used to publish a blog post. Use the
        Create or Update endpoints to set the publish_date, but then use this
        endpoint to trigger the actual publish event.
      operationId: post-content-api-v2-blog-posts-blog_post_id-publish-action
      parameters:
        - name: blog_post_id
          in: path
          required: true
          description: Unique identifier for a particular blog post
          schema:
            type: integer
            format: int64
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - action
              properties:
                action:
                  type: string
                  enum:
                    - schedule-publish
                    - cancel-publish
                  description: >-
                    Action to perform: 'schedule-publish' sets up the content
                    for publishing at the publish_date already set on the post,
                    'cancel-publish' cancels a previously scheduled blog post
                    publish
            example:
              action: schedule-publish
      responses:
        '204':
          description: Publish action completed
        '400':
          description: Bad request with error message detailing the problem
      security:
        - hapikey: []
        - oauth2:
            - content
components: {}

````