Change how long a PDF file is kept

Set a new end for a successful job's file: the job's created_at plus retention_days. You can make the time shorter or longer, up to the plan maximum: 365 days on a paid plan, 30 on a free, pack-only, or trial account. The new end must be in the future. A later plan change keeps this choice, except that a smaller plan maximum still shortens it. A job without a live file, such as a queued, failed, deleted, or expired one, returns 404.

patch/v1/pdf/{id}

Request

  • Base URL: https://thirds.ai
  • URL: https://thirds.ai/v1/pdf/{id}
  • Auth: HTTP bearer

Path parameters

idstring required

The job's public identifier, such as "pdf_1f8b3c7d5e2a49061f8b3c7d5e2a4906".

Request body

retention_daysinteger required

Days from the job's created_at. It can't be more than your plan maximum, and the end must be in the future.

Response

The job with its file's new end in artifact.expires_at.

referencestring

Your reference, preserved in the job, history, and webhook. Omitted when not supplied.

idstring required

The job's public identifier: "pdf_" followed by 32 lowercase hexadecimal characters.

status'queued' | 'running' | 'succeeded' | 'failed' | 'cancelled' required
created_atstring date-time required
finished_atstring date-time nullable required
credit'reserved' | 'settled' | 'released' | 'free' | 'none' required

What happened to the credit this job holds: "reserved" while it is queued or running, "settled" once it succeeded, "released" once it failed or was cancelled, "free" when it is the account's free first file and costs no credit, and "none" when the job was never billed.

Changes

No recorded changes to this operation across all 1 revision of this API.