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

# Set Worker Document Viewable

> Sets whether a worker can view a specific document.

<Info>
  Set `worker_viewable` to `1` to allow the worker to see this document, or `0` to hide it.
</Info>


## OpenAPI

````yaml api-reference/v01.12.00/openapi-v01.12.00.json POST /workers/{id}/documents/{document_id}
openapi: 3.0.0
info:
  title: Roosted
  version: 0.1.12
  contact:
    name: Support
    url: https://support.roostedhr.com/support/home
    email: support@roostedhr.com
  description: |-
    Enterprise API

    Sandbox keys and Production keys are requested from support
servers:
  - url: https://api.roostedhr.com/api/1_12
  - url: https://sandbox.roostedhr.com/api/1_12
security:
  - X-API-KEY: []
tags:
  - name: Announcements
  - name: Areas
  - name: Clients
  - name: Company
  - name: Configuration
  - name: Events
  - name: Locations
  - name: Payroll Groups
  - name: Rate Cards
  - name: Shifts
  - name: Skillsets
  - name: Time Tracking
  - name: Wage Rules
  - name: Workers
paths:
  /workers/{id}/documents/{document_id}:
    parameters:
      - schema:
          type: string
        name: id
        in: path
        required: true
        description: Worker ID
      - schema:
          type: string
        name: document_id
        in: path
        required: true
        description: Document ID
    post:
      tags:
        - Workers
      summary: Set Worker Document Viewable
      description: Sets whether a worker can view a specific document.
      operationId: post-worker-document-viewable
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - worker_viewable
              properties:
                worker_viewable:
                  type: integer
                  enum:
                    - 0
                    - 1
                  description: >-
                    Whether the worker can view this document. `1` = viewable,
                    `0` = hidden.
      responses:
        '200':
          description: Viewable status updated successfully
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: WRK-1200
                  error:
                    type: string
                    example: An unexpected error occurred while updating the document.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: ATH-100
                  error:
                    type: string
                    example: Invalid or missing API key.
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: WRK-800
                  error:
                    type: string
                    example: Insufficient permissions to manage workers.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: WRK-1100
                  error:
                    type: string
                    example: Document not found.
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Machine-readable error code.
                  error:
                    type: string
                    description: Human-readable error message.
              examples:
                Failed to create worker:
                  value:
                    code: WRK-200
                    error: Failed to create worker
components:
  securitySchemes:
    X-API-KEY:
      name: X-API-KEY
      type: apiKey
      in: header

````