> ## 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.

# Update Action

> Updates an action by ID



## OpenAPI

````yaml PATCH /actions/{id}
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/{id}:
    patch:
      description: Updates an action by ID
      parameters:
        - name: id
          in: path
          required: true
          description: ID of the action to update
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Name of the action
                increase:
                  type: integer
                  description: Points to increase
      responses:
        '200':
          description: Action updated 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

````