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
| Parameter | Type | Description |
|---|---|---|
| id | string | Statement ID |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| password | string | Yes | The 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
| Code | Description |
|---|---|
| 400 | Missing/empty password, wrong password, or the file type is not password-protectable |
| 401 | Invalid or missing API credentials |
| 403 | API key lacks statements:edit permission |
| 404 | Statement not found |
| 502 | The stored file could not be downloaded, or the processing job could not be queued |