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

ParameterTypeDescription
idstringAccount ID

Body Parameters

ParameterTypeRequiredDescription
valuestringYesIdentifier 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

CodeDescription
400value missing, or already present in the identifier array
401Invalid or missing API credentials
403API key lacks accounts:edit permission
404Account 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

ParameterTypeDescription
idstringAccount ID
valuestringIdentifier 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

CodeDescription
401Invalid or missing API credentials
403API key lacks accounts:edit permission
404Account not found