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

# Create a task for a company

> Creates a task linked to the company. Assignees and the reviewer get a notification.



## OpenAPI

````yaml /openapi/records.yaml post /companies/{id}/tasks
openapi: 3.1.0
info:
  title: Connie Records API
  version: 1.0.0
  description: >
    Endpoints the Connie web app uses for records. They authenticate with your
    signed-in browser session — see
    https://docs.connie.ai/api-reference/authentication. These are the app's own
    endpoints and can change when the app changes.
servers:
  - url: https://connie.ai/api
security:
  - sessionCookie: []
tags:
  - name: Lists
    description: Lists of records on an object, and the records in them.
  - name: People
    description: Find, match and create records on the People object.
  - name: Companies
    description: Find and create records on the Companies object.
  - name: Notes
    description: Notes on a person.
  - name: Tasks
    description: Tasks linked to a person or a company, and their comments.
paths:
  /companies/{id}/tasks:
    post:
      tags:
        - Tasks
      summary: Create a task for a company
      description: >-
        Creates a task linked to the company. Assignees and the reviewer get a
        notification.
      operationId: createCompanyTask
      parameters:
        - $ref: '#/components/parameters/CompanyId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/TaskInput'
                - type: object
                  required:
                    - workspaceId
                    - title
      responses:
        '200':
          description: The new task.
          content:
            application/json:
              schema:
                type: object
                properties:
                  task:
                    $ref: '#/components/schemas/Task'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  parameters:
    CompanyId:
      name: id
      in: path
      required: true
      description: The company's record id.
      schema:
        type: string
        format: uuid
  schemas:
    TaskInput:
      type: object
      properties:
        workspaceId:
          type: string
          format: uuid
        title:
          type: string
          maxLength: 500
        description:
          type: string
          maxLength: 10000
        status:
          type: string
          enum:
            - not_started
            - in_progress
            - completed
            - on_hold
            - blocked
            - cancelled
          description: Defaults to `not_started` on create.
        priority:
          type: string
          enum:
            - low
            - medium
            - high
            - urgent
        dueDate:
          type: string
          description: Due date as an ISO date or date-time.
        assignedTo:
          type: string
          description: Assignee user id. Several assignees are sent as comma-separated ids.
        reviewerId:
          type: string
          format: uuid
        tags:
          type: array
          maxItems: 20
          items:
            type: string
    Task:
      type: object
      properties:
        id:
          type: string
          format: uuid
        workspace_id:
          type: string
          format: uuid
        contact_id:
          type:
            - string
            - 'null'
          format: uuid
        company_id:
          type:
            - string
            - 'null'
          format: uuid
        title:
          type: string
        description:
          type:
            - string
            - 'null'
        status:
          type: string
          enum:
            - not_started
            - in_progress
            - completed
            - on_hold
            - blocked
            - cancelled
        priority:
          type: string
        due_date:
          type:
            - string
            - 'null'
        completed_date:
          type:
            - string
            - 'null'
        assigned_to:
          type:
            - string
            - 'null'
          description: Assignee user id, or comma-separated ids.
        reviewer_id:
          type:
            - string
            - 'null'
        tags:
          type: array
          items:
            type: string
        created_by:
          type:
            - string
            - 'null'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: string
          description: Human-readable message.
        code:
          type: string
          description: Machine-readable code, when there is one.
      required:
        - error
  responses:
    BadRequest:
      description: A required field is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: >-
        No valid session (`UNAUTHORIZED`), or the session has expired
        (`SESSION_EXPIRED`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: You aren't a member of the workspace or don't have access to this item.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    sessionCookie:
      type: apiKey
      in: header
      name: Cookie
      description: >-
        The full Cookie header copied from a signed-in connie.ai browser
        request. See the Authentication page.

````

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