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

# Create Action

> Creates a new action



## OpenAPI

````yaml POST /actions
openapi: 3.0.1
info:
  title: OpenAPI Letterby
  description: API for Letterby
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://letterby.com/api/v4
security:
  - apiKeyAuth: []
paths:
  /actions:
    post:
      description: Creates a new action
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - contactId
              properties:
                name:
                  type: string
                  description: Name of the action
                increase:
                  type: integer
                  description: 'Points to increase (default: 1)'
                  default: 1
                contactId:
                  type: string
                  description: ID of the contact performing the action
      responses:
        '201':
          description: Action created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      action:
                        $ref: '#/components/schemas/Action'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    Action:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the action
        name:
          type: string
          description: Name of the action
        increase:
          type: integer
          description: Points to increase
        createdAt:
          type: string
          format: date-time
          description: When the action was created
        updatedAt:
          type: string
          format: date-time
          description: When the action was last updated
        subId:
          type: string
          description: ID of the contact performing the action
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Unauthorized - Invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: apiKey
      description: API key to authorize requests

````