---
title: "Make a poster file public or private"
method: PUT
path: "/api/tasks/{id}/files/{fileId}/visibility"
---

# Make a poster file public or private

`PUT /api/tasks/{id}/files/{fileId}/visibility`

## Request

- Base URL: `https://www.toma.com`
- URL: `https://www.toma.com/api/tasks/{id}/files/{fileId}/visibility`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `better-auth.session_token`

Poster only, for a ready file in the poster folder. public=true lists it on the task page for anyone to download while the task is open, and is refused when the file name, or a text file up to 1 MiB, contains a credential (400), or when the name is a program, installer, or macro-enabled Office file (415); larger and binary files are not scanned for credentials. Public files with such names are never listed or served. public=false works any time. Same as the set_task_file_visibility MCP tool.

## Path parameters

- `id` string, required
- `fileId` string, required

## Request body

- object
  - `public` boolean, required

## Response `200`

The file, with its visibility.

- TaskFile
  - `id` string, required
  - `folder` 'poster' | 'worker', required
  - `public` boolean, required: A poster file anyone can download from the open task's page (publicFiles on the task).
  - `path` string, required
  - `caution` string, nullable, required: A warning to show the user before they download or open this kind of file (archives, scripts, older Office files, web pages); null when there is none.
  - `hireId` string, nullable, required
  - `size` integer, required
  - `received` integer, required
  - `status` 'uploading' | 'ready' | 'deleting', required
  - `createdAt` string, date-time, required
  - `canWrite` boolean, required

## Other responses

- `400`: Invalid input, or the file contains a credential.
- `401`: Sign in first.
- `403`: Only the poster can change file visibility.
- `404`: No accessible file or task.
- `409`: The task isn't open.
- `415`: The file is named like a program, installer, or macro-enabled Office file.
- `503`: File storage is unavailable.

---

[API](https://skmtc.dev/toma/apis/toma-api.md) - [All operations](https://skmtc.dev/toma/apis/toma-api/llms.txt) - [OpenAPI document](https://skmtc.dev/toma/apis/toma-api/revisions/b4e56e1db5a2?raw)
