Lightfield Tasks API

The Tasks API from Lightfield — 3 operation(s) for tasks.

OpenAPI Specification

lightfield-tasks-api-openapi.yml Raw ↑
openapi: 3.1.1
info:
  title: API Reference Accounts Tasks API
  version: 0.0.0
tags:
- name: Tasks
paths:
  /v1/tasks/definitions:
    get:
      operationId: task.definitions
      summary: Get task field definitions
      description: 'Returns the schema for the field and relationship definitions available on tasks. Useful for understanding the shape of task data before creating or updating records. See <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for more details.


        **[Required scope](/using-the-api/scopes/):** `tasks:read`


        **[Rate limit category](/using-the-api/rate-limits/):** Read'
      security:
      - bearerAuth: []
      parameters:
      - name: Lightfield-Version
        in: header
        required: true
        description: Required API version header. Requests may error without it.
        schema:
          type: string
          enum:
          - '2026-03-01'
          default: '2026-03-01'
        example: '2026-03-01'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskDefinitionsResponse'
        '400':
          description: '400'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
        '401':
          description: '401'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '403':
          description: '403'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: '404'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '409':
          description: '409'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictError'
        '415':
          description: '415'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnsupportedMediaTypeError'
        '422':
          description: '422'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableContentError'
        '429':
          description: '429'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: '500'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
        '503':
          description: '503'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableError'
        '504':
          description: '504'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayTimeoutError'
      tags:
      - Tasks
  /v1/tasks:
    post:
      operationId: task.create
      summary: Create a task
      description: 'Creates a new task record. The `$title` and `$status` fields and the `$assignedTo` relationship are required.


        If `$createdBy` is omitted it defaults to the authenticated user. The `$note` relationship is read-only — manage notes via their own relationships.


        Supports idempotency via the `Idempotency-Key` header.


        **[Required scope](/using-the-api/scopes/):** `tasks:create`


        **[Rate limit category](/using-the-api/rate-limits/):** Write'
      security:
      - bearerAuth: []
      parameters:
      - name: Lightfield-Version
        in: header
        required: true
        description: Required API version header. Requests may error without it.
        schema:
          type: string
          enum:
          - '2026-03-01'
          default: '2026-03-01'
        example: '2026-03-01'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                fields:
                  type: object
                  properties:
                    $title:
                      type: string
                      description: Title of the task.
                    $status:
                      type: string
                      description: 'Task status. One of: `TODO`, `IN_PROGRESS`, `COMPLETE`, `CANCELLED`.'
                    $description:
                      anyOf:
                      - type: string
                      - type: 'null'
                      description: Description of the task in markdown format.
                    $dueAt:
                      anyOf:
                      - type: string
                      - type: 'null'
                      description: Due date as an ISO 8601 datetime string.
                  required:
                  - $title
                  - $status
                  additionalProperties: false
                  description: 'Field values for the new task. Tasks only support the documented system fields, all prefixed with `$` (e.g. `$title`, `$status`). Required: `$title` (string) and `$status` (one of `TODO`, `IN_PROGRESS`, `COMPLETE`, `CANCELLED`). Call the <u>[definitions endpoint](/api/resources/task/methods/definitions)</u> to discover the available fields. See <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for value type details.'
                relationships:
                  title: TaskCreateRelationships
                  oneOf:
                  - type: object
                    properties:
                      $account:
                        anyOf:
                        - type: string
                        - type: array
                          items:
                            type: string
                        description: ID of the account this task belongs to.
                      $assignedTo:
                        anyOf:
                        - type: string
                        - type: array
                          items:
                            type: string
                        description: ID of the member this task is assigned to.
                      $opportunity:
                        anyOf:
                        - type: string
                        - type: array
                          items:
                            type: string
                        description: ID of the opportunity this task is associated with.
                      $createdBy:
                        anyOf:
                        - type: string
                        - type: array
                          items:
                            type: string
                        description: ID of the member who created this task. Defaults to the authenticated user.
                    required:
                    - $assignedTo
                    additionalProperties:
                      anyOf:
                      - type: string
                      - type: array
                        items:
                          type: string
                      description: A single entity ID or an array of entity IDs.
                    title: TaskCreateRelationshipsTyped
                    x-stainless-skip:
                    - typescript
                    - python
                    - go
                    - java
                    x-stainless-variantName: typed
                  - title: TaskCreateRelationshipsUntyped
                    type: object
                    additionalProperties:
                      anyOf:
                      - type: string
                      - type: array
                        items:
                          type: string
                      description: A single entity ID or an array of entity IDs.
                    x-stainless-skip:
                    - cli
                    x-stainless-variantName: untyped
                  description: Relationships to set on the new task. System relationships use a `$` prefix (e.g. `$account`, `$assignedTo`); custom relationships use their bare slug. `$assignedTo` is required. Each value is a single entity ID or an array of IDs. Call the <u>[definitions endpoint](/api/resources/task/methods/definitions)</u> to list available relationship keys.
              required:
              - fields
              - relationships
              additionalProperties: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskCreateResponse'
        '400':
          description: '400'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
        '401':
          description: '401'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '403':
          description: '403'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: '404'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '409':
          description: '409'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictError'
        '415':
          description: '415'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnsupportedMediaTypeError'
        '422':
          description: '422'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableContentError'
        '429':
          description: '429'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: '500'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
        '503':
          description: '503'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableError'
        '504':
          description: '504'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayTimeoutError'
      tags:
      - Tasks
    get:
      operationId: task.list
      summary: List tasks
      description: 'Returns a paginated list of tasks. Use `offset` and `limit` to paginate through results. See <u>[List endpoints](/using-the-api/list-endpoints/)</u> for more information about pagination.


        **[Required scope](/using-the-api/scopes/):** `tasks:read`


        **[Rate limit category](/using-the-api/rate-limits/):** Search'
      security:
      - bearerAuth: []
      parameters:
      - name: Lightfield-Version
        in: header
        required: true
        description: Required API version header. Requests may error without it.
        schema:
          type: string
          enum:
          - '2026-03-01'
          default: '2026-03-01'
        example: '2026-03-01'
      - name: offset
        in: query
        schema:
          type: integer
          minimum: 0
          maximum: 9007199254740991
          description: Number of records to skip for pagination. Defaults to 0.
        allowEmptyValue: true
        allowReserved: true
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 9007199254740991
          description: Maximum number of records to return. Defaults to 25, maximum 25.
        allowEmptyValue: true
        allowReserved: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskListResponse'
        '400':
          description: '400'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
        '401':
          description: '401'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '403':
          description: '403'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: '404'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '409':
          description: '409'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictError'
        '415':
          description: '415'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnsupportedMediaTypeError'
        '422':
          description: '422'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableContentError'
        '429':
          description: '429'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: '500'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
        '503':
          description: '503'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableError'
        '504':
          description: '504'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayTimeoutError'
      tags:
      - Tasks
  /v1/tasks/{id}:
    post:
      operationId: task.update
      summary: Update a task
      description: 'Updates an existing task by ID. Only included fields and relationships are modified.


        The `$note` relationship is read-only — manage notes via their own relationships.


        Supports idempotency via the `Idempotency-Key` header.


        **[Required scope](/using-the-api/scopes/):** `tasks:update`


        **[Rate limit category](/using-the-api/rate-limits/):** Write'
      security:
      - bearerAuth: []
      parameters:
      - name: Lightfield-Version
        in: header
        required: true
        description: Required API version header. Requests may error without it.
        schema:
          type: string
          enum:
          - '2026-03-01'
          default: '2026-03-01'
        example: '2026-03-01'
      - name: id
        in: path
        required: true
        schema:
          type: string
          description: Unique identifier of the task to update.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                fields:
                  type: object
                  properties:
                    $title:
                      anyOf:
                      - type: string
                      - type: 'null'
                      description: Title of the task.
                    $status:
                      anyOf:
                      - type: string
                      - type: 'null'
                      description: 'Task status. One of: `TODO`, `IN_PROGRESS`, `COMPLETE`, `CANCELLED`.'
                    $description:
                      anyOf:
                      - type: string
                      - type: 'null'
                      description: Description of the task in markdown format.
                    $dueAt:
                      anyOf:
                      - type: string
                      - type: 'null'
                      description: Due date as an ISO 8601 datetime string.
                  additionalProperties: false
                  description: Field values to update — only provided fields are modified; omitted fields are left unchanged. Tasks only support the documented system fields, all prefixed with `$` (e.g. `$title`, `$status`). Call the <u>[definitions endpoint](/api/resources/task/methods/definitions)</u> for available fields. See <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for value type details.
                relationships:
                  title: TaskUpdateRelationships
                  oneOf:
                  - type: object
                    properties:
                      $account:
                        type: object
                        properties:
                          add:
                            anyOf:
                            - type: string
                            - type: array
                              items:
                                type: string
                            description: Entity ID(s) to add to the relationship.
                          remove:
                            anyOf:
                            - type: string
                            - type: array
                              items:
                                type: string
                            description: Entity ID(s) to remove from the relationship.
                          replace:
                            anyOf:
                            - anyOf:
                              - type: string
                              - type: array
                                items:
                                  type: string
                              description: A single entity ID or an array of entity IDs.
                            - type: 'null'
                            description: Entity ID(s) to set as the relationship replacement, or null to clear supported relationships.
                        additionalProperties: false
                        description: Operation to modify the task account.
                      $assignedTo:
                        type: object
                        properties:
                          add:
                            anyOf:
                            - type: string
                            - type: array
                              items:
                                type: string
                            description: Entity ID(s) to add to the relationship.
                          remove:
                            anyOf:
                            - type: string
                            - type: array
                              items:
                                type: string
                            description: Entity ID(s) to remove from the relationship.
                          replace:
                            anyOf:
                            - anyOf:
                              - type: string
                              - type: array
                                items:
                                  type: string
                              description: A single entity ID or an array of entity IDs.
                            - type: 'null'
                            description: Entity ID(s) to set as the relationship replacement, or null to clear supported relationships.
                        additionalProperties: false
                        description: Operation to modify the assigned member.
                      $opportunity:
                        type: object
                        properties:
                          add:
                            anyOf:
                            - type: string
                            - type: array
                              items:
                                type: string
                            description: Entity ID(s) to add to the relationship.
                          remove:
                            anyOf:
                            - type: string
                            - type: array
                              items:
                                type: string
                            description: Entity ID(s) to remove from the relationship.
                          replace:
                            anyOf:
                            - anyOf:
                              - type: string
                              - type: array
                                items:
                                  type: string
                              description: A single entity ID or an array of entity IDs.
                            - type: 'null'
                            description: Entity ID(s) to set as the relationship replacement, or null to clear supported relationships.
                        additionalProperties: false
                        description: Operation to modify the associated opportunity.
                    additionalProperties:
                      type: object
                      properties:
                        add:
                          anyOf:
                          - type: string
                          - type: array
                            items:
                              type: string
                          description: Entity ID(s) to add to the relationship.
                        remove:
                          anyOf:
                          - type: string
                          - type: array
                            items:
                              type: string
                          description: Entity ID(s) to remove from the relationship.
                        replace:
                          anyOf:
                          - anyOf:
                            - type: string
                            - type: array
                              items:
                                type: string
                            description: A single entity ID or an array of entity IDs.
                          - type: 'null'
                          description: Entity ID(s) to set as the relationship replacement, or null to clear supported relationships.
                      additionalProperties: false
                      description: An operation to modify a relationship. Provide one of `add`, `remove`, or `replace`.
                    title: TaskUpdateRelationshipsTyped
                    x-stainless-skip:
                    - typescript
                    - python
                    - go
                    - java
                    x-stainless-variantName: typed
                  - title: TaskUpdateRelationshipsUntyped
                    type: object
                    additionalProperties:
                      type: object
                      properties:
                        add:
                          anyOf:
                          - type: string
                          - type: array
                            items:
                              type: string
                          description: Entity ID(s) to add to the relationship.
                        remove:
                          anyOf:
                          - type: string
                          - type: array
                            items:
                              type: string
                          description: Entity ID(s) to remove from the relationship.
                        replace:
                          anyOf:
                          - anyOf:
                            - type: string
                            - type: array
                              items:
                                type: string
                            description: A single entity ID or an array of entity IDs.
                          - type: 'null'
                          description: Entity ID(s) to set as the relationship replacement, or null to clear supported relationships.
                      additionalProperties: false
                      description: An operation to modify a relationship. Provide one of `add`, `remove`, or `replace`.
                    x-stainless-skip:
                    - cli
                    x-stainless-variantName: untyped
                  description: Relationship operations to apply. System relationships use a `$` prefix (e.g. `$account`, `$assignedTo`). Each value is an operation object with `add`, `remove`, or `replace`.
              additionalProperties: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskUpdateResponse'
        '400':
          description: '400'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
        '401':
          description: '401'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '403':
          description: '403'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: '404'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '409':
          description: '409'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictError'
        '415':
          description: '415'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnsupportedMediaTypeError'
        '422':
          description: '422'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableContentError'
        '429':
          description: '429'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: '500'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
        '503':
          description: '503'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableError'
        '504':
          description: '504'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayTimeoutError'
      tags:
      - Tasks
    get:
      operationId: task.retrieve
      summary: Retrieve a task
      description: 'Retrieves a single task by its ID.


        **[Required scope](/using-the-api/scopes/):** `tasks:read`


        **[Rate limit category](/using-the-api/rate-limits/):** Read'
      security:
      - bearerAuth: []
      parameters:
      - name: Lightfield-Version
        in: header
        required: true
        description: Required API version header. Requests may error without it.
        schema:
          type: string
          enum:
          - '2026-03-01'
          default: '2026-03-01'
        example: '2026-03-01'
      - name: id
        in: path
        required: true
        schema:
          type: string
          description: Unique identifier of the task to retrieve.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskRetrieveResponse'
        '400':
          description: '400'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
        '401':
          description: '401'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '403':
          description: '403'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: '404'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '409':
          description: '409'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictError'
        '415':
          description: '415'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnsupportedMediaTypeError'
        '422':
          description: '422'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableContentError'
        '429':
          description: '429'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: '500'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
        '503':
          description: '503'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableError'
        '504':
          description: '504'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayTimeoutError'
      tags:
      - Tasks
components:
  schemas:
    TaskCreateResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the entity.
        createdAt:
          type: string
          description: ISO 8601 timestamp of when the entity was created.
        updatedAt:
          anyOf:
          - type: string
          - type: 'null'
          description: ISO 8601 timestamp of when the entity was last updated, or null.
        httpLink:
          anyOf:
          - type: string
          - type: 'null'
          description: URL to view the entity in the Lightfield web app, or null.
        externalId:
          anyOf:
          - type: string
          - type: 'null'
          description: External identifier for the entity, or null if unset.
        fields:
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type: object
            properties:
              valueType:
                enum:
                - ADDRESS
                - CHECKBOX
                - CURRENCY
                - DATETIME
                - EMAIL
                - FULL_NAME
                - MARKDOWN
                - MULTI_SELECT
                - NUMBER
                - SINGLE_SELECT
                - SOCIAL_HANDLE
                - TELEPHONE
                - TEXT
                - URL
                - HTML
                description: The data type of the field.
              value:
                anyOf:
                - type: string
                - type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                - type: number
                - type: boolean
                - type: 'null'
                - type: array
                  items:
                    type: string
                - $ref: '#/components/schemas/Address'
                - $ref: '#/components/schemas/FullName'
                description: The field value, or null if unset.
            required:
            - valueType
            - value
          description: Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug.
        relationships:
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type: object
            properties:
              cardinality:
                type: string
                description: Whether the relationship is `has_one` or `has_many`.
          

# --- truncated at 32 KB (51 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/lightfield/refs/heads/main/openapi/lightfield-tasks-api-openapi.yml