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

# Submit task response

> Submits or updates a task user response for a business. Tasks only exist for businesses enrolled in bookkeeping services, and task lifecycle management is handled by Layer's bookkeeping team. This endpoint is used by Layer's `<Tasks>` component to submit user responses, and if you use embedded components, you should not need to call this endpoint directly.



## OpenAPI

````yaml post /v1/businesses/{businessId}/tasks/{taskId}/user-response
openapi: 3.0.1
info:
  title: API
  version: latest
servers: []
security:
  - BearerAuth: []
tags: []
externalDocs:
  url: /
paths:
  /v1/businesses/{businessId}/tasks/{taskId}/user-response:
    post:
      tags: []
      summary: Submit task response
      description: >-
        Submits or updates a task user response for a business. Tasks only exist
        for businesses enrolled in bookkeeping services, and task lifecycle
        management is handled by Layer's bookkeeping team. This endpoint is used
        by Layer's `<Tasks>` component to submit user responses, and if you use
        embedded components, you should not need to call this endpoint directly.
      operationId: business.tasks.user-response.post
      parameters:
        - name: businessId
          in: path
          description: The UUID of the business to update
          required: true
          schema:
            type: string
        - name: taskId
          in: path
          description: The UUID of the task to update
          required: true
          schema:
            type: string
        - name: Content-Type
          in: header
          description: Content-Type must be set to application/json
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiBusinessTaskUserResponse'
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiBusinessTask'
        '400':
          description: Invalid task response type.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: >-
            Business id or task id is not found. This indicates the business id
            is invalid or the business has been archived, or the task id is
            invalid or the task has been deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      deprecated: false
components:
  schemas:
    ApiBusinessTaskUserResponse:
      $ref: '#/components/schemas/FreeResponseAnswer'
      type: object
      description: >-
        Base schema for a user response in a business task, allowing for
        different types of responses.
    ApiBusinessTask:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique ID for the task
        user_response_type:
          $ref: '#/components/schemas/TaskUserResponseType'
          description: User response type for the task
        title:
          type: string
          description: Title for the task
          example: This is a demo task
        question:
          type: string
          description: The question asked to the business owner
          example: >-
            On Wednesday, you spent $290.99 on example items. What was this
            purchase for?
        user_response:
          type: string
          nullable: true
          description: The business owner's response to the task
          example: This is my response to the task.
        status:
          $ref: '#/components/schemas/BusinessTaskStatus'
          description: The status of the task
          example: COMPLETED
        transaction_id:
          type: string
          format: uuid
          nullable: true
          description: The transaction the task is related to, if any.
        created_at:
          type: string
          format: date-time
          description: Timestamp of when the task was created
        updated_at:
          type: string
          format: date-time
          description: Timestamp of when the task was last updated
        user_marked_completed_at:
          type: string
          format: date-time
          nullable: true
          description: Timestamp of when the business owner marked the task as completed.
        completed_at:
          type: string
          format: date-time
          nullable: true
          description: Timestamp of when Layer marked the task as completed.
        archived_at:
          type: string
          format: date-time
          nullable: true
          description: Timestamp of when the task was archived.
      required:
        - id
        - user_response_type
        - title
        - question
        - status
        - created_at
        - updated_at
    ApiError:
      type: object
      properties: {}
      example: ''
      description: ''
    FreeResponseAnswer:
      allOf:
        - $ref: '#/components/schemas/ApiBusinessTaskUserResponse'
        - type: object
          properties:
            user_response:
              type: string
              description: The free text response provided by the user.
              example: This is my response to the task.
          required:
            - user_response
            - type
          description: >-
            Describes a free text response to a business task, where the user
            can provide any text as feedback or answer.
    TaskUserResponseType:
      type: string
      enum:
        - FREE_RESPONSE
        - UPLOAD_DOCUMENT
    BusinessTaskStatus:
      type: string
      enum:
        - TODO
        - USER_MARKED_COMPLETED
        - COMPLETED
        - ARCHIVED
        - DELETED
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````