> ## Documentation Index
> Fetch the complete documentation index at: https://entendre.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Reauthorize connection

> Starts the setup to renew the authorization of the same provider account.

Track the authorization attempt on the connection. To connect a different account, create a new connection.

An active bank connection can start a Plaid Link session to renew authorization or add accounts. A disconnected bank can attempt Plaid update mode with its saved Item. Cached accounts do not prove that the Item can be restored. A removed Item needs a new connection. If Plaid confirms that the Item is missing, reauthorization returns `409` even if the saved connection still appears active. An invalid access token also returns `409` when the connection is disconnected. In either case, connect the bank again. Starting Link does not prove that authorization is complete.

A Plaid rate limit returns `429` with `rate_limit_source: plaid`. When Plaid supplies a valid retry delay, the response includes it in seconds and in the `Retry-After` header. Other Plaid failures return `502`.


## OpenAPI

````yaml openapi-public-preview.json POST /v1/connections/{connection_id}/reauthorize
openapi: 3.1.0
info:
  title: Entendre API
  version: 1.0.0
  description: Programmatic access to crypto-native accounting and treasury operations.
servers:
  - url: https://api.entendre.finance
    description: Production API.
security:
  - ApiKey: []
tags:
  - name: Cost Basis
    description: >-
      Read and configure the organization cost-basis method and lot-tracking
      scope.
  - name: Organization
    description: Read your organization profile and find members for agent assignments.
  - name: Transactions
    description: Find transactions, inspect their details and create manual records.
  - name: Sources
    description: >-
      Manage wallets, exchange accounts, bank accounts and other transaction
      sources.
  - name: Assets
    description: Inspect asset acquisitions, remaining quantities and cost basis.
  - name: Journals
    description: >-
      Create and post journal entries, correct eligible entries and sync posted
      journals to a connected general ledger.
  - name: Documents
    description: >-
      Upload documents, check processing status and link supporting evidence to
      transactions.
  - name: Legal Entities
    description: Manage the legal entities used in your accounting records.
  - name: Ledger Accounts
    description: Manage your chart of accounts and find accounts for journal entries.
  - name: Tags
    description: Create and manage tags to classify your records.
  - name: Accruals
    description: >-
      Create and post accruals, inspect their status and reverse eligible
      entries.
  - name: Cash Application
    description: Match deposits to invoices and manage the resulting cash applications.
  - name: Classification
    description: >-
      Classify transactions in a batch, post eligible entries and inspect the
      results.
  - name: Revaluation
    description: Run asset revaluations for an accounting period and check their results.
  - name: Accounting Periods
    description: Check whether a period is ready to close, then close or reopen it.
  - name: Income Statement
    description: View revenue, expenses and net income for a reporting period.
  - name: Balance Sheet
    description: View assets, liabilities and equity as of a reporting date.
  - name: Trial Balance
    description: Review ledger account balances and debit and credit totals.
  - name: Closing Positions
    description: View asset positions at the end of a reporting period.
  - name: Treasury Balances
    description: Review treasury balances by asset and source.
  - name: Realized Gains & Losses
    description: Review realized gains and losses from asset dispositions.
  - name: Asset Tax Lots
    description: Inspect asset tax lots, remaining quantities and cost basis.
  - name: Schedule of Dispositions
    description: >-
      Review asset dispositions and their proceeds, cost basis and gains or
      losses.
  - name: Financial Insights
    description: Review financial insights for your selected reporting context.
  - name: Agents
    description: Create agents, schedule their work and inspect their runs.
  - name: Memory
    description: Read, search and maintain the memory files your agents use.
  - name: Connections
    description: Connect providers, manage authorization and disconnect.
  - name: GL Mapping
    description: >-
      Map ledger accounts and legal entities to your ERP. Import legal entities,
      tags and chart of accounts.
  - name: Request
    description: Request information, documents or connections from a client.
  - name: Client
    description: Manage your firm’s client relationships.
  - name: Team
    description: Invite team members and manage their access to your firm.
  - name: Settings
    description: Read and update your firm settings.
  - name: Purpose Accounts
    description: >-
      Read accounting purpose assignments and set the realized gain or loss
      account.
externalDocs:
  description: Versioning, deprecation, and rate-limit policy
  url: https://entendre.ai/docs/get-started/versioning
paths:
  /v1/connections/{connection_id}/reauthorize:
    post:
      tags:
        - Connections
      summary: Reauthorize connection
      description: >-
        Renews authorization for the same provider account. Supply replacement
        credentials inline for an exchange, or omit them to receive a secure
        setup URL. Track the authorization attempt on the connection. A bank
        response also returns authorization_attempt.link_token for an embedded
        Plaid Link session; only this response returns it. An active bank
        connection can reauthorize with account_selection_enabled to add
        accounts. A disconnected bank can attempt Plaid update mode with its
        saved Item. Cached accounts do not prove that the Item can be restored.
        A removed Item needs a new connection. If Plaid confirms that the Item
        is missing, this operation returns 409 regardless of the saved
        connection status; connect the bank again. An invalid access token also
        returns 409 when the connection is disconnected. Other Plaid failures
        return 502, except provider rate limits: these return 429 with
        rate_limit_source: plaid. A provider retry delay is returned only when
        Plaid supplies a valid positive number of seconds. A saved connection
        record does not prove that the provider item is still usable. After the
        user finishes Plaid Link, the Entendre app completes a bank
        reauthorization; until then the attempt stays pending. A different
        account needs a new connection. A Fireblocks connection rotates api_key,
        api_secret or environment in one request, also while active; the
        connectivity check runs on the resulting credentials, and a failed check
        changes nothing. To change credentials and the legal entity, reauthorize
        first, then PATCH the legal entity: the two requests are independent. A
        Stripe connection cannot be reauthorized. A bank connection takes
        link_mode: hosted (default) or sdk; sdk returns setup_url null and
        refuses return_url with 400.
      operationId: reauthorize_connection
      parameters:
        - name: connection_id
          in: path
          required: true
          description: ID of the connection.
          schema:
            type: string
            minLength: 1
          example: con_507f1f77bcf86cd799439011
        - name: Idempotency-Key
          in: header
          required: false
          description: >-
            Required for an exchange or card connection. Retry with the same key
            and request body after a timeout. Keys are retained for at least 24
            hours. Do not send it for a bank connection. A bank response holds a
            short-lived link token that cannot be replayed, so a bank request
            with this header returns 400 IDEMPOTENCY_NOT_SUPPORTED.
          schema:
            type: string
            minLength: 1
            maxLength: 255
          example: example-operation-2026-08-31-001
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                return_url:
                  type: string
                  description: Registered HTTPS return URL.
                  format: uri
                  example: https://app.entendre.finance/settings/integrations
                api_key:
                  type: string
                  description: Replacement venue API key.
                  minLength: 1
                api_secret:
                  type: string
                  description: Replacement venue API secret.
                  minLength: 1
                api_passphrase:
                  type: string
                  description: >-
                    Replacement venue API passphrase, for coinbase,
                    coinbase_exchange, coinbase_prime, coinbase_international
                    and kucoin.
                  minLength: 1
                account_selection_enabled:
                  type: boolean
                  description: >-
                    Bank only. Lets the user add or remove accounts in Plaid
                    Link. Defaults to false; another provider returns 400.
                environment:
                  type: string
                  enum:
                    - production
                    - sandbox
                  description: >-
                    Fireblocks only. The Fireblocks host; a change runs the
                    connectivity check.
                legal_entity_ids:
                  type: array
                  items:
                    type: string
                    pattern: ^(le_)?[0-9a-fA-F]{24}$
                  maxItems: 1
                  description: >-
                    Rain only. The legal entity to save with the new api_key in
                    the same update.
                credentials:
                  type: object
                  writeOnly: true
                  additionalProperties: false
                  required:
                    - client_id
                    - client_secret
                  properties:
                    client_id:
                      type: string
                      minLength: 1
                      description: Ramp OAuth client id.
                    client_secret:
                      type: string
                      minLength: 1
                      description: Ramp OAuth client secret. Never returned.
                  description: >-
                    Ramp only. Replacement app credentials. Never returned; the
                    connection shows ramp.masked_client_id and
                    ramp.masked_client_secret.
                link_mode:
                  type: string
                  enum:
                    - hosted
                    - sdk
                  description: >-
                    Bank only. hosted (default) returns a setup_url for Plaid
                    Hosted Link; sdk returns only the link_token for an embedded
                    Plaid Link session, with setup_url null and no return_url.
                    Another provider returns 422.
              additionalProperties: false
            example: {}
      responses:
        '200':
          description: The request succeeded.
          headers:
            X-Request-Id:
              description: Support correlation ID.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Connection'
              example:
                id: con_507f1f77bcf86cd799439011
                organization_id: org_507f1f77bcf86cd799439011
                provider: quickbooks
                auth_method: oauth
                name: Operating bank connection
                status: pending_setup
                external_account_id: null
                legal_entity_ids:
                  - le_507f1f77bcf86cd799439011
                source_ids: []
                capabilities:
                  - import_transactions
                authorization_attempt:
                  id: auth_507f1f77bcf86cd799439011
                  status: pending
                  setup_url: https://app.entendre.finance/settings/integrations
                  expires_at: '2026-08-31T12:10:00Z'
                  error: null
                created_at: '2026-08-31T12:00:00Z'
                guidance:
                  allowed_actions: []
                  warnings: []
                  version: v_example
                revocation_error: null
                retained_resources:
                  - transactions
                etag: '"v_example"'
        '400':
          description: >-
            The request is invalid. `error.fields` lists the fields to correct.
            Nothing was changed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: VALIDATION_ERROR
                  message: Invalid path, query or request body.
                  request_id: req_example
        '401':
          description: The API key is missing, invalid or expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: UNAUTHORIZED
                  message: Invalid or expired API Key
                  request_id: req_example
                  suggested_action: >-
                    Send an API key in X-API-Key, or an OAuth access token as
                    Authorization: Bearer. Refresh an expired access token.
                  documentation_url: https://entendre.ai/docs/get-started/authentication
          headers:
            WWW-Authenticate:
              $ref: '#/components/headers/WWW-Authenticate'
        '403':
          description: >-
            The API key does not have the required scope or is not associated
            with a user, or the action needs a review in the dashboard.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: FORBIDDEN
                  message: Insufficient access to organization
                  request_id: req_example
        '404':
          description: The resource does not exist, or your organization cannot access it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: RESOURCE_NOT_FOUND
                  message: Resource not found
                  request_id: req_example
        '409':
          description: >-
            The current state of the resource or an accounting rule prevents
            this operation. Read the resource again before you choose another
            action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: CONFLICT
                  message: The resource state does not allow this operation.
                  request_id: req_example
        '422':
          description: >-
            link_mode was sent for a connection that is not a bank connection.
            Nothing was changed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: UNPROCESSABLE_CONTENT
                  message: link_mode applies only to a bank connection.
                  request_id: req_example
        '429':
          description: >-
            Too many requests. If the response has a `Retry-After` header, wait
            that many seconds before you retry. Otherwise, read `error.message`.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: RATE_LIMITED
                  message: Rate limit exceeded. Retry after 30s.
                  request_id: req_example
        '500':
          description: >-
            An unexpected error occurred. A write can still have taken effect;
            check the resource before you retry. Give the `request_id` to
            support.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: INTERNAL_ERROR
                  message: Internal server error
                  request_id: req_example
        '502':
          description: The provider request failed. The error code is `PROVIDER_ERROR`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: PROVIDER_ERROR
                  message: Internal server error
                  request_id: req_example
        '503':
          description: >-
            A service that this operation needs is unavailable. If the response
            has a `Retry-After` header, wait that many seconds. Check for
            earlier accepted work before you send the request again.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: SERVICE_UNAVAILABLE
                  message: Service unavailable.
                  request_id: req_example
components:
  schemas:
    Connection:
      type: object
      properties:
        id:
          type: string
          description: Connection ID (`con_…`).
          example: con_507f1f77bcf86cd799439011
        organization_id:
          type: string
          description: Organization ID (`org_…`).
          example: org_507f1f77bcf86cd799439011
        provider:
          type: string
          description: Provider identifier.
          example: quickbooks
        auth_method:
          type: string
          description: Setup method.
          enum:
            - oauth
            - api_key
        name:
          type: string
          description: Connection display name.
        status:
          type: string
          description: Connection status.
          enum:
            - pending_setup
            - active
            - inactive
            - expired
            - disconnecting
            - disconnected
            - failed
        external_account_id:
          type:
            - string
            - 'null'
          description: Account ID at the provider.
        legal_entity_ids:
          type: array
          items:
            type: string
            description: Legal entity ID (`le_…`).
            example: le_507f1f77bcf86cd799439011
          description: Legal entities of the connection (`le_…`).
        source_ids:
          type: array
          items:
            type: string
            description: Source ID (`src_…`).
            example: src_507f1f77bcf86cd799439011
          description: Sources created from the connection.
        capabilities:
          type: array
          items:
            type: string
            description: Supported action.
          description: Actions that the connection supports.
        authorization_attempt:
          type: object
          properties:
            id:
              type: string
              description: Authorization attempt ID (`auth_…`).
              example: auth_507f1f77bcf86cd799439011
            status:
              type: string
              description: Status of the setup attempt.
              enum:
                - pending
                - succeeded
                - expired
                - failed
            setup_url:
              type:
                - string
                - 'null'
              description: Setup URL for the user. It expires and is not a credential.
            link_token:
              type:
                - string
                - 'null'
              description: >-
                Plaid Link token. Present only in the reauthorize response of a
                bank connection.
            expires_at:
              type:
                - string
                - 'null'
              description: Expiry time (ISO 8601).
            error:
              type:
                - string
                - 'null'
              description: Why the setup failed.
          required:
            - id
            - status
          additionalProperties: false
          description: The latest setup attempt.
        created_at:
          type: string
          description: ISO 8601 UTC timestamp.
          format: date-time
          example: '2026-08-31T12:00:00Z'
        updated_at:
          type: string
          format: date-time
          description: ISO 8601 UTC timestamp of the last change.
        created_by:
          type:
            - object
            - 'null'
          description: >-
            Rain only. The user the legacy configuration records as creator. The
            email is masked unless `include_pii=true` on the list.
          properties:
            id:
              type: string
            email:
              type:
                - string
                - 'null'
        updated_by:
          type:
            - object
            - 'null'
          description: >-
            Rain only. The user the legacy configuration records as last editor.
            The email is masked unless `include_pii=true` on the list.
          properties:
            id:
              type: string
            email:
              type:
                - string
                - 'null'
        ramp:
          type:
            - object
            - 'null'
          description: >-
            Ramp only. Credential hints of the current Ramp connection; null on
            a disconnected or replaced one. The credentials themselves are never
            returned.
          properties:
            has_credentials:
              type: boolean
              description: The organization saved Ramp app credentials.
            masked_client_id:
              type:
                - string
                - 'null'
            masked_client_secret:
              type:
                - string
                - 'null'
        guidance:
          $ref: '#/components/schemas/Guidance'
        revocation_error:
          type:
            - string
            - 'null'
          description: >-
            Why the provider did not revoke access. A disabled connection in
            Entendre does not prove that the provider revoked access.
        retained_resources:
          type: array
          items:
            type: string
            description: Resource types retained after disconnect.
          description: Resource types that stay after a disconnect.
        etag:
          type: string
          readOnly: true
          pattern: ^"[^"\r\n]+"$
          description: >-
            Strong version of this resource. Send this value, including its
            quotes, in If-Match when updating it.
          examples:
            - '"v_example"'
        cleanup:
          type: object
          description: >-
            Present after bank disconnect. Counts rows removed by this call.
            Zero is valid for empty or already-cleaned connections.
          properties:
            accounts_deleted:
              type: integer
              minimum: 0
              description: Bank accounts deleted.
            transactions_deleted:
              type: integer
              minimum: 0
              description: Transactions deleted.
          required:
            - accounts_deleted
            - transactions_deleted
        institution_id:
          type:
            - string
            - 'null'
          description: 'Bank connections only: the Plaid institution id.'
        last_synced_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Bank and Stripe connections: when the last transaction import from
            the provider finished.
        last_error:
          type:
            - object
            - 'null'
          additionalProperties: false
          required:
            - code
            - message
            - type
          properties:
            code:
              type: string
            message:
              type: string
            type:
              type: string
          description: >-
            Bank connections only: the last error that the provider reported for
            the connection, as the provider sent it. Null when the connection
            has no error.
        importable_resources:
          type: array
          items:
            type: string
          description: >-
            General-ledger connections only: the resource types that the
            connection can import.
        environment:
          type:
            - string
            - 'null'
          enum:
            - production
            - sandbox
            - null
          description: >-
            Fireblocks connections only: the Fireblocks host; null when the
            stored host is not a known Fireblocks host.
        plaid:
          type:
            - object
            - 'null'
          description: >-
            Bank only. Plaid state of the bank connection; null on a hosted
            setup that has no Plaid item yet.
          properties:
            institution_name:
              type:
                - string
                - 'null'
            connection_status:
              type:
                - string
                - 'null'
              description: One of pending_setup, active, error or disconnected.
            consent_expires_at:
              type:
                - string
                - 'null'
              format: date-time
            pending_disconnect_at:
              type:
                - string
                - 'null'
              format: date-time
            initial_update_complete:
              type:
                - boolean
                - 'null'
            historical_update_complete:
              type:
                - boolean
                - 'null'
            new_accounts_available:
              type:
                - boolean
                - 'null'
            bank_transactions_updated_at:
              type:
                - string
                - 'null'
              format: date-time
            tags:
              type: array
              items:
                type: string
              description: Prefixed tag ids (tag_).
      required:
        - id
        - organization_id
        - provider
        - auth_method
        - name
        - status
        - external_account_id
        - legal_entity_ids
        - source_ids
        - capabilities
        - created_at
        - updated_at
        - guidance
        - etag
      additionalProperties: false
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - request_id
          properties:
            code:
              type: string
              description: Machine-readable error code.
            message:
              type: string
              description: Technical description for developers.
            fields:
              type: object
              additionalProperties:
                type: string
              description: >-
                Present only on VALIDATION_ERROR. Maps failing field paths to
                reason strings.
            details:
              type: object
              additionalProperties: true
              description: >-
                Optional redacted diagnostic details. Request validation uses
                fields or field_errors.
            suggested_action:
              type: string
              description: A suggested next step.
            documentation_url:
              type: string
              format: uri
              description: Link to documentation about this error.
            request_id:
              type: string
              description: Unique request ID for support escalation.
          description: Error details.
    Guidance:
      type: object
      properties:
        allowed_actions:
          type: array
          items:
            $ref: '#/components/schemas/ActionHint'
          description: Actions that you can take now.
        warnings:
          type: array
          items:
            $ref: '#/components/schemas/Warning'
          description: Warnings about the resource.
        version:
          type: string
          description: >-
            Version of the resource. Use it only when an operation asks for
            `expected_version`.
      required:
        - allowed_actions
        - warnings
        - version
      additionalProperties: false
    ActionHint:
      type: object
      properties:
        action:
          type: string
          description: Stable operation name.
        available:
          type: boolean
          description: Whether the action is currently available.
        reason:
          type:
            - string
            - 'null'
          description: Why unavailable, or null.
        url:
          type:
            - string
            - 'null'
          description: Authorized relative API or dashboard URL, or null.
      required:
        - action
        - available
        - reason
        - url
      additionalProperties: false
    Warning:
      type: object
      properties:
        code:
          type: string
          description: Stable warning code.
        message:
          type: string
          description: Actionable explanation.
        field:
          type:
            - string
            - 'null'
          description: Affected field, if known.
      required:
        - code
        - message
      additionalProperties: false
  headers:
    WWW-Authenticate:
      description: >-
        Bearer challenge with `realm="entendre"` and `resource_metadata`, the
        URL of the protected-resource metadata (RFC 9728).
        `error="invalid_token"` is added when the credential that was sent is
        invalid or expired.
      schema:
        type: string
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Your organization API key. See
        [Authentication](/get-started/authentication).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.