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

# Create a task

> Creates a task via the Tasks marketplace app installed on the workspace. The request body is validated against the app's registered resource schema and proxied to the app's task API. Requires the Tasks app to be installed.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/tasks
openapi: 3.0.0
info:
  contact: {}
  title: Assembly API
  version: 0.0.1
servers:
  - url: https://api.assembly.com
security: []
paths:
  /v1/tasks:
    post:
      tags:
        - Tasks
      summary: Create a task
      description: >-
        Creates a task via the Tasks marketplace app installed on the workspace.
        The request body is validated against the app's registered resource
        schema and proxied to the app's task API. Requires the Tasks app to be
        installed.
      operationId: create-task
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/marketplace_application.TaskInput'
        description: Task fields
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/marketplace_application.Task'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dispatcher.Error'
          description: Invalid request body for the app resource
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dispatcher.Error'
          description: Missing or invalid API key
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dispatcher.Error'
          description: >-
            App not found, not installed on the workspace, or app resource not
            found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dispatcher.Error'
          description: App API rejected the request as unprocessable
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dispatcher.Error'
          description: App API rate limit exceeded
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dispatcher.Error'
          description: App API request failed or unexpected server error
      security:
        - APIKeyHeader: []
components:
  schemas:
    marketplace_application.TaskInput:
      properties:
        clientId:
          description: >-
            ClientID assigns the task to a client user; CompanyID is required
            when set.
          example: 64734088-94c7-47dd-b2fe-e5ac7e5cfaf4
          type: string
        companyId:
          description: >-
            CompanyID assigns the task to a company; required when assigning to
            a client.
          example: 550e8400-e29b-41d4-a716-446655440000
          type: string
        description:
          description: Description is the optional long-form details of the task.
          example: Write the welcome email for new clients.
          type: string
        dueDate:
          description: DueDate is when the task is due, in RFC 3339 format.
          example: '2025-05-01T16:18:54Z'
          format: date-time
          type: string
        internalUserId:
          description: InternalUserID assigns the task to an internal user.
          example: 64734088-94c7-47dd-b2fe-e5ac7e5cfaf4
          type: string
        isArchived:
          description: >-
            IsArchived archives or unarchives the task. Used when updating a
            task.
          example: false
          type: boolean
        name:
          description: Name is the human-readable name of the task.
          example: Draft the onboarding email
          type: string
        parentTaskId:
          description: ParentTaskID makes this task a subtask of the given parent task.
          example: 550e8400-e29b-41d4-a716-446655440000
          type: string
        status:
          description: 'Status is the task status: one of todo, inProgress, completed.'
          enum:
            - todo
            - inProgress
            - completed
          example: todo
          type: string
        templateId:
          description: TemplateID is the task template to create this task from.
          example: 550e8400-e29b-41d4-a716-446655440000
          type: string
        viewers:
          description: >-
            Viewers grant view access to the task (assignee must be an internal
            user).
          items:
            $ref: '#/components/schemas/marketplace_application.TaskViewer'
          type: array
      type: object
    marketplace_application.Task:
      properties:
        createdAt:
          description: Created is the RFC 3339 timestamp at which the object was created.
          example: '2024-01-15T09:30:00Z'
          format: date-time
          type: string
        deleted:
          description: >-
            Deleted is true when the object has been deleted; present only on
            delete responses.
          example: true
          type: boolean
        description:
          description: Description is the optional long-form details of the task.
          example: Write the welcome email for new clients.
          type: string
        id:
          description: ID is the unique identifier of the object.
          example: 550e8400-e29b-41d4-a716-446655440000
          type: string
        name:
          description: Name is the human-readable title of the task.
          example: Draft the onboarding email
          type: string
        object:
          allOf:
            - $ref: '#/components/schemas/constants.ApiObject'
          description: Object is the type of the object (e.g. "client", "company").
        updatedAt:
          description: >-
            Updated is the RFC 3339 timestamp at which the object was last
            updated.
          example: '2024-02-20T14:05:00Z'
          format: date-time
          type: string
      type: object
    dispatcher.Error:
      properties:
        code:
          type: string
        data: {}
        message:
          type: string
      type: object
    marketplace_application.TaskViewer:
      properties:
        clientId:
          description: >-
            ClientID grants a client viewing access; their CompanyID must also
            be set.
          example: 64734088-94c7-47dd-b2fe-e5ac7e5cfaf4
          type: string
        companyId:
          description: CompanyID grants a company viewing access (leave ClientID empty).
          example: 550e8400-e29b-41d4-a716-446655440000
          type: string
      type: object
    constants.ApiObject:
      enum:
        - client
        - internalUser
        - company
        - customField
        - customFieldOption
        - file
        - fileChannel
        - folder
        - messageChannel
        - message
        - notification
      type: string
      x-enum-varnames:
        - ApiObjectClient
        - ApiObjectInternalUser
        - ApiObjectCompany
        - ApiObjectCustomField
        - ApiObjectCustomFieldOption
        - ApiObjectFile
        - ApiObjectFileChannel
        - ApiObjectFolder
        - ApiObjectMessageChannel
        - ApiObjectMessage
        - ApiObjectNotification
  securitySchemes:
    APIKeyHeader:
      in: header
      name: X-API-KEY
      type: apiKey

````