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

# Update PTO earned

> Set the PTO earned for a month for one or more users. The value is in hours. Emails are matched case-insensitively and duplicates are ignored. An email that matches no active user is listed under `skipped`. A user whose PTO for that month is locked is also skipped and listed under `skipped` with the reason "Monthly PTO is locked".

> [!NOTE]
>
> Replace `{your-subdomain}` with your workspace's subdomain. \
> Learn how to find your subdomain in [Workspace subdomain](/api/workspace-subdomain.md).


## OpenAPI

````yaml bundled/monthly-ptos.yaml PATCH /monthly-ptos/update-earned
openapi: 3.0.3
info:
  title: NeetoInvoice APIs
  version: 2.0.0
servers:
  - description: NeetoInvoice APIs
    url: https://{your-subdomain}.neetoinvoice.com/api/external/v2
    variables:
      your-subdomain:
        default: spinkart
        description: >-
          Replace **spinkart** with your [workspace's
          subdomain](/api/workspace-subdomain).
security: []
paths:
  /monthly-ptos/update-earned:
    patch:
      tags:
        - Monthly PTO
      summary: Update PTO earned
      description: >-
        Set the PTO earned for a month for one or more users. The value is in
        hours. Emails are matched case-insensitively and duplicates are ignored.
        An email that matches no active user is listed under `skipped`. A user
        whose PTO for that month is locked is also skipped and listed under
        `skipped` with the reason "Monthly PTO is locked".
      parameters:
        - $ref: '#/components/parameters/api_key_header'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update_earned_request'
      responses:
        '200':
          description: OK - Request succeeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update_earned_response'
components:
  parameters:
    api_key_header:
      in: header
      name: X-Api-Key
      description: >-
        Use the X-Api-Key header to provide your workspace API key. Refer to
        [Authentication](/api/authentication) for more information.
      required: true
      schema:
        type: string
        default: your-api-key
  schemas:
    update_earned_request:
      type: object
      required:
        - emails
        - month
        - year
      properties:
        emails:
          type: array
          description: Emails of the users to update.
          items:
            type: string
            format: email
          example:
            - oliver@example.com
            - sam@example.com
        month:
          type: integer
          minimum: 1
          maximum: 12
          description: Month number, 1 to 12.
          example: 10
        year:
          type: integer
          example: 2026
        pto_earned:
          type: number
          format: float
          description: PTO earned for the month, in hours.
          example: 12
    update_earned_response:
      type: object
      properties:
        month:
          type: integer
          example: 10
        year:
          type: integer
          example: 2026
        updated:
          type: array
          items:
            type: object
            properties:
              user_email:
                type: string
                format: email
              pto_earned:
                type: number
                format: float
                description: In hours.
              net_pto:
                type: number
                format: float
                description: In hours.
        skipped:
          type: array
          items:
            type: object
            properties:
              user_email:
                type: string
                format: email
              reason:
                type: string
                example: User not found

````

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