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

# Create Task

> Create a task in a project. For tasks coming from connected integrations, sync them via `POST /projects/{project_id}/sync` instead.



## OpenAPI

````yaml /openapi.json post /projects/{project_id}/tasks
openapi: 3.1.1
info:
  title: Everhour API
  version: 1.0.0
  license:
    name: Proprietary
    identifier: LicenseRef-Proprietary
servers:
  - url: https://api.everhour.com
security:
  - ApiKeyAuth: []
tags:
  - name: Clients
  - name: Custom Fields
  - name: Expenses
  - name: Invoices
  - name: Projects
  - name: Reports
  - name: Schedule
  - name: Tasks
  - name: Time Off
  - name: Time Records
  - name: Timecards
  - name: Timers
  - name: Timesheets
  - name: Users
  - name: Webhooks
paths:
  /projects/{project_id}/tasks:
    post:
      tags:
        - Tasks
      summary: Create Task
      description: >-
        Create a task in a project. For tasks coming from connected
        integrations, sync them via `POST /projects/{project_id}/sync` instead.
      operationId: createTask
      parameters:
        - name: project_id
          in: path
          required: true
          description: Project ID
          schema:
            type: string
            example: ev:1234567789001
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskRequestCreateRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
        '401':
          description: Unauthorized
components:
  schemas:
    TaskRequestCreateRequest:
      type: object
      properties:
        name:
          type: string
          example: Task Name
        section:
          type: integer
          description: Section ID
          example: 1234
        labels:
          type: array
          items:
            type: string
          example:
            - high
            - bug
        status:
          type: string
          enum:
            - open
            - closed
          example: open
        color:
          type: string
          description: Label color, max 15 chars.
          example: '#fdb301'
        dueOn:
          type: string
          description: Due date, format Y-m-d. Send "" to clear.
          example: '2018-03-05'
        startOn:
          type: string
          description: Start date, format Y-m-d. Send "" to clear.
          example: '2018-03-01'
        description:
          type: string
          description: Plain-text description, max 2000 chars.
        assignees:
          type: array
          description: Task assignees.
          items:
            type: object
            properties:
              userId:
                type: integer
              accountId:
                type: string
        tags:
          type: array
          items:
            type: integer
          description: Tag IDs, max 10.
        fields:
          type: array
          description: Custom field values.
          items:
            type: object
        cover:
          type: object
          properties:
            coverId:
              type: integer
            coverPick:
              type: string
              example: recent
        placeBefore:
          type: array
          items:
            type: string
          description: Encoded IDs of tasks to place this one before (create only).
      required:
        - name
    Task:
      type: object
      properties:
        id:
          type: string
          example: ev:9876543210
        name:
          type: string
          example: Task Name
        type:
          type: string
          description: Object kind reported by the source platform.
          example: task
        url:
          type: string
          description: >-
            Link to the task in the source platform. Absent for native Everhour
            tasks.
          example: https://github.com/acme/web/issues/8688
        number:
          type: string
          description: >-
            Issue number or key in the source platform. Absent for native
            Everhour tasks.
          example: ED-774
        projects:
          type: array
          description: List of projects ID
          items:
            type: string
          example:
            - ev:1234567890
        section:
          type:
            - number
            - 'null'
          description: Section ID
          example: 1234
        labels:
          type: array
          items:
            type: string
          example:
            - high
            - bug
        position:
          type: number
          example: 1
        description:
          type:
            - string
            - 'null'
        dueAt:
          type:
            - string
            - 'null'
          description: 'Format: Y-m-d H:i:s'
          example: '2018-03-05 16:00:00'
        dueOn:
          type:
            - string
            - 'null'
          description: 'Due date without a time component. Format: Y-m-d'
          example: '2024-10-31'
        status:
          type: string
          enum:
            - open
            - completed
            - closed
          example: open
        completed:
          type: boolean
          description: >-
            Mirrors `status` — `true` when the task is done in the source
            platform.
          example: false
        completedAt:
          type:
            - string
            - 'null'
          description: 'When the task was completed. Format: Y-m-d H:i:s'
          example: '2024-01-24 14:36:20'
        createdAt:
          type: string
          description: 'Format: Y-m-d H:i:s'
          example: '2023-04-07 13:11:20'
        createdBy:
          type: number
          description: ID of the user who created the task. Native Everhour tasks only.
          example: 1304
        favorite:
          type: boolean
          description: Whether you marked this task as a favorite.
          example: false
        assignees:
          type:
            - array
            - 'null'
          description: >-
            Who the task is assigned to. `null` when the source platform reports
            no assignee data, and an empty array when the task is unassigned.
          items:
            $ref: '#/components/schemas/TaskAssignee'
        iteration:
          type: string
          description: >-
            Sprint, board column, or section the task sits in, as reported by
            the source platform.
          example: In Progress
        color:
          type: string
          description: Task color as a hex value. Native Everhour tasks only.
          example: '#edacc7'
        comments:
          type: number
          description: Number of comments on the task.
          example: 1
        time:
          $ref: '#/components/schemas/TaskTime'
        estimate:
          $ref: '#/components/schemas/TaskEstimate'
        attributes:
          type: object
          description: Custom attributes from integration
          additionalProperties:
            type: string
          example:
            Client: Everhour
            Priority: high
        metrics:
          type: object
          description: Custom metrics from integration
          additionalProperties:
            type: number
          example:
            efforts: 42
            expenses: 199
        unbillable:
          type: boolean
          description: '`true` when the task is marked as non-billable.'
          example: false
      required:
        - id
        - name
        - projects
    TaskAssignee:
      type: object
      description: >-
        A task assignee. Integration tasks report the account from the source
        platform; native Everhour tasks return `userId` only.
      properties:
        userId:
          type: number
          description: >-
            Everhour user ID. Present when the platform account is linked to a
            team member.
          example: 1304
        accountId:
          type: string
          description: Account ID in the source platform.
          example: gh:313991
        accountName:
          type: string
          description: Account name in the source platform.
          example: jbender
    TaskTime:
      type: object
      properties:
        total:
          type: number
          description: Total task time in seconds
          example: 7200
        users:
          type: object
          description: Task time per user ID
          additionalProperties:
            type: number
          example:
            '1304': 3600
            '1543': 3600
        timerTime:
          type: number
          description: >-
            Part of `total` that came from timers rather than manual entry, in
            seconds.
          example: 5400
      required:
        - total
        - users
    TaskEstimate:
      type: object
      properties:
        total:
          type: number
          description: Total task estimate in seconds
          example: 7200
        type:
          type: string
          enum:
            - overall
            - users
          example: overall
        users:
          type: object
          description: Task estimate per user ID
          additionalProperties:
            type: number
          example:
            '1304': 3600
            '1543': 3600
      required:
        - total
        - type
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

````

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