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

# Create post

> Creates a new post.



## OpenAPI

````yaml post /v2/posts
openapi: 3.0.0
info:
  title: Campsite API
  version: 2.0.0
  contact:
    email: support@campsite.com
  description: >
    This is the internal documentation for our public REST API. Use this as a
    starting point for hacking on projects. We'll build a proper documentation
    site later.


    ⚠️  This API is a work in progress! Field and endpoint names are subject to
    change, and not all endpoints have been added yet.
servers:
  - url: https://api.campsite.com
security:
  - bearerAuth: []
paths:
  /v2/posts:
    post:
      summary: Create post
      description: Creates a new post.
      operationId: _v2_posts_post
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/_v2_posts_post_request'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2Post'
components:
  schemas:
    _v2_posts_post_request:
      type: object
      required:
        - content_markdown
        - channel_id
      properties:
        title:
          type: string
          properties: {}
        content_markdown:
          type: string
          description: The post content in Markdown format.
          properties: {}
        channel_id:
          type: string
          description: The ID of the channel to create the post in.
          properties: {}
    V2Post:
      type: object
      required:
        - id
        - title
        - created_at
        - last_activity_at
        - url
        - content
        - comments_count
        - channel
        - author
        - resolution
      properties:
        id:
          type: string
          properties: {}
        title:
          type: string
          properties: {}
        created_at:
          type: string
          properties: {}
        last_activity_at:
          type: string
          properties: {}
        url:
          type: string
          properties: {}
        content:
          type: string
          properties: {}
        comments_count:
          type: number
          properties: {}
        channel:
          $ref: '#/components/schemas/V2Project'
        author:
          $ref: '#/components/schemas/V2Author'
        resolution:
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/V2PostResolution'
    V2Project:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: string
          properties: {}
        name:
          type: string
          properties: {}
    V2Author:
      type: object
      required:
        - avatar_urls
        - name
        - id
        - type
      properties:
        avatar_urls:
          $ref: '#/components/schemas/AvatarUrls'
        name:
          type: string
          properties: {}
        id:
          type: string
          properties: {}
        type:
          type: string
          enum:
            - app
            - member
          properties: {}
    V2PostResolution:
      type: object
      required:
        - resolved_at
        - resolved_html
        - resolved_by
        - resolved_comment
      properties:
        resolved_at:
          type: string
          properties: {}
        resolved_html:
          type: string
          properties: {}
          nullable: true
        resolved_by:
          $ref: '#/components/schemas/V2Author'
        resolved_comment:
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/V2Comment'
    AvatarUrls:
      type: object
      required:
        - xs
        - sm
        - base
        - lg
        - xl
        - xxl
      properties:
        xs:
          type: string
          properties: {}
        sm:
          type: string
          properties: {}
        base:
          type: string
          properties: {}
        lg:
          type: string
          properties: {}
        xl:
          type: string
          properties: {}
        xxl:
          type: string
          properties: {}
    V2Comment:
      type: object
      required:
        - id
        - content
        - created_at
        - replies_count
        - parent_id
        - subject_id
        - subject_type
        - author
      properties:
        id:
          type: string
          properties: {}
        content:
          type: string
          properties: {}
        created_at:
          type: string
          properties: {}
        replies_count:
          type: number
          properties: {}
        parent_id:
          type: string
          properties: {}
          nullable: true
        subject_id:
          type: string
          properties: {}
        subject_type:
          type: string
          properties: {}
        author:
          $ref: '#/components/schemas/V2Author'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.