Crear cuenta financiera
POST/financial-accounts
Creates a financial account. Requires scope finance.accounts.write. workspace_id is taken from the token. company_id is required (accounts must belong to a company; workspace-level accounts exist from imports but aren't creatable via v1). balance is an opening seed (default 0.00) — it is NOT the live balance (that is computed from transactions and returned on the detail endpoint) and cannot be updated. The bank may be given as bank_id (UUID) or bank_code (public COMPE/BACEN, e.g. 341) — not both (400); an unknown code → 422. The response echoes the resolved bank as bank: { code, name }. Pass an X-Idempotency-Key header on retries.
Solicitud
Respuestas
- 201
- 400
- 401
- 403
- 409
- 422
- 429
- 500
Account created. The body is the detail shape (includes the computed balance).
Malformed JSON body, or bank_id and bank_code sent together.
Missing / invalid / expired / revoked token.
Token lacks the finance.accounts.write scope.
X-Idempotency-Key reused with a different body.
Schema validation failure, company_id not in the tenant, or unknown bank_code.
Rate limit exceeded for this token. Reads and writes have separate budgets, both on a 1-hour sliding window. The response carries X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset and Retry-After — wait out Retry-After rather than retrying immediately.
Unhandled server error.