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

> Create a schedule assignment. To create time-off use `POST /resource-planner/assignments/time-off` instead.



## OpenAPI

````yaml /openapi.json post /resource-planner/assignments
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:
  /resource-planner/assignments:
    post:
      tags:
        - Schedule
      summary: Create Assignment
      description: >-
        Create a schedule assignment. To create time-off use `POST
        /resource-planner/assignments/time-off` instead.
      operationId: createAssignment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssignmentRequestCreateRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Assignment'
        '401':
          description: Unauthorized
components:
  schemas:
    AssignmentRequestCreateRequest:
      type: object
      properties:
        user:
          type: integer
          example: 79786
        project:
          type: string
          description: Project encoded ID
          example: as:981141080110246
        task:
          type: string
          description: Task encoded ID
        client:
          type: integer
          description: Client ID
        type:
          type: string
          enum:
            - project
            - client
            - task
            - time-off
          example: project
        startDate:
          type: string
          description: 'Format: Y-m-d'
          example: '2019-01-21'
        endDate:
          type: string
          description: 'Format: Y-m-d'
          example: '2019-02-01'
        time:
          type: integer
          description: Scheduled time in seconds
          example: 252000
        note:
          type: string
          description: Max 1000 chars
        includeWeekends:
          type: boolean
        color:
          type: string
          description: 'Hex color #rrggbb'
        sendNotification:
          type: boolean
        forceOverride:
          type: boolean
          example: true
        timeOffType:
          type: string
          description: Time-off type (only when type is `time-off`).
        timeOffPeriod:
          type: string
          enum:
            - full-day
            - half-of-day
            - quarter-of-day
            - half-and-quarter-of-day
          description: Time-off period (only when type is `time-off`).
        status:
          type: string
          enum:
            - pending
            - approved
          description: Time-off approval status (only when type is `time-off`).
        users:
          type: array
          items:
            type: integer
          description: Create the same schedule for multiple users (create only).
          example:
            - 79786
            - 80012
        reviewer:
          type: integer
          description: Reviewer user ID for time-off (create only).
      required:
        - startDate
        - endDate
    Assignment:
      type: object
      properties:
        days:
          type: number
          description: Number of workdays
          example: 10
        endDate:
          type: string
          example: '2019-02-01'
        id:
          type: number
          example: 41827
        project:
          type: string
          example: as:981141080110246
        startDate:
          type: string
          example: '2019-01-21'
        time:
          type: number
          description: Scheduled time in seconds
          example: 252000
        type:
          type: string
          enum:
            - project
            - time-off
          example: project
        user:
          type: number
          example: 79786
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

````