Skip to content
Navigation

Initiate authorization

POST
https://api.sureshake.com/v2/reporter/accounting-connections/authorization

Request body JSON required

  • entityId
    string
    required
    format: uuid
  • providerId
    string
    required
    maxLength: 80 · minLength: 1 · pattern: ^[a-z0-9][a-z0-9_-]*$
  • reportingCadence
    optional
    monthly
    or
    quarterly
    or
    annual
  • redirectUri
    optional
    string
    maxLength: 2048 · minLength: 1

Returns

200

Default Response

JSON
  • data
    object
    required
    • connection
      object
      required
      • id
        string
        required
        format: uuid
      • entityId
        string
        required
        format: uuid
      • providerId
        string
        required
        maxLength: 80 · minLength: 1 · pattern: ^[a-z0-9][a-z0-9_-]*$
      • onboardingSessionId
        string
        or null
        required
        format: uuid
      • connectedAccountId
        string
        or null
        required
        format: uuid
      • status
        not_started
        or
        selected
        or
        authorizing
        or
        connected
        or
        syncing
        or
        synced
        +2 more
        required
      • reportingCadence
        monthly
        or
        quarterly
        or
        annual
        or null
        required
      • hasCredentialRefs
        boolean
        required
      • blocksReportReadiness
        boolean
        required
      • readinessFactorKeys
        array of
        accounting_connection
        or
        initial_sync
        required
      • readinessMilestones
        array of
        accounting_authorization_started
        or
        accounting_connected
        or
        initial_sync_started
        or
        initial_sync_completed
        required
      • failureCode
        string
        or null
        required
        maxLength: 120 · minLength: 1
      • failurePublicMessage
        string
        or null
        required
        maxLength: 500 · minLength: 1
      • retryGuidance
        string
        or null
        required
        maxLength: 500 · minLength: 1
      • selectedAt
        string
        or null
        required
        format: date-time
      • authorizationStartedAt
        string
        or null
        required
        format: date-time
      • connectedAt
        string
        or null
        required
        format: date-time
      • syncStartedAt
        string
        or null
        required
        format: date-time
      • syncedAt
        string
        or null
        required
        format: date-time
      • failedAt
        string
        or null
        required
        format: date-time
      • revokedAt
        string
        or null
        required
        format: date-time
      • createdAt
        string
        required
        format: date-time
      • updatedAt
        string
        required
        format: date-time
      • requiredScopes
        optional
        array of
        string
        minLength: 1 · default: []
      • grantedScopes
        optional
        array of
        string
        minLength: 1 · default: []
    • authorization
      object
      required
      • mode
        existing_provider_handler
        or
        mock
        required
      • providerId
        string
        required
        maxLength: 80 · minLength: 1 · pattern: ^[a-z0-9][a-z0-9_-]*$
      • authorizationUrl
        string
        or null
        required
        format: uri
      • state
        string
        or null
        required
      • handlerPath
        string
        required
        minLength: 1
      • legacyProcedure
        string
        or null
        required
        minLength: 1
  • meta
    optional
    object
    • timestamp
      string
      required
      format: date-time

400

Default Response
JSON
  • error
    object
    required
    • code
      string
      required

      Machine-readable error code (e.g., NOT_FOUND)

    • message
      string
      required

      Human-readable error message

    • details
      optional
      unknown

      Optional structured error details

    • traceId
      optional
      string

      Unique ID for log correlation

401

Default Response
JSON
  • error
    object
    required
    • code
      string
      required

      Machine-readable error code (e.g., NOT_FOUND)

    • message
      string
      required

      Human-readable error message

    • details
      optional
      unknown

      Optional structured error details

    • traceId
      optional
      string

      Unique ID for log correlation

403

Default Response
JSON
  • error
    object
    required
    • code
      string
      required

      Machine-readable error code (e.g., NOT_FOUND)

    • message
      string
      required

      Human-readable error message

    • details
      optional
      unknown

      Optional structured error details

    • traceId
      optional
      string

      Unique ID for log correlation

409

Default Response
JSON
  • error
    object
    required
    • code
      string
      required

      Machine-readable error code (e.g., NOT_FOUND)

    • message
      string
      required

      Human-readable error message

    • details
      optional
      unknown

      Optional structured error details

    • traceId
      optional
      string

      Unique ID for log correlation

500

Default Response
JSON
  • error
    object
    required
    • code
      string
      required

      Machine-readable error code (e.g., NOT_FOUND)

    • message
      string
      required

      Human-readable error message

    • details
      optional
      unknown

      Optional structured error details

    • traceId
      optional
      string

      Unique ID for log correlation

Type to search…

↑↓ navigate↵ selectEsc close