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

# Set Subscribers

> Replace all subscribers on a task with the given provider IDs.



## OpenAPI

````yaml put /task/{task_id}/subscribers
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /task/{task_id}/subscribers:
    put:
      tags:
        - Tasks
      summary: Set Subscribers
      description: Replace all subscribers on a task with the given provider IDs.
      operationId: set_subscribers_task__task_id__subscribers_put
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
        - name: task_id
          in: path
          required: true
          schema:
            type: string
            title: Task Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscriberSetRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskDetail'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SubscriberSetRequest:
      properties:
        providerIds:
          items:
            type: string
          type: array
          title: Providerids
          description: Provider IDs to set as subscribers
      type: object
      required:
        - providerIds
      title: SubscriberSetRequest
    TaskDetail:
      properties:
        id:
          type: string
          title: Id
        title:
          type: string
          title: Title
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        status:
          $ref: '#/components/schemas/TaskStatus'
        priority:
          $ref: '#/components/schemas/TaskPriority'
        startDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Startdate
        dueDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Duedate
        patientId:
          anyOf:
            - type: string
            - type: 'null'
          title: Patientid
        opportunityId:
          anyOf:
            - type: string
            - type: 'null'
          title: Opportunityid
        assigneeId:
          anyOf:
            - type: string
            - type: 'null'
          title: Assigneeid
        teamId:
          anyOf:
            - type: string
            - type: 'null'
          title: Teamid
        locationId:
          anyOf:
            - type: string
            - type: 'null'
          title: Locationid
        targetNoteId:
          anyOf:
            - type: string
            - type: 'null'
          title: Targetnoteid
        targetFaxId:
          anyOf:
            - type: string
            - type: 'null'
          title: Targetfaxid
        targetDocumentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Targetdocumentid
        creatorId:
          type: string
          title: Creatorid
        completedById:
          anyOf:
            - type: string
            - type: 'null'
          title: Completedbyid
        completedDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completeddate
        createdDate:
          type: string
          format: date-time
          title: Createddate
        updatedDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updateddate
        patient:
          anyOf:
            - $ref: '#/components/schemas/PatientRef'
            - type: 'null'
        assignee:
          anyOf:
            - $ref: '#/components/schemas/ProviderTiny'
            - type: 'null'
        team:
          anyOf:
            - $ref: '#/components/schemas/TeamRef'
            - type: 'null'
        creator:
          anyOf:
            - $ref: '#/components/schemas/ProviderTiny'
            - type: 'null'
        carePlan:
          anyOf:
            - $ref: '#/components/schemas/CarePlanStepTiny'
            - type: 'null'
        comments:
          items:
            $ref: '#/components/schemas/TaskCommentDetail'
          type: array
          title: Comments
        subscribers:
          items:
            $ref: '#/components/schemas/SubscriberDetail'
          type: array
          title: Subscribers
        linkedCalls:
          items:
            $ref: '#/components/schemas/LinkedCallRef'
          type: array
          title: Linkedcalls
      type: object
      required:
        - id
        - title
        - status
        - priority
        - creatorId
        - createdDate
      title: TaskDetail
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TaskStatus:
      type: string
      enum:
        - OPEN
        - IN_PROGRESS
        - COMPLETED
        - CANCELLED
      title: TaskStatus
    TaskPriority:
      type: string
      enum:
        - URGENT
        - HIGH
        - NORMAL
        - LOW
      title: TaskPriority
    PatientRef:
      properties:
        id:
          type: string
          title: Id
        firstName:
          anyOf:
            - type: string
            - type: 'null'
          title: Firstname
        lastName:
          anyOf:
            - type: string
            - type: 'null'
          title: Lastname
      type: object
      required:
        - id
      title: PatientRef
      description: Minimal patient reference for task display (id and name only).
    ProviderTiny:
      properties:
        id:
          type: string
          title: Id
        firstName:
          type: string
          title: Firstname
        lastName:
          anyOf:
            - type: string
            - type: 'null'
          title: Lastname
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        createdDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Createddate
      type: object
      required:
        - id
        - firstName
      title: ProviderTiny
    TeamRef:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
      type: object
      required:
        - id
        - name
      title: TeamRef
      description: Minimal team reference for task display.
    CarePlanStepTiny:
      properties:
        carePlanId:
          type: string
          title: Careplanid
        stepNumber:
          type: integer
          title: Stepnumber
        carePlanName:
          type: string
          title: Careplanname
        status:
          type: string
          title: Status
      type: object
      required:
        - carePlanId
        - stepNumber
        - carePlanName
        - status
      title: CarePlanStepTiny
      description: Minimal care-plan step reference for task/event display.
    TaskCommentDetail:
      properties:
        id:
          type: string
          title: Id
        taskId:
          type: string
          title: Taskid
        authorId:
          anyOf:
            - type: string
            - type: 'null'
          title: Authorid
        content:
          type: string
          title: Content
        createdDate:
          type: string
          format: date-time
          title: Createddate
        updatedDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updateddate
        author:
          anyOf:
            - $ref: '#/components/schemas/ProviderTiny'
            - type: 'null'
      type: object
      required:
        - id
        - taskId
        - content
        - createdDate
      title: TaskCommentDetail
    SubscriberDetail:
      properties:
        id:
          type: string
          title: Id
        providerId:
          anyOf:
            - type: string
            - type: 'null'
          title: Providerid
        teamId:
          anyOf:
            - type: string
            - type: 'null'
          title: Teamid
        createdDate:
          type: string
          format: date-time
          title: Createddate
        provider:
          anyOf:
            - $ref: '#/components/schemas/ProviderTiny'
            - type: 'null'
        team:
          anyOf:
            - $ref: '#/components/schemas/TeamRef'
            - type: 'null'
      type: object
      required:
        - id
        - createdDate
      title: SubscriberDetail
    LinkedCallRef:
      properties:
        id:
          type: string
          title: Id
        createdDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Createddate
      type: object
      required:
        - id
      title: LinkedCallRef
      description: Minimal call reference for task detail context.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````