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

# Post hours



## OpenAPI

````yaml /api-reference/openapi.json post /hours
openapi: 3.1.0
info:
  title: COR API
  description: >-
    The COR API lets you integrate with projectcor.com applications using simple
    HTTP methods, in either XML or JSON formats, making this an ideal API for
    developing integrations with other softwares, external clients or mobile
    applications
  version: 1.0.0
servers:
  - url: https://api.projectcor.com/v1
    description: Production server
security:
  - bearerAuth: []
paths:
  /hours:
    post:
      tags:
        - Hours
      summary: Post hours
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HourInput'
      responses:
        '200':
          description: Hours logged successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Hour'
components:
  schemas:
    HourInput:
      type: object
      required:
        - task_log_id
        - start
      properties:
        task_log_id:
          type: integer
          description: Task ID
        start:
          type: string
          format: date-time
          description: Start Timestamp
        stop:
          type: string
          format: date-time
          description: Stop Timestamp
    Hour:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier of the time entry
        start:
          type: string
          format: date-time
          description: Start timestamp of the time entry
        stop:
          type: string
          format: date-time
          description: Stop timestamp of the time entry
        duration:
          type: string
          description: Duration of the time entry in hours
        cost:
          type: number
          description: Calculated cost for this time entry
        user_id:
          type: integer
          description: ID of the user who logged the hours
        task_log_id:
          type: integer
          description: ID of the task this time entry is logged against
        project_id:
          type:
            - integer
            - 'null'
          description: Project ID (null when the task has no associated project)
        client_id:
          type:
            - integer
            - 'null'
          description: Client ID (null when the task has no associated client)
        created_at:
          type: string
          format: date-time
          description: Timestamp when the time entry was created
        status:
          type: string
          enum:
            - pending
            - approved
            - rejected
            - paid
          description: Current approval status of the time entry
        status_changed_by:
          type:
            - integer
            - 'null'
          description: >-
            ID of the user who last changed the status (null if status has not
            been changed)
        status_changed_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Timestamp when the status was last changed (null if status has not
            been changed)
        type:
          type: string
          description: Type of time entry (e.g. `TASK`)
        task_log_rework_id:
          type:
            - integer
            - 'null'
          description: >-
            Rework ID if this time entry is associated with a rework, otherwise
            null
        comments:
          type:
            - string
            - 'null'
          description: Optional comments on the time entry
        user:
          type: object
          description: Summary of the user who logged the time entry
          properties:
            id:
              type: integer
            first_name:
              type: string
            last_name:
              type: string
            picture:
              type: string
              description: URL to the user's profile picture
            remaining_hours:
              type: number
              description: Remaining available hours for the user
            timezone:
              type: string
              description: User's timezone (e.g. `America/Buenos_Aires`)
            gmt:
              type: string
              description: GMT offset (e.g. `-03:00`)
        client:
          type:
            - object
            - 'null'
          description: Client information (null when the task has no associated client)
        project:
          type:
            - object
            - 'null'
          description: Project information (null when the task has no associated project)
        task:
          type: object
          description: Task this time entry is logged against
          properties:
            id:
              type: integer
              description: Task ID
            title:
              type: string
              description: Task title
            project_id:
              type:
                - integer
                - 'null'
              description: ID of the project this task belongs to
            task_father:
              type:
                - integer
                - 'null'
              description: ID of the parent task, if any
            status:
              type: string
              description: Current status of the task
            father:
              type:
                - object
                - 'null'
              description: Parent task summary (null if no parent task)
              properties:
                id:
                  type: integer
                title:
                  type: string
            project:
              type:
                - object
                - 'null'
              description: Project this task belongs to (null if no project)
              properties:
                id:
                  type: integer
                name:
                  type: string
                client_id:
                  type: integer
                contract_id:
                  type:
                    - integer
                    - 'null'
                client:
                  type: object
                  description: Client that owns the project
                  properties:
                    id:
                      type: integer
                    name:
                      type: string
                    client_status_id:
                      type: integer
                has_expired_contract:
                  type: boolean
            labels:
              type: array
              description: Labels assigned to the task
              items:
                type: object
                properties:
                  id:
                    type: integer
                  hex:
                    type: string
                    description: Hex color code for the label
                  names:
                    type: array
                    description: Localized label names
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                        lang:
                          type: string
                          description: Language code (e.g. `en`, `es`, `pt`, `fr`)
        userPosition:
          type:
            - object
            - 'null'
          description: User's position information (null if not set)
        billInput:
          type:
            - object
            - 'null'
          description: >-
            Billing information, present when the time entry has been invoiced
            (status `paid`)
          properties:
            id:
              type: integer
              description: Bill input ID
            entity_id:
              type: integer
              description: ID of the time entry this billing relates to
            bill_id:
              type: integer
              description: ID of the associated bill
            updated_at:
              type: string
              format: date-time
              description: Last update timestamp
            bill:
              type: object
              description: Associated bill details
              properties:
                id:
                  type: integer
                receipt_number:
                  type: string
                  description: Receipt or invoice number
        rework_hour:
          type:
            - object
            - 'null'
          description: Rework details, present when `task_log_rework_id` is set
          properties:
            requested_by:
              type: string
              description: Source of the rework request (e.g. `internal`)
            description:
              type: string
              description: Description of the rework
            'on':
              type: string
              format: date-time
              description: Date the rework was requested
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````