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

# Add tasks to a stored taskset and take tasks out



## OpenAPI

````yaml https://api.primeintellect.ai/openapi.json patch /api/v1/hub/tasksets/{owner}/{name}/members
openapi: 3.1.0
info:
  title: PI API
  version: 0.1.0
servers:
  - url: https://api.primeintellect.ai
security: []
paths:
  /api/v1/hub/tasksets/{owner}/{name}/members:
    patch:
      tags:
        - Hub
      summary: Add tasks to a stored taskset and take tasks out
      operationId: hub_update_taskset_members
      parameters:
        - name: owner
          in: path
          required: true
          schema:
            type: string
            maxLength: 255
            minLength: 1
            title: Owner
            description: Owning user or team slug
          description: Owning user or team slug
        - name: name
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 255
            description: Taskset name
            title: Name
          description: Taskset name
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TasksetMembersUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TasksetMembersResult'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Unprocessable Entity
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Too Many Requests
      security:
        - HTTPBearer: []
components:
  schemas:
    TasksetMembersUpdate:
      properties:
        task_owner:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Task Owner
          description: >-
            Whose tasks `add` and `remove` name; the taskset's owner when
            omitted
        add:
          items:
            type: string
            maxLength: 400
            pattern: ^[A-Za-z0-9][A-Za-z0-9_.-]*(/[A-Za-z0-9][A-Za-z0-9_.-]*)*$
          type: array
          maxItems: 1000
          title: Add
          description: >-
            Tasks to add, in this order, after the members there are. One that
            is already a member stays where it is
        remove:
          items:
            type: string
            maxLength: 400
            pattern: ^[A-Za-z0-9][A-Za-z0-9_.-]*(/[A-Za-z0-9][A-Za-z0-9_.-]*)*$
          type: array
          maxItems: 1000
          title: Remove
          description: Tasks to take out. One that isn't a member is ignored
        remove_positions:
          items:
            type: integer
            minimum: 1
          type: array
          maxItems: 1000
          title: Remove Positions
          description: >-
            Members to take out by their position in the list: the way to drop a
            member whose task you may not read. A position that holds no member
            is ignored
      additionalProperties: false
      type: object
      title: TasksetMembersUpdate
    TasksetMembersResult:
      properties:
        added:
          type: integer
          title: Added
        removed:
          type: integer
          title: Removed
        member_count:
          type: integer
          title: Member Count
      type: object
      required:
        - added
        - removed
        - member_count
      title: TasksetMembersResult
    ErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
      type: object
      required:
        - error
      title: ErrorEnvelope
    ErrorBody:
      properties:
        code:
          type: string
          title: Code
          description: Stable, machine-readable error code
        message:
          type: string
          title: Message
        details:
          type: object
          title: Details
      type: object
      required:
        - code
        - message
      title: ErrorBody
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````