Submit Statement Password

POST /api/v1/statements/:id/password

Supplies the password for a password-protected PDF or XLSX statement. The password is validated against the stored file before anything is saved; on success it is persisted, the statement's error is cleared, and processing re-runs from the read_file step. This is the API equivalent of the in-app "enter password" recovery prompt.

Only statements whose file_type is pdf or excel can accept a password. Requires the statements:edit permission.

Path Parameters

ParameterTypeDescription
idstringStatement ID

Request Body

FieldTypeRequiredDescription
passwordstringYesThe file password. Validated before storage; sent over TLS and never logged.

Example Request

curl -X POST "https://statements.finopsbricks.com/api/v1/statements/stmt123xyz/password" \
  -H "api-key: fob_stm_xxxxxxxxxxxx" \
  -H "api-secret: xxxxxxxxxxxxxxxx" \
  -H "content-type: application/json" \
  -d '{"password": "s3cr3t"}'

Response

202 Accepted:

{
  "data": {
    "id": "stmt123xyz",
    "job_id": "01HPXYZ...",
    "step": "read_file"
  }
}

Errors

CodeDescription
400Missing/empty password, wrong password, or the file type is not password-protectable
401Invalid or missing API credentials
403API key lacks statements:edit permission
404Statement not found
502The stored file could not be downloaded, or the processing job could not be queued