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

# Create an issue

> Learn how to create an issue using the Notocat API.

This endpoint can be used to create a send from a Notion page. The send will be created with the page's properties and the page's content will be transformed into an issue to be sent.


## OpenAPI

````yaml POST /sends
openapi: 3.0.1
info:
  title: OpenAPI Contacts
  description: The contacts API allows you to manage your contacts in Notocat.
  version: 1.0.0
servers:
  - url: https://api.notocat.com/v1
security:
  - bearerAuth: []
paths:
  /sends:
    post:
      description: Creates a send
      requestBody:
        description: Transform a Notion page into an issue to be sent
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewSend'
      responses:
        '200':
          description: Send created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Send'
        '400':
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    NewSend:
      required:
        - workspace_id
        - page_id
      type: object
      properties:
        workspace_id:
          description: The ID of the workspace
          type: string
        page_id:
          description: The ID of the Notion page to transform into an issue
          type: string
        subject:
          description: >-
            The subject line of the email. If not provided, it will be extracted
            from the Notion page properties.
          type: string
        preheader:
          description: The preheader text of the email
          type: string
        segment_id:
          description: >-
            The ID of the segment to send to. If not provided, all workspace
            contacts will be used.
          type: string
        font:
          description: The font used in the email
          type: string
        css:
          description: Custom CSS for the email
          type: string
        linkColor:
          description: The color of links in the email
          type: string
          default: '#0000ED'
        dividerColor:
          description: The color of dividers in the email
          type: string
          default: '#434343'
        dividerSize:
          description: The size of dividers in the email
          type: integer
          default: 1
        showCover:
          description: Whether to show the cover image in the email
          type: boolean
          default: true
        trackOpens:
          description: Whether to track email opens
          type: boolean
          default: true
        trackLinks:
          description: Whether to track link clicks
          type: boolean
          default: true
    Send:
      type: object
      properties:
        id:
          description: The unique ID of the send
          type: string
        workspace_id:
          description: The ID of the workspace this send belongs to
          type: string
        segment_id:
          description: The ID of the segment this send is targeting (optional)
          type: string
        page_id:
          description: The ID of the Notion page this send is based on
          type: string
        html:
          description: The HTML content of the email
          type: string
        subject:
          description: The subject line of the email
          type: string
        preheader:
          description: The preheader text of the email
          type: string
        font:
          description: The font used in the email
          type: string
        css:
          description: Custom CSS for the email
          type: string
        linkColor:
          description: The color of links in the email
          type: string
          default: '#0000ED'
        status:
          description: The status of the send
          type: string
          enum:
            - draft
            - sending
            - sent
          default: draft
        dividerColor:
          description: The color of dividers in the email
          type: string
          default: '#434343'
        dividerSize:
          description: The size of dividers in the email
          type: integer
          default: 1
        showCover:
          description: Whether to show the cover image in the email
          type: boolean
          default: true
        sentAt:
          description: The timestamp when the send was sent
          type: string
          format: date-time
        trackOpens:
          description: Whether to track email opens
          type: boolean
          default: true
        trackLinks:
          description: Whether to track link clicks
          type: boolean
          default: true
        createdAt:
          description: Creation timestamp
          type: string
          format: date-time
        updatedAt:
          description: Last update timestamp
          type: string
          format: date-time
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````