# Get tasks by ids

> Get tasks by ids. Requires a Bearer session and a valid Bearer session.

`POST /tasks/profiles/{studioId}/by-ids`

## OpenAPI

````yaml openapi/agata-v1.yaml post /tasks/profiles/{studioId}/by-ids
openapi: 3.0.3
info:
  title: Agata canonical API
  version: 1.0.0
  description: Canonical contract of the Agata Go API. Every documented route is
    registered in internal/delivery/http/handler.go. Monetary amounts are
    expressed in cents and local date keys use YYYY-MM-DD.
servers:
  - url: http://localhost:{port}/api
    description: Local server
    variables:
      port:
        default: "8080"
        description: Local HTTP port
  - url: "{scheme}://{host}/api"
    description: Configurable server
    variables:
      scheme:
        default: https
        enum:
          - http
          - https
      host:
        default: api.example.com
tags:
  - name: Health check
    description: Health-check operations.
  - name: Users
    description: Users domain operations.
  - name: Profiles
    description: Studio domain operations.
  - name: Organizations
    description: Company accounts that own people and Studios. Not followable.
  - name: Public profiles
    description: Public studio reads and one-way follows. Membership is not required.
  - name: Membership
    description: Studio membership plans, Connect status, and fan subscriptions.
  - name: Messages
    description: 1:1 owner chat between a studio owner and a subscriber with the
      owner_chat perk.
  - name: Feedback
    description: Feedback domain operations.
  - name: Internal system
    description: Internal system operations.
  - name: AI capabilities
    description: Durable leases, outcomes, and reversible effects for integrated AI actions.
  - name: Finance
    description: Finance domain operations.
  - name: Goals
    description: Goals domain operations.
  - name: Pomodoro
    description: Pomodoro domain operations.
  - name: Activities
    description: Activities domain operations.
  - name: Calendar
    description: Calendar domain operations.
  - name: Library
    description: Library domain operations.
  - name: Health
    description: Health domain operations.
  - name: Nutrition
    description: Nutrition domain operations.
  - name: Notebook
    description: Notebook domain operations.
  - name: Week plan
    description: Week-plan domain operations.
  - name: Files
    description: Files domain operations.
  - name: Tags
    description: Tags domain operations.
  - name: Tasks
    description: Tasks domain operations.
  - name: Projects
    description: Projects domain operations.
  - name: Internal
    description: Internal integrations protected by Bearer session.
  - name: Internal cron
    description: Internal cron operations.
paths:
  /tasks/profiles/{studioId}/by-ids:
    post:
      tags:
        - Tasks
      operationId: getTasksByIDs
      summary: Get tasks by ids
      description: Get tasks by ids. Requires a Bearer session and a valid Bearer session.
      security:
        - sessionBearer: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TasksBulkTaskIDsInput"
            example:
              taskIds: []
      responses:
        "200":
          description: OK.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/TasksTaskListItem"
                  request_id:
                    type: string
                    format: uuid
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "409":
          $ref: "#/components/responses/Conflict"
        "429":
          $ref: "#/components/responses/RateLimited"
        "500":
          $ref: "#/components/responses/ServerError"
      parameters:
        - name: studioId
          in: path
          required: true
          description: Identifier or key studioId.
          schema:
            type: string
components:
  schemas:
    TasksBulkTaskIDsInput:
      type: object
      properties:
        taskIds:
          type: array
          items:
            type: string
            format: uuid
          example: []
      required:
        - taskIds
    TasksProjectSummary:
      type: object
      properties:
        id:
          type: string
          example: 11111111-1111-4111-8111-111111111111
        name:
          type: string
          example: Example
        color:
          type: string
          example: "#3B82F6"
      required:
        - id
        - name
    TasksSubtaskSummary:
      type: object
      properties:
        total:
          type: integer
          format: int32
          example: 1
        completed:
          type: integer
          format: int32
          example: 1
        open:
          type: integer
          format: int32
          example: 1
      required:
        - total
        - completed
        - open
    TasksTagSummary:
      type: object
      properties:
        id:
          type: string
          example: 11111111-1111-4111-8111-111111111111
        name:
          type: string
          example: Example
        color:
          type: string
          example: "#3B82F6"
      required:
        - id
        - name
    TasksTask:
      type: object
      properties:
        id:
          type: string
          example: 11111111-1111-4111-8111-111111111111
        studioId:
          type: string
          example: 11111111-1111-4111-8111-111111111111
        projectId:
          type: string
          example: 11111111-1111-4111-8111-111111111111
        parentTaskId:
          type: string
          format: uuid
          description: Parent task when this resource is a first-level subtask.
          example: 11111111-1111-4111-8111-111111111111
        parentTaskName:
          type: string
          description: Parent task name for contextual navigation.
          example: Plan de lanzamiento
        name:
          type: string
          example: Example
        status:
          type: string
          enum:
            - todo
            - in_progress
            - done
            - canceled
          example: todo
        priority:
          type: string
          example: medium
        dueDate:
          type: string
          format: date-time
          example: 2026-01-01T12:00:00Z
        dueDateKey:
          type: string
          example: 2026-01-01
        createdBy:
          type: string
          example: example
        assignedTo:
          type: array
          items:
            type: string
          example: []
        isFavorite:
          type: boolean
          example: false
        completionDate:
          type: string
          format: date-time
          example: 2026-01-01T12:00:00Z
        statusOrder:
          type: integer
          format: int32
          example: 1
        priorityOrder:
          type: integer
          format: int32
          example: 1
        reminderTime:
          type: string
          example: example
        reminderDate:
          type: string
          format: date-time
          example: 2026-01-01T12:00:00Z
        reminderTimeZone:
          type: string
          example: Europe/Madrid
        archivedAt:
          type: string
          format: date-time
          example: 2026-01-01T12:00:00Z
        deletedAt:
          type: string
          format: date-time
          example: 2026-01-01T12:00:00Z
        createdAt:
          type: string
          format: date-time
          example: 2026-01-01T12:00:00Z
        updatedAt:
          type: string
          format: date-time
          example: 2026-01-01T12:00:00Z
        projectName:
          type: string
          example: Example
        subtaskSummary:
          $ref: "#/components/schemas/TasksSubtaskSummary"
          example: {}
      required:
        - id
        - studioId
        - projectId
        - name
        - status
        - priority
        - createdBy
        - isFavorite
        - createdAt
        - updatedAt
        - subtaskSummary
    TasksTaskListItem:
      allOf:
        - $ref: "#/components/schemas/TasksTask"
        - type: object
          properties:
            project:
              $ref: "#/components/schemas/TasksProjectSummary"
              example: {}
            tags:
              type: array
              items:
                $ref: "#/components/schemas/TasksTagSummary"
              example: []
    ErrorDetail:
      type: object
      required:
        - message
      properties:
        code:
          type: string
          example: VALIDATION_ERROR
        message:
          type: string
          example: The request is not valid.
        limit_key:
          type: string
        limit:
          type: integer
        required_plan:
          type: string
          enum:
            - pro
            - business
        resolution:
          type: string
          enum:
            - upgrade_plan
            - purchase_addon
        addon_key:
          type: string
          enum:
            - extra_members
            - ai_credit_packs
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          $ref: "#/components/schemas/ErrorDetail"
        request_id:
          type: string
          format: uuid
  responses:
    BadRequest:
      description: Invalid request.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ErrorResponse"
    Unauthorized:
      description: Missing or invalid authentication.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ErrorResponse"
    Forbidden:
      description: Acceso denegado.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ErrorResponse"
    NotFound:
      description: Recurso no encontrado.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ErrorResponse"
    Conflict:
      description: Conflict with the current state.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ErrorResponse"
    RateLimited:
      description: Request limit exceeded.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ErrorResponse"
    ServerError:
      description: Internal server error.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ErrorResponse"
````
