{"openapi":"3.1.0","info":{"title":"PDF Loft API","version":"1.2.0","description":"Run every PDF Loft tool, manage documents, send documents for signature and receive webhooks. Calls are authenticated with an API key sent as a Bearer token and count against the same task pool as the web apps.","termsOfService":"https://pdfloft.wrxstack.com/legal/terms","contact":{"name":"PDF Loft support","url":"https://pdfloft.wrxstack.com/support"}},"servers":[{"url":"https://api.pdfloft.wrxstack.com"}],"tags":[{"name":"Tools","description":"Find and run PDF tools."},{"name":"Files","description":"Upload the files a run reads."},{"name":"Jobs","description":"Follow a run and download its results."},{"name":"Documents","description":"The document library."},{"name":"Workflows","description":"Save a chain of tools and run it on files."},{"name":"Webhooks","description":"Endpoints that receive events."},{"name":"Review","description":"Share a document for review by link with people who have no account, and read and answer the comments they leave."},{"name":"Signatures","description":"Send documents for electronic signature, follow each signer and download the signed document and its certificate."}],"paths":{"/v1/tools":{"get":{"operationId":"listTools","tags":["Tools"],"summary":"List tools","description":"Every PDF tool, with the content types it reads, how many files one run takes, whether the API can run it now, and the options it takes as a JSON Schema.","security":[{"bearerAuth":["tools:run"]}],"x-required-scope":"tools:run","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl https://api.pdfloft.wrxstack.com/v1/tools -H \"Authorization: Bearer $PDFLOFT_API_KEY\""}],"parameters":[],"responses":{"200":{"description":"The tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolList"}}}},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/tools/{toolId}":{"get":{"operationId":"getTool","tags":["Tools"],"summary":"Get a tool","description":"One tool by its id, with the content types it reads, how many files a run takes and the options it takes as a JSON Schema.","security":[{"bearerAuth":["tools:run"]}],"x-required-scope":"tools:run","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl https://api.pdfloft.wrxstack.com/v1/tools/merge -H \"Authorization: Bearer $PDFLOFT_API_KEY\""}],"parameters":[{"name":"toolId","in":"path","required":true,"description":"The tool id, such as merge, split or compress.","schema":{"type":"string"},"example":"merge"}],"responses":{"200":{"description":"The tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tool"}}}},"400":{"description":"The request is not valid. Error codes: validation_failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."}]},"404":{"description":"No such tool. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/files":{"post":{"operationId":"uploadFile","tags":["Files"],"summary":"Upload a file","description":"Send the bytes of one file as the request body, with its Content-Type and an exact Content-Length (chunked uploads are not accepted). The largest file is your plan limit: 25 MB on Free up to 1 GB on Enterprise. The returned id goes into a run. An uploaded file that no run uses is deleted after ten minutes.","security":[{"bearerAuth":["tools:run"]}],"x-required-scope":"tools:run","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.pdfloft.wrxstack.com/v1/files -H \"Authorization: Bearer $PDFLOFT_API_KEY\" -H \"Content-Type: application/pdf\" --data-binary @contract.pdf"}],"parameters":[],"requestBody":{"required":true,"description":"The file bytes.","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}},"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"201":{"description":"The file was stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/File"}}}},"400":{"description":"The Content-Length is missing or the body is a different size. Error codes: validation_failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope, read_only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"read_only":{"summary":"The person who owns the key has read only access to the account, so a call that changes data is refused.","value":{"statusCode":403,"error":"read_only","message":"The person who owns the key has read only access to the account, so a call that changes data is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."},{"code":"read_only","meaning":"The person who owns the key has read only access to the account, so a call that changes data is refused.","fix":"Ask an owner or admin to give that person write access, or use a key owned by someone who has it."}]},"413":{"description":"The file is larger than your plan allows. Error codes: file.too_large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"file.too_large":{"summary":"A file is larger than your plan or the tool allows. The details give maxBytes.","value":{"statusCode":413,"error":"file.too_large","message":"A file is larger than your plan or the tool allows.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"file.too_large","meaning":"A file is larger than your plan or the tool allows. The details give maxBytes.","fix":"Send a smaller file, or use a plan with a higher limit (25 MB on Free up to 1 GB on Enterprise)."}]},"415":{"description":"No tool reads this content type. Error codes: file.type_refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"file.type_refused":{"summary":"No tool reads this content type, this tool does not read it, or the bytes of the file are not the type it declares. The check reads the file itself, never only the Content-Type header.","value":{"statusCode":415,"error":"file.type_refused","message":"No tool reads this content type, this tool does not read it, or the bytes of the file are not the type it declares.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"file.type_refused","meaning":"No tool reads this content type, this tool does not read it, or the bytes of the file are not the type it declares. The check reads the file itself, never only the Content-Type header.","fix":"Send a file the tool accepts (GET /v1/tools/{toolId} lists accepts) with a Content-Type that matches its real format."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/tools/{toolId}/runs":{"post":{"operationId":"runTool","tags":["Tools"],"summary":"Run a tool","description":"Starts a run on uploaded files and answers at once with the run. The options are those the tool lists at GET /v1/tools/{toolId}; options that do not fit are refused with options.invalid before anything is counted. The API runs the tool on the server, so the files are uploaded, processed and deleted two hours after the run, whatever the web app does for that tool. Tools that place pictures on a document (sign, editor) take the document first and the pictures after it. Poll the run, or subscribe to the job.completed and job.failed webhook events. A run counts against the same task pool as the web; the count is reserved now and committed when the run succeeds. A tool listed with batch true also takes many files: each file is its own run, the files that work come back in one ZIP (result 0) with a JSON report (result 1) that names, for each file in the order given, whether it worked and why not, and each file counts one task. A run in which every file fails fails with the first reason. A tool that starts from nothing, such as blank-pdf, takes no files. The redact tool takes terms, patterns (email, phone, card, national-id) and areas; with preview true it only lists the matches as JSON, in the same form as areas, and counts no task. The watermark tool takes a picture, as the last file, when image is true. The jpg-to-pdf tool reads JPEG, PNG, GIF, WebP, BMP, TIFF and HEIC; every page of a TIFF becomes a page, and an animated GIF gives its first frame unless frames is all.","security":[{"bearerAuth":["tools:run"]}],"x-required-scope":"tools:run","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.pdfloft.wrxstack.com/v1/tools/merge/runs -H \"Authorization: Bearer $PDFLOFT_API_KEY\" -H \"Idempotency-Key: $(uuidgen)\" -H \"Content-Type: application/json\" -d '{\"files\":[\"file_Qm3nT9xvB2kLw8RzYc1pAe5H\",\"file_Zr7sD4jKp0uVn6XaMb2cTe9G\"]}'"}],"parameters":[{"name":"toolId","in":"path","required":true,"description":"The tool id.","schema":{"type":"string"},"example":"merge"},{"name":"Idempotency-Key","in":"header","required":false,"description":"A unique value of 1 to 255 characters. A repeat with the same key and body returns the first answer; the same key with a different body is refused with idempotency_key_reused. Keys are kept for 24 hours.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunRequest"}}}},"responses":{"202":{"description":"The run was accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"The options do not fit the tool (options.invalid), or the number of files does not. Error codes: validation_failed, idempotency_key_invalid, run.too_many_files, run.too_few_files, tool.runs_on_device, options.invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"idempotency_key_invalid":{"summary":"The Idempotency-Key is not 1 to 255 visible ASCII characters.","value":{"statusCode":400,"error":"idempotency_key_invalid","message":"The Idempotency-Key is not 1 to 255 visible ASCII characters.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"run.too_many_files":{"summary":"The run names more files than one run of the tool takes on your plan. The details give the limit.","value":{"statusCode":400,"error":"run.too_many_files","message":"The run names more files than one run of the tool takes on your plan.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"run.too_few_files":{"summary":"The tool needs more files than the run names. The details give the minimum.","value":{"statusCode":400,"error":"run.too_few_files","message":"The tool needs more files than the run names.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"tool.runs_on_device":{"summary":"The tool has no server version, so it cannot be run through the API. Every tool in the current list has one; the code is kept for a tool added later that runs in the browser only.","value":{"statusCode":400,"error":"tool.runs_on_device","message":"The tool has no server version, so it cannot be run through the API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"options.invalid":{"summary":"The options do not fit the tool. Nothing was counted. The fields array names each invalid option.","value":{"statusCode":400,"error":"options.invalid","message":"The options do not fit the tool.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."},{"code":"idempotency_key_invalid","meaning":"The Idempotency-Key is not 1 to 255 visible ASCII characters.","fix":"Send a UUID, or any value of 1 to 255 letters, digits and punctuation marks, with no spaces."},{"code":"run.too_many_files","meaning":"The run names more files than one run of the tool takes on your plan. The details give the limit.","fix":"Send at most the number in the details, or split the work into several runs."},{"code":"run.too_few_files","meaning":"The tool needs more files than the run names. The details give the minimum.","fix":"Upload the missing files and name every file in the files array."},{"code":"tool.runs_on_device","meaning":"The tool has no server version, so it cannot be run through the API. Every tool in the current list has one; the code is kept for a tool added later that runs in the browser only.","fix":"Choose a tool whose runnable field is true in GET /v1/tools."},{"code":"options.invalid","meaning":"The options do not fit the tool. Nothing was counted. The fields array names each invalid option.","fix":"Compare the options with the JSON Schema that GET /v1/tools/{toolId} returns for the tool, then send the corrected options."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The tasks or AI credits of this period are used. The details name the limit and when it resets. Error codes: plan_required, tasks.exhausted, credits.exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"tasks.exhausted":{"summary":"The account has used its tasks for this period. The details give the limit, the amount used and when the period resets.","value":{"statusCode":402,"error":"tasks.exhausted","message":"The account has used its tasks for this period.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"credits.exhausted":{"summary":"The account has used its AI credits for this period. The details give the limit and when it resets.","value":{"statusCode":402,"error":"credits.exhausted","message":"The account has used its AI credits for this period.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."},{"code":"tasks.exhausted","meaning":"The account has used its tasks for this period. The details give the limit, the amount used and when the period resets.","fix":"Wait for the reset time in the details, or upgrade the plan. Calls that read data still work."},{"code":"credits.exhausted","meaning":"The account has used its AI credits for this period. The details give the limit and when it resets.","fix":"Wait for the reset time in the details, or upgrade the plan."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope, read_only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"read_only":{"summary":"The person who owns the key has read only access to the account, so a call that changes data is refused.","value":{"statusCode":403,"error":"read_only","message":"The person who owns the key has read only access to the account, so a call that changes data is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."},{"code":"read_only","meaning":"The person who owns the key has read only access to the account, so a call that changes data is refused.","fix":"Ask an owner or admin to give that person write access, or use a key owned by someone who has it."}]},"404":{"description":"No such tool or file. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"409":{"description":"The call conflicts with the current state. Error codes: idempotency_in_progress.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_in_progress":{"summary":"A request with the same Idempotency-Key is still running.","value":{"statusCode":409,"error":"idempotency_in_progress","message":"A request with the same Idempotency-Key is still running.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"idempotency_in_progress","meaning":"A request with the same Idempotency-Key is still running.","fix":"Wait a moment and send the same request with the same key again. It returns the first answer once that one finishes."}]},"413":{"description":"The body or file is too large. Error codes: payload_too_large, file.too_large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"payload_too_large":{"summary":"A JSON body is larger than 1 MB. Files never travel as JSON.","value":{"statusCode":413,"error":"payload_too_large","message":"A JSON body is larger than 1 MB.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"file.too_large":{"summary":"A file is larger than your plan or the tool allows. The details give maxBytes.","value":{"statusCode":413,"error":"file.too_large","message":"A file is larger than your plan or the tool allows.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"payload_too_large","meaning":"A JSON body is larger than 1 MB. Files never travel as JSON.","fix":"Send less in one call. Upload a file with POST /v1/files and refer to it by its id."},{"code":"file.too_large","meaning":"A file is larger than your plan or the tool allows. The details give maxBytes.","fix":"Send a smaller file, or use a plan with a higher limit (25 MB on Free up to 1 GB on Enterprise)."}]},"415":{"description":"The body or file is a type the call does not read. Error codes: unsupported_media_type, file.type_refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unsupported_media_type":{"summary":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","value":{"statusCode":415,"error":"unsupported_media_type","message":"The body has a content type the route does not read.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"file.type_refused":{"summary":"No tool reads this content type, this tool does not read it, or the bytes of the file are not the type it declares. The check reads the file itself, never only the Content-Type header.","value":{"statusCode":415,"error":"file.type_refused","message":"No tool reads this content type, this tool does not read it, or the bytes of the file are not the type it declares.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"unsupported_media_type","meaning":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","fix":"Send Content-Type: application/json with a JSON body, or send a file only to POST /v1/files."},{"code":"file.type_refused","meaning":"No tool reads this content type, this tool does not read it, or the bytes of the file are not the type it declares. The check reads the file itself, never only the Content-Type header.","fix":"Send a file the tool accepts (GET /v1/tools/{toolId} lists accepts) with a Content-Type that matches its real format."}]},"422":{"description":"The request is well formed but cannot be processed. Error codes: idempotency_key_reused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_key_reused":{"summary":"The Idempotency-Key was already used with a different request, so the first answer is not the answer to this one.","value":{"statusCode":422,"error":"idempotency_key_reused","message":"The Idempotency-Key was already used with a different request, so the first answer is not the answer to this one.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"idempotency_key_reused","meaning":"The Idempotency-Key was already used with a different request, so the first answer is not the answer to this one.","fix":"Send a new Idempotency-Key for a new request. Repeat the key only to retry the exact same request."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: tool.unavailable, service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"tool.unavailable":{"summary":"The tool cannot run right now. Nothing was counted against your tasks.","value":{"statusCode":503,"error":"tool.unavailable","message":"The tool cannot run right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"tool.unavailable","meaning":"The tool cannot run right now. Nothing was counted against your tasks.","fix":"Try again after a short wait, using the same Idempotency-Key so the retry cannot run twice."},{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/jobs":{"get":{"operationId":"listJobs","tags":["Jobs"],"summary":"List runs","description":"The runs started by the person who owns the key, newest first.","security":[{"bearerAuth":["jobs:read"]}],"x-required-scope":"jobs:read","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl \"https://api.pdfloft.wrxstack.com/v1/jobs?limit=20\" -H \"Authorization: Bearer $PDFLOFT_API_KEY\""}],"parameters":[{"name":"limit","in":"query","required":false,"description":"How many items to return, 1 to 100.","schema":{"default":30,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The nextCursor of the previous page.","schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"A page of runs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobList"}}}},"400":{"description":"The request is not valid. Error codes: validation_failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/jobs/{jobId}":{"get":{"operationId":"getJob","tags":["Jobs"],"summary":"Get a run","description":"The state of one run. Poll no faster than once a second.","security":[{"bearerAuth":["jobs:read"]}],"x-required-scope":"jobs:read","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl https://api.pdfloft.wrxstack.com/v1/jobs/cm3x8k2f10001 -H \"Authorization: Bearer $PDFLOFT_API_KEY\""}],"parameters":[{"name":"jobId","in":"path","required":true,"description":"The run id.","schema":{"type":"string"},"example":"cm3x8k2f10001"}],"responses":{"200":{"description":"The run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"The request is not valid. Error codes: validation_failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."}]},"404":{"description":"No such run. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/jobs/{jobId}/cancel":{"post":{"operationId":"cancelJob","tags":["Jobs"],"summary":"Cancel a run","description":"Ends a queued or running run and gives its tasks back. Cancelling a finished run changes nothing.","security":[{"bearerAuth":["tools:run"]}],"x-required-scope":"tools:run","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.pdfloft.wrxstack.com/v1/jobs/cm3x8k2f10001/cancel -H \"Authorization: Bearer $PDFLOFT_API_KEY\""}],"parameters":[{"name":"jobId","in":"path","required":true,"description":"The run id.","schema":{"type":"string"},"example":"cm3x8k2f10001"}],"responses":{"200":{"description":"The run after the cancel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"The request is not valid. Error codes: validation_failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope, read_only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"read_only":{"summary":"The person who owns the key has read only access to the account, so a call that changes data is refused.","value":{"statusCode":403,"error":"read_only","message":"The person who owns the key has read only access to the account, so a call that changes data is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."},{"code":"read_only","meaning":"The person who owns the key has read only access to the account, so a call that changes data is refused.","fix":"Ask an owner or admin to give that person write access, or use a key owned by someone who has it."}]},"404":{"description":"No such run. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/jobs/{jobId}/results/{index}":{"get":{"operationId":"getJobResult","tags":["Jobs"],"summary":"Download a result","description":"A signed link to one result file of a finished run, valid for five minutes. Results are deleted two hours after the run; save one as a document to keep it.","security":[{"bearerAuth":["jobs:read"]}],"x-required-scope":"jobs:read","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl https://api.pdfloft.wrxstack.com/v1/jobs/cm3x8k2f10001/results/0 -H \"Authorization: Bearer $PDFLOFT_API_KEY\""}],"parameters":[{"name":"jobId","in":"path","required":true,"description":"The run id.","schema":{"type":"string"},"example":"cm3x8k2f10001"},{"name":"index","in":"path","required":true,"description":"The result number, from 0.","schema":{"type":"string"},"example":"0"}],"responses":{"200":{"description":"The link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadLink"}}}},"400":{"description":"The request is not valid. Error codes: validation_failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."}]},"404":{"description":"No such run or result. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"410":{"description":"The result was deleted. Error codes: result.expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"result.expired":{"summary":"The result file was deleted two hours after the run finished.","value":{"statusCode":410,"error":"result.expired","message":"The result file was deleted two hours after the run finished.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"result.expired","meaning":"The result file was deleted two hours after the run finished.","fix":"Run the tool again, or save the result as a document with POST /v1/documents before it expires."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/documents":{"get":{"operationId":"listDocuments","tags":["Documents"],"summary":"List documents","description":"The library documents the key can see: every account-wide document and the private documents of the key owner. Search by name and by the text of documents that have text, and filter by folder, tag and who made the document. The list is paged with a cursor and holds with thousands of documents; a search shows its best 500 matches.","security":[{"bearerAuth":["documents:read"]}],"x-required-scope":"documents:read","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl https://api.pdfloft.wrxstack.com/v1/documents -H \"Authorization: Bearer $PDFLOFT_API_KEY\""}],"parameters":[{"name":"limit","in":"query","required":false,"description":"How many items to return, 1 to 100.","schema":{"default":30,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The nextCursor of the previous page.","schema":{"type":"string","maxLength":64}},{"name":"q","in":"query","required":false,"description":"Words to find at the start of a word in a name, or in the text of a document that has text. Every word must match.","schema":{"type":"string","maxLength":200}},{"name":"folderId","in":"query","required":false,"description":"A folder id, or none for the documents at the top of the library. Every folder when omitted.","schema":{"type":"string","maxLength":64}},{"name":"tag","in":"query","required":false,"description":"Only documents with this tag.","schema":{"type":"string","maxLength":160}},{"name":"scope","in":"query","required":false,"description":"mine: documents the key owner made. team: documents shared with the account. Both when omitted.","schema":{"type":"string","enum":["mine","team"]}},{"name":"sort","in":"query","required":false,"description":"What to order by. updated when omitted.","schema":{"type":"string","enum":["updated","created","name"]}},{"name":"order","in":"query","required":false,"description":"asc or desc. desc, except asc for name.","schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"A page of documents.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentList"}}}},"400":{"description":"The request is not valid. Error codes: validation_failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}},"post":{"operationId":"createDocument","tags":["Documents"],"summary":"Save a document","description":"Saves an uploaded PDF or a run result to the library. The file is scanned for viruses and counted against the library storage of your plan.","security":[{"bearerAuth":["documents:write"]}],"x-required-scope":"documents:write","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.pdfloft.wrxstack.com/v1/documents -H \"Authorization: Bearer $PDFLOFT_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"jobId\":\"cm3x8k2f10001\",\"index\":0},\"name\":\"Merged.pdf\"}'"}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"A unique value of 1 to 255 characters. A repeat with the same key and body returns the first answer; the same key with a different body is refused with idempotency_key_reused. Keys are kept for 24 hours.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocumentRequest"}}}},"responses":{"201":{"description":"The document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"400":{"description":"The request is not valid. Error codes: validation_failed, idempotency_key_invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"idempotency_key_invalid":{"summary":"The Idempotency-Key is not 1 to 255 visible ASCII characters.","value":{"statusCode":400,"error":"idempotency_key_invalid","message":"The Idempotency-Key is not 1 to 255 visible ASCII characters.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."},{"code":"idempotency_key_invalid","meaning":"The Idempotency-Key is not 1 to 255 visible ASCII characters.","fix":"Send a UUID, or any value of 1 to 255 letters, digits and punctuation marks, with no spaces."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope, read_only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"read_only":{"summary":"The person who owns the key has read only access to the account, so a call that changes data is refused.","value":{"statusCode":403,"error":"read_only","message":"The person who owns the key has read only access to the account, so a call that changes data is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."},{"code":"read_only","meaning":"The person who owns the key has read only access to the account, so a call that changes data is refused.","fix":"Ask an owner or admin to give that person write access, or use a key owned by someone who has it."}]},"404":{"description":"The thing the call names does not exist in this account. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"409":{"description":"The library is full. Error codes: idempotency_in_progress, storage.full, storage.over_limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_in_progress":{"summary":"A request with the same Idempotency-Key is still running.","value":{"statusCode":409,"error":"idempotency_in_progress","message":"A request with the same Idempotency-Key is still running.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"storage.full":{"summary":"Saving the document would take the library past the storage limit of the plan.","value":{"statusCode":409,"error":"storage.full","message":"Saving the document would take the library past the storage limit of the plan.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"storage.over_limit":{"summary":"The library is already over its storage limit, so nothing new is saved until space is freed or the plan changes.","value":{"statusCode":409,"error":"storage.over_limit","message":"The library is already over its storage limit, so nothing new is saved until space is freed or the plan changes.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"idempotency_in_progress","meaning":"A request with the same Idempotency-Key is still running.","fix":"Wait a moment and send the same request with the same key again. It returns the first answer once that one finishes."},{"code":"storage.full","meaning":"Saving the document would take the library past the storage limit of the plan.","fix":"Delete documents you no longer need with DELETE /v1/documents/{documentId}, or upgrade the plan."},{"code":"storage.over_limit","meaning":"The library is already over its storage limit, so nothing new is saved until space is freed or the plan changes.","fix":"Delete documents or upgrade the plan, then save again."}]},"410":{"description":"The result was deleted. Error codes: result.expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"result.expired":{"summary":"The result file was deleted two hours after the run finished.","value":{"statusCode":410,"error":"result.expired","message":"The result file was deleted two hours after the run finished.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"result.expired","meaning":"The result file was deleted two hours after the run finished.","fix":"Run the tool again, or save the result as a document with POST /v1/documents before it expires."}]},"413":{"description":"The body or file is too large. Error codes: payload_too_large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"payload_too_large":{"summary":"A JSON body is larger than 1 MB. Files never travel as JSON.","value":{"statusCode":413,"error":"payload_too_large","message":"A JSON body is larger than 1 MB.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"payload_too_large","meaning":"A JSON body is larger than 1 MB. Files never travel as JSON.","fix":"Send less in one call. Upload a file with POST /v1/files and refer to it by its id."}]},"415":{"description":"The body or file is a type the call does not read. Error codes: unsupported_media_type, file.type_refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unsupported_media_type":{"summary":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","value":{"statusCode":415,"error":"unsupported_media_type","message":"The body has a content type the route does not read.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"file.type_refused":{"summary":"No tool reads this content type, this tool does not read it, or the bytes of the file are not the type it declares. The check reads the file itself, never only the Content-Type header.","value":{"statusCode":415,"error":"file.type_refused","message":"No tool reads this content type, this tool does not read it, or the bytes of the file are not the type it declares.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"unsupported_media_type","meaning":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","fix":"Send Content-Type: application/json with a JSON body, or send a file only to POST /v1/files."},{"code":"file.type_refused","meaning":"No tool reads this content type, this tool does not read it, or the bytes of the file are not the type it declares. The check reads the file itself, never only the Content-Type header.","fix":"Send a file the tool accepts (GET /v1/tools/{toolId} lists accepts) with a Content-Type that matches its real format."}]},"422":{"description":"The file contains a virus. Error codes: idempotency_key_reused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_key_reused":{"summary":"The Idempotency-Key was already used with a different request, so the first answer is not the answer to this one.","value":{"statusCode":422,"error":"idempotency_key_reused","message":"The Idempotency-Key was already used with a different request, so the first answer is not the answer to this one.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"idempotency_key_reused","meaning":"The Idempotency-Key was already used with a different request, so the first answer is not the answer to this one.","fix":"Send a new Idempotency-Key for a new request. Repeat the key only to retry the exact same request."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/documents/{documentId}":{"get":{"operationId":"getDocument","tags":["Documents"],"summary":"Get a document","description":"One document of the library, with the size and page count of its current version.","security":[{"bearerAuth":["documents:read"]}],"x-required-scope":"documents:read","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl https://api.pdfloft.wrxstack.com/v1/documents/cm3x8k2f10002 -H \"Authorization: Bearer $PDFLOFT_API_KEY\""}],"parameters":[{"name":"documentId","in":"path","required":true,"description":"The document id.","schema":{"type":"string"},"example":"cm3x8k2f10002"}],"responses":{"200":{"description":"The document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"400":{"description":"The request is not valid. Error codes: validation_failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."}]},"404":{"description":"No such document. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}},"delete":{"operationId":"deleteDocument","tags":["Documents"],"summary":"Delete a document","description":"Deletes a document and every version of it.","security":[{"bearerAuth":["documents:write"]}],"x-required-scope":"documents:write","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE https://api.pdfloft.wrxstack.com/v1/documents/cm3x8k2f10002 -H \"Authorization: Bearer $PDFLOFT_API_KEY\""}],"parameters":[{"name":"documentId","in":"path","required":true,"description":"The document id.","schema":{"type":"string"},"example":"cm3x8k2f10002"}],"responses":{"204":{"description":"Deleted."},"400":{"description":"The request is not valid. Error codes: validation_failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope, read_only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"read_only":{"summary":"The person who owns the key has read only access to the account, so a call that changes data is refused.","value":{"statusCode":403,"error":"read_only","message":"The person who owns the key has read only access to the account, so a call that changes data is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."},{"code":"read_only","meaning":"The person who owns the key has read only access to the account, so a call that changes data is refused.","fix":"Ask an owner or admin to give that person write access, or use a key owned by someone who has it."}]},"404":{"description":"No such document. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/documents/{documentId}/download":{"get":{"operationId":"downloadDocument","tags":["Documents"],"summary":"Download a document","description":"A signed link to the current version of a document, or to the version named in the query. Valid for five minutes.","security":[{"bearerAuth":["documents:read"]}],"x-required-scope":"documents:read","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl https://api.pdfloft.wrxstack.com/v1/documents/cm3x8k2f10002/download -H \"Authorization: Bearer $PDFLOFT_API_KEY\""}],"parameters":[{"name":"documentId","in":"path","required":true,"description":"The document id.","schema":{"type":"string"},"example":"cm3x8k2f10002"},{"name":"version","in":"query","required":false,"description":"A version number. The current version when omitted.","schema":{"type":"integer","minimum":1,"maximum":100000}}],"responses":{"200":{"description":"The link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadLink"}}}},"400":{"description":"The request is not valid. Error codes: validation_failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."}]},"404":{"description":"No such document or version. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/documents/{documentId}/chat":{"post":{"operationId":"askDocument","tags":["Documents"],"summary":"Ask a question about a document","description":"Asks a question about a library document and answers with the question and the answer, both saved in the conversation of the key owner. The answer is written from the document alone and cites the pages it uses as [p3]; the citations list holds only pages the document has. A scanned page is read by text recognition, and a document that cannot be read is refused with document.unreadable. The call counts AI credits, one for a document of up to 25 pages and one more for each further 25, only when an answer is saved. It is unavailable where no model is set up.","security":[{"bearerAuth":["documents:write"]}],"x-required-scope":"documents:write","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.pdfloft.wrxstack.com/v1/documents/cm3x8k2f10002/chat -H \"Authorization: Bearer $PDFLOFT_API_KEY\" -H \"Content-Type: application/json\" -d '{\"question\":\"What is the notice period?\"}'"}],"parameters":[{"name":"documentId","in":"path","required":true,"description":"The document id.","schema":{"type":"string"},"example":"cm3x8k2f10002"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskDocumentRequest"}}}},"responses":{"200":{"description":"The question and the answer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentAnswer"}}}},"400":{"description":"The request is not valid. Error codes: validation_failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account has used its AI credits (credits.exhausted). Error codes: plan_required, credits.exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"credits.exhausted":{"summary":"The account has used its AI credits for this period. The details give the limit and when it resets.","value":{"statusCode":402,"error":"credits.exhausted","message":"The account has used its AI credits for this period.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."},{"code":"credits.exhausted","meaning":"The account has used its AI credits for this period. The details give the limit and when it resets.","fix":"Wait for the reset time in the details, or upgrade the plan."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope, read_only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"read_only":{"summary":"The person who owns the key has read only access to the account, so a call that changes data is refused.","value":{"statusCode":403,"error":"read_only","message":"The person who owns the key has read only access to the account, so a call that changes data is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."},{"code":"read_only","meaning":"The person who owns the key has read only access to the account, so a call that changes data is refused.","fix":"Ask an owner or admin to give that person write access, or use a key owned by someone who has it."}]},"404":{"description":"No such document. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"413":{"description":"The body or file is too large. Error codes: payload_too_large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"payload_too_large":{"summary":"A JSON body is larger than 1 MB. Files never travel as JSON.","value":{"statusCode":413,"error":"payload_too_large","message":"A JSON body is larger than 1 MB.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"payload_too_large","meaning":"A JSON body is larger than 1 MB. Files never travel as JSON.","fix":"Send less in one call. Upload a file with POST /v1/files and refer to it by its id."}]},"415":{"description":"The body or file is a type the call does not read. Error codes: unsupported_media_type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unsupported_media_type":{"summary":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","value":{"statusCode":415,"error":"unsupported_media_type","message":"The body has a content type the route does not read.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"unsupported_media_type","meaning":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","fix":"Send Content-Type: application/json with a JSON body, or send a file only to POST /v1/files."}]},"422":{"description":"The document cannot be read (document.unreadable) or the model declined (ai.declined). Error codes: ai.declined, document.unreadable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"ai.declined":{"summary":"The model declined to work on this document. Nothing was counted.","value":{"statusCode":422,"error":"ai.declined","message":"The model declined to work on this document.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"document.unreadable":{"summary":"The document has no text that could be read. The details give the reason: scan_unreadable for a scan that could not be recognised, no_words for a document with no words, encrypted, damaged, too_many_pages or too_large. Nothing was counted.","value":{"statusCode":422,"error":"document.unreadable","message":"The document has no text that could be read.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"ai.declined","meaning":"The model declined to work on this document. Nothing was counted.","fix":"Ask about other pages, or use a different document."},{"code":"document.unreadable","meaning":"The document has no text that could be read. The details give the reason: scan_unreadable for a scan that could not be recognised, no_words for a document with no words, encrypted, damaged, too_many_pages or too_large. Nothing was counted.","fix":"For a scan, run the ocr tool first and ask about the result. Remove a password, repair a damaged file or split a long one."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"Questions are not available right now (tool.unavailable). Nothing was counted. Error codes: tool.unavailable, service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"tool.unavailable":{"summary":"The tool cannot run right now. Nothing was counted against your tasks.","value":{"statusCode":503,"error":"tool.unavailable","message":"The tool cannot run right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"tool.unavailable","meaning":"The tool cannot run right now. Nothing was counted against your tasks.","fix":"Try again after a short wait, using the same Idempotency-Key so the retry cannot run twice."},{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}},"get":{"operationId":"listDocumentChat","tags":["Documents"],"summary":"Read the conversation about a document","description":"The questions the key owner asked about a document and the answers, oldest first, up to the last 200. Other people's conversations about the same document are never returned.","security":[{"bearerAuth":["documents:read"]}],"x-required-scope":"documents:read","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl https://api.pdfloft.wrxstack.com/v1/documents/cm3x8k2f10002/chat -H \"Authorization: Bearer $PDFLOFT_API_KEY\""}],"parameters":[{"name":"documentId","in":"path","required":true,"description":"The document id.","schema":{"type":"string"},"example":"cm3x8k2f10002"}],"responses":{"200":{"description":"The conversation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentChat"}}}},"400":{"description":"The request is not valid. Error codes: validation_failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."}]},"404":{"description":"No such document. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}},"delete":{"operationId":"deleteDocumentChat","tags":["Documents"],"summary":"Delete the conversation about a document","description":"Deletes the conversation of the key owner about a document. The document and other people's conversations are untouched.","security":[{"bearerAuth":["documents:write"]}],"x-required-scope":"documents:write","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE https://api.pdfloft.wrxstack.com/v1/documents/cm3x8k2f10002/chat -H \"Authorization: Bearer $PDFLOFT_API_KEY\""}],"parameters":[{"name":"documentId","in":"path","required":true,"description":"The document id.","schema":{"type":"string"},"example":"cm3x8k2f10002"}],"responses":{"204":{"description":"Deleted."},"400":{"description":"The request is not valid. Error codes: validation_failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope, read_only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"read_only":{"summary":"The person who owns the key has read only access to the account, so a call that changes data is refused.","value":{"statusCode":403,"error":"read_only","message":"The person who owns the key has read only access to the account, so a call that changes data is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."},{"code":"read_only","meaning":"The person who owns the key has read only access to the account, so a call that changes data is refused.","fix":"Ask an owner or admin to give that person write access, or use a key owned by someone who has it."}]},"404":{"description":"No such document. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/workflows":{"get":{"operationId":"listWorkflows","tags":["Workflows"],"summary":"List workflows","description":"The workflows saved in the account, newest first, with how many the plan keeps and how many are used. A workflow is a named chain of up to ten tools with their options, shared with every member of the account. issues names the steps that cannot work today, so a workflow that uses a tool or an option that no longer exists is listed and never hidden. The list stays readable on a plan without workflows.","security":[{"bearerAuth":["workflows:read"]}],"x-required-scope":"workflows:read","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl https://api.pdfloft.wrxstack.com/v1/workflows -H \"Authorization: Bearer $PDFLOFT_API_KEY\""}],"parameters":[],"responses":{"200":{"description":"The workflows.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowList"}}}},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}},"post":{"operationId":"createWorkflow","tags":["Workflows"],"summary":"Save a workflow","description":"Saves a named chain of tools. Each step names a tool and its options, checked against that tool at once: a chain whose order or options cannot work is refused with workflow.invalid and the steps at fault, and nothing is saved. A tool that turns another kind of file into a PDF (epub-to-pdf, csv-to-pdf, zip-to-pdf) can only be the first step; a tool whose result is parts, text or pictures (the split tools, pdf-to-markdown, pdf-to-html, pdf-to-csv, pdf-to-tiff) can only be the last. Workflows come with a paid plan, and the plan sets how many an account keeps (workflow.plan, workflow.limit).","security":[{"bearerAuth":["workflows:write"]}],"x-required-scope":"workflows:write","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.pdfloft.wrxstack.com/v1/workflows -H \"Authorization: Bearer $PDFLOFT_API_KEY\" -H \"Idempotency-Key: $(uuidgen)\" -H \"Content-Type: application/json\" -d '{\"name\":\"Monthly report\",\"steps\":[{\"tool\":\"rotate\",\"options\":{\"angle\":90}},{\"tool\":\"compress\",\"options\":{}}]}'"}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"A unique value of 1 to 255 characters. A repeat with the same key and body returns the first answer; the same key with a different body is refused with idempotency_key_reused. Keys are kept for 24 hours.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkflowRequest"}}}},"responses":{"201":{"description":"The saved workflow.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflow"}}}},"400":{"description":"The chain cannot work (workflow.invalid). The details list the steps at fault. Error codes: validation_failed, idempotency_key_invalid, workflow.invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"idempotency_key_invalid":{"summary":"The Idempotency-Key is not 1 to 255 visible ASCII characters.","value":{"statusCode":400,"error":"idempotency_key_invalid","message":"The Idempotency-Key is not 1 to 255 visible ASCII characters.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"workflow.invalid":{"summary":"The chain of tools cannot work. The details list the steps at fault: an index counted from zero and a code of tool_gone, tool_not_allowed, first_only, last_only or options_invalid. A chain holds 1 to 10 steps. Nothing was saved.","value":{"statusCode":400,"error":"workflow.invalid","message":"The chain of tools cannot work.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."},{"code":"idempotency_key_invalid","meaning":"The Idempotency-Key is not 1 to 255 visible ASCII characters.","fix":"Send a UUID, or any value of 1 to 255 letters, digits and punctuation marks, with no spaces."},{"code":"workflow.invalid","meaning":"The chain of tools cannot work. The details list the steps at fault: an index counted from zero and a code of tool_gone, tool_not_allowed, first_only, last_only or options_invalid. A chain holds 1 to 10 steps. Nothing was saved.","fix":"Change the steps named in the details: a tool that starts a chain goes first, a tool that ends one goes last, and the options of each step must fit that tool, as GET /v1/tools/{toolId} lists them."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The plan has no workflows (workflow.plan) or keeps no more (workflow.limit), or the key owner has read only access. Error codes: insufficient_scope, read_only, workflow.plan, workflow.limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"read_only":{"summary":"The person who owns the key has read only access to the account, so a call that changes data is refused.","value":{"statusCode":403,"error":"read_only","message":"The person who owns the key has read only access to the account, so a call that changes data is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"workflow.plan":{"summary":"The plan of the account has no workflows. Workflows come with a paid plan. Nothing was saved or counted.","value":{"statusCode":403,"error":"workflow.plan","message":"The plan of the account has no workflows.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"workflow.limit":{"summary":"The account keeps as many workflows as its plan allows. The details give the limit.","value":{"statusCode":403,"error":"workflow.limit","message":"The account keeps as many workflows as its plan allows.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."},{"code":"read_only","meaning":"The person who owns the key has read only access to the account, so a call that changes data is refused.","fix":"Ask an owner or admin to give that person write access, or use a key owned by someone who has it."},{"code":"workflow.plan","meaning":"The plan of the account has no workflows. Workflows come with a paid plan. Nothing was saved or counted.","fix":"Change the plan, or run the tools one at a time with POST /v1/tools/{toolId}/runs."},{"code":"workflow.limit","meaning":"The account keeps as many workflows as its plan allows. The details give the limit.","fix":"Delete a workflow you no longer use with DELETE /v1/workflows/{workflowId}, or change the plan."}]},"409":{"description":"The call conflicts with the current state. Error codes: idempotency_in_progress.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_in_progress":{"summary":"A request with the same Idempotency-Key is still running.","value":{"statusCode":409,"error":"idempotency_in_progress","message":"A request with the same Idempotency-Key is still running.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"idempotency_in_progress","meaning":"A request with the same Idempotency-Key is still running.","fix":"Wait a moment and send the same request with the same key again. It returns the first answer once that one finishes."}]},"413":{"description":"The body or file is too large. Error codes: payload_too_large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"payload_too_large":{"summary":"A JSON body is larger than 1 MB. Files never travel as JSON.","value":{"statusCode":413,"error":"payload_too_large","message":"A JSON body is larger than 1 MB.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"payload_too_large","meaning":"A JSON body is larger than 1 MB. Files never travel as JSON.","fix":"Send less in one call. Upload a file with POST /v1/files and refer to it by its id."}]},"415":{"description":"The body or file is a type the call does not read. Error codes: unsupported_media_type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unsupported_media_type":{"summary":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","value":{"statusCode":415,"error":"unsupported_media_type","message":"The body has a content type the route does not read.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"unsupported_media_type","meaning":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","fix":"Send Content-Type: application/json with a JSON body, or send a file only to POST /v1/files."}]},"422":{"description":"The request is well formed but cannot be processed. Error codes: idempotency_key_reused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_key_reused":{"summary":"The Idempotency-Key was already used with a different request, so the first answer is not the answer to this one.","value":{"statusCode":422,"error":"idempotency_key_reused","message":"The Idempotency-Key was already used with a different request, so the first answer is not the answer to this one.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"idempotency_key_reused","meaning":"The Idempotency-Key was already used with a different request, so the first answer is not the answer to this one.","fix":"Send a new Idempotency-Key for a new request. Repeat the key only to retry the exact same request."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/workflows/{workflowId}":{"get":{"operationId":"getWorkflow","tags":["Workflows"],"summary":"Get a workflow","description":"One workflow of the account with its steps and its issues, worked out now. A workflow of another account is answered as not found.","security":[{"bearerAuth":["workflows:read"]}],"x-required-scope":"workflows:read","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl https://api.pdfloft.wrxstack.com/v1/workflows/cm3x8k2f10003 -H \"Authorization: Bearer $PDFLOFT_API_KEY\""}],"parameters":[{"name":"workflowId","in":"path","required":true,"description":"The workflow id.","schema":{"type":"string"},"example":"cm3x8k2f10003"}],"responses":{"200":{"description":"The workflow.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflow"}}}},"400":{"description":"The request is not valid. Error codes: validation_failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."}]},"404":{"description":"No such workflow. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}},"patch":{"operationId":"updateWorkflow","tags":["Workflows"],"summary":"Change a workflow","description":"Changes the name, the steps or both. The steps replace the saved chain whole and are checked as when a workflow is saved. Only the person who made the workflow, or an owner or admin of the account, may change it (forbidden otherwise). Changing a workflow does not change a run already started, which holds a copy of the steps it began with.","security":[{"bearerAuth":["workflows:write"]}],"x-required-scope":"workflows:write","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH https://api.pdfloft.wrxstack.com/v1/workflows/cm3x8k2f10003 -H \"Authorization: Bearer $PDFLOFT_API_KEY\" -H \"Content-Type: application/json\" -d '{\"name\":\"Quarterly report\"}'"}],"parameters":[{"name":"workflowId","in":"path","required":true,"description":"The workflow id.","schema":{"type":"string"},"example":"cm3x8k2f10003"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkflowRequest"}}}},"responses":{"200":{"description":"The changed workflow.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflow"}}}},"400":{"description":"The chain cannot work (workflow.invalid). Error codes: validation_failed, workflow.invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"workflow.invalid":{"summary":"The chain of tools cannot work. The details list the steps at fault: an index counted from zero and a code of tool_gone, tool_not_allowed, first_only, last_only or options_invalid. A chain holds 1 to 10 steps. Nothing was saved.","value":{"statusCode":400,"error":"workflow.invalid","message":"The chain of tools cannot work.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."},{"code":"workflow.invalid","meaning":"The chain of tools cannot work. The details list the steps at fault: an index counted from zero and a code of tool_gone, tool_not_allowed, first_only, last_only or options_invalid. A chain holds 1 to 10 steps. Nothing was saved.","fix":"Change the steps named in the details: a tool that starts a chain goes first, a tool that ends one goes last, and the options of each step must fit that tool, as GET /v1/tools/{toolId} lists them."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope, read_only, forbidden, workflow.plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"read_only":{"summary":"The person who owns the key has read only access to the account, so a call that changes data is refused.","value":{"statusCode":403,"error":"read_only","message":"The person who owns the key has read only access to the account, so a call that changes data is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"forbidden":{"summary":"The person who owns the key may read this signature request or workflow but not change it. Only the sender or maker, or an owner or admin, can.","value":{"statusCode":403,"error":"forbidden","message":"The person who owns the key may read this signature request or workflow but not change it.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"workflow.plan":{"summary":"The plan of the account has no workflows. Workflows come with a paid plan. Nothing was saved or counted.","value":{"statusCode":403,"error":"workflow.plan","message":"The plan of the account has no workflows.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."},{"code":"read_only","meaning":"The person who owns the key has read only access to the account, so a call that changes data is refused.","fix":"Ask an owner or admin to give that person write access, or use a key owned by someone who has it."},{"code":"forbidden","meaning":"The person who owns the key may read this signature request or workflow but not change it. Only the sender or maker, or an owner or admin, can.","fix":"Use a key owned by the sender or maker, or by an owner or admin of the account."},{"code":"workflow.plan","meaning":"The plan of the account has no workflows. Workflows come with a paid plan. Nothing was saved or counted.","fix":"Change the plan, or run the tools one at a time with POST /v1/tools/{toolId}/runs."}]},"404":{"description":"No such workflow. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"413":{"description":"The body or file is too large. Error codes: payload_too_large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"payload_too_large":{"summary":"A JSON body is larger than 1 MB. Files never travel as JSON.","value":{"statusCode":413,"error":"payload_too_large","message":"A JSON body is larger than 1 MB.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"payload_too_large","meaning":"A JSON body is larger than 1 MB. Files never travel as JSON.","fix":"Send less in one call. Upload a file with POST /v1/files and refer to it by its id."}]},"415":{"description":"The body or file is a type the call does not read. Error codes: unsupported_media_type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unsupported_media_type":{"summary":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","value":{"statusCode":415,"error":"unsupported_media_type","message":"The body has a content type the route does not read.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"unsupported_media_type","meaning":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","fix":"Send Content-Type: application/json with a JSON body, or send a file only to POST /v1/files."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}},"delete":{"operationId":"deleteWorkflow","tags":["Workflows"],"summary":"Delete a workflow","description":"Deletes a workflow. Runs already started and their results are untouched. Only the person who made the workflow, or an owner or admin of the account, may delete it. Deleting stays possible on a plan without workflows.","security":[{"bearerAuth":["workflows:write"]}],"x-required-scope":"workflows:write","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE https://api.pdfloft.wrxstack.com/v1/workflows/cm3x8k2f10003 -H \"Authorization: Bearer $PDFLOFT_API_KEY\""}],"parameters":[{"name":"workflowId","in":"path","required":true,"description":"The workflow id.","schema":{"type":"string"},"example":"cm3x8k2f10003"}],"responses":{"204":{"description":"Deleted."},"400":{"description":"The request is not valid. Error codes: validation_failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope, read_only, forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"read_only":{"summary":"The person who owns the key has read only access to the account, so a call that changes data is refused.","value":{"statusCode":403,"error":"read_only","message":"The person who owns the key has read only access to the account, so a call that changes data is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"forbidden":{"summary":"The person who owns the key may read this signature request or workflow but not change it. Only the sender or maker, or an owner or admin, can.","value":{"statusCode":403,"error":"forbidden","message":"The person who owns the key may read this signature request or workflow but not change it.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."},{"code":"read_only","meaning":"The person who owns the key has read only access to the account, so a call that changes data is refused.","fix":"Ask an owner or admin to give that person write access, or use a key owned by someone who has it."},{"code":"forbidden","meaning":"The person who owns the key may read this signature request or workflow but not change it. Only the sender or maker, or an owner or admin, can.","fix":"Use a key owned by the sender or maker, or by an owner or admin of the account."}]},"404":{"description":"No such workflow. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/workflows/{workflowId}/runs":{"post":{"operationId":"runWorkflow","tags":["Workflows"],"summary":"Run a workflow","description":"Runs the saved chain on uploaded files and answers at once with the run, a job whose tool is workflow. Each file goes through every step on its own, one file at a time: one file gives the last step's own results, several give one ZIP (result 0) and a JSON report (result 1) in the form a batch tool uses. While the run works, its progress names the step it is at; when a step fails, the run fails with that step's own error code. A step with nothing to do, such as removing annotations from a clean file, passes its input on; a run in which every step had nothing to do fails with result.unchanged. The first step's tool decides which kinds of file and how many files the run takes. The tasks of every step on every file are reserved now and committed when the run succeeds. A workflow with issues is refused with workflow.outdated before anything is counted. Read the run with the job routes.","security":[{"bearerAuth":["tools:run"]}],"x-required-scope":"tools:run","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.pdfloft.wrxstack.com/v1/workflows/cm3x8k2f10003/runs -H \"Authorization: Bearer $PDFLOFT_API_KEY\" -H \"Idempotency-Key: $(uuidgen)\" -H \"Content-Type: application/json\" -d '{\"files\":[\"file_Qm3nT9xvB2kLw8RzYc1pAe5H\"]}'"}],"parameters":[{"name":"workflowId","in":"path","required":true,"description":"The workflow id.","schema":{"type":"string"},"example":"cm3x8k2f10003"},{"name":"Idempotency-Key","in":"header","required":false,"description":"A unique value of 1 to 255 characters. A repeat with the same key and body returns the first answer; the same key with a different body is refused with idempotency_key_reused. Keys are kept for 24 hours.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunWorkflowRequest"}}}},"responses":{"202":{"description":"The run was accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"The number of files does not fit the first step. Error codes: validation_failed, idempotency_key_invalid, run.too_many_files, run.too_few_files.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"idempotency_key_invalid":{"summary":"The Idempotency-Key is not 1 to 255 visible ASCII characters.","value":{"statusCode":400,"error":"idempotency_key_invalid","message":"The Idempotency-Key is not 1 to 255 visible ASCII characters.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"run.too_many_files":{"summary":"The run names more files than one run of the tool takes on your plan. The details give the limit.","value":{"statusCode":400,"error":"run.too_many_files","message":"The run names more files than one run of the tool takes on your plan.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"run.too_few_files":{"summary":"The tool needs more files than the run names. The details give the minimum.","value":{"statusCode":400,"error":"run.too_few_files","message":"The tool needs more files than the run names.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."},{"code":"idempotency_key_invalid","meaning":"The Idempotency-Key is not 1 to 255 visible ASCII characters.","fix":"Send a UUID, or any value of 1 to 255 letters, digits and punctuation marks, with no spaces."},{"code":"run.too_many_files","meaning":"The run names more files than one run of the tool takes on your plan. The details give the limit.","fix":"Send at most the number in the details, or split the work into several runs."},{"code":"run.too_few_files","meaning":"The tool needs more files than the run names. The details give the minimum.","fix":"Upload the missing files and name every file in the files array."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The tasks of this period are used. The details name the limit and when it resets. Error codes: plan_required, tasks.exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"tasks.exhausted":{"summary":"The account has used its tasks for this period. The details give the limit, the amount used and when the period resets.","value":{"statusCode":402,"error":"tasks.exhausted","message":"The account has used its tasks for this period.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."},{"code":"tasks.exhausted","meaning":"The account has used its tasks for this period. The details give the limit, the amount used and when the period resets.","fix":"Wait for the reset time in the details, or upgrade the plan. Calls that read data still work."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope, read_only, workflow.plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"read_only":{"summary":"The person who owns the key has read only access to the account, so a call that changes data is refused.","value":{"statusCode":403,"error":"read_only","message":"The person who owns the key has read only access to the account, so a call that changes data is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"workflow.plan":{"summary":"The plan of the account has no workflows. Workflows come with a paid plan. Nothing was saved or counted.","value":{"statusCode":403,"error":"workflow.plan","message":"The plan of the account has no workflows.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."},{"code":"read_only","meaning":"The person who owns the key has read only access to the account, so a call that changes data is refused.","fix":"Ask an owner or admin to give that person write access, or use a key owned by someone who has it."},{"code":"workflow.plan","meaning":"The plan of the account has no workflows. Workflows come with a paid plan. Nothing was saved or counted.","fix":"Change the plan, or run the tools one at a time with POST /v1/tools/{toolId}/runs."}]},"404":{"description":"No such workflow or file. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"409":{"description":"The workflow has issues (workflow.outdated); the details list them. Error codes: idempotency_in_progress, workflow.outdated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_in_progress":{"summary":"A request with the same Idempotency-Key is still running.","value":{"statusCode":409,"error":"idempotency_in_progress","message":"A request with the same Idempotency-Key is still running.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"workflow.outdated":{"summary":"The workflow uses a tool or an option that no longer exists, or breaks the order rules. The details list the steps at fault in the same form as workflow.invalid. Nothing was counted.","value":{"statusCode":409,"error":"workflow.outdated","message":"The workflow uses a tool or an option that no longer exists, or breaks the order rules.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"idempotency_in_progress","meaning":"A request with the same Idempotency-Key is still running.","fix":"Wait a moment and send the same request with the same key again. It returns the first answer once that one finishes."},{"code":"workflow.outdated","meaning":"The workflow uses a tool or an option that no longer exists, or breaks the order rules. The details list the steps at fault in the same form as workflow.invalid. Nothing was counted.","fix":"Change the workflow with PATCH /v1/workflows/{workflowId} so that every step is valid, then run it again."}]},"413":{"description":"The body or file is too large. Error codes: payload_too_large, file.too_large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"payload_too_large":{"summary":"A JSON body is larger than 1 MB. Files never travel as JSON.","value":{"statusCode":413,"error":"payload_too_large","message":"A JSON body is larger than 1 MB.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"file.too_large":{"summary":"A file is larger than your plan or the tool allows. The details give maxBytes.","value":{"statusCode":413,"error":"file.too_large","message":"A file is larger than your plan or the tool allows.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"payload_too_large","meaning":"A JSON body is larger than 1 MB. Files never travel as JSON.","fix":"Send less in one call. Upload a file with POST /v1/files and refer to it by its id."},{"code":"file.too_large","meaning":"A file is larger than your plan or the tool allows. The details give maxBytes.","fix":"Send a smaller file, or use a plan with a higher limit (25 MB on Free up to 1 GB on Enterprise)."}]},"415":{"description":"The body or file is a type the call does not read. Error codes: unsupported_media_type, file.type_refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unsupported_media_type":{"summary":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","value":{"statusCode":415,"error":"unsupported_media_type","message":"The body has a content type the route does not read.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"file.type_refused":{"summary":"No tool reads this content type, this tool does not read it, or the bytes of the file are not the type it declares. The check reads the file itself, never only the Content-Type header.","value":{"statusCode":415,"error":"file.type_refused","message":"No tool reads this content type, this tool does not read it, or the bytes of the file are not the type it declares.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"unsupported_media_type","meaning":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","fix":"Send Content-Type: application/json with a JSON body, or send a file only to POST /v1/files."},{"code":"file.type_refused","meaning":"No tool reads this content type, this tool does not read it, or the bytes of the file are not the type it declares. The check reads the file itself, never only the Content-Type header.","fix":"Send a file the tool accepts (GET /v1/tools/{toolId} lists accepts) with a Content-Type that matches its real format."}]},"422":{"description":"The request is well formed but cannot be processed. Error codes: idempotency_key_reused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_key_reused":{"summary":"The Idempotency-Key was already used with a different request, so the first answer is not the answer to this one.","value":{"statusCode":422,"error":"idempotency_key_reused","message":"The Idempotency-Key was already used with a different request, so the first answer is not the answer to this one.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"idempotency_key_reused","meaning":"The Idempotency-Key was already used with a different request, so the first answer is not the answer to this one.","fix":"Send a new Idempotency-Key for a new request. Repeat the key only to retry the exact same request."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/webhooks":{"get":{"operationId":"listWebhookEndpoints","tags":["Webhooks"],"summary":"List webhook endpoints","description":"Every webhook endpoint of the account, newest first.","security":[{"bearerAuth":["webhooks:manage"]}],"x-required-scope":"webhooks:manage","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl https://api.pdfloft.wrxstack.com/v1/webhooks -H \"Authorization: Bearer $PDFLOFT_API_KEY\""}],"parameters":[],"responses":{"200":{"description":"The endpoints.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointList"}}}},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}},"post":{"operationId":"createWebhookEndpoint","tags":["Webhooks"],"summary":"Create a webhook endpoint","description":"Registers an https address for events. The signing secret is in the answer once. Addresses that are private, loopback, link-local or a metadata address are refused.","security":[{"bearerAuth":["webhooks:manage"]}],"x-required-scope":"webhooks:manage","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.pdfloft.wrxstack.com/v1/webhooks -H \"Authorization: Bearer $PDFLOFT_API_KEY\" -H \"Content-Type: application/json\" -d '{\"url\":\"https://example.com/pdfloft/webhooks\",\"events\":[\"job.completed\",\"job.failed\"]}'"}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"A unique value of 1 to 255 characters. A repeat with the same key and body returns the first answer; the same key with a different body is refused with idempotency_key_reused. Keys are kept for 24 hours.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookRequest"}}}},"responses":{"201":{"description":"The endpoint, with its secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedWebhookEndpoint"}}}},"400":{"description":"The address is refused. Error codes: validation_failed, idempotency_key_invalid, webhook.url_refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"idempotency_key_invalid":{"summary":"The Idempotency-Key is not 1 to 255 visible ASCII characters.","value":{"statusCode":400,"error":"idempotency_key_invalid","message":"The Idempotency-Key is not 1 to 255 visible ASCII characters.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"webhook.url_refused":{"summary":"The endpoint address is not a public https address. Private, loopback, link-local and metadata addresses are refused.","value":{"statusCode":400,"error":"webhook.url_refused","message":"The endpoint address is not a public https address.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."},{"code":"idempotency_key_invalid","meaning":"The Idempotency-Key is not 1 to 255 visible ASCII characters.","fix":"Send a UUID, or any value of 1 to 255 letters, digits and punctuation marks, with no spaces."},{"code":"webhook.url_refused","meaning":"The endpoint address is not a public https address. Private, loopback, link-local and metadata addresses are refused.","fix":"Register an https address on the public internet that answers POST."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."}]},"409":{"description":"The account has the most endpoints it may. Error codes: idempotency_in_progress, webhook.limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_in_progress":{"summary":"A request with the same Idempotency-Key is still running.","value":{"statusCode":409,"error":"idempotency_in_progress","message":"A request with the same Idempotency-Key is still running.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"webhook.limit_reached":{"summary":"The account already has the most webhook endpoints it may have.","value":{"statusCode":409,"error":"webhook.limit_reached","message":"The account already has the most webhook endpoints it may have.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"idempotency_in_progress","meaning":"A request with the same Idempotency-Key is still running.","fix":"Wait a moment and send the same request with the same key again. It returns the first answer once that one finishes."},{"code":"webhook.limit_reached","meaning":"The account already has the most webhook endpoints it may have.","fix":"Delete an endpoint you no longer use with DELETE /v1/webhooks/{endpointId}, then create the new one."}]},"413":{"description":"The body or file is too large. Error codes: payload_too_large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"payload_too_large":{"summary":"A JSON body is larger than 1 MB. Files never travel as JSON.","value":{"statusCode":413,"error":"payload_too_large","message":"A JSON body is larger than 1 MB.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"payload_too_large","meaning":"A JSON body is larger than 1 MB. Files never travel as JSON.","fix":"Send less in one call. Upload a file with POST /v1/files and refer to it by its id."}]},"415":{"description":"The body or file is a type the call does not read. Error codes: unsupported_media_type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unsupported_media_type":{"summary":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","value":{"statusCode":415,"error":"unsupported_media_type","message":"The body has a content type the route does not read.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"unsupported_media_type","meaning":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","fix":"Send Content-Type: application/json with a JSON body, or send a file only to POST /v1/files."}]},"422":{"description":"The request is well formed but cannot be processed. Error codes: idempotency_key_reused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_key_reused":{"summary":"The Idempotency-Key was already used with a different request, so the first answer is not the answer to this one.","value":{"statusCode":422,"error":"idempotency_key_reused","message":"The Idempotency-Key was already used with a different request, so the first answer is not the answer to this one.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"idempotency_key_reused","meaning":"The Idempotency-Key was already used with a different request, so the first answer is not the answer to this one.","fix":"Send a new Idempotency-Key for a new request. Repeat the key only to retry the exact same request."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/webhooks/{endpointId}":{"delete":{"operationId":"deleteWebhookEndpoint","tags":["Webhooks"],"summary":"Delete a webhook endpoint","description":"Removes an endpoint and its delivery log.","security":[{"bearerAuth":["webhooks:manage"]}],"x-required-scope":"webhooks:manage","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE https://api.pdfloft.wrxstack.com/v1/webhooks/cm3x8k2f10003 -H \"Authorization: Bearer $PDFLOFT_API_KEY\""}],"parameters":[{"name":"endpointId","in":"path","required":true,"description":"The endpoint id.","schema":{"type":"string"},"example":"cm3x8k2f10003"}],"responses":{"204":{"description":"Deleted."},"400":{"description":"The request is not valid. Error codes: validation_failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."}]},"404":{"description":"No such endpoint. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/folders":{"get":{"operationId":"listFolders","tags":["Documents"],"summary":"List folders","description":"The folders the key can see: every team folder and the private folders of the key owner, each with the number of documents the key can see in it. Folders nest one level, so a folder has a parentId only when it sits inside a top folder.","security":[{"bearerAuth":["documents:read"]}],"x-required-scope":"documents:read","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl https://api.pdfloft.wrxstack.com/v1/folders -H \"Authorization: Bearer $PDFLOFT_API_KEY\""}],"parameters":[],"responses":{"200":{"description":"The folders.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderList"}}}},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}},"post":{"operationId":"createFolder","tags":["Documents"],"summary":"Create a folder","description":"Makes a folder at the top of the library or inside a top folder. A folder inside a private folder is private. An account keeps up to 500 folders.","security":[{"bearerAuth":["documents:write"]}],"x-required-scope":"documents:write","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.pdfloft.wrxstack.com/v1/folders -H \"Authorization: Bearer $PDFLOFT_API_KEY\" -H \"Content-Type: application/json\" -d '{\"name\":\"Client contracts\",\"visibility\":\"ACCOUNT\"}'"}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"A unique value of 1 to 255 characters. A repeat with the same key and body returns the first answer; the same key with a different body is refused with idempotency_key_reused. Keys are kept for 24 hours.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFolderRequest"}}}},"responses":{"201":{"description":"The folder.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"400":{"description":"The name is not valid, or folders would nest deeper than one level (folder.invalid). Error codes: validation_failed, idempotency_key_invalid, folder.invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"idempotency_key_invalid":{"summary":"The Idempotency-Key is not 1 to 255 visible ASCII characters.","value":{"statusCode":400,"error":"idempotency_key_invalid","message":"The Idempotency-Key is not 1 to 255 visible ASCII characters.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"folder.invalid":{"summary":"A folder or a document cannot be organised that way: folders nest one level only, a team document cannot go in a private folder, and a folder moves only among folders of the same kind.","value":{"statusCode":400,"error":"folder.invalid","message":"A folder or a document cannot be organised that way: folders nest one level only, a team document cannot go in a private folder, and a folder moves only among folders of the same kind.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."},{"code":"idempotency_key_invalid","meaning":"The Idempotency-Key is not 1 to 255 visible ASCII characters.","fix":"Send a UUID, or any value of 1 to 255 letters, digits and punctuation marks, with no spaces."},{"code":"folder.invalid","meaning":"A folder or a document cannot be organised that way: folders nest one level only, a team document cannot go in a private folder, and a folder moves only among folders of the same kind.","fix":"Put the folder at the top, or inside a top folder of the same kind, and keep a team document in a team folder or at the top."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope, read_only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"read_only":{"summary":"The person who owns the key has read only access to the account, so a call that changes data is refused.","value":{"statusCode":403,"error":"read_only","message":"The person who owns the key has read only access to the account, so a call that changes data is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."},{"code":"read_only","meaning":"The person who owns the key has read only access to the account, so a call that changes data is refused.","fix":"Ask an owner or admin to give that person write access, or use a key owned by someone who has it."}]},"409":{"description":"The account keeps the most folders it may (folder.limit_reached). Error codes: idempotency_in_progress, folder.limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_in_progress":{"summary":"A request with the same Idempotency-Key is still running.","value":{"statusCode":409,"error":"idempotency_in_progress","message":"A request with the same Idempotency-Key is still running.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"folder.limit_reached":{"summary":"The account already has the most folders it may keep.","value":{"statusCode":409,"error":"folder.limit_reached","message":"The account already has the most folders it may keep.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"idempotency_in_progress","meaning":"A request with the same Idempotency-Key is still running.","fix":"Wait a moment and send the same request with the same key again. It returns the first answer once that one finishes."},{"code":"folder.limit_reached","meaning":"The account already has the most folders it may keep.","fix":"Delete a folder you no longer use with DELETE /v1/folders/{folderId}. Its documents are kept and return to the top of the library."}]},"413":{"description":"The body or file is too large. Error codes: payload_too_large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"payload_too_large":{"summary":"A JSON body is larger than 1 MB. Files never travel as JSON.","value":{"statusCode":413,"error":"payload_too_large","message":"A JSON body is larger than 1 MB.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"payload_too_large","meaning":"A JSON body is larger than 1 MB. Files never travel as JSON.","fix":"Send less in one call. Upload a file with POST /v1/files and refer to it by its id."}]},"415":{"description":"The body or file is a type the call does not read. Error codes: unsupported_media_type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unsupported_media_type":{"summary":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","value":{"statusCode":415,"error":"unsupported_media_type","message":"The body has a content type the route does not read.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"unsupported_media_type","meaning":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","fix":"Send Content-Type: application/json with a JSON body, or send a file only to POST /v1/files."}]},"422":{"description":"The request is well formed but cannot be processed. Error codes: idempotency_key_reused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_key_reused":{"summary":"The Idempotency-Key was already used with a different request, so the first answer is not the answer to this one.","value":{"statusCode":422,"error":"idempotency_key_reused","message":"The Idempotency-Key was already used with a different request, so the first answer is not the answer to this one.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"idempotency_key_reused","meaning":"The Idempotency-Key was already used with a different request, so the first answer is not the answer to this one.","fix":"Send a new Idempotency-Key for a new request. Repeat the key only to retry the exact same request."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/folders/{folderId}":{"delete":{"operationId":"deleteFolder","tags":["Documents"],"summary":"Delete a folder","description":"Deletes a folder and loses no document: its documents go to its parent folder, or to the top of the library, and its subfolders go to the top. Only the person who made the folder, or an owner or admin for a team folder, may delete it.","security":[{"bearerAuth":["documents:write"]}],"x-required-scope":"documents:write","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE https://api.pdfloft.wrxstack.com/v1/folders/cm3x8k2f10040 -H \"Authorization: Bearer $PDFLOFT_API_KEY\""}],"parameters":[{"name":"folderId","in":"path","required":true,"description":"The folder id.","schema":{"type":"string"},"example":"cm3x8k2f10040"}],"responses":{"200":{"description":"Deleted, with the number of documents that moved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedFolder"}}}},"400":{"description":"The request is not valid. Error codes: validation_failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope, read_only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"read_only":{"summary":"The person who owns the key has read only access to the account, so a call that changes data is refused.","value":{"statusCode":403,"error":"read_only","message":"The person who owns the key has read only access to the account, so a call that changes data is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."},{"code":"read_only","meaning":"The person who owns the key has read only access to the account, so a call that changes data is refused.","fix":"Ask an owner or admin to give that person write access, or use a key owned by someone who has it."}]},"404":{"description":"No such folder. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/documents/{documentId}/organize":{"post":{"operationId":"organizeDocument","tags":["Documents"],"summary":"Put a document in a folder and set its tags","description":"Moves a document into a folder, or to the top of the library with folderId null, and replaces its tags. Send either or both. A team document cannot go in a private folder. Only the person who made the document, or an owner or admin for a team document, may do this.","security":[{"bearerAuth":["documents:write"]}],"x-required-scope":"documents:write","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.pdfloft.wrxstack.com/v1/documents/cm3x8k2f10002/organize -H \"Authorization: Bearer $PDFLOFT_API_KEY\" -H \"Content-Type: application/json\" -d '{\"folderId\":\"cm3x8k2f10040\",\"tags\":[\"invoice\",\"2026\"]}'"}],"parameters":[{"name":"documentId","in":"path","required":true,"description":"The document id.","schema":{"type":"string"},"example":"cm3x8k2f10002"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizeDocumentRequest"}}}},"responses":{"200":{"description":"The document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"400":{"description":"The folder or the tags do not fit (folder.invalid, or validation_failed). Error codes: validation_failed, folder.invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"folder.invalid":{"summary":"A folder or a document cannot be organised that way: folders nest one level only, a team document cannot go in a private folder, and a folder moves only among folders of the same kind.","value":{"statusCode":400,"error":"folder.invalid","message":"A folder or a document cannot be organised that way: folders nest one level only, a team document cannot go in a private folder, and a folder moves only among folders of the same kind.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."},{"code":"folder.invalid","meaning":"A folder or a document cannot be organised that way: folders nest one level only, a team document cannot go in a private folder, and a folder moves only among folders of the same kind.","fix":"Put the folder at the top, or inside a top folder of the same kind, and keep a team document in a team folder or at the top."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope, read_only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"read_only":{"summary":"The person who owns the key has read only access to the account, so a call that changes data is refused.","value":{"statusCode":403,"error":"read_only","message":"The person who owns the key has read only access to the account, so a call that changes data is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."},{"code":"read_only","meaning":"The person who owns the key has read only access to the account, so a call that changes data is refused.","fix":"Ask an owner or admin to give that person write access, or use a key owned by someone who has it."}]},"404":{"description":"No such document in this account, or it is private to another person. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"413":{"description":"The body or file is too large. Error codes: payload_too_large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"payload_too_large":{"summary":"A JSON body is larger than 1 MB. Files never travel as JSON.","value":{"statusCode":413,"error":"payload_too_large","message":"A JSON body is larger than 1 MB.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"payload_too_large","meaning":"A JSON body is larger than 1 MB. Files never travel as JSON.","fix":"Send less in one call. Upload a file with POST /v1/files and refer to it by its id."}]},"415":{"description":"The body or file is a type the call does not read. Error codes: unsupported_media_type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unsupported_media_type":{"summary":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","value":{"statusCode":415,"error":"unsupported_media_type","message":"The body has a content type the route does not read.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"unsupported_media_type","meaning":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","fix":"Send Content-Type: application/json with a JSON body, or send a file only to POST /v1/files."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/documents/{documentId}/review-links":{"get":{"operationId":"listReviewLinks","tags":["Review"],"summary":"List the review links of a document","description":"The links made for a document, newest first, with their state and use. A token is never returned here: it is in the answer that made the link, once.","security":[{"bearerAuth":["reviews:read"]}],"x-required-scope":"reviews:read","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl https://api.pdfloft.wrxstack.com/v1/documents/cm3x8k2f10002/review-links -H \"Authorization: Bearer $PDFLOFT_API_KEY\""}],"parameters":[{"name":"documentId","in":"path","required":true,"description":"The document id.","schema":{"type":"string"},"example":"cm3x8k2f10002"}],"responses":{"200":{"description":"The links.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewLinkList"}}}},"400":{"description":"The request is not valid. Error codes: validation_failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."}]},"404":{"description":"No such document in this account, or it is private to another person. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}},"post":{"operationId":"createReviewLink","tags":["Review"],"summary":"Share a document for review","description":"Makes a link that lets a person with no account read one document and, in comment mode, leave comments anchored to a place on a page. Optionally the link expires, asks for an access code and offers the PDF for download. The answer holds the token and the address once; only a hash of the token is kept, so it cannot be read again, and this call is not idempotent so that a replayed answer never stores it. An account keeps as many active links as its plan allows. Revoking takes effect on the next request; a signed file address already handed out lives up to one minute.","security":[{"bearerAuth":["reviews:write"]}],"x-required-scope":"reviews:write","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.pdfloft.wrxstack.com/v1/documents/cm3x8k2f10002/review-links -H \"Authorization: Bearer $PDFLOFT_API_KEY\" -H \"Content-Type: application/json\" -d '{\"mode\":\"comment\",\"expiresAt\":\"2026-12-31T23:59:59Z\",\"code\":\"correct horse\",\"label\":\"For Priya\"}'"}],"parameters":[{"name":"documentId","in":"path","required":true,"description":"The document id.","schema":{"type":"string"},"example":"cm3x8k2f10002"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReviewLinkRequest"}}}},"responses":{"201":{"description":"The link, with its token and address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedReviewLink"}}}},"400":{"description":"The expiry or the code is not valid. Error codes: validation_failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope, read_only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"read_only":{"summary":"The person who owns the key has read only access to the account, so a call that changes data is refused.","value":{"statusCode":403,"error":"read_only","message":"The person who owns the key has read only access to the account, so a call that changes data is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."},{"code":"read_only","meaning":"The person who owns the key has read only access to the account, so a call that changes data is refused.","fix":"Ask an owner or admin to give that person write access, or use a key owned by someone who has it."}]},"404":{"description":"No such document in this account, or it is private to another person. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"409":{"description":"The account has as many active links as its plan allows (review_links.exhausted). Error codes: review_links.exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"review_links.exhausted":{"summary":"The account already has as many active review links as its plan allows.","value":{"statusCode":409,"error":"review_links.exhausted","message":"The account already has as many active review links as its plan allows.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"review_links.exhausted","meaning":"The account already has as many active review links as its plan allows.","fix":"Revoke a link you no longer need with DELETE /v1/documents/{documentId}/review-links/{linkId}, or change the plan, then create the new link."}]},"413":{"description":"The body or file is too large. Error codes: payload_too_large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"payload_too_large":{"summary":"A JSON body is larger than 1 MB. Files never travel as JSON.","value":{"statusCode":413,"error":"payload_too_large","message":"A JSON body is larger than 1 MB.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"payload_too_large","meaning":"A JSON body is larger than 1 MB. Files never travel as JSON.","fix":"Send less in one call. Upload a file with POST /v1/files and refer to it by its id."}]},"415":{"description":"The body or file is a type the call does not read. Error codes: unsupported_media_type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unsupported_media_type":{"summary":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","value":{"statusCode":415,"error":"unsupported_media_type","message":"The body has a content type the route does not read.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"unsupported_media_type","meaning":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","fix":"Send Content-Type: application/json with a JSON body, or send a file only to POST /v1/files."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/documents/{documentId}/review-links/{linkId}":{"delete":{"operationId":"revokeReviewLink","tags":["Review"],"summary":"Revoke a review link","description":"Ends a link on the next request: it opens nothing and takes no comment, and an access grant already given stops with it. Revoking twice is not an error. A signed file address handed out in the last minute may work until it ends.","security":[{"bearerAuth":["reviews:write"]}],"x-required-scope":"reviews:write","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE https://api.pdfloft.wrxstack.com/v1/documents/cm3x8k2f10002/review-links/cm3x8k2f10050 -H \"Authorization: Bearer $PDFLOFT_API_KEY\""}],"parameters":[{"name":"documentId","in":"path","required":true,"description":"The document id.","schema":{"type":"string"},"example":"cm3x8k2f10002"},{"name":"linkId","in":"path","required":true,"description":"The link id.","schema":{"type":"string"},"example":"cm3x8k2f10050"}],"responses":{"204":{"description":"Revoked."},"400":{"description":"The request is not valid. Error codes: validation_failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope, read_only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"read_only":{"summary":"The person who owns the key has read only access to the account, so a call that changes data is refused.","value":{"statusCode":403,"error":"read_only","message":"The person who owns the key has read only access to the account, so a call that changes data is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."},{"code":"read_only","meaning":"The person who owns the key has read only access to the account, so a call that changes data is refused.","fix":"Ask an owner or admin to give that person write access, or use a key owned by someone who has it."}]},"404":{"description":"No such document in this account, or it is private to another person. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/documents/{documentId}/comments":{"get":{"operationId":"listReviewComments","tags":["Review"],"summary":"List the comments left through review links","description":"Every thread on the document, oldest first, with its replies, the page and the place on it. The text is what the reviewer typed: show it as text, never as markup.","security":[{"bearerAuth":["reviews:read"]}],"x-required-scope":"reviews:read","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl https://api.pdfloft.wrxstack.com/v1/documents/cm3x8k2f10002/comments -H \"Authorization: Bearer $PDFLOFT_API_KEY\""}],"parameters":[{"name":"documentId","in":"path","required":true,"description":"The document id.","schema":{"type":"string"},"example":"cm3x8k2f10002"}],"responses":{"200":{"description":"The threads.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewCommentList"}}}},"400":{"description":"The request is not valid. Error codes: validation_failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."}]},"404":{"description":"No such document in this account, or it is private to another person. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/documents/{documentId}/comments/{commentId}/replies":{"post":{"operationId":"replyToReviewComment","tags":["Review"],"summary":"Reply to a comment","description":"Adds a reply from the person who owns the key. The reviewer sees it under their comment when they open their link again.","security":[{"bearerAuth":["reviews:write"]}],"x-required-scope":"reviews:write","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.pdfloft.wrxstack.com/v1/documents/cm3x8k2f10002/comments/cm3x8k2f10060/replies -H \"Authorization: Bearer $PDFLOFT_API_KEY\" -H \"Content-Type: application/json\" -d '{\"body\":\"Clause 4 is final.\"}'"}],"parameters":[{"name":"documentId","in":"path","required":true,"description":"The document id.","schema":{"type":"string"},"example":"cm3x8k2f10002"},{"name":"commentId","in":"path","required":true,"description":"The comment id.","schema":{"type":"string"},"example":"cm3x8k2f10060"},{"name":"Idempotency-Key","in":"header","required":false,"description":"A unique value of 1 to 255 characters. A repeat with the same key and body returns the first answer; the same key with a different body is refused with idempotency_key_reused. Keys are kept for 24 hours.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewReplyRequest"}}}},"responses":{"201":{"description":"The reply.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewReply"}}}},"400":{"description":"The request is not valid. Error codes: validation_failed, idempotency_key_invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"idempotency_key_invalid":{"summary":"The Idempotency-Key is not 1 to 255 visible ASCII characters.","value":{"statusCode":400,"error":"idempotency_key_invalid","message":"The Idempotency-Key is not 1 to 255 visible ASCII characters.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."},{"code":"idempotency_key_invalid","meaning":"The Idempotency-Key is not 1 to 255 visible ASCII characters.","fix":"Send a UUID, or any value of 1 to 255 letters, digits and punctuation marks, with no spaces."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope, read_only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"read_only":{"summary":"The person who owns the key has read only access to the account, so a call that changes data is refused.","value":{"statusCode":403,"error":"read_only","message":"The person who owns the key has read only access to the account, so a call that changes data is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."},{"code":"read_only","meaning":"The person who owns the key has read only access to the account, so a call that changes data is refused.","fix":"Ask an owner or admin to give that person write access, or use a key owned by someone who has it."}]},"404":{"description":"No such document in this account, or it is private to another person. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"409":{"description":"The call conflicts with the current state. Error codes: idempotency_in_progress.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_in_progress":{"summary":"A request with the same Idempotency-Key is still running.","value":{"statusCode":409,"error":"idempotency_in_progress","message":"A request with the same Idempotency-Key is still running.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"idempotency_in_progress","meaning":"A request with the same Idempotency-Key is still running.","fix":"Wait a moment and send the same request with the same key again. It returns the first answer once that one finishes."}]},"413":{"description":"The body or file is too large. Error codes: payload_too_large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"payload_too_large":{"summary":"A JSON body is larger than 1 MB. Files never travel as JSON.","value":{"statusCode":413,"error":"payload_too_large","message":"A JSON body is larger than 1 MB.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"payload_too_large","meaning":"A JSON body is larger than 1 MB. Files never travel as JSON.","fix":"Send less in one call. Upload a file with POST /v1/files and refer to it by its id."}]},"415":{"description":"The body or file is a type the call does not read. Error codes: unsupported_media_type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unsupported_media_type":{"summary":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","value":{"statusCode":415,"error":"unsupported_media_type","message":"The body has a content type the route does not read.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"unsupported_media_type","meaning":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","fix":"Send Content-Type: application/json with a JSON body, or send a file only to POST /v1/files."}]},"422":{"description":"The request is well formed but cannot be processed. Error codes: idempotency_key_reused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_key_reused":{"summary":"The Idempotency-Key was already used with a different request, so the first answer is not the answer to this one.","value":{"statusCode":422,"error":"idempotency_key_reused","message":"The Idempotency-Key was already used with a different request, so the first answer is not the answer to this one.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"idempotency_key_reused","meaning":"The Idempotency-Key was already used with a different request, so the first answer is not the answer to this one.","fix":"Send a new Idempotency-Key for a new request. Repeat the key only to retry the exact same request."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/documents/{documentId}/comments/{commentId}/resolve":{"post":{"operationId":"resolveReviewComment","tags":["Review"],"summary":"Resolve or reopen a comment","description":"Marks a thread resolved, or reopens it with resolved false. The reviewer sees the state through their link.","security":[{"bearerAuth":["reviews:write"]}],"x-required-scope":"reviews:write","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.pdfloft.wrxstack.com/v1/documents/cm3x8k2f10002/comments/cm3x8k2f10060/resolve -H \"Authorization: Bearer $PDFLOFT_API_KEY\" -H \"Content-Type: application/json\" -d '{\"resolved\":true}'"}],"parameters":[{"name":"documentId","in":"path","required":true,"description":"The document id.","schema":{"type":"string"},"example":"cm3x8k2f10002"},{"name":"commentId","in":"path","required":true,"description":"The comment id.","schema":{"type":"string"},"example":"cm3x8k2f10060"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveReviewCommentRequest"}}}},"responses":{"200":{"description":"The state of the thread.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolvedReviewComment"}}}},"400":{"description":"The request is not valid. Error codes: validation_failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope, read_only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"read_only":{"summary":"The person who owns the key has read only access to the account, so a call that changes data is refused.","value":{"statusCode":403,"error":"read_only","message":"The person who owns the key has read only access to the account, so a call that changes data is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."},{"code":"read_only","meaning":"The person who owns the key has read only access to the account, so a call that changes data is refused.","fix":"Ask an owner or admin to give that person write access, or use a key owned by someone who has it."}]},"404":{"description":"No such document in this account, or it is private to another person. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"413":{"description":"The body or file is too large. Error codes: payload_too_large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"payload_too_large":{"summary":"A JSON body is larger than 1 MB. Files never travel as JSON.","value":{"statusCode":413,"error":"payload_too_large","message":"A JSON body is larger than 1 MB.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"payload_too_large","meaning":"A JSON body is larger than 1 MB. Files never travel as JSON.","fix":"Send less in one call. Upload a file with POST /v1/files and refer to it by its id."}]},"415":{"description":"The body or file is a type the call does not read. Error codes: unsupported_media_type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unsupported_media_type":{"summary":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","value":{"statusCode":415,"error":"unsupported_media_type","message":"The body has a content type the route does not read.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"unsupported_media_type","meaning":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","fix":"Send Content-Type: application/json with a JSON body, or send a file only to POST /v1/files."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/signature-verifications":{"post":{"operationId":"verifyPdfSignatures","tags":["Signatures"],"summary":"Verify the signatures of a PDF","description":"Checks the digital signatures of an uploaded PDF (POST /v1/files) and answers for each one: the signer certificate, the time, whether the document changed after signing, whether the certificate chain links up and whether a timestamp token attests to the signature. The answer is never \"valid\". The strongest verdicts say the document is unchanged and that the signer is not independently confirmed, because the check holds no trust list and does not check revocation; notEstablished lists exactly what was not checked. Nothing about the file is stored. The file may be up to 25 MB.","security":[{"bearerAuth":["signatures:read"]}],"x-required-scope":"signatures:read","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.pdfloft.wrxstack.com/v1/signature-verifications -H \"Authorization: Bearer $PDFLOFT_API_KEY\" -H \"Content-Type: application/json\" -d '{\"fileId\":\"file_Qm3nT9xvB2kLw8RzYc1pAe5H\"}'"}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifySignaturesRequest"}}}},"responses":{"200":{"description":"What the signatures establish.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifySignaturesResult"}}}},"400":{"description":"The file is empty or is not a PDF (validation_failed, problem verify.empty or verify.not_pdf). Error codes: validation_failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."}]},"404":{"description":"No such uploaded file in this account. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"413":{"description":"The file is larger than 25 MB (file.too_large). Error codes: payload_too_large, file.too_large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"payload_too_large":{"summary":"A JSON body is larger than 1 MB. Files never travel as JSON.","value":{"statusCode":413,"error":"payload_too_large","message":"A JSON body is larger than 1 MB.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"file.too_large":{"summary":"A file is larger than your plan or the tool allows. The details give maxBytes.","value":{"statusCode":413,"error":"file.too_large","message":"A file is larger than your plan or the tool allows.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"payload_too_large","meaning":"A JSON body is larger than 1 MB. Files never travel as JSON.","fix":"Send less in one call. Upload a file with POST /v1/files and refer to it by its id."},{"code":"file.too_large","meaning":"A file is larger than your plan or the tool allows. The details give maxBytes.","fix":"Send a smaller file, or use a plan with a higher limit (25 MB on Free up to 1 GB on Enterprise)."}]},"415":{"description":"The body or file is a type the call does not read. Error codes: unsupported_media_type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unsupported_media_type":{"summary":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","value":{"statusCode":415,"error":"unsupported_media_type","message":"The body has a content type the route does not read.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"unsupported_media_type","meaning":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","fix":"Send Content-Type: application/json with a JSON body, or send a file only to POST /v1/files."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/signature-templates":{"get":{"operationId":"listSignatureTemplates","tags":["Signatures"],"summary":"List signature templates","description":"The reusable layouts of the account: the document, the signer roles and the fields placed on it. Templates are shared with every member of the account. Make and edit them in the web app.","security":[{"bearerAuth":["signatures:read"]}],"x-required-scope":"signatures:read","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl https://api.pdfloft.wrxstack.com/v1/signature-templates -H \"Authorization: Bearer $PDFLOFT_API_KEY\""}],"parameters":[],"responses":{"200":{"description":"The templates.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignatureTemplateList"}}}},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/signature-templates/{templateId}":{"get":{"operationId":"getSignatureTemplate","tags":["Signatures"],"summary":"Get a signature template","description":"One template with its signer roles and fields. Name a role by its id or its label when you send a request from the template.","security":[{"bearerAuth":["signatures:read"]}],"x-required-scope":"signatures:read","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl https://api.pdfloft.wrxstack.com/v1/signature-templates/cm3x8k2f10020 -H \"Authorization: Bearer $PDFLOFT_API_KEY\""}],"parameters":[{"name":"templateId","in":"path","required":true,"description":"The template id.","schema":{"type":"string"},"example":"cm3x8k2f10020"}],"responses":{"200":{"description":"The template.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignatureTemplate"}}}},"400":{"description":"The request is not valid. Error codes: validation_failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."}]},"404":{"description":"No such template in this account. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/signature-requests":{"post":{"operationId":"createSignatureRequest","tags":["Signatures"],"summary":"Create a signature request","description":"Makes a signature request from an uploaded PDF (POST /v1/files), a library document or a template, with its signers and the fields they fill. A draft is created unless send is true, and a sent request spends one signature request of the plan allowance, exactly as in the web app: a send the allowance refuses (signatures.exhausted) creates nothing. The request belongs to the person who owns the key and is private to them unless visibility is ACCOUNT. Signers are emailed their links when the request is sent.","security":[{"bearerAuth":["signatures:send"]}],"x-required-scope":"signatures:send","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.pdfloft.wrxstack.com/v1/signature-requests -H \"Authorization: Bearer $PDFLOFT_API_KEY\" -H \"Idempotency-Key: $(uuidgen)\" -H \"Content-Type: application/json\" -d '{\"title\":\"Services agreement\",\"source\":{\"fileId\":\"file_Qm3nT9xvB2kLw8RzYc1pAe5H\"},\"signers\":[{\"role\":\"Client\",\"sequence\":1,\"name\":\"Meera Iyer\",\"email\":\"meera@example.com\"}],\"fields\":[{\"signerRole\":\"Client\",\"type\":\"signature\",\"label\":\"Client signature\",\"page\":0,\"x\":60,\"y\":100,\"w\":160,\"h\":40}],\"send\":true}'"}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"A unique value of 1 to 255 characters. A repeat with the same key and body returns the first answer; the same key with a different body is refused with idempotency_key_reused. Keys are kept for 24 hours.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSignatureRequest"}}}},"responses":{"201":{"description":"The request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignatureRequest"}}}},"400":{"description":"The signers, the fields or the document do not fit (validation_failed, with the problem in the details). Error codes: validation_failed, idempotency_key_invalid, signature.verification_unsupported, signature.access_code_invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"idempotency_key_invalid":{"summary":"The Idempotency-Key is not 1 to 255 visible ASCII characters.","value":{"statusCode":400,"error":"idempotency_key_invalid","message":"The Idempotency-Key is not 1 to 255 visible ASCII characters.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"signature.verification_unsupported":{"summary":"A signer asked to be verified by a method PDF Loft does not offer. The methods sms-otp, kba and id-document do not exist yet, and nothing is sent without the check the sender asked for. The details name the method and list the supported ones.","value":{"statusCode":400,"error":"signature.verification_unsupported","message":"A signer asked to be verified by a method PDF Loft does not offer.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"signature.access_code_invalid":{"summary":"A signer verified by access code has no accessCode, or it is not 6 to 64 characters, or an accessCode was given for a signer with another method. The details name the problem and the signer position.","value":{"statusCode":400,"error":"signature.access_code_invalid","message":"A signer verified by access code has no accessCode, or it is not 6 to 64 characters, or an accessCode was given for a signer with another method.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."},{"code":"idempotency_key_invalid","meaning":"The Idempotency-Key is not 1 to 255 visible ASCII characters.","fix":"Send a UUID, or any value of 1 to 255 letters, digits and punctuation marks, with no spaces."},{"code":"signature.verification_unsupported","meaning":"A signer asked to be verified by a method PDF Loft does not offer. The methods sms-otp, kba and id-document do not exist yet, and nothing is sent without the check the sender asked for. The details name the method and list the supported ones.","fix":"Set verificationMethod to none, access-code or email-code for each signer, or leave it out."},{"code":"signature.access_code_invalid","meaning":"A signer verified by access code has no accessCode, or it is not 6 to 64 characters, or an accessCode was given for a signer with another method. The details name the problem and the signer position.","fix":"Give every access-code signer an accessCode of 6 to 64 characters and share it with them yourself, and send no accessCode for the other methods."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account has used its signature requests for this period. The details give the limit, the amount used and when it resets. Error codes: plan_required, signatures.exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"signatures.exhausted":{"summary":"The account has used its signature requests for this period. The details give the limit, the amount used, the amount a bulk send needed and when the period resets.","value":{"statusCode":402,"error":"signatures.exhausted","message":"The account has used its signature requests for this period.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."},{"code":"signatures.exhausted","meaning":"The account has used its signature requests for this period. The details give the limit, the amount used, the amount a bulk send needed and when the period resets.","fix":"Wait for the reset time in the details, send fewer requests, or upgrade the plan."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope, read_only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"read_only":{"summary":"The person who owns the key has read only access to the account, so a call that changes data is refused.","value":{"statusCode":403,"error":"read_only","message":"The person who owns the key has read only access to the account, so a call that changes data is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."},{"code":"read_only","meaning":"The person who owns the key has read only access to the account, so a call that changes data is refused.","fix":"Ask an owner or admin to give that person write access, or use a key owned by someone who has it."}]},"404":{"description":"No such file, document or template in this account. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"409":{"description":"The call conflicts with the current state. Error codes: idempotency_in_progress.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_in_progress":{"summary":"A request with the same Idempotency-Key is still running.","value":{"statusCode":409,"error":"idempotency_in_progress","message":"A request with the same Idempotency-Key is still running.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"idempotency_in_progress","meaning":"A request with the same Idempotency-Key is still running.","fix":"Wait a moment and send the same request with the same key again. It returns the first answer once that one finishes."}]},"413":{"description":"The body or file is too large. Error codes: payload_too_large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"payload_too_large":{"summary":"A JSON body is larger than 1 MB. Files never travel as JSON.","value":{"statusCode":413,"error":"payload_too_large","message":"A JSON body is larger than 1 MB.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"payload_too_large","meaning":"A JSON body is larger than 1 MB. Files never travel as JSON.","fix":"Send less in one call. Upload a file with POST /v1/files and refer to it by its id."}]},"415":{"description":"The body or file is a type the call does not read. Error codes: unsupported_media_type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unsupported_media_type":{"summary":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","value":{"statusCode":415,"error":"unsupported_media_type","message":"The body has a content type the route does not read.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"unsupported_media_type","meaning":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","fix":"Send Content-Type: application/json with a JSON body, or send a file only to POST /v1/files."}]},"422":{"description":"The request is well formed but cannot be processed. Error codes: idempotency_key_reused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_key_reused":{"summary":"The Idempotency-Key was already used with a different request, so the first answer is not the answer to this one.","value":{"statusCode":422,"error":"idempotency_key_reused","message":"The Idempotency-Key was already used with a different request, so the first answer is not the answer to this one.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"idempotency_key_reused","meaning":"The Idempotency-Key was already used with a different request, so the first answer is not the answer to this one.","fix":"Send a new Idempotency-Key for a new request. Repeat the key only to retry the exact same request."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}},"get":{"operationId":"listSignatureRequests","tags":["Signatures"],"summary":"List signature requests","description":"The requests the key can see, newest first: every account-wide request and the private requests of the person who owns the key. Filter by status, or by mine to list only the requests that person sent.","security":[{"bearerAuth":["signatures:read"]}],"x-required-scope":"signatures:read","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl \"https://api.pdfloft.wrxstack.com/v1/signature-requests?status=sent&limit=20\" -H \"Authorization: Bearer $PDFLOFT_API_KEY\""}],"parameters":[{"name":"status","in":"query","required":false,"description":"draft: not sent yet. sent: waiting for the first signer. in_progress: at least one signer signed. completed: every signer signed. declined: a signer declined. expired: the request passed its expiry. voided: the sender cancelled it.","schema":{"type":"string","enum":["draft","sent","in_progress","completed","declined","expired","voided"]}},{"name":"mine","in":"query","required":false,"description":"true: only the requests the owner of the key sent.","schema":{"type":"string","enum":["true","false"]}},{"name":"limit","in":"query","required":false,"description":"How many items to return, 1 to 100.","schema":{"default":30,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The nextCursor of the previous page.","schema":{"type":"string","maxLength":64,"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}}],"responses":{"200":{"description":"A page of requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignatureRequestList"}}}},"400":{"description":"The request is not valid. Error codes: validation_failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/signature-requests/bulk":{"post":{"operationId":"bulkSendSignatureRequests","tags":["Signatures"],"summary":"Send a template to many signers","description":"Sends one request from a template for each row, each row naming the signers who fill the template roles. The batch is refused whole when it would pass the signature requests the plan allows; otherwise the answer lists the rows that were created and the rows that failed with a code.","security":[{"bearerAuth":["signatures:send"]}],"x-required-scope":"signatures:send","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.pdfloft.wrxstack.com/v1/signature-requests/bulk -H \"Authorization: Bearer $PDFLOFT_API_KEY\" -H \"Content-Type: application/json\" -d '{\"templateId\":\"cm3x8k2f10020\",\"rows\":[{\"title\":\"Services agreement for Northwind\",\"signers\":[{\"role\":\"client\",\"name\":\"Meera Iyer\",\"email\":\"meera@example.com\"}]}]}'"}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"A unique value of 1 to 255 characters. A repeat with the same key and body returns the first answer; the same key with a different body is refused with idempotency_key_reused. Keys are kept for 24 hours.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkSignatureRequest"}}}},"responses":{"202":{"description":"The rows that were created and the rows that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkSignatureResult"}}}},"400":{"description":"The request is not valid. Error codes: validation_failed, idempotency_key_invalid, signature.verification_unsupported, signature.access_code_invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"idempotency_key_invalid":{"summary":"The Idempotency-Key is not 1 to 255 visible ASCII characters.","value":{"statusCode":400,"error":"idempotency_key_invalid","message":"The Idempotency-Key is not 1 to 255 visible ASCII characters.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"signature.verification_unsupported":{"summary":"A signer asked to be verified by a method PDF Loft does not offer. The methods sms-otp, kba and id-document do not exist yet, and nothing is sent without the check the sender asked for. The details name the method and list the supported ones.","value":{"statusCode":400,"error":"signature.verification_unsupported","message":"A signer asked to be verified by a method PDF Loft does not offer.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"signature.access_code_invalid":{"summary":"A signer verified by access code has no accessCode, or it is not 6 to 64 characters, or an accessCode was given for a signer with another method. The details name the problem and the signer position.","value":{"statusCode":400,"error":"signature.access_code_invalid","message":"A signer verified by access code has no accessCode, or it is not 6 to 64 characters, or an accessCode was given for a signer with another method.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."},{"code":"idempotency_key_invalid","meaning":"The Idempotency-Key is not 1 to 255 visible ASCII characters.","fix":"Send a UUID, or any value of 1 to 255 letters, digits and punctuation marks, with no spaces."},{"code":"signature.verification_unsupported","meaning":"A signer asked to be verified by a method PDF Loft does not offer. The methods sms-otp, kba and id-document do not exist yet, and nothing is sent without the check the sender asked for. The details name the method and list the supported ones.","fix":"Set verificationMethod to none, access-code or email-code for each signer, or leave it out."},{"code":"signature.access_code_invalid","meaning":"A signer verified by access code has no accessCode, or it is not 6 to 64 characters, or an accessCode was given for a signer with another method. The details name the problem and the signer position.","fix":"Give every access-code signer an accessCode of 6 to 64 characters and share it with them yourself, and send no accessCode for the other methods."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account has used its signature requests for this period. The details give the limit, the amount used and when it resets. Error codes: plan_required, signatures.exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"signatures.exhausted":{"summary":"The account has used its signature requests for this period. The details give the limit, the amount used, the amount a bulk send needed and when the period resets.","value":{"statusCode":402,"error":"signatures.exhausted","message":"The account has used its signature requests for this period.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."},{"code":"signatures.exhausted","meaning":"The account has used its signature requests for this period. The details give the limit, the amount used, the amount a bulk send needed and when the period resets.","fix":"Wait for the reset time in the details, send fewer requests, or upgrade the plan."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope, read_only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"read_only":{"summary":"The person who owns the key has read only access to the account, so a call that changes data is refused.","value":{"statusCode":403,"error":"read_only","message":"The person who owns the key has read only access to the account, so a call that changes data is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."},{"code":"read_only","meaning":"The person who owns the key has read only access to the account, so a call that changes data is refused.","fix":"Ask an owner or admin to give that person write access, or use a key owned by someone who has it."}]},"404":{"description":"No such template in this account. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"409":{"description":"The call conflicts with the current state. Error codes: idempotency_in_progress.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_in_progress":{"summary":"A request with the same Idempotency-Key is still running.","value":{"statusCode":409,"error":"idempotency_in_progress","message":"A request with the same Idempotency-Key is still running.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"idempotency_in_progress","meaning":"A request with the same Idempotency-Key is still running.","fix":"Wait a moment and send the same request with the same key again. It returns the first answer once that one finishes."}]},"413":{"description":"The body or file is too large. Error codes: payload_too_large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"payload_too_large":{"summary":"A JSON body is larger than 1 MB. Files never travel as JSON.","value":{"statusCode":413,"error":"payload_too_large","message":"A JSON body is larger than 1 MB.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"payload_too_large","meaning":"A JSON body is larger than 1 MB. Files never travel as JSON.","fix":"Send less in one call. Upload a file with POST /v1/files and refer to it by its id."}]},"415":{"description":"The body or file is a type the call does not read. Error codes: unsupported_media_type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unsupported_media_type":{"summary":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","value":{"statusCode":415,"error":"unsupported_media_type","message":"The body has a content type the route does not read.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"unsupported_media_type","meaning":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","fix":"Send Content-Type: application/json with a JSON body, or send a file only to POST /v1/files."}]},"422":{"description":"The request is well formed but cannot be processed. Error codes: idempotency_key_reused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_key_reused":{"summary":"The Idempotency-Key was already used with a different request, so the first answer is not the answer to this one.","value":{"statusCode":422,"error":"idempotency_key_reused","message":"The Idempotency-Key was already used with a different request, so the first answer is not the answer to this one.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"idempotency_key_reused","meaning":"The Idempotency-Key was already used with a different request, so the first answer is not the answer to this one.","fix":"Send a new Idempotency-Key for a new request. Repeat the key only to retry the exact same request."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/signature-requests/{requestId}":{"get":{"operationId":"getSignatureRequest","tags":["Signatures"],"summary":"Get a signature request","description":"One request with its status and each signer: whether they were asked, opened it, signed or declined, and when. A request past its expiry reads as expired.","security":[{"bearerAuth":["signatures:read"]}],"x-required-scope":"signatures:read","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl https://api.pdfloft.wrxstack.com/v1/signature-requests/cm3x8k2f10010 -H \"Authorization: Bearer $PDFLOFT_API_KEY\""}],"parameters":[{"name":"requestId","in":"path","required":true,"description":"The signature request id.","schema":{"type":"string"},"example":"cm3x8k2f10010"}],"responses":{"200":{"description":"The request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignatureRequest"}}}},"400":{"description":"The request is not valid. Error codes: validation_failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."}]},"404":{"description":"No such signature request in this account, or it is private to another person. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/signature-requests/{requestId}/timeline":{"get":{"operationId":"getSignatureTimeline","tags":["Signatures"],"summary":"Get the timeline of a request","description":"What happened to the request, in order: created, sent, opened, signed, reminded, declined, voided, expired or completed, with the time and the person. The chain field says whether the hash chain of the trail still verifies.","security":[{"bearerAuth":["signatures:read"]}],"x-required-scope":"signatures:read","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl https://api.pdfloft.wrxstack.com/v1/signature-requests/cm3x8k2f10010/timeline -H \"Authorization: Bearer $PDFLOFT_API_KEY\""}],"parameters":[{"name":"requestId","in":"path","required":true,"description":"The signature request id.","schema":{"type":"string"},"example":"cm3x8k2f10010"}],"responses":{"200":{"description":"The timeline.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignatureTimeline"}}}},"400":{"description":"The request is not valid. Error codes: validation_failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."}]},"404":{"description":"No such signature request in this account, or it is private to another person. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/signature-requests/{requestId}/send":{"post":{"operationId":"sendSignatureRequest","tags":["Signatures"],"summary":"Send a draft","description":"Sends a draft request: one signature request of the plan allowance is spent, the signers whose turn it is are emailed, and the signature.request_sent event is raised. Only the sender, or an owner or admin for an account-wide request, can send it.","security":[{"bearerAuth":["signatures:send"]}],"x-required-scope":"signatures:send","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.pdfloft.wrxstack.com/v1/signature-requests/cm3x8k2f10010/send -H \"Authorization: Bearer $PDFLOFT_API_KEY\""}],"parameters":[{"name":"requestId","in":"path","required":true,"description":"The signature request id.","schema":{"type":"string"},"example":"cm3x8k2f10010"},{"name":"Idempotency-Key","in":"header","required":false,"description":"A unique value of 1 to 255 characters. A repeat with the same key and body returns the first answer; the same key with a different body is refused with idempotency_key_reused. Keys are kept for 24 hours.","schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The request was sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignatureSendResult"}}}},"400":{"description":"The request is not valid. Error codes: validation_failed, idempotency_key_invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"idempotency_key_invalid":{"summary":"The Idempotency-Key is not 1 to 255 visible ASCII characters.","value":{"statusCode":400,"error":"idempotency_key_invalid","message":"The Idempotency-Key is not 1 to 255 visible ASCII characters.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."},{"code":"idempotency_key_invalid","meaning":"The Idempotency-Key is not 1 to 255 visible ASCII characters.","fix":"Send a UUID, or any value of 1 to 255 letters, digits and punctuation marks, with no spaces."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account has used its signature requests for this period. The details give the limit, the amount used and when it resets. Error codes: plan_required, signatures.exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"signatures.exhausted":{"summary":"The account has used its signature requests for this period. The details give the limit, the amount used, the amount a bulk send needed and when the period resets.","value":{"statusCode":402,"error":"signatures.exhausted","message":"The account has used its signature requests for this period.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."},{"code":"signatures.exhausted","meaning":"The account has used its signature requests for this period. The details give the limit, the amount used, the amount a bulk send needed and when the period resets.","fix":"Wait for the reset time in the details, send fewer requests, or upgrade the plan."}]},"403":{"description":"The key owner may not change this request (forbidden). Error codes: insufficient_scope, read_only, forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"read_only":{"summary":"The person who owns the key has read only access to the account, so a call that changes data is refused.","value":{"statusCode":403,"error":"read_only","message":"The person who owns the key has read only access to the account, so a call that changes data is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"forbidden":{"summary":"The person who owns the key may read this signature request or workflow but not change it. Only the sender or maker, or an owner or admin, can.","value":{"statusCode":403,"error":"forbidden","message":"The person who owns the key may read this signature request or workflow but not change it.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."},{"code":"read_only","meaning":"The person who owns the key has read only access to the account, so a call that changes data is refused.","fix":"Ask an owner or admin to give that person write access, or use a key owned by someone who has it."},{"code":"forbidden","meaning":"The person who owns the key may read this signature request or workflow but not change it. Only the sender or maker, or an owner or admin, can.","fix":"Use a key owned by the sender or maker, or by an owner or admin of the account."}]},"404":{"description":"No such signature request in this account, or it is private to another person. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"409":{"description":"The request was already sent (signature.not_draft). Error codes: idempotency_in_progress, signature.not_draft.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_in_progress":{"summary":"A request with the same Idempotency-Key is still running.","value":{"statusCode":409,"error":"idempotency_in_progress","message":"A request with the same Idempotency-Key is still running.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"signature.not_draft":{"summary":"The signature request was already sent, so it cannot be sent again.","value":{"statusCode":409,"error":"signature.not_draft","message":"The signature request was already sent, so it cannot be sent again.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"idempotency_in_progress","meaning":"A request with the same Idempotency-Key is still running.","fix":"Wait a moment and send the same request with the same key again. It returns the first answer once that one finishes."},{"code":"signature.not_draft","meaning":"The signature request was already sent, so it cannot be sent again.","fix":"Read the request with GET /v1/signature-requests/{requestId}. Use remind to nudge signers or void to cancel it."}]},"422":{"description":"The request is well formed but cannot be processed. Error codes: idempotency_key_reused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_key_reused":{"summary":"The Idempotency-Key was already used with a different request, so the first answer is not the answer to this one.","value":{"statusCode":422,"error":"idempotency_key_reused","message":"The Idempotency-Key was already used with a different request, so the first answer is not the answer to this one.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"idempotency_key_reused","meaning":"The Idempotency-Key was already used with a different request, so the first answer is not the answer to this one.","fix":"Send a new Idempotency-Key for a new request. Repeat the key only to retry the exact same request."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/signature-requests/{requestId}/remind":{"post":{"operationId":"remindSignatureRequest","tags":["Signatures"],"summary":"Remind the signers","description":"Asks the signers whose turn it is to sign again. Each gets a new link and the old one stops working. A signer waiting for an earlier signer is not reminded.","security":[{"bearerAuth":["signatures:send"]}],"x-required-scope":"signatures:send","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.pdfloft.wrxstack.com/v1/signature-requests/cm3x8k2f10010/remind -H \"Authorization: Bearer $PDFLOFT_API_KEY\" -H \"Content-Type: application/json\" -d '{}'"}],"parameters":[{"name":"requestId","in":"path","required":true,"description":"The signature request id.","schema":{"type":"string"},"example":"cm3x8k2f10010"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemindSignatureRequest"}}}},"responses":{"200":{"description":"How many signers were reminded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignatureRemindResult"}}}},"400":{"description":"The request is not valid. Error codes: validation_failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope, read_only, forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"read_only":{"summary":"The person who owns the key has read only access to the account, so a call that changes data is refused.","value":{"statusCode":403,"error":"read_only","message":"The person who owns the key has read only access to the account, so a call that changes data is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"forbidden":{"summary":"The person who owns the key may read this signature request or workflow but not change it. Only the sender or maker, or an owner or admin, can.","value":{"statusCode":403,"error":"forbidden","message":"The person who owns the key may read this signature request or workflow but not change it.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."},{"code":"read_only","meaning":"The person who owns the key has read only access to the account, so a call that changes data is refused.","fix":"Ask an owner or admin to give that person write access, or use a key owned by someone who has it."},{"code":"forbidden","meaning":"The person who owns the key may read this signature request or workflow but not change it. Only the sender or maker, or an owner or admin, can.","fix":"Use a key owned by the sender or maker, or by an owner or admin of the account."}]},"404":{"description":"No such signature request in this account, or it is private to another person. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"409":{"description":"The request is not waiting for signatures (signature.not_open). Error codes: signature.not_open.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"signature.not_open":{"summary":"The signature request is complete, voided, expired or otherwise no longer waiting for signatures.","value":{"statusCode":409,"error":"signature.not_open","message":"The signature request is complete, voided, expired or otherwise no longer waiting for signatures.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"signature.not_open","meaning":"The signature request is complete, voided, expired or otherwise no longer waiting for signatures.","fix":"Read the status of the request. Make a new request if the document still needs signatures."}]},"413":{"description":"The body or file is too large. Error codes: payload_too_large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"payload_too_large":{"summary":"A JSON body is larger than 1 MB. Files never travel as JSON.","value":{"statusCode":413,"error":"payload_too_large","message":"A JSON body is larger than 1 MB.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"payload_too_large","meaning":"A JSON body is larger than 1 MB. Files never travel as JSON.","fix":"Send less in one call. Upload a file with POST /v1/files and refer to it by its id."}]},"415":{"description":"The body or file is a type the call does not read. Error codes: unsupported_media_type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unsupported_media_type":{"summary":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","value":{"statusCode":415,"error":"unsupported_media_type","message":"The body has a content type the route does not read.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"unsupported_media_type","meaning":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","fix":"Send Content-Type: application/json with a JSON body, or send a file only to POST /v1/files."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/signature-requests/{requestId}/void":{"post":{"operationId":"voidSignatureRequest","tags":["Signatures"],"summary":"Void a request","description":"Cancels a request that is not complete. The signers who were asked are told, their links stop working, and the signature.voided event is raised. A completed request cannot be voided.","security":[{"bearerAuth":["signatures:send"]}],"x-required-scope":"signatures:send","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.pdfloft.wrxstack.com/v1/signature-requests/cm3x8k2f10010/void -H \"Authorization: Bearer $PDFLOFT_API_KEY\" -H \"Content-Type: application/json\" -d '{\"reason\":\"The terms changed.\"}'"}],"parameters":[{"name":"requestId","in":"path","required":true,"description":"The signature request id.","schema":{"type":"string"},"example":"cm3x8k2f10010"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoidSignatureRequest"}}}},"responses":{"200":{"description":"The request was voided.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignatureVoidResult"}}}},"400":{"description":"The request is not valid. Error codes: validation_failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope, read_only, forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"read_only":{"summary":"The person who owns the key has read only access to the account, so a call that changes data is refused.","value":{"statusCode":403,"error":"read_only","message":"The person who owns the key has read only access to the account, so a call that changes data is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"forbidden":{"summary":"The person who owns the key may read this signature request or workflow but not change it. Only the sender or maker, or an owner or admin, can.","value":{"statusCode":403,"error":"forbidden","message":"The person who owns the key may read this signature request or workflow but not change it.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."},{"code":"read_only","meaning":"The person who owns the key has read only access to the account, so a call that changes data is refused.","fix":"Ask an owner or admin to give that person write access, or use a key owned by someone who has it."},{"code":"forbidden","meaning":"The person who owns the key may read this signature request or workflow but not change it. Only the sender or maker, or an owner or admin, can.","fix":"Use a key owned by the sender or maker, or by an owner or admin of the account."}]},"404":{"description":"No such signature request in this account, or it is private to another person. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"409":{"description":"The request is complete or already voided (signature.not_open). Error codes: signature.not_open.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"signature.not_open":{"summary":"The signature request is complete, voided, expired or otherwise no longer waiting for signatures.","value":{"statusCode":409,"error":"signature.not_open","message":"The signature request is complete, voided, expired or otherwise no longer waiting for signatures.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"signature.not_open","meaning":"The signature request is complete, voided, expired or otherwise no longer waiting for signatures.","fix":"Read the status of the request. Make a new request if the document still needs signatures."}]},"413":{"description":"The body or file is too large. Error codes: payload_too_large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"payload_too_large":{"summary":"A JSON body is larger than 1 MB. Files never travel as JSON.","value":{"statusCode":413,"error":"payload_too_large","message":"A JSON body is larger than 1 MB.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"payload_too_large","meaning":"A JSON body is larger than 1 MB. Files never travel as JSON.","fix":"Send less in one call. Upload a file with POST /v1/files and refer to it by its id."}]},"415":{"description":"The body or file is a type the call does not read. Error codes: unsupported_media_type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unsupported_media_type":{"summary":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","value":{"statusCode":415,"error":"unsupported_media_type","message":"The body has a content type the route does not read.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"unsupported_media_type","meaning":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","fix":"Send Content-Type: application/json with a JSON body, or send a file only to POST /v1/files."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/signature-requests/{requestId}/signed-document":{"get":{"operationId":"downloadSignedDocument","tags":["Signatures"],"summary":"Download the signed document","description":"A signed link to the signed PDF of a completed request, valid for five minutes. Until every signer has signed the answer is signature.not_completed.","security":[{"bearerAuth":["signatures:read"]}],"x-required-scope":"signatures:read","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl https://api.pdfloft.wrxstack.com/v1/signature-requests/cm3x8k2f10010/signed-document -H \"Authorization: Bearer $PDFLOFT_API_KEY\""}],"parameters":[{"name":"requestId","in":"path","required":true,"description":"The signature request id.","schema":{"type":"string"},"example":"cm3x8k2f10010"}],"responses":{"200":{"description":"The link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadLink"}}}},"400":{"description":"The request is not valid. Error codes: validation_failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."}]},"404":{"description":"No such signature request in this account, or it is private to another person. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"409":{"description":"The request is not complete (signature.not_completed). Error codes: signature.not_completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"signature.not_completed":{"summary":"The signed document and the certificate are made when every signer has signed, and that has not happened yet.","value":{"statusCode":409,"error":"signature.not_completed","message":"The signed document and the certificate are made when every signer has signed, and that has not happened yet.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"signature.not_completed","meaning":"The signed document and the certificate are made when every signer has signed, and that has not happened yet.","fix":"Wait for the signature.completed webhook, or poll the request until its status is completed, then download."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}},"/v1/signature-requests/{requestId}/certificate":{"get":{"operationId":"downloadSignatureCertificate","tags":["Signatures"],"summary":"Download the completion certificate","description":"A signed link to the completion certificate of a completed request: who signed, when, from where, and the root of the trail. Valid for five minutes.","security":[{"bearerAuth":["signatures:read"]}],"x-required-scope":"signatures:read","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl https://api.pdfloft.wrxstack.com/v1/signature-requests/cm3x8k2f10010/certificate -H \"Authorization: Bearer $PDFLOFT_API_KEY\""}],"parameters":[{"name":"requestId","in":"path","required":true,"description":"The signature request id.","schema":{"type":"string"},"example":"cm3x8k2f10010"}],"responses":{"200":{"description":"The link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadLink"}}}},"400":{"description":"The request is not valid. Error codes: validation_failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"summary":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","value":{"statusCode":400,"error":"validation_failed","message":"The request body, a query value or a path value is not valid.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"validation_failed","meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."}]},"401":{"description":"The API key is missing, wrong, revoked or expired. Error codes: invalid_api_key, api_key_revoked, api_key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","value":{"statusCode":401,"error":"invalid_api_key","message":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_revoked":{"summary":"The key was revoked, so every call with it is refused.","value":{"statusCode":401,"error":"api_key_revoked","message":"The key was revoked, so every call with it is refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}},"api_key_expired":{"summary":"The key passed its expiry date.","value":{"statusCode":401,"error":"api_key_expired","message":"The key passed its expiry date.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"invalid_api_key","meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"api_key_revoked","meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"api_key_expired","meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."}]},"402":{"description":"The account plan does not include the API. Error codes: plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"plan_required":{"summary":"The account plan does not include the public API. The API is included in the Team plan and above.","value":{"statusCode":402,"error":"plan_required","message":"The account plan does not include the public API.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"plan_required","meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."}]},"403":{"description":"The key does not hold the scope this call needs. Error codes: insufficient_scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"The key does not hold the scope this call needs. The details name the scope in required.","value":{"statusCode":403,"error":"insufficient_scope","message":"The key does not hold the scope this call needs.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"insufficient_scope","meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."}]},"404":{"description":"No such signature request in this account, or it is private to another person. Error codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","value":{"statusCode":404,"error":"not_found","message":"There is no such tool, run, file, document, endpoint, signature request or template in this account.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"not_found","meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."}]},"409":{"description":"The request is not complete (signature.not_completed). Error codes: signature.not_completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"signature.not_completed":{"summary":"The signed document and the certificate are made when every signer has signed, and that has not happened yet.","value":{"statusCode":409,"error":"signature.not_completed","message":"The signed document and the certificate are made when every signer has signed, and that has not happened yet.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"signature.not_completed","meaning":"The signed document and the certificate are made when every signer has signed, and that has not happened yet.","fix":"Wait for the signature.completed webhook, or poll the request until its status is completed, then download."}]},"429":{"description":"Too many calls. Wait for Retry-After seconds. Error codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","value":{"statusCode":429,"error":"rate_limited","message":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"rate_limited","meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."}]},"500":{"description":"Something went wrong on the PDF Loft side. Error codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something went wrong on the PDF Loft side.","value":{"statusCode":500,"error":"internal_error","message":"Something went wrong on the PDF Loft side.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"internal_error","meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."}]},"503":{"description":"The service is not available right now. Try again. Error codes: service.unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"service.unavailable":{"summary":"The API, storage or the virus scanner is not available right now.","value":{"statusCode":503,"error":"service.unavailable","message":"The API, storage or the virus scanner is not available right now.","requestId":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"}}}}},"x-error-codes":[{"code":"service.unavailable","meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."}]}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API key","description":"Send the key as Authorization: Bearer pl_live_... Each operation names the scope it needs."}},"schemas":{"ToolList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Tool"},"description":"Every tool, in the order of the web app."}},"required":["items"],"additionalProperties":false},"Tool":{"type":"object","properties":{"id":{"type":"string","description":"The tool id, used in the path of a run.","example":"merge"},"category":{"type":"string","description":"The group the tool belongs to in the web app, such as organize, convert or secure.","example":"organize"},"runsOn":{"type":"string","enum":["server","device"],"description":"Where the web app processes the file: on the device means the file stays in the browser there. A run through the API always uploads the file and runs on the server, whatever this says; read runnable."},"accepts":{"type":"array","items":{"type":"string"},"description":"The content types a run through the API reads. Tools that place pictures on a document, such as sign, take the document first and then the pictures."},"minFiles":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The fewest files one run takes."},"batch":{"type":"boolean","description":"True when the tool works on one file at a time and also takes many: each file is its own run, a run with several files returns a ZIP and a report, and each file counts one task."},"maxFiles":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Null means up to your plan limit."},"runnable":{"type":"boolean","description":"Whether this tool can be run through the API now."},"options":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"The options the run takes, as a JSON Schema: the same rules that refuse an invalid run with options.invalid. Null when the tool is not runnable."}},"required":["id","category","runsOn","accepts","minFiles","batch","maxFiles","runnable","options"],"additionalProperties":false},"File":{"type":"object","properties":{"id":{"type":"string","pattern":"^file_[A-Za-z0-9_-]{16,64}$","description":"The id of an uploaded file.","example":"file_Qm3nT9xvB2kLw8RzYc1pAe5H"},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The size of the stored file in bytes.","example":482113},"contentType":{"type":"string","description":"The content type of the stored file, as detected from its bytes.","example":"application/pdf"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"An uploaded file that no run uses is deleted after this time."}},"required":["id","sizeBytes","contentType","expiresAt"],"additionalProperties":false},"Job":{"type":"object","properties":{"id":{"type":"string","description":"The run id. Use it to read, cancel and download the run.","example":"cm3x8k2f10001"},"tool":{"type":"string","description":"The id of the tool the run used.","example":"merge"},"status":{"type":"string","enum":["queued","running","succeeded","failed","cancelled"],"description":"queued: waiting. running: in progress. succeeded: results are ready. failed: see error. cancelled: ended by a cancel."},"stage":{"type":"string","description":"The step the run is in, for a progress display. Do not branch on it.","example":"CONVERTING"},"progress":{"type":"integer","minimum":0,"maximum":100,"description":"Percent complete, 0 to 100."},"error":{"description":"A stable error code when the run failed.","example":null,"type":["string","null"]},"results":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many result files the run produced."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When the run was accepted."},"finishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the run ended, or null while it is queued or running."},"resultExpiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"Results are deleted two hours after the run, unless saved as a document."}},"required":["id","tool","status","stage","progress","error","results","createdAt","finishedAt","resultExpiresAt"],"additionalProperties":false},"RunRequest":{"type":"object","properties":{"files":{"maxItems":200,"type":"array","items":{"type":"string","pattern":"^file_[A-Za-z0-9_-]{16,64}$","description":"The id of an uploaded file.","example":"file_Qm3nT9xvB2kLw8RzYc1pAe5H"},"description":"The uploaded files, in the order the tool reads them. Empty for a tool that starts from nothing, such as blank-pdf, or from a web address in the options."},"options":{"default":{},"description":"The tool options. Each tool lists the options it takes, as a JSON Schema, at GET /v1/tools/{toolId}, and the Tools page of the guide lists them all. Options that do not fit are refused with options.invalid.","example":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["files"]},"JobList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Job"},"description":"The runs of this page, newest first."},"nextCursor":{"description":"Send this as cursor to read the next page. Null on the last page.","type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false},"DownloadLink":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"A signed link. Fetch it with a plain GET; it needs no API key."},"expiresInSeconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long the link works, in seconds.","example":300}},"required":["url","expiresInSeconds"],"additionalProperties":false},"DocumentList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Document"},"description":"The documents of this page, newest first."},"nextCursor":{"description":"Send this as cursor to read the next page. Null on the last page.","type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false},"Document":{"type":"object","properties":{"id":{"type":"string","description":"The document id."},"name":{"type":"string","minLength":1,"description":"The name shown in the library.","example":"Lease.pdf"},"visibility":{"type":"string","enum":["PRIVATE","ACCOUNT"],"description":"PRIVATE documents are visible to the person who owns the key only."},"currentVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The number of the latest version, from 1."},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The size of the current version in bytes."},"pageCount":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The pages of the current version, or null when it is not counted."},"folderId":{"description":"The folder the document sits in, or null for the top of the library.","type":["string","null"]},"tags":{"type":"array","items":{"type":"string"},"description":"The document tags, lower case."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When the document was saved."},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When a new version was last added."}},"required":["id","name","visibility","currentVersion","sizeBytes","pageCount","folderId","tags","createdAt","updatedAt"],"additionalProperties":false},"CreateDocumentRequest":{"type":"object","properties":{"source":{"anyOf":[{"type":"object","properties":{"fileId":{"type":"string","pattern":"^file_[A-Za-z0-9_-]{16,64}$","description":"The id of an uploaded file.","example":"file_Qm3nT9xvB2kLw8RzYc1pAe5H"}},"required":["fileId"]},{"type":"object","properties":{"jobId":{"type":"string","maxLength":64,"description":"The run whose result to save."},"index":{"type":"integer","minimum":0,"maximum":1000,"description":"Which result file of the run, from 0."}},"required":["jobId","index"]}],"description":"An uploaded PDF, or one result file of a run."},"name":{"type":"string","minLength":1,"description":"The name to show in the library, 1 to 255 characters.","example":"Lease.pdf"},"visibility":{"default":"ACCOUNT","description":"ACCOUNT documents are visible to every member of the account. PRIVATE documents are visible to the key owner only. ACCOUNT when omitted.","type":"string","enum":["PRIVATE","ACCOUNT"]}},"required":["source","name"]},"DocumentAnswer":{"type":"object","properties":{"question":{"description":"The question as saved.","$ref":"#/components/schemas/ChatMessage"},"answer":{"description":"The answer as saved, with its citations.","$ref":"#/components/schemas/ChatMessage"}},"required":["question","answer"],"additionalProperties":false},"ChatMessage":{"type":"object","properties":{"id":{"type":"string","description":"The message id."},"role":{"type":"string","enum":["USER","ASSISTANT"],"description":"USER for a question, ASSISTANT for an answer."},"content":{"type":"string","description":"The question or the answer, as plain text. An answer cites pages as [p3]."},"citations":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"The pages of the document an answer cites, in the order first cited. Empty for a question."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When the message was saved."}},"required":["id","role","content","citations","createdAt"],"additionalProperties":false},"AskDocumentRequest":{"type":"object","properties":{"question":{"type":"string","minLength":1,"maxLength":2000,"description":"The question, 1 to 2,000 characters. Ask in any language.","example":"What is the notice period?"},"language":{"default":"en","description":"The language of the person asking, used to read a scanned document. The answer follows the language of the question. en when omitted.","type":"string","enum":["en","es","hi","fr","de","ja","zh","ar","pt-PT","he"]}},"required":["question"]},"DocumentChat":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessage"},"description":"The conversation of the key owner about this document, oldest first."}},"required":["items"],"additionalProperties":false},"WorkflowList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Workflow"},"description":"Every workflow of the account, newest first."},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many workflows the plan of the account keeps. 0 on a plan without workflows."},"used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many the account keeps now."}},"required":["items","limit","used"],"additionalProperties":false},"Workflow":{"type":"object","properties":{"id":{"type":"string","description":"The workflow id.","example":"cm3x8k2f10003"},"name":{"type":"string","minLength":1,"description":"The name, 1 to 80 characters.","example":"Monthly report"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowStep"},"description":"The tools of the chain, in the order they run. Each step reads the first result of the step before it."},"issues":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowIssue"},"description":"The steps that cannot work today, worked out on every read. Empty when the workflow can run. A workflow with issues is refused with workflow.outdated until it is changed."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When the workflow was saved."},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When the workflow was last changed."},"createdByMe":{"type":"boolean","description":"True when the person who owns the key made the workflow."},"canEdit":{"type":"boolean","description":"True when the person who owns the key may change or delete it: its maker, or an owner or admin of the account."}},"required":["id","name","steps","issues","createdAt","updatedAt","createdByMe","canEdit"],"additionalProperties":false},"WorkflowStep":{"type":"object","properties":{"tool":{"type":"string","minLength":1,"maxLength":64,"description":"The id of the tool, as GET /v1/tools lists it. A chain may use these tools: those that turn another kind of file into a PDF (only as the first step), the tools that read a PDF and answer a PDF, and the tools that end in parts, text or pictures (only as the last step).","example":"rotate"},"options":{"default":{},"description":"The options of this step, as the tool takes them in a run: GET /v1/tools/{toolId} lists them as a JSON Schema. Options that do not fit are refused with workflow.invalid.","example":{"angle":90},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["tool"],"additionalProperties":false},"WorkflowIssue":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The step at fault, counted from zero.","example":1},"code":{"type":"string","enum":["tool_gone","tool_not_allowed","first_only","last_only","options_invalid"],"description":"tool_gone: this version has no such tool. tool_not_allowed: the tool cannot be a step. first_only: the tool can only start a chain. last_only: the tool can only end one. options_invalid: the options do not fit the tool."}},"required":["index","code"],"additionalProperties":false},"CreateWorkflowRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"The name to show, 1 to 80 characters. Leading and trailing spaces are removed.","example":"Monthly report"},"steps":{"maxItems":50,"type":"array","items":{"$ref":"#/components/schemas/WorkflowStep"},"description":"The chain: 1 to 10 steps. Several files given to a run each go through every step, one file at a time."}},"required":["name","steps"],"additionalProperties":false},"UpdateWorkflowRequest":{"type":"object","properties":{"name":{"description":"The new name, 1 to 80 characters.","type":"string","minLength":1},"steps":{"description":"The new chain, which replaces the saved one whole: 1 to 10 steps.","maxItems":50,"type":"array","items":{"$ref":"#/components/schemas/WorkflowStep"}}},"additionalProperties":false},"RunWorkflowRequest":{"type":"object","properties":{"files":{"maxItems":200,"type":"array","items":{"type":"string","pattern":"^file_[A-Za-z0-9_-]{16,64}$","description":"The id of an uploaded file.","example":"file_Qm3nT9xvB2kLw8RzYc1pAe5H"},"description":"The uploaded files, from POST /v1/files. The first step of the workflow decides which kinds of file and how many a run takes. Each file goes through the whole chain on its own; several files give a ZIP of the results and a JSON report."}},"required":["files"],"additionalProperties":false},"WebhookEndpointList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"},"description":"The endpoints of the account, newest first."}},"required":["items"],"additionalProperties":false},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string","description":"The endpoint id."},"url":{"type":"string","format":"uri","description":"The https address that receives events.","example":"https://example.com/pdfloft/webhooks"},"description":{"description":"Your own note about the endpoint, or null.","type":["string","null"]},"events":{"type":"array","items":{"type":"string"},"description":"The event ids this endpoint receives."},"status":{"type":"string","enum":["active","disabled"],"description":"active receives events. disabled stopped after repeated failed deliveries; fix the endpoint and it resumes when you replay."},"secretHint":{"type":"string","description":"The last characters of the signing secret."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When the endpoint was created."}},"required":["id","url","description","events","status","secretHint","createdAt"],"additionalProperties":false},"CreatedWebhookEndpoint":{"type":"object","properties":{"id":{"type":"string","description":"The endpoint id."},"url":{"type":"string","format":"uri","description":"The https address that receives events.","example":"https://example.com/pdfloft/webhooks"},"description":{"description":"Your own note about the endpoint, or null.","type":["string","null"]},"events":{"type":"array","items":{"type":"string"},"description":"The event ids this endpoint receives."},"status":{"type":"string","enum":["active","disabled"],"description":"active receives events. disabled stopped after repeated failed deliveries; fix the endpoint and it resumes when you replay."},"secretHint":{"type":"string","description":"The last characters of the signing secret."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When the endpoint was created."},"secret":{"type":"string","description":"The signing secret. It is shown once and cannot be read again.","example":"whsec_..."}},"required":["id","url","description","events","status","secretHint","createdAt","secret"],"additionalProperties":false},"CreateWebhookRequest":{"type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri","description":"An https address that answers POST. Private, loopback and link-local addresses are refused."},"events":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","enum":["job.completed","job.failed","document.created","document.deleted","signature.request_sent","signature.viewed","signature.signed","signature.declined","signature.completed","signature.voided","signature.expired"]},"description":"The events to receive, 1 to 20, from the list of webhook events."},"description":{"description":"A note for your own use, up to 200 characters.","type":"string","maxLength":200}},"required":["url","events"]},"FolderList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Folder"},"description":"The folders, by name."}},"required":["items"],"additionalProperties":false},"Folder":{"type":"object","properties":{"id":{"type":"string","description":"The folder id."},"name":{"type":"string","minLength":1,"description":"The name shown in the library.","example":"Client contracts"},"parentId":{"description":"The folder this one sits in, or null for a folder at the top. Folders nest one level.","type":["string","null"]},"visibility":{"type":"string","enum":["PRIVATE","ACCOUNT"],"description":"PRIVATE folders are seen by the person who made them only."},"documentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The documents the key can see in the folder."}},"required":["id","name","parentId","visibility","documentCount"],"additionalProperties":false},"CreateFolderRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"The folder name, 1 to 120 characters."},"parentId":{"default":null,"description":"A top folder to put this one in, or null for the top of the library.","anyOf":[{"type":"string","minLength":1,"maxLength":64,"description":"The parent folder id."},{"type":"null"}]},"visibility":{"default":"PRIVATE","description":"ACCOUNT folders are seen by every member. A folder inside a private folder is private. PRIVATE when omitted.","type":"string","enum":["PRIVATE","ACCOUNT"]}},"required":["name"]},"DeletedFolder":{"type":"object","properties":{"documentsMoved":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many documents went back to the parent folder or the top. None is deleted."}},"required":["documentsMoved"],"additionalProperties":false},"OrganizeDocumentRequest":{"type":"object","properties":{"folderId":{"description":"The folder to put the document in, or null for the top of the library.","anyOf":[{"type":"string","minLength":1,"maxLength":64,"description":"The folder id."},{"type":"null"}]},"tags":{"description":"Replaces the document's tags: up to 10, each 1 to 40 characters, kept lower case.","maxItems":10,"type":"array","items":{"type":"string","maxLength":160}}}},"ReviewLinkList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ReviewLink"},"description":"The links, newest first."}},"required":["items"],"additionalProperties":false},"ReviewLink":{"type":"object","properties":{"id":{"type":"string","description":"The link id."},"mode":{"type":"string","enum":["view","comment"],"description":"view lets people read; comment lets them read and comment."},"allowDownload":{"type":"boolean","description":"Whether the viewer offers the PDF for download."},"label":{"description":"A note for you. It is not shown to the people who open the link.","type":["string","null"]},"hasCode":{"type":"boolean","description":"Whether an access code is needed. The code is never returned."},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the link stops working, or null."},"revokedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the link was revoked, or null."},"status":{"type":"string","enum":["active","expired","revoked"],"description":"active, expired (past its expiry) or revoked."},"viewCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many times the file was opened through the link."},"lastViewedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the file was last opened through the link, or null."},"commentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The threads left through the link."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When the link was made."}},"required":["id","mode","allowDownload","label","hasCode","expiresAt","revokedAt","status","viewCount","lastViewedAt","commentCount","createdAt"],"additionalProperties":false},"CreatedReviewLink":{"type":"object","properties":{"id":{"type":"string","description":"The link id."},"mode":{"type":"string","enum":["view","comment"],"description":"view lets people read; comment lets them read and comment."},"allowDownload":{"type":"boolean","description":"Whether the viewer offers the PDF for download."},"label":{"description":"A note for you. It is not shown to the people who open the link.","type":["string","null"]},"hasCode":{"type":"boolean","description":"Whether an access code is needed. The code is never returned."},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the link stops working, or null."},"revokedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the link was revoked, or null."},"status":{"type":"string","enum":["active","expired","revoked"],"description":"active, expired (past its expiry) or revoked."},"viewCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many times the file was opened through the link."},"lastViewedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the file was last opened through the link, or null."},"commentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The threads left through the link."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When the link was made."},"token":{"type":"string","description":"The secret in the link. It is in this answer once and cannot be read again: only a hash of it is kept."},"url":{"type":"string","description":"The address to send to reviewers. It holds the token, so treat it as a secret.","example":"https://pdfloft.wrxstack.com/review/TOKEN"}},"required":["id","mode","allowDownload","label","hasCode","expiresAt","revokedAt","status","viewCount","lastViewedAt","commentCount","createdAt","token","url"],"additionalProperties":false},"CreateReviewLinkRequest":{"type":"object","properties":{"mode":{"default":"comment","description":"comment when omitted.","type":"string","enum":["view","comment"]},"allowDownload":{"default":false,"description":"Offer the PDF for download. A person who can read a document can always capture what they see; this only controls the button. False when omitted.","type":"boolean"},"expiresAt":{"default":null,"description":"When the link stops working: a time in the future within one year, or null for none.","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"code":{"default":null,"description":"An access code reviewers must enter first, 4 to 64 characters, or null. Send it to them separately from the link.","anyOf":[{"type":"string","minLength":4,"maxLength":64},{"type":"null"}]},"label":{"default":null,"description":"A note for you, up to 80 characters.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]}}},"ReviewCommentList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ReviewComment"},"description":"The threads, oldest first."},"unread":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many comments are unread."}},"required":["items","unread"],"additionalProperties":false},"ReviewComment":{"type":"object","properties":{"id":{"type":"string","description":"The comment id."},"authorName":{"type":"string","minLength":1,"description":"The name the reviewer typed. It is text, not verified."},"body":{"type":"string","description":"The comment as typed. Show it as text, never as markup."},"pageIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The page, counting from 0."},"x":{"type":"number","description":"The place on the page as a fraction of its width, from 0 at the left edge to 1."},"y":{"type":"number","description":"The place on the page as a fraction of its height, from 0 at the top edge to 1."},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The version of the document that was current when the comment was left."},"resolved":{"type":"boolean","description":"Whether the thread is marked resolved."},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When it was resolved, or null."},"unread":{"type":"boolean","description":"True until a member opens the comments in the web app."},"linkId":{"description":"The link the comment came through.","type":["string","null"]},"linkLabel":{"description":"The note you gave that link, or null.","type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When the comment was left."},"replies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The reply id."},"authorName":{"type":"string","minLength":1,"description":"The name of the person who replied."},"fromMember":{"type":"boolean","description":"True for a reply from a member of the account."},"body":{"type":"string","description":"The reply as typed. Show it as text, never as markup."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When the reply was made."}},"required":["id","authorName","fromMember","body","createdAt"],"additionalProperties":false},"description":"The replies, oldest first."}},"required":["id","authorName","body","pageIndex","x","y","version","resolved","resolvedAt","unread","linkId","linkLabel","createdAt","replies"],"additionalProperties":false},"ReviewReply":{"type":"object","properties":{"id":{"type":"string","description":"The reply id."},"authorName":{"type":"string","minLength":1,"description":"The name of the person who replied."},"fromMember":{"type":"boolean","description":"True for a reply from a member of the account."},"body":{"type":"string","description":"The reply as typed. Show it as text, never as markup."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When the reply was made."}},"required":["id","authorName","fromMember","body","createdAt"],"additionalProperties":false},"ReviewReplyRequest":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":2000,"description":"The reply, 1 to 2000 characters. The reviewer sees it under their comment."}},"required":["body"]},"ResolvedReviewComment":{"type":"object","properties":{"resolved":{"type":"boolean","description":"Whether the thread is now resolved."},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When it was resolved, or null."}},"required":["resolved","resolvedAt"],"additionalProperties":false},"ResolveReviewCommentRequest":{"type":"object","properties":{"resolved":{"type":"boolean","description":"True to mark the comment resolved, false to reopen it."}},"required":["resolved"]},"VerifySignaturesResult":{"type":"object","properties":{"signed":{"type":"boolean","description":"Whether the file carries any digital signature."},"signatureCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many signatures were found."},"verdict":{"type":"object","properties":{"code":{"type":"string","enum":["unsigned","altered","unreadable","changed-after-signing","intact-self-issued","intact-identity-unconfirmed"],"description":"The verdict as a stable code: unsigned, altered, unreadable, changed-after-signing, intact-self-issued or intact-identity-unconfirmed."},"title":{"type":"string","description":"The verdict as a short heading."},"summary":{"type":"string","description":"The verdict as a sentence a person can read."}},"required":["code","title","summary"],"additionalProperties":false,"description":"One plain answer. The answer is never \"valid\": the strongest verdicts say the document is unchanged and that the signer is not independently confirmed."},"signatures":{"type":"array","items":{"$ref":"#/components/schemas/SignatureAnswer"},"description":"One entry for each signature, in file order."},"notEstablished":{"type":"array","items":{"type":"string","enum":["signer-identity","root-trusted","revocation-status","timestamp-authority-trusted","signing-time-proven"]},"description":"What this check does not establish. Listed on every signed file: the check holds no trust list and does not check revocation."},"bytesAfterLastSignature":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Bytes after the last byte any signature covers."}},"required":["signed","signatureCount","verdict","signatures","notEstablished","bytesAfterLastSignature"],"additionalProperties":false},"SignatureAnswer":{"type":"object","properties":{"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The place of the signature in the file, from 1."},"integrity":{"type":"string","enum":["intact","tampered","unverifiable"],"description":"intact: the signed bytes are unchanged and the signature matches its certificate. tampered: the document changed after signing or the signature does not match. unverifiable: the signature is damaged or uses a method not read. Never treat unverifiable as a pass."},"reason":{"type":"string","description":"Why, in one sentence."},"signer":{"anyOf":[{"$ref":"#/components/schemas/SignatureSignerCertificate"},{"type":"null"}],"description":"The signing certificate, or null when none could be read."},"laterChanges":{"type":"string","enum":["none","covered-by-later-signature","not-covered"],"description":"none: the file ends where this signature ends. covered-by-later-signature: more was added, and a later signature covers it. not-covered: more was added that no signature covers."},"coversWholeDocument":{"type":"boolean","description":"Whether this signature covers the whole file."},"uncoveredBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Bytes after the end of this signature."},"signingTime":{"anyOf":[{"type":"object","properties":{"value":{"type":"string","description":"The time, as an ISO 8601 time."},"source":{"type":"string","enum":["timestamp-token","signer-claim"],"description":"Where the time came from."}},"required":["value","source"],"additionalProperties":false},{"type":"null"}],"description":"The time to show. timestamp-token: stated by a timestamp token that checks out. signer-claim: written by the signer, and not proof of when the signature was made."},"timestamp":{"anyOf":[{"$ref":"#/components/schemas/SignatureTimestampEvidence"},{"type":"null"}],"description":"What the timestamp token establishes, or null when the signature could not be read that far."},"chain":{"anyOf":[{"$ref":"#/components/schemas/SignatureChainEvidence"},{"type":"null"}],"description":"What the certificates inside the signature establish, or null when none could be read."},"established":{"type":"array","items":{"type":"string","enum":["unchanged-since-signing","signature-matches-certificate","timestamp-attests-signature","chain-links-to-root","certificates-in-date"]},"description":"What the bytes proved for this signature."}},"required":["index","integrity","reason","signer","laterChanges","coversWholeDocument","uncoveredBytes","signingTime","timestamp","chain","established"],"additionalProperties":false},"SignatureSignerCertificate":{"type":"object","properties":{"commonName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"The common name of the signing certificate, as written in it. Anyone can write any name in a certificate they make themselves."},"organization":{"description":"The organisation named in the signing certificate, or null.","type":["string","null"]},"issuerCommonName":{"description":"The common name of the certificate that issued the signing certificate. It equals commonName for a self-issued certificate.","type":["string","null"]},"serialNumber":{"description":"The certificate serial number as hexadecimal.","type":["string","null"]},"validFrom":{"description":"When the signing certificate starts to be valid, as an ISO 8601 time.","type":["string","null"]},"validTo":{"description":"When the signing certificate stops being valid, as an ISO 8601 time.","type":["string","null"]}},"required":["commonName","organization","issuerCommonName","serialNumber","validFrom","validTo"],"additionalProperties":false},"SignatureTimestampEvidence":{"type":"object","properties":{"status":{"type":"string","enum":["absent","consistent","mismatch","unreadable"],"description":"absent: the signature has no timestamp token. consistent: the token attests to exactly this signature and verifies with the certificate inside it; the authority is not checked against a trust list. mismatch: the token attests to other bytes or does not verify. unreadable: the token could not be parsed."},"time":{"description":"The time the token states, only when status is consistent.","type":["string","null"]},"authority":{"description":"The common name of the timestamp authority certificate, when it could be read.","type":["string","null"]}},"required":["status","time","authority"],"additionalProperties":false},"SignatureChainEvidence":{"type":"object","properties":{"status":{"type":"string","enum":["self-issued","chain-complete","chain-incomplete","chain-broken"],"description":"self-issued: the signing certificate signed itself, so no one else vouches for it. chain-complete: each certificate is signed by the next, up to a self-signed root; the root is not checked against any trust list. chain-incomplete: the issuing certificate is not in the file. chain-broken: a certificate names an issuer in the file whose key did not sign it."},"links":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The number of certificates followed, the signer first."},"topCommonName":{"description":"The common name of the last certificate reached.","type":["string","null"]},"validAtSigning":{"type":"string","enum":["yes","no","unknown"],"description":"Whether every certificate followed was inside its dates at the signing time. unknown when the file states no time."},"timeBasis":{"anyOf":[{"type":"string","enum":["timestamp-token","signer-claim"]},{"type":"null"}],"description":"Where the signing time used for validAtSigning came from. A signer-claim time is the signer own clock and proves nothing."}},"required":["status","links","topCommonName","validAtSigning","timeBasis"],"additionalProperties":false},"VerifySignaturesRequest":{"type":"object","properties":{"fileId":{"type":"string","pattern":"^file_[A-Za-z0-9_-]{16,64}$","description":"The PDF to check, uploaded with POST /v1/files. The file is read and left as it was; nothing about it is stored by the check.","example":"file_Qm3nT9xvB2kLw8RzYc1pAe5H"}},"required":["fileId"],"additionalProperties":false},"SignatureTemplateList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SignatureTemplate"},"description":"The templates of the account."},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many templates the plan keeps."}},"required":["items","limit"],"additionalProperties":false},"SignatureTemplate":{"type":"object","properties":{"id":{"type":"string","description":"The template id."},"name":{"type":"string","minLength":1,"description":"The template name."},"description":{"description":"A note about the template, or null.","type":["string","null"]},"signerRoles":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The role id."},"label":{"type":"string","description":"The role label, such as Client."},"color":{"type":"string","description":"The color the web app shows the role in."},"verificationMethod":{"type":"string","enum":["none","access-code","email-code"],"description":"How a signer in this role is verified by default: none, access-code or email-code. A signer in a request can name another method."}},"required":["id","label","color","verificationMethod"],"additionalProperties":false},"description":"The roles a request from this template names its signers by (the id or the label)."},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The field id."},"type":{"type":"string","description":"signature, initials, date, text or checkbox."},"label":{"type":"string","description":"The label shown on the field."},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The page, from 0."},"x":{"type":"number","description":"Points from the left edge."},"y":{"type":"number","description":"Points from the top edge."},"w":{"type":"number","description":"Width in points."},"h":{"type":"number","description":"Height in points."},"required":{"type":"boolean","description":"Whether the signer must fill it."},"signerRoleId":{"type":"string","description":"The role that fills the field."}},"required":["id","type","label","page","x","y","w","h","required","signerRoleId"],"additionalProperties":false},"description":"The fields placed on the document."},"pageCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The pages of the template document."},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The size of the template document in bytes."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When the template was made."},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When the template was last changed."}},"required":["id","name","description","signerRoles","fields","pageCount","sizeBytes","createdAt","updatedAt"],"additionalProperties":false},"SignatureRequest":{"type":"object","properties":{"id":{"type":"string","description":"The request id.","example":"cm3x8k2f10010"},"title":{"type":"string","description":"The title of the request."},"message":{"description":"The note shown to signers, or null.","type":["string","null"]},"status":{"type":"string","enum":["draft","sent","in_progress","completed","declined","expired","voided"],"description":"draft: not sent yet. sent: waiting for the first signer. in_progress: at least one signer signed. completed: every signer signed. declined: a signer declined. expired: the request passed its expiry. voided: the sender cancelled it."},"visibility":{"type":"string","enum":["PRIVATE","ACCOUNT"],"description":"PRIVATE: visible to the key owner. ACCOUNT: visible to every member."},"signingOrder":{"type":"string","enum":["sequential","parallel"],"description":"sequential or parallel."},"locale":{"type":"string","description":"The language code of the emails the signers receive."},"templateId":{"description":"The template the request was made from, or null.","type":["string","null"]},"pageCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The pages of the document."},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The size of the document in bytes."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When the request was made."},"sentAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the request was sent, or null for a draft."},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the request stops accepting signatures, or null."},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the last signer signed, or null."},"voidedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the request was voided, or null."},"voidReason":{"description":"The reason given when it was voided, or null.","type":["string","null"]},"reminderCadenceHours":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Hours between reminders, or null when reminders are off."},"signedDocumentAvailable":{"type":"boolean","description":"True once every signer signed and the signed document and certificate can be downloaded."},"signers":{"type":"array","items":{"$ref":"#/components/schemas/SignatureSigner"},"description":"Every signer, in signing order."}},"required":["id","title","message","status","visibility","signingOrder","locale","templateId","pageCount","sizeBytes","createdAt","sentAt","expiresAt","completedAt","voidedAt","voidReason","reminderCadenceHours","signedDocumentAvailable","signers"],"additionalProperties":false},"SignatureSigner":{"type":"object","properties":{"id":{"type":"string","description":"The signer id, used to remind one signer."},"name":{"type":"string","minLength":1,"description":"The name given when the request was made."},"email":{"type":"string","description":"The address the signing link was sent to."},"role":{"type":"string","description":"The role the signer signs as."},"sequence":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The place in the signing order, from 1."},"status":{"type":"string","enum":["pending","sent","viewed","signed","declined"],"description":"pending: not asked yet. sent: asked. viewed: opened the request. signed: signed. declined: declined."},"sentAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the signer was asked, or null."},"viewedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the signer first opened the request, or null."},"signedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the signer signed, or null."},"declinedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the signer declined, or null."},"declinedReason":{"description":"The reason the signer gave, or null.","type":["string","null"]},"verificationMethod":{"type":"string","enum":["none","access-code","email-code"],"description":"How the signer is verified before they see the document: none, access-code or email-code."}},"required":["id","name","email","role","sequence","status","sentAt","viewedAt","signedAt","declinedAt","declinedReason","verificationMethod"],"additionalProperties":false},"CreateSignatureRequest":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200,"description":"The title shown to signers and in the library, 1 to 200 characters.","example":"Services agreement"},"message":{"description":"A note shown to the signers.","type":"string","maxLength":5000},"visibility":{"default":"PRIVATE","description":"PRIVATE requests are visible to the person who owns the key only. ACCOUNT requests are visible to every member of the account.","type":"string","enum":["PRIVATE","ACCOUNT"]},"signingOrder":{"default":"sequential","description":"sequential: signers sign in the order of their sequence number. parallel: everyone is asked at once. sequential when omitted.","type":"string","enum":["sequential","parallel"]},"locale":{"default":"en","description":"The language of the emails the signers receive.","type":"string","enum":["en","es","hi","fr","de","ja","zh","ar","pt-PT","he"]},"expiresAt":{"description":"When the request stops accepting signatures. It must be in the future.","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"reminderCadenceHours":{"description":"Hours between reminders to a signer who has not signed. 72 when omitted; null turns reminders off.","anyOf":[{"type":"integer","minimum":1,"maximum":1440},{"type":"null"}]},"source":{"anyOf":[{"type":"object","properties":{"fileId":{"type":"string","pattern":"^file_[A-Za-z0-9_-]{16,64}$","description":"The id of an uploaded file.","example":"file_Qm3nT9xvB2kLw8RzYc1pAe5H"}},"required":["fileId"],"additionalProperties":false},{"type":"object","properties":{"documentId":{"type":"string","minLength":1,"maxLength":64,"description":"The id of a library document."}},"required":["documentId"],"additionalProperties":false},{"type":"object","properties":{"templateId":{"type":"string","minLength":1,"maxLength":64,"description":"The id of a signature template."}},"required":["templateId"],"additionalProperties":false}],"description":"The document to send: a PDF uploaded to POST /v1/files, a document of the library, or a signature template. A template brings its own fields."},"signers":{"minItems":1,"maxItems":50,"type":"array","items":{"$ref":"#/components/schemas/SignatureSignerInput"},"description":"The people who sign, 1 to 50, each with a role and a different email address."},"fields":{"description":"Where each signer signs. Leave out when a template supplies them.","maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/SignatureFieldInput"}},"send":{"default":false,"description":"Send the request at once. A send the plan allowance refuses creates nothing.","type":"boolean"}},"required":["title","source","signers"],"additionalProperties":false},"SignatureSignerInput":{"type":"object","properties":{"role":{"type":"string","minLength":1,"maxLength":200,"description":"The role this person signs as. Fields name the same role. For a template, the id or the label of one of its roles.","example":"Client"},"sequence":{"type":"integer","minimum":1,"maximum":1000,"description":"The place in the signing order, from 1. Parallel requests ignore it.","example":1},"name":{"type":"string","minLength":1,"description":"The signer name, 1 to 200 characters. It appears in the emails and on the certificate.","example":"Meera Iyer"},"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"The address that receives the signing link. Each signer needs a different address.","example":"meera@example.com"},"verificationMethod":{"description":"How the signer proves who they are before they see the document: none (the default), access-code (the signer must enter accessCode, which you share with them yourself) or email-code (the signer is emailed a six digit code). Any other value, including sms-otp, kba and id-document, is refused with signature.verification_unsupported until it exists. For a template, the default comes from the role.","example":"access-code","type":"string","maxLength":40},"accessCode":{"description":"The code for a signer verified by access-code, 6 to 64 characters. Share it with the signer by another route than the signing email. It is stored hashed and never returned. Refused with signature.access_code_invalid when it is missing or the wrong length, and when given for another method.","type":"string","maxLength":256}},"required":["role","sequence","name","email"],"additionalProperties":false},"SignatureFieldInput":{"type":"object","properties":{"signerRole":{"type":"string","minLength":1,"maxLength":200,"description":"The role of the signer who fills the field.","example":"Client"},"type":{"type":"string","enum":["signature","initials","date","text","checkbox"],"description":"signature and initials are drawn or typed by the signer. date is filled on signing. text is typed. checkbox is ticked."},"label":{"type":"string","minLength":1,"maxLength":200,"description":"The label shown on the field, 1 to 200 characters.","example":"Client signature"},"page":{"type":"integer","minimum":0,"maximum":5000,"description":"The page, from 0."},"x":{"type":"number","minimum":0,"maximum":100000,"description":"Points from the left edge of the page."},"y":{"type":"number","minimum":0,"maximum":100000,"description":"Points from the top edge of the page."},"w":{"type":"number","minimum":0,"maximum":100000,"description":"Width in points."},"h":{"type":"number","minimum":0,"maximum":100000,"description":"Height in points."},"required":{"default":true,"description":"Whether the signer must fill the field before finishing. true when omitted.","type":"boolean"}},"required":["signerRole","type","label","page","x","y","w","h"],"additionalProperties":false},"BulkSignatureResult":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"row":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The row, from 0."},"id":{"type":"string","description":"The id of the request made for the row."}},"required":["row","id"],"additionalProperties":false},"description":"The requests that were made."},"failed":{"type":"array","items":{"type":"object","properties":{"row":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The row, from 0."},"code":{"type":"string","description":"Why the row was refused."}},"required":["row","code"],"additionalProperties":false},"description":"The rows that were refused."}},"required":["created","failed"],"additionalProperties":false},"BulkSignatureRequest":{"type":"object","properties":{"templateId":{"type":"string","minLength":1,"maxLength":64,"description":"The template every request is made from. Rows name its signer roles."},"visibility":{"default":"PRIVATE","description":"PRIVATE requests are visible to the person who owns the key only. ACCOUNT requests are visible to every member of the account.","type":"string","enum":["PRIVATE","ACCOUNT"]},"signingOrder":{"default":"sequential","description":"sequential: signers sign in the order of their sequence number. parallel: everyone is asked at once. sequential when omitted.","type":"string","enum":["sequential","parallel"]},"locale":{"default":"en","description":"The language of the emails the signers receive.","type":"string","enum":["en","es","hi","fr","de","ja","zh","ar","pt-PT","he"]},"expiresAt":{"description":"When the request stops accepting signatures. It must be in the future.","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"reminderCadenceHours":{"description":"Hours between reminders to a signer who has not signed. 72 when omitted; null turns reminders off.","anyOf":[{"type":"integer","minimum":1,"maximum":1440},{"type":"null"}]},"rows":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200,"description":"The title of this row request."},"signers":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","minLength":1,"maxLength":200,"description":"The id or label of a role of the template."},"name":{"type":"string","minLength":1,"description":"The signer name."},"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"The signer email address."},"verificationMethod":{"description":"How the signer proves who they are before they see the document: none (the default), access-code (the signer must enter accessCode, which you share with them yourself) or email-code (the signer is emailed a six digit code). Any other value, including sms-otp, kba and id-document, is refused with signature.verification_unsupported until it exists. For a template, the default comes from the role.","example":"access-code","type":"string","maxLength":40},"accessCode":{"description":"The code for a signer verified by access-code, 6 to 64 characters. Share it with the signer by another route than the signing email. It is stored hashed and never returned. Refused with signature.access_code_invalid when it is missing or the wrong length, and when given for another method.","type":"string","maxLength":256}},"required":["role","name","email"],"additionalProperties":false},"description":"The people who sign this row, one for each role of the template."}},"required":["title","signers"],"additionalProperties":false},"description":"One signature request for each row, up to 100. Each is sent at once. The whole batch is refused if it would pass the plan allowance."}},"required":["templateId","rows"],"additionalProperties":false},"SignatureRequestList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SignatureRequestSummary"},"description":"The requests of this page, newest first."},"nextCursor":{"description":"Send this as cursor to read the next page. Null on the last page.","type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false},"SignatureRequestSummary":{"type":"object","properties":{"id":{"type":"string","description":"The request id."},"title":{"type":"string","description":"The title of the request."},"status":{"type":"string","enum":["draft","sent","in_progress","completed","declined","expired","voided"],"description":"draft: not sent yet. sent: waiting for the first signer. in_progress: at least one signer signed. completed: every signer signed. declined: a signer declined. expired: the request passed its expiry. voided: the sender cancelled it."},"visibility":{"type":"string","enum":["PRIVATE","ACCOUNT"],"description":"PRIVATE or ACCOUNT."},"signingOrder":{"type":"string","enum":["sequential","parallel"],"description":"sequential or parallel."},"templateId":{"description":"The template the request was made from, or null.","type":["string","null"]},"pageCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The pages of the document."},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The size of the document in bytes."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When the request was made."},"sentAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When it was sent, or null for a draft."},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When it stops accepting signatures, or null."},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the last signer signed, or null."},"signers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The signer id."},"name":{"type":"string","minLength":1,"description":"The signer name."},"status":{"type":"string","description":"pending, sent, viewed, signed or declined."},"sequence":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The place in the signing order."}},"required":["id","name","status","sequence"],"additionalProperties":false},"description":"The signers with their status."}},"required":["id","title","status","visibility","signingOrder","templateId","pageCount","sizeBytes","createdAt","sentAt","expiresAt","completedAt","signers"],"additionalProperties":false},"SignatureTimeline":{"type":"object","properties":{"chain":{"type":"object","properties":{"valid":{"type":"boolean","description":"True when every event links to the one before it."},"brokenAt":{"description":"The id of the first event that does not link, when invalid.","type":"string"}},"required":["valid"],"additionalProperties":false,"description":"Whether the hash chain of the trail still verifies."},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The event id."},"kind":{"type":"string","description":"What happened, such as created, sent, viewed, signed, declined, completed or voided.","example":"signed"},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it happened."},"actorKind":{"type":"string","enum":["sender","signer","system","super_admin"],"description":"Who caused it."},"actorName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"The name of the actor, or null for the system."},"signerName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"The signer the event is about, or null."},"reason":{"description":"The reason, for a decline or a void.","type":["string","null"]},"hash":{"type":"string","description":"The hash that links this event to the one before it."}},"required":["id","kind","at","actorKind","actorName","signerName","reason","hash"],"additionalProperties":false},"description":"Every event of the request, oldest first."}},"required":["chain","events"],"additionalProperties":false},"SignatureSendResult":{"type":"object","properties":{"status":{"type":"string","description":"The status of the request after the send.","example":"sent"},"emailsQueued":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many signing emails were queued."}},"required":["status","emailsQueued"],"additionalProperties":false},"SignatureRemindResult":{"type":"object","properties":{"remindersSent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many signers were reminded."},"emailsQueued":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many reminder emails were queued."}},"required":["remindersSent","emailsQueued"],"additionalProperties":false},"RemindSignatureRequest":{"type":"object","properties":{"signerId":{"description":"Remind one signer. Every signer whose turn it is when omitted.","type":"string","minLength":1,"maxLength":64}},"additionalProperties":false},"SignatureVoidResult":{"type":"object","properties":{"status":{"type":"string","const":"voided","description":"Always voided."}},"required":["status"],"additionalProperties":false},"VoidSignatureRequest":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":2000,"description":"Why the request is cancelled. The signers who were asked are told."}},"required":["reason"],"additionalProperties":false},"Error":{"type":"object","properties":{"statusCode":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The HTTP status of the answer, repeated in the body.","example":409},"error":{"type":"string","description":"A stable code. Branch on this, never on the message.","example":"tasks.exhausted"},"message":{"type":"string","description":"A sentence for a person. It can change, so show it but never branch on it.","example":"Your account has used its tasks for this period."},"requestId":{"type":"string","description":"Quote this to support. It is also in the X-Request-Id header.","example":"5b6c0c88-6d06-4a62-9a0e-6c3c3e1b9b0e"},"details":{"description":"Numbers the caller can act on, such as a limit and when it resets.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"fields":{"description":"The invalid inputs of a validation error.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The input that is invalid, such as files[0] or options.pages."},"code":{"type":"string","description":"Why it is invalid, such as too_small or invalid_type."}},"required":["path","code"],"additionalProperties":false}}},"required":["statusCode","error","message","requestId"],"additionalProperties":false},"SignatureEventData":{"type":"object","properties":{"id":{"type":"string","description":"The request id.","example":"cm3x8k2f10010"},"title":{"type":"string","description":"The title of the request."},"message":{"description":"The note shown to signers, or null.","type":["string","null"]},"status":{"type":"string","enum":["draft","sent","in_progress","completed","declined","expired","voided"],"description":"draft: not sent yet. sent: waiting for the first signer. in_progress: at least one signer signed. completed: every signer signed. declined: a signer declined. expired: the request passed its expiry. voided: the sender cancelled it."},"visibility":{"type":"string","enum":["PRIVATE","ACCOUNT"],"description":"PRIVATE: visible to the key owner. ACCOUNT: visible to every member."},"signingOrder":{"type":"string","enum":["sequential","parallel"],"description":"sequential or parallel."},"locale":{"type":"string","description":"The language code of the emails the signers receive."},"templateId":{"description":"The template the request was made from, or null.","type":["string","null"]},"pageCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The pages of the document."},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The size of the document in bytes."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When the request was made."},"sentAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the request was sent, or null for a draft."},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the request stops accepting signatures, or null."},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the last signer signed, or null."},"voidedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the request was voided, or null."},"voidReason":{"description":"The reason given when it was voided, or null.","type":["string","null"]},"reminderCadenceHours":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Hours between reminders, or null when reminders are off."},"signedDocumentAvailable":{"type":"boolean","description":"True once every signer signed and the signed document and certificate can be downloaded."},"signers":{"type":"array","items":{"$ref":"#/components/schemas/SignatureSigner"},"description":"Every signer, in signing order."},"signerId":{"description":"The signer a viewed, signed or declined event is about.","type":"string"},"signer":{"description":"The same signer in full.","$ref":"#/components/schemas/SignatureSigner"},"reason":{"description":"Why the request was declined or voided.","type":"string"}},"required":["id","title","message","status","visibility","signingOrder","locale","templateId","pageCount","sizeBytes","createdAt","sentAt","expiresAt","completedAt","voidedAt","voidReason","reminderCadenceHours","signedDocumentAvailable","signers"],"additionalProperties":false}}},"x-tool-options":{"merge":{"category":"organize","accepts":["application/pdf"],"minFiles":2,"maxFiles":null,"batch":false,"options":{"type":"object","properties":{},"additionalProperties":false}},"merge-alternate":{"category":"organize","accepts":["application/pdf"],"minFiles":2,"maxFiles":10,"batch":false,"options":{"type":"object","properties":{"reverseEven":{"default":false,"type":"boolean"}},"additionalProperties":false}},"merge-images":{"category":"organize","accepts":["application/pdf","image/jpeg","image/png","image/gif","image/webp","image/bmp","image/tiff","image/heic","image/heif"],"minFiles":2,"maxFiles":200,"batch":false,"options":{"type":"object","properties":{"size":{"default":"fit","type":"string","enum":["fit","a4","letter"]},"margin":{"default":0,"type":"number","minimum":0,"maximum":50},"frames":{"default":"first","type":"string","enum":["first","all"]}},"additionalProperties":false}},"split":{"category":"organize","accepts":["application/pdf"],"minFiles":1,"maxFiles":1,"batch":false,"options":{"type":"object","properties":{"ranges":{"type":"string","minLength":1,"maxLength":2000,"pattern":"^[0-9][0-9\\s,-]*$"},"every":{"type":"integer","minimum":1,"maximum":2000}},"additionalProperties":false}},"split-size":{"category":"organize","accepts":["application/pdf"],"minFiles":1,"maxFiles":1,"batch":false,"options":{"type":"object","properties":{"maxMegabytes":{"default":5,"type":"number","minimum":0.1,"maximum":500}},"additionalProperties":false}},"split-bookmarks":{"category":"organize","accepts":["application/pdf"],"minFiles":1,"maxFiles":1,"batch":false,"options":{"type":"object","properties":{"level":{"default":1,"type":"integer","minimum":1,"maximum":6}},"additionalProperties":false}},"split-text":{"category":"organize","accepts":["application/pdf"],"minFiles":1,"maxFiles":1,"batch":false,"options":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":200},"match":{"default":"contains","type":"string","enum":["contains","starts"]},"caseSensitive":{"default":false,"type":"boolean"}},"required":["text"],"additionalProperties":false}},"split-half":{"category":"organize","accepts":["application/pdf"],"minFiles":1,"maxFiles":1,"batch":false,"options":{"type":"object","properties":{"cut":{"default":"document","type":"string","enum":["document","vertical","horizontal"]},"rtl":{"default":false,"type":"boolean"}},"additionalProperties":false}},"reorder":{"category":"organize","accepts":["application/pdf"],"minFiles":1,"maxFiles":1,"batch":false,"options":{"type":"object","properties":{"order":{"minItems":1,"maxItems":2000,"type":"array","items":{"type":"integer","minimum":1,"maximum":2000}}},"required":["order"],"additionalProperties":false}},"extract-pages":{"category":"organize","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":true,"options":{"type":"object","properties":{"pages":{"type":"string","minLength":1,"maxLength":2000,"pattern":"^[0-9][0-9\\s,-]*$"}},"required":["pages"],"additionalProperties":false}},"insert-pages":{"category":"organize","accepts":["application/pdf"],"minFiles":2,"maxFiles":2,"batch":false,"options":{"type":"object","properties":{"after":{"type":"integer","minimum":0,"maximum":2000},"sourcePages":{"type":"string","minLength":1,"maxLength":2000,"pattern":"^[0-9][0-9\\s,-]*$"}},"required":["after"],"additionalProperties":false}},"insert-blank-pages":{"category":"organize","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":true,"options":{"type":"object","properties":{"after":{"type":"integer","minimum":0,"maximum":2000},"count":{"type":"integer","minimum":1,"maximum":500},"pageSize":{"default":"match","type":"string","enum":["match","a4","letter"]}},"required":["after","count"],"additionalProperties":false}},"delete-pages":{"category":"organize","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":true,"options":{"type":"object","properties":{"pages":{"type":"string","minLength":1,"maxLength":2000,"pattern":"^[0-9][0-9\\s,-]*$"}},"required":["pages"],"additionalProperties":false}},"rotate":{"category":"organize","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":true,"options":{"type":"object","properties":{"angle":{"default":90,"anyOf":[{"type":"number","const":90},{"type":"number","const":180},{"type":"number","const":270}]},"pages":{"type":"string","minLength":1,"maxLength":2000,"pattern":"^[0-9][0-9\\s,-]*$"}},"additionalProperties":false}},"crop":{"category":"organize","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":true,"options":{"type":"object","properties":{"top":{"default":10,"type":"number","minimum":0,"maximum":1000},"right":{"default":10,"type":"number","minimum":0,"maximum":1000},"bottom":{"default":10,"type":"number","minimum":0,"maximum":1000},"left":{"default":10,"type":"number","minimum":0,"maximum":1000},"pages":{"type":"string","minLength":1,"maxLength":2000,"pattern":"^[0-9][0-9\\s,-]*$"}},"additionalProperties":false}},"page-numbers":{"category":"organize","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":true,"options":{"type":"object","properties":{"position":{"default":"bottom-center","type":"string","enum":["bottom-center","bottom-right","bottom-left","top-center","top-right","top-left"]},"start":{"default":1,"type":"integer","minimum":0,"maximum":100000},"format":{"default":"n","type":"string","enum":["n","n-of-total"]}},"additionalProperties":false}},"resize-pages":{"category":"organize","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":true,"options":{"type":"object","properties":{"size":{"default":"a4","type":"string","enum":["a3","a4","a5","letter","legal","custom"]},"widthMm":{"type":"number","minimum":20,"maximum":2000},"heightMm":{"type":"number","minimum":20,"maximum":2000},"fit":{"default":"fit","type":"string","enum":["fit","fill","stretch"]},"orientation":{"default":"keep","type":"string","enum":["keep","portrait","landscape"]},"pages":{"type":"string","minLength":1,"maxLength":2000,"pattern":"^[0-9][0-9\\s,-]*$"}},"additionalProperties":false}},"flip-pages":{"category":"organize","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":true,"options":{"type":"object","properties":{"direction":{"default":"horizontal","type":"string","enum":["horizontal","vertical"]},"pages":{"type":"string","minLength":1,"maxLength":2000,"pattern":"^[0-9][0-9\\s,-]*$"}},"additionalProperties":false}},"n-up":{"category":"organize","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":true,"options":{"type":"object","properties":{"perSheet":{"default":4,"anyOf":[{"type":"number","const":2},{"type":"number","const":4},{"type":"number","const":6},{"type":"number","const":9},{"type":"number","const":16}]},"size":{"default":"a4","type":"string","enum":["a4","letter","a3"]},"orientation":{"default":"auto","type":"string","enum":["auto","portrait","landscape"]},"margin":{"default":10,"type":"number","minimum":0,"maximum":30},"gutter":{"default":4,"type":"number","minimum":0,"maximum":20},"border":{"default":false,"type":"boolean"},"order":{"default":"across","type":"string","enum":["across","down"]}},"additionalProperties":false}},"booklet":{"category":"organize","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":true,"options":{"type":"object","properties":{"size":{"default":"a4","type":"string","enum":["a4","letter"]},"binding":{"default":"left","type":"string","enum":["left","right"]}},"additionalProperties":false}},"pdf-to-word":{"category":"convert-from-pdf","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":false,"options":{"type":"object","properties":{},"additionalProperties":false}},"pdf-to-excel":{"category":"convert-from-pdf","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":false,"options":{"type":"object","properties":{},"additionalProperties":false}},"pdf-to-ppt":{"category":"convert-from-pdf","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":false,"options":{"type":"object","properties":{},"additionalProperties":false}},"pdf-to-zpl":{"category":"convert-from-pdf","accepts":["application/pdf"],"minFiles":1,"maxFiles":1,"batch":false,"options":{"type":"object","properties":{"density":{"default":8,"anyOf":[{"type":"number","const":6},{"type":"number","const":8},{"type":"number","const":12},{"type":"number","const":24}]},"size":{"default":"4x6in","type":"string","enum":["4x6in","4x4in","4x2in","2x1in","100x150mm"]},"fit":{"default":"contain","type":"string","enum":["contain","cover"]},"threshold":{"default":128,"type":"integer","minimum":1,"maximum":254},"compression":{"default":"z64","type":"string","enum":["hex","acs","z64"]}},"additionalProperties":false}},"pdf-to-jpg":{"category":"convert-from-pdf","accepts":["application/pdf"],"minFiles":1,"maxFiles":1,"batch":false,"options":{"type":"object","properties":{"dpi":{"default":150,"anyOf":[{"type":"number","const":72},{"type":"number","const":150},{"type":"number","const":300}]},"quality":{"default":85,"type":"integer","minimum":10,"maximum":100}},"additionalProperties":false}},"pdf-to-png":{"category":"convert-from-pdf","accepts":["application/pdf"],"minFiles":1,"maxFiles":1,"batch":false,"options":{"type":"object","properties":{"dpi":{"default":150,"anyOf":[{"type":"number","const":72},{"type":"number","const":150},{"type":"number","const":300}]}},"additionalProperties":false}},"pdf-a":{"category":"convert-from-pdf","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":false,"options":{"type":"object","properties":{"part":{"default":2,"anyOf":[{"type":"number","const":1},{"type":"number","const":2},{"type":"number","const":3}]},"preflightOnly":{"default":false,"type":"boolean"}},"additionalProperties":false}},"pdf-to-markdown":{"category":"convert-from-pdf","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":false,"options":{"type":"object","properties":{"pageBreaks":{"default":false,"type":"boolean"}},"additionalProperties":false}},"pdf-to-html":{"category":"convert-from-pdf","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":false,"options":{"type":"object","properties":{"layout":{"default":"flow","type":"string","enum":["flow","fixed"]}},"additionalProperties":false}},"pdf-to-csv":{"category":"convert-from-pdf","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":false,"options":{"type":"object","properties":{"delimiter":{"default":"comma","type":"string","enum":["comma","semicolon","tab"]},"pages":{"type":"string","minLength":1,"maxLength":2000,"pattern":"^[0-9][0-9\\s,-]*$"}},"additionalProperties":false}},"pdf-to-tiff":{"category":"convert-from-pdf","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":false,"options":{"type":"object","properties":{"dpi":{"default":200,"type":"integer","minimum":72,"maximum":600},"color":{"default":"color","type":"string","enum":["color","gray","bw"]},"pages":{"type":"string","minLength":1,"maxLength":2000,"pattern":"^[0-9][0-9\\s,-]*$"}},"additionalProperties":false}},"word-to-pdf":{"category":"convert-to-pdf","accepts":["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/msword","application/vnd.oasis.opendocument.text","application/rtf"],"minFiles":1,"maxFiles":null,"batch":false,"options":{"type":"object","properties":{},"additionalProperties":false}},"excel-to-pdf":{"category":"convert-to-pdf","accepts":["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-excel","application/vnd.oasis.opendocument.spreadsheet","text/csv"],"minFiles":1,"maxFiles":null,"batch":false,"options":{"type":"object","properties":{},"additionalProperties":false}},"ppt-to-pdf":{"category":"convert-to-pdf","accepts":["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.ms-powerpoint","application/vnd.oasis.opendocument.presentation"],"minFiles":1,"maxFiles":null,"batch":false,"options":{"type":"object","properties":{},"additionalProperties":false}},"zpl-to-pdf":{"category":"convert-to-pdf","accepts":["text/plain"],"minFiles":1,"maxFiles":1,"batch":false,"options":{"type":"object","properties":{"density":{"default":8,"anyOf":[{"type":"number","const":6},{"type":"number","const":8},{"type":"number","const":12},{"type":"number","const":24}]},"size":{"default":"4x6in","type":"string","enum":["4x6in","4x4in","4x2in","2x1in","100x150mm"]}},"additionalProperties":false}},"jpg-to-pdf":{"category":"convert-to-pdf","accepts":["image/jpeg","image/png","image/gif","image/webp","image/bmp","image/tiff","image/heic","image/heif"],"minFiles":1,"maxFiles":null,"batch":false,"options":{"type":"object","properties":{"size":{"default":"fit","type":"string","enum":["fit","a4","letter"]},"margin":{"default":0,"type":"number","minimum":0,"maximum":50},"frames":{"default":"first","type":"string","enum":["first","all"]}},"additionalProperties":false}},"html-to-pdf":{"category":"convert-to-pdf","accepts":["text/html"],"minFiles":0,"maxFiles":1,"batch":false,"options":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false}},"scan-to-pdf":{"category":"convert-to-pdf","accepts":["image/jpeg","image/png"],"minFiles":1,"maxFiles":null,"batch":false,"options":{"type":"object","properties":{"size":{"default":"a4","type":"string","enum":["fit","a4","letter"]},"margin":{"default":10,"type":"number","minimum":0,"maximum":50},"clean":{"default":true,"type":"boolean"}},"additionalProperties":false}},"epub-to-pdf":{"category":"convert-to-pdf","accepts":["application/epub+zip"],"minFiles":1,"maxFiles":null,"batch":false,"options":{"type":"object","properties":{"size":{"default":"a4","type":"string","enum":["a4","letter"]},"fontSize":{"default":11,"type":"number","minimum":8,"maximum":24}},"additionalProperties":false}},"csv-to-pdf":{"category":"convert-to-pdf","accepts":["text/csv","text/plain"],"minFiles":1,"maxFiles":null,"batch":false,"options":{"type":"object","properties":{"size":{"default":"a4","type":"string","enum":["a4","letter"]},"orientation":{"default":"auto","type":"string","enum":["auto","portrait","landscape"]},"delimiter":{"default":"auto","type":"string","enum":["auto","comma","semicolon","tab"]},"header":{"default":true,"type":"boolean"},"fontSize":{"default":9,"type":"number","minimum":6,"maximum":14}},"additionalProperties":false}},"zip-to-pdf":{"category":"convert-to-pdf","accepts":["application/zip"],"minFiles":1,"maxFiles":null,"batch":false,"options":{"type":"object","properties":{"size":{"default":"fit","type":"string","enum":["fit","a4","letter"]},"margin":{"default":0,"type":"number","minimum":0,"maximum":50}},"additionalProperties":false}},"editor":{"category":"edit","accepts":["application/pdf","image/jpeg","image/png"],"minFiles":1,"maxFiles":11,"batch":false,"options":{"type":"object","properties":{"edits":{"minItems":1,"maxItems":500,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"page":{"type":"integer","minimum":1,"maximum":2000},"x":{"type":"number","minimum":-20000,"maximum":20000},"y":{"type":"number","minimum":-20000,"maximum":20000},"anchor":{"type":"string","enum":["bottom-left","bottom-center","bottom-right","top-left","top-center","top-right","center"]},"text":{"type":"string","minLength":1,"maxLength":2000},"size":{"default":12,"type":"number","minimum":4,"maximum":200},"color":{"default":"#000000","type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"opacity":{"default":1,"type":"number","exclusiveMinimum":0,"maximum":1}},"required":["type","page","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image"},"page":{"type":"integer","minimum":1,"maximum":2000},"image":{"type":"integer","minimum":1,"maximum":10},"x":{"type":"number","minimum":-20000,"maximum":20000},"y":{"type":"number","minimum":-20000,"maximum":20000},"anchor":{"type":"string","enum":["bottom-left","bottom-center","bottom-right","top-left","top-center","top-right","center"]},"width":{"type":"number","exclusiveMinimum":0,"maximum":20000},"height":{"type":"number","exclusiveMinimum":0,"maximum":20000},"opacity":{"default":1,"type":"number","exclusiveMinimum":0,"maximum":1}},"required":["type","page","image","width"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"rectangle"},"page":{"type":"integer","minimum":1,"maximum":2000},"x":{"type":"number","minimum":-20000,"maximum":20000},"y":{"type":"number","minimum":-20000,"maximum":20000},"width":{"type":"number","exclusiveMinimum":0,"maximum":20000},"height":{"type":"number","exclusiveMinimum":0,"maximum":20000},"color":{"default":"#FFFFFF","type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"opacity":{"default":1,"type":"number","exclusiveMinimum":0,"maximum":1}},"required":["type","page","x","y","width","height"],"additionalProperties":false}]}}},"required":["edits"],"additionalProperties":false}},"watermark":{"category":"edit","accepts":["application/pdf","image/jpeg","image/png"],"minFiles":1,"maxFiles":null,"batch":true,"options":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":200},"image":{"default":false,"type":"boolean"},"scale":{"default":0.5,"type":"number","minimum":0.05,"maximum":1},"opacity":{"default":0.25,"type":"number","exclusiveMinimum":0,"maximum":1},"pages":{"type":"string","minLength":1,"maxLength":2000,"pattern":"^[0-9][0-9\\s,-]*$"}},"additionalProperties":false}},"forms":{"category":"edit","accepts":["application/pdf"],"minFiles":1,"maxFiles":1,"batch":false,"options":{"type":"object","properties":{"values":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":256},"additionalProperties":{"anyOf":[{"type":"string","maxLength":10000},{"type":"boolean"}]}},"flatten":{"default":false,"type":"boolean"}},"required":["values"],"additionalProperties":false}},"compare":{"category":"edit","accepts":["application/pdf"],"minFiles":2,"maxFiles":2,"batch":false,"options":{"type":"object","properties":{},"additionalProperties":false}},"annotate":{"category":"edit","accepts":["application/pdf"],"minFiles":1,"maxFiles":1,"batch":false,"options":{"type":"object","properties":{"annotations":{"minItems":1,"maxItems":500,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"highlight"},"page":{"type":"integer","minimum":1,"maximum":2000},"x":{"type":"number","minimum":-20000,"maximum":20000},"y":{"type":"number","minimum":-20000,"maximum":20000},"width":{"type":"number","exclusiveMinimum":0,"maximum":20000},"height":{"type":"number","exclusiveMinimum":0,"maximum":20000},"color":{"default":"#FFEB3B","type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"opacity":{"default":0.4,"type":"number","exclusiveMinimum":0,"maximum":1},"contents":{"type":"string","minLength":1,"maxLength":2000}},"required":["type","page","x","y","width","height"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"rectangle"},"page":{"type":"integer","minimum":1,"maximum":2000},"x":{"type":"number","minimum":-20000,"maximum":20000},"y":{"type":"number","minimum":-20000,"maximum":20000},"width":{"type":"number","exclusiveMinimum":0,"maximum":20000},"height":{"type":"number","exclusiveMinimum":0,"maximum":20000},"color":{"default":"#E53935","type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"lineWidth":{"default":2,"type":"number","minimum":0.25,"maximum":20},"contents":{"type":"string","minLength":1,"maxLength":2000}},"required":["type","page","x","y","width","height"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"line"},"page":{"type":"integer","minimum":1,"maximum":2000},"x1":{"type":"number","minimum":-20000,"maximum":20000},"y1":{"type":"number","minimum":-20000,"maximum":20000},"x2":{"type":"number","minimum":-20000,"maximum":20000},"y2":{"type":"number","minimum":-20000,"maximum":20000},"color":{"default":"#E53935","type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"lineWidth":{"default":2,"type":"number","minimum":0.25,"maximum":20},"contents":{"type":"string","minLength":1,"maxLength":2000}},"required":["type","page","x1","y1","x2","y2"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"note"},"page":{"type":"integer","minimum":1,"maximum":2000},"x":{"type":"number","minimum":-20000,"maximum":20000},"y":{"type":"number","minimum":-20000,"maximum":20000},"contents":{"type":"string","minLength":1,"maxLength":2000},"color":{"default":"#FFEB3B","type":"string","pattern":"^#[0-9a-fA-F]{6}$"}},"required":["type","page","x","y","contents"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"text"},"page":{"type":"integer","minimum":1,"maximum":2000},"x":{"type":"number","minimum":-20000,"maximum":20000},"y":{"type":"number","minimum":-20000,"maximum":20000},"width":{"type":"number","exclusiveMinimum":0,"maximum":20000},"height":{"type":"number","exclusiveMinimum":0,"maximum":20000},"text":{"type":"string","minLength":1,"maxLength":2000},"size":{"default":12,"type":"number","minimum":4,"maximum":72},"color":{"default":"#000000","type":"string","pattern":"^#[0-9a-fA-F]{6}$"}},"required":["type","page","x","y","width","height","text"],"additionalProperties":false}]}}},"required":["annotations"],"additionalProperties":false}},"header-footer":{"category":"edit","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":true,"options":{"type":"object","properties":{"headerLeft":{"default":"","type":"string","maxLength":200},"headerCenter":{"default":"","type":"string","maxLength":200},"headerRight":{"default":"","type":"string","maxLength":200},"footerLeft":{"default":"","type":"string","maxLength":200},"footerCenter":{"default":"","type":"string","maxLength":200},"footerRight":{"default":"","type":"string","maxLength":200},"fontSize":{"default":10,"type":"number","minimum":6,"maximum":24},"margin":{"default":12,"type":"number","minimum":5,"maximum":40},"color":{"default":"gray","type":"string","enum":["black","gray"]},"skipFirst":{"default":false,"type":"boolean"},"pages":{"type":"string","minLength":1,"maxLength":2000,"pattern":"^[0-9][0-9\\s,-]*$"},"dateFormat":{"default":"iso","type":"string","enum":["iso","long","us","eu"]},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"additionalProperties":false}},"edit-metadata":{"category":"edit","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":true,"options":{"type":"object","properties":{"title":{"type":"string","maxLength":1000},"author":{"type":"string","maxLength":1000},"subject":{"type":"string","maxLength":1000},"keywords":{"type":"string","maxLength":1000}},"additionalProperties":false}},"remove-annotations":{"category":"edit","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":true,"options":{"type":"object","properties":{"links":{"default":false,"type":"boolean"},"formFields":{"default":false,"type":"boolean"},"pages":{"type":"string","minLength":1,"maxLength":2000,"pattern":"^[0-9][0-9\\s,-]*$"}},"additionalProperties":false}},"overlay":{"category":"edit","accepts":["application/pdf"],"minFiles":2,"maxFiles":2,"batch":false,"options":{"type":"object","properties":{"layer":{"default":"over","type":"string","enum":["over","under"]},"repeat":{"default":"repeat","type":"string","enum":["first","repeat","match"]},"opacity":{"default":1,"type":"number","minimum":0.05,"maximum":1},"pages":{"type":"string","minLength":1,"maxLength":2000,"pattern":"^[0-9][0-9\\s,-]*$"}},"additionalProperties":false}},"bates":{"category":"secure","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":false,"options":{"type":"object","properties":{"prefix":{"default":"","type":"string","maxLength":32,"pattern":"^[\\x20-\\x7e]*$"},"suffix":{"default":"","type":"string","maxLength":32,"pattern":"^[\\x20-\\x7e]*$"},"start":{"default":1,"type":"integer","minimum":0,"maximum":1000000000000},"digits":{"default":6,"type":"integer","minimum":1,"maximum":12},"position":{"default":"bottom-right","type":"string","enum":["bottom-right","bottom-left","bottom-center","top-right","top-left","top-center"]},"fontSize":{"default":10,"type":"number","minimum":4,"maximum":72}},"additionalProperties":false}},"redact":{"category":"secure","accepts":["application/pdf"],"minFiles":1,"maxFiles":1,"batch":false,"options":{"type":"object","properties":{"areas":{"default":[],"maxItems":500,"type":"array","items":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":2000},"x":{"type":"number","minimum":-20000,"maximum":20000},"y":{"type":"number","minimum":-20000,"maximum":20000},"width":{"type":"number","exclusiveMinimum":0,"maximum":20000},"height":{"type":"number","exclusiveMinimum":0,"maximum":20000}},"required":["page","x","y","width","height"],"additionalProperties":false}},"terms":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"patterns":{"default":[],"maxItems":4,"type":"array","items":{"type":"string","enum":["email","phone","card","national-id"]}},"dpi":{"default":200,"anyOf":[{"type":"number","const":150},{"type":"number","const":200},{"type":"number","const":300}]},"preview":{"default":false,"type":"boolean"}},"additionalProperties":false}},"protect":{"category":"secure","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":true,"options":{"type":"object","properties":{"password":{"type":"string","minLength":4,"maxLength":128},"ownerPassword":{"type":"string","minLength":4,"maxLength":128},"allowPrinting":{"default":true,"type":"boolean"},"allowCopying":{"default":true,"type":"boolean"},"allowEditing":{"default":true,"type":"boolean"}},"required":["password"],"additionalProperties":false}},"unlock":{"category":"secure","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":true,"options":{"type":"object","properties":{"password":{"type":"string","minLength":1,"maxLength":128}},"required":["password"],"additionalProperties":false}},"repair":{"category":"secure","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":true,"options":{"type":"object","properties":{},"additionalProperties":false}},"sanitize":{"category":"secure","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":true,"options":{"type":"object","properties":{"metadata":{"default":true,"type":"boolean"},"scripts":{"default":true,"type":"boolean"},"attachments":{"default":true,"type":"boolean"},"hidden":{"default":true,"type":"boolean"}},"additionalProperties":false}},"sign":{"category":"sign","accepts":["application/pdf","image/jpeg","image/png"],"minFiles":2,"maxFiles":11,"batch":false,"options":{"type":"object","properties":{"placements":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":2000},"image":{"type":"integer","minimum":1,"maximum":10},"x":{"type":"number","minimum":-20000,"maximum":20000},"y":{"type":"number","minimum":-20000,"maximum":20000},"anchor":{"type":"string","enum":["bottom-left","bottom-center","bottom-right","top-left","top-center","top-right","center"]},"width":{"type":"number","exclusiveMinimum":0,"maximum":20000},"height":{"type":"number","exclusiveMinimum":0,"maximum":20000},"opacity":{"default":1,"type":"number","exclusiveMinimum":0,"maximum":1}},"required":["page","image","width"],"additionalProperties":false}}},"required":["placements"],"additionalProperties":false}},"compress":{"category":"optimize","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":false,"options":{"type":"object","properties":{"quality":{"default":"balanced","type":"string","enum":["lossless","balanced","small"]}},"additionalProperties":false}},"grayscale":{"category":"optimize","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":true,"options":{"type":"object","properties":{},"additionalProperties":false}},"deskew":{"category":"optimize","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":true,"options":{"type":"object","properties":{"minAngle":{"default":0.3,"type":"number","minimum":0.1,"maximum":5},"dpi":{"default":200,"type":"number","minimum":150,"maximum":300}},"additionalProperties":false}},"linearize":{"category":"optimize","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":true,"options":{"type":"object","properties":{},"additionalProperties":false}},"ocr":{"category":"ai","accepts":["application/pdf"],"minFiles":1,"maxFiles":1,"batch":false,"options":{"type":"object","properties":{"languages":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["eng","spa","hin","fra","deu","jpn","chi_sim","ara","por","heb"]}},"boxes":{"default":false,"type":"boolean"}},"required":["languages"],"additionalProperties":false}},"flatten":{"category":"edit","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":true,"options":{"type":"object","properties":{"forms":{"default":true,"type":"boolean"},"annotations":{"default":true,"type":"boolean"}},"additionalProperties":false}},"extract-images":{"category":"convert-from-pdf","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":false,"options":{"type":"object","properties":{},"additionalProperties":false}},"pdf-to-text":{"category":"convert-from-pdf","accepts":["application/pdf"],"minFiles":1,"maxFiles":null,"batch":false,"options":{"type":"object","properties":{"layout":{"default":false,"type":"boolean"}},"additionalProperties":false}},"text-to-pdf":{"category":"convert-to-pdf","accepts":["text/plain","text/markdown"],"minFiles":1,"maxFiles":null,"batch":false,"options":{"type":"object","properties":{"size":{"default":"a4","type":"string","enum":["a4","letter"]},"fontSize":{"default":11,"type":"number","minimum":8,"maximum":24},"format":{"default":"text","type":"string","enum":["text","markdown"]}},"additionalProperties":false}},"blank-pdf":{"category":"organize","accepts":["application/pdf"],"minFiles":0,"maxFiles":0,"batch":false,"options":{"type":"object","properties":{"pages":{"default":1,"type":"integer","minimum":1,"maximum":500},"size":{"default":"a4","type":"string","enum":["a3","a4","a5","letter","legal"]},"orientation":{"default":"portrait","type":"string","enum":["portrait","landscape"]}},"additionalProperties":false}},"summarize":{"category":"ai","accepts":["application/pdf"],"minFiles":1,"maxFiles":1,"batch":false,"options":{"type":"object","properties":{"pages":{"type":"integer","minimum":1,"maximum":2000},"language":{"type":"string","enum":["en","es","hi","fr","de","ja","zh","ar","pt-PT","he"]}},"required":["pages","language"],"additionalProperties":false}},"ask":{"category":"ai","accepts":["application/pdf"],"minFiles":1,"maxFiles":1,"batch":false,"options":{"type":"object","properties":{"pages":{"type":"integer","minimum":1,"maximum":2000},"language":{"type":"string","enum":["en","es","hi","fr","de","ja","zh","ar","pt-PT","he"]},"question":{"type":"string","maxLength":2000}},"required":["pages","language","question"],"additionalProperties":false}},"extract-tables":{"category":"ai","accepts":["application/pdf"],"minFiles":1,"maxFiles":1,"batch":false,"options":{"type":"object","properties":{"pages":{"type":"integer","minimum":1,"maximum":2000}},"required":["pages"],"additionalProperties":false}},"extract-fields":{"category":"ai","accepts":["application/pdf"],"minFiles":1,"maxFiles":1,"batch":false,"options":{"type":"object","properties":{"pages":{"type":"integer","minimum":1,"maximum":2000},"fields":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string","maxLength":200},"type":{"type":"string","enum":["text","number","date","boolean"]}},"required":["name"],"additionalProperties":false}}},"required":["pages","fields"],"additionalProperties":false}},"quiz":{"category":"ai","accepts":["application/pdf"],"minFiles":1,"maxFiles":1,"batch":false,"options":{"type":"object","properties":{"pages":{"type":"integer","minimum":1,"maximum":2000},"language":{"type":"string","enum":["en","es","hi","fr","de","ja","zh","ar","pt-PT","he"]},"count":{"type":"integer","minimum":1,"maximum":30}},"required":["pages","language","count"],"additionalProperties":false}},"flashcards":{"category":"ai","accepts":["application/pdf"],"minFiles":1,"maxFiles":1,"batch":false,"options":{"type":"object","properties":{"pages":{"type":"integer","minimum":1,"maximum":2000},"language":{"type":"string","enum":["en","es","hi","fr","de","ja","zh","ar","pt-PT","he"]},"count":{"type":"integer","minimum":1,"maximum":60}},"required":["pages","language","count"],"additionalProperties":false}}},"x-error-codes":[{"code":"folder.invalid","status":400,"meaning":"A folder or a document cannot be organised that way: folders nest one level only, a team document cannot go in a private folder, and a folder moves only among folders of the same kind.","fix":"Put the folder at the top, or inside a top folder of the same kind, and keep a team document in a team folder or at the top."},{"code":"idempotency_key_invalid","status":400,"meaning":"The Idempotency-Key is not 1 to 255 visible ASCII characters.","fix":"Send a UUID, or any value of 1 to 255 letters, digits and punctuation marks, with no spaces."},{"code":"options.invalid","status":400,"meaning":"The options do not fit the tool. Nothing was counted. The fields array names each invalid option.","fix":"Compare the options with the JSON Schema that GET /v1/tools/{toolId} returns for the tool, then send the corrected options."},{"code":"run.too_few_files","status":400,"meaning":"The tool needs more files than the run names. The details give the minimum.","fix":"Upload the missing files and name every file in the files array."},{"code":"run.too_many_files","status":400,"meaning":"The run names more files than one run of the tool takes on your plan. The details give the limit.","fix":"Send at most the number in the details, or split the work into several runs."},{"code":"signature.access_code_invalid","status":400,"meaning":"A signer verified by access code has no accessCode, or it is not 6 to 64 characters, or an accessCode was given for a signer with another method. The details name the problem and the signer position.","fix":"Give every access-code signer an accessCode of 6 to 64 characters and share it with them yourself, and send no accessCode for the other methods."},{"code":"signature.verification_unsupported","status":400,"meaning":"A signer asked to be verified by a method PDF Loft does not offer. The methods sms-otp, kba and id-document do not exist yet, and nothing is sent without the check the sender asked for. The details name the method and list the supported ones.","fix":"Set verificationMethod to none, access-code or email-code for each signer, or leave it out."},{"code":"tool.runs_on_device","status":400,"meaning":"The tool has no server version, so it cannot be run through the API. Every tool in the current list has one; the code is kept for a tool added later that runs in the browser only.","fix":"Choose a tool whose runnable field is true in GET /v1/tools."},{"code":"validation_failed","status":400,"meaning":"The request body, a query value or a path value is not valid. The fields array names each invalid input and the reason. A file that contains a virus is refused with status 422 and this code.","fix":"Read the fields array, correct each named input and send the request again. Do not retry the same request unchanged."},{"code":"webhook.url_refused","status":400,"meaning":"The endpoint address is not a public https address. Private, loopback, link-local and metadata addresses are refused.","fix":"Register an https address on the public internet that answers POST."},{"code":"workflow.invalid","status":400,"meaning":"The chain of tools cannot work. The details list the steps at fault: an index counted from zero and a code of tool_gone, tool_not_allowed, first_only, last_only or options_invalid. A chain holds 1 to 10 steps. Nothing was saved.","fix":"Change the steps named in the details: a tool that starts a chain goes first, a tool that ends one goes last, and the options of each step must fit that tool, as GET /v1/tools/{toolId} lists them."},{"code":"api_key_expired","status":401,"meaning":"The key passed its expiry date.","fix":"Make a new key in Settings, Developers, with a later expiry or none, and replace the old one."},{"code":"api_key_revoked","status":401,"meaning":"The key was revoked, so every call with it is refused.","fix":"Make a new key in Settings, Developers and replace the revoked one in your secret store."},{"code":"invalid_api_key","status":401,"meaning":"The key is missing, malformed or unknown, or the person who made it is no longer an owner or admin of the account.","fix":"Send the key as Authorization: Bearer pl_live_... exactly as it was shown when it was made. If it was lost, make a new key in Settings, Developers."},{"code":"credits.exhausted","status":402,"meaning":"The account has used its AI credits for this period. The details give the limit and when it resets.","fix":"Wait for the reset time in the details, or upgrade the plan."},{"code":"plan_required","status":402,"meaning":"The account plan does not include the public API. The API is included in the Team plan and above.","fix":"Upgrade the account in Settings, Billing, then repeat the call with the same key."},{"code":"signatures.exhausted","status":402,"meaning":"The account has used its signature requests for this period. The details give the limit, the amount used, the amount a bulk send needed and when the period resets.","fix":"Wait for the reset time in the details, send fewer requests, or upgrade the plan."},{"code":"tasks.exhausted","status":402,"meaning":"The account has used its tasks for this period. The details give the limit, the amount used and when the period resets.","fix":"Wait for the reset time in the details, or upgrade the plan. Calls that read data still work."},{"code":"forbidden","status":403,"meaning":"The person who owns the key may read this signature request or workflow but not change it. Only the sender or maker, or an owner or admin, can.","fix":"Use a key owned by the sender or maker, or by an owner or admin of the account."},{"code":"insufficient_scope","status":403,"meaning":"The key does not hold the scope this call needs. The details name the scope in required.","fix":"Make a key that holds the scope named in details.required. A scope cannot be added to an existing key."},{"code":"read_only","status":403,"meaning":"The person who owns the key has read only access to the account, so a call that changes data is refused.","fix":"Ask an owner or admin to give that person write access, or use a key owned by someone who has it."},{"code":"workflow.limit","status":403,"meaning":"The account keeps as many workflows as its plan allows. The details give the limit.","fix":"Delete a workflow you no longer use with DELETE /v1/workflows/{workflowId}, or change the plan."},{"code":"workflow.plan","status":403,"meaning":"The plan of the account has no workflows. Workflows come with a paid plan. Nothing was saved or counted.","fix":"Change the plan, or run the tools one at a time with POST /v1/tools/{toolId}/runs."},{"code":"not_found","status":404,"meaning":"There is no such tool, run, file, document, endpoint, signature request or template in this account. A resource of another account is never revealed, so it looks the same as one that does not exist.","fix":"Check the id, and that the key belongs to the account that owns the resource. Uploaded files that no run used are deleted after ten minutes."},{"code":"folder.limit_reached","status":409,"meaning":"The account already has the most folders it may keep.","fix":"Delete a folder you no longer use with DELETE /v1/folders/{folderId}. Its documents are kept and return to the top of the library."},{"code":"idempotency_in_progress","status":409,"meaning":"A request with the same Idempotency-Key is still running.","fix":"Wait a moment and send the same request with the same key again. It returns the first answer once that one finishes."},{"code":"review_links.exhausted","status":409,"meaning":"The account already has as many active review links as its plan allows.","fix":"Revoke a link you no longer need with DELETE /v1/documents/{documentId}/review-links/{linkId}, or change the plan, then create the new link."},{"code":"signature.not_completed","status":409,"meaning":"The signed document and the certificate are made when every signer has signed, and that has not happened yet.","fix":"Wait for the signature.completed webhook, or poll the request until its status is completed, then download."},{"code":"signature.not_draft","status":409,"meaning":"The signature request was already sent, so it cannot be sent again.","fix":"Read the request with GET /v1/signature-requests/{requestId}. Use remind to nudge signers or void to cancel it."},{"code":"signature.not_open","status":409,"meaning":"The signature request is complete, voided, expired or otherwise no longer waiting for signatures.","fix":"Read the status of the request. Make a new request if the document still needs signatures."},{"code":"storage.full","status":409,"meaning":"Saving the document would take the library past the storage limit of the plan.","fix":"Delete documents you no longer need with DELETE /v1/documents/{documentId}, or upgrade the plan."},{"code":"storage.over_limit","status":409,"meaning":"The library is already over its storage limit, so nothing new is saved until space is freed or the plan changes.","fix":"Delete documents or upgrade the plan, then save again."},{"code":"webhook.limit_reached","status":409,"meaning":"The account already has the most webhook endpoints it may have.","fix":"Delete an endpoint you no longer use with DELETE /v1/webhooks/{endpointId}, then create the new one."},{"code":"workflow.outdated","status":409,"meaning":"The workflow uses a tool or an option that no longer exists, or breaks the order rules. The details list the steps at fault in the same form as workflow.invalid. Nothing was counted.","fix":"Change the workflow with PATCH /v1/workflows/{workflowId} so that every step is valid, then run it again."},{"code":"result.expired","status":410,"meaning":"The result file was deleted two hours after the run finished.","fix":"Run the tool again, or save the result as a document with POST /v1/documents before it expires."},{"code":"file.too_large","status":413,"meaning":"A file is larger than your plan or the tool allows. The details give maxBytes.","fix":"Send a smaller file, or use a plan with a higher limit (25 MB on Free up to 1 GB on Enterprise)."},{"code":"payload_too_large","status":413,"meaning":"A JSON body is larger than 1 MB. Files never travel as JSON.","fix":"Send less in one call. Upload a file with POST /v1/files and refer to it by its id."},{"code":"file.type_refused","status":415,"meaning":"No tool reads this content type, this tool does not read it, or the bytes of the file are not the type it declares. The check reads the file itself, never only the Content-Type header.","fix":"Send a file the tool accepts (GET /v1/tools/{toolId} lists accepts) with a Content-Type that matches its real format."},{"code":"unsupported_media_type","status":415,"meaning":"The body has a content type the route does not read. Routes read JSON; only POST /v1/files reads file bytes.","fix":"Send Content-Type: application/json with a JSON body, or send a file only to POST /v1/files."},{"code":"ai.declined","status":422,"meaning":"The model declined to work on this document. Nothing was counted.","fix":"Ask about other pages, or use a different document."},{"code":"document.unreadable","status":422,"meaning":"The document has no text that could be read. The details give the reason: scan_unreadable for a scan that could not be recognised, no_words for a document with no words, encrypted, damaged, too_many_pages or too_large. Nothing was counted.","fix":"For a scan, run the ocr tool first and ask about the result. Remove a password, repair a damaged file or split a long one."},{"code":"idempotency_key_reused","status":422,"meaning":"The Idempotency-Key was already used with a different request, so the first answer is not the answer to this one.","fix":"Send a new Idempotency-Key for a new request. Repeat the key only to retry the exact same request."},{"code":"rate_limited","status":429,"meaning":"The key made more calls in a minute than its limit allows, or too many calls with a key that was refused. The details give the limit and retryAfterSeconds.","fix":"Wait for the number of seconds in the Retry-After header, then continue. Spread calls out, and read the X-RateLimit-Remaining header to slow down before the limit."},{"code":"internal_error","status":500,"meaning":"Something went wrong on the PDF Loft side.","fix":"Retry once. If it repeats, quote the requestId (also the X-Request-Id header) to support."},{"code":"service.unavailable","status":503,"meaning":"The API, storage or the virus scanner is not available right now.","fix":"Try again after a short wait, with exponential backoff, using the same Idempotency-Key."},{"code":"tool.unavailable","status":503,"meaning":"The tool cannot run right now. Nothing was counted against your tasks.","fix":"Try again after a short wait, using the same Idempotency-Key so the retry cannot run twice."}],"x-scopes":[{"id":"tools:run","description":"Upload files, run PDF tools and cancel runs.","reserved":false},{"id":"jobs:read","description":"Read runs and download their results.","reserved":false},{"id":"documents:read","description":"List documents and download them.","reserved":false},{"id":"documents:write","description":"Save documents to the library and delete them.","reserved":false},{"id":"webhooks:manage","description":"Create, list and delete webhook endpoints.","reserved":false},{"id":"reviews:read","description":"Read the review links of a document and the comments left through them.","reserved":false},{"id":"reviews:write","description":"Create and revoke review links, and reply to and resolve the comments left through them.","reserved":false},{"id":"signatures:send","description":"Create, send, remind and void signature requests, and send from a template in bulk.","reserved":false},{"id":"signatures:read","description":"Read templates and signature requests, and download signed documents and certificates.","reserved":false},{"id":"workflows:read","description":"List and read saved workflows.","reserved":false},{"id":"workflows:write","description":"Create, change and delete saved workflows. Running one needs the tools:run scope.","reserved":false}],"webhooks":{"job.completed":{"post":{"summary":"A tool run finished successfully.","description":"Signed with HMAC-SHA256 over the timestamp, a dot and the raw body, sent in PDFLoft-Signature. See Webhooks in the guide.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"const":"job.completed"},"createdAt":{"type":"string","format":"date-time"},"data":{"$ref":"#/components/schemas/Job"}},"required":["id","type","createdAt","data"]}}}},"responses":{"2XX":{"description":"Any 2xx answer marks the delivery as received."}}}},"job.failed":{"post":{"summary":"A tool run failed.","description":"Signed with HMAC-SHA256 over the timestamp, a dot and the raw body, sent in PDFLoft-Signature. See Webhooks in the guide.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"const":"job.failed"},"createdAt":{"type":"string","format":"date-time"},"data":{"$ref":"#/components/schemas/Job"}},"required":["id","type","createdAt","data"]}}}},"responses":{"2XX":{"description":"Any 2xx answer marks the delivery as received."}}}},"document.created":{"post":{"summary":"A document was saved to the library.","description":"Signed with HMAC-SHA256 over the timestamp, a dot and the raw body, sent in PDFLoft-Signature. See Webhooks in the guide.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"const":"document.created"},"createdAt":{"type":"string","format":"date-time"},"data":{"type":"object"}},"required":["id","type","createdAt","data"]}}}},"responses":{"2XX":{"description":"Any 2xx answer marks the delivery as received."}}}},"document.deleted":{"post":{"summary":"A document was deleted from the library.","description":"Signed with HMAC-SHA256 over the timestamp, a dot and the raw body, sent in PDFLoft-Signature. See Webhooks in the guide.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"const":"document.deleted"},"createdAt":{"type":"string","format":"date-time"},"data":{"type":"object"}},"required":["id","type","createdAt","data"]}}}},"responses":{"2XX":{"description":"Any 2xx answer marks the delivery as received."}}}},"signature.request_sent":{"post":{"summary":"A signature request was sent to its signers.","description":"Signed with HMAC-SHA256 over the timestamp, a dot and the raw body, sent in PDFLoft-Signature. See Webhooks in the guide.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"const":"signature.request_sent"},"createdAt":{"type":"string","format":"date-time"},"data":{"$ref":"#/components/schemas/SignatureEventData"}},"required":["id","type","createdAt","data"]}}}},"responses":{"2XX":{"description":"Any 2xx answer marks the delivery as received."}}}},"signature.viewed":{"post":{"summary":"A signer opened a signature request.","description":"Signed with HMAC-SHA256 over the timestamp, a dot and the raw body, sent in PDFLoft-Signature. See Webhooks in the guide.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"const":"signature.viewed"},"createdAt":{"type":"string","format":"date-time"},"data":{"$ref":"#/components/schemas/SignatureEventData"}},"required":["id","type","createdAt","data"]}}}},"responses":{"2XX":{"description":"Any 2xx answer marks the delivery as received."}}}},"signature.signed":{"post":{"summary":"A signer signed.","description":"Signed with HMAC-SHA256 over the timestamp, a dot and the raw body, sent in PDFLoft-Signature. See Webhooks in the guide.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"const":"signature.signed"},"createdAt":{"type":"string","format":"date-time"},"data":{"$ref":"#/components/schemas/SignatureEventData"}},"required":["id","type","createdAt","data"]}}}},"responses":{"2XX":{"description":"Any 2xx answer marks the delivery as received."}}}},"signature.declined":{"post":{"summary":"A signer declined.","description":"Signed with HMAC-SHA256 over the timestamp, a dot and the raw body, sent in PDFLoft-Signature. See Webhooks in the guide.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"const":"signature.declined"},"createdAt":{"type":"string","format":"date-time"},"data":{"$ref":"#/components/schemas/SignatureEventData"}},"required":["id","type","createdAt","data"]}}}},"responses":{"2XX":{"description":"Any 2xx answer marks the delivery as received."}}}},"signature.completed":{"post":{"summary":"Every signer signed and the signed document is ready.","description":"Signed with HMAC-SHA256 over the timestamp, a dot and the raw body, sent in PDFLoft-Signature. See Webhooks in the guide.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"const":"signature.completed"},"createdAt":{"type":"string","format":"date-time"},"data":{"$ref":"#/components/schemas/SignatureEventData"}},"required":["id","type","createdAt","data"]}}}},"responses":{"2XX":{"description":"Any 2xx answer marks the delivery as received."}}}},"signature.voided":{"post":{"summary":"A signature request was voided.","description":"Signed with HMAC-SHA256 over the timestamp, a dot and the raw body, sent in PDFLoft-Signature. See Webhooks in the guide.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"const":"signature.voided"},"createdAt":{"type":"string","format":"date-time"},"data":{"$ref":"#/components/schemas/SignatureEventData"}},"required":["id","type","createdAt","data"]}}}},"responses":{"2XX":{"description":"Any 2xx answer marks the delivery as received."}}}},"signature.expired":{"post":{"summary":"A signature request expired before every signer signed.","description":"Signed with HMAC-SHA256 over the timestamp, a dot and the raw body, sent in PDFLoft-Signature. See Webhooks in the guide.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"const":"signature.expired"},"createdAt":{"type":"string","format":"date-time"},"data":{"$ref":"#/components/schemas/SignatureEventData"}},"required":["id","type","createdAt","data"]}}}},"responses":{"2XX":{"description":"Any 2xx answer marks the delivery as received."}}}}}}