Manage Account Identifiers
An account's identifier array (usually account numbers or fragments of one) is what the statement pipeline uses to auto-match an uploaded statement to the right account during the detect_account step. These endpoints let you manage that array directly, instead of only via Update Account's full-array replace.
Add an Identifier
POST /api/v1/accounts/:id/identifiers
Appends a value to the account's identifier array. Fails if the value is already present.
Path Parameters
| Parameter | Type | Description |
|---|
| id | string | Account ID |
Body Parameters
| Parameter | Type | Required | Description |
|---|
| value | string | Yes | Identifier value to add |
Example Request
curl -X POST "https://statements.finopsbricks.com/api/v1/accounts/acc123xyz/identifiers" \
-H "api-key: fob_stm_xxxxxxxxxxxx" \
-H "api-secret: xxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{ "value": "1234567890" }'
Response
{
"data": {
"id": "acc123xyz",
"identifier": ["1234567890"]
}
}
Errors
| Code | Description |
|---|
| 400 | value missing, or already present in the identifier array |
| 401 | Invalid or missing API credentials |
| 403 | API key lacks accounts:edit permission |
| 404 | Account not found |
Remove an Identifier
DELETE /api/v1/accounts/:id/identifiers/:value
Removes a value from the account's identifier array. Idempotent — no error if the value isn't present. URL-encode :value if it contains special characters.
Path Parameters
| Parameter | Type | Description |
|---|
| id | string | Account ID |
| value | string | Identifier value to remove (URL-encoded) |
Example Request
curl -X DELETE "https://statements.finopsbricks.com/api/v1/accounts/acc123xyz/identifiers/1234567890" \
-H "api-key: fob_stm_xxxxxxxxxxxx" \
-H "api-secret: xxxxxxxxxxxxxxxx"
Response
{
"data": {
"id": "acc123xyz",
"identifier": []
}
}
Errors
| Code | Description |
|---|
| 401 | Invalid or missing API credentials |
| 403 | API key lacks accounts:edit permission |
| 404 | Account not found |