Developer Portal

SplitArc Public API & MCP Documentation

Connect AI assistants over Streamable HTTP MCP or integrate directly with the versioned OpenAPI 3.1.0 REST API. Authenticate with OAuth 2.1 + S256 PKCE across every surface, or issue scoped Personal API Keys for REST automation.

Base URL:https://splitarc.appOpenAPI 3.1.0 · v1.0.025 REST Operations · 14 MCP Tools · 3 MCP Resources

Security & Scopes

Authentication Overview

SplitArc supports two explicit credential mechanisms tailored to interactive MCP / OAuth applications and headless REST API scripts.

OAuth 2.1 with PKCE (S256)

Public REST API (/api/v1/*) and Remote MCP Server (/api/mcp)

REST + MCP

Recommended for AI assistants, native mobile clients, and third-party web apps. Supports RFC 9728 Protected Resource metadata, RFC 8414 Authorization Server metadata, RFC 7591 Dynamic Client Registration, mandatory S256 PKCE, and rotating refresh tokens.

Discover metadata

GET /.well-known/oauth-protected-resource & /.well-known/oauth-authorization-server

RFC 9728 and RFC 8414 metadata advertise the authorization server issuer, supported scopes, S256 PKCE requirement, and endpoint URLs.

Dynamic client registration

POST /api/oauth/register

RFC 7591 public and confidential clients register redirect URIs (HTTPS, loopback HTTP, or custom app schemes) and receive a client_id.

User consent with mandatory S256 PKCE

GET /oauth/authorize -> POST /api/oauth/authorize

Users sign in with Passkey, Google, Apple, or email + 2FA and review requested scopes before an authorization code is issued.

Token exchange & rotation

POST /api/oauth/token

Exchanges the code and PKCE code_verifier for an sa_oauth_... access token (1 hour TTL) and rotating sa_rt_... refresh token (30 day TTL).

Token revocation

POST /api/oauth/revoke

Revokes access or refresh tokens immediately per RFC 7009; users can also revoke connected apps anytime in Account Settings.

Personal API Keys (sa_live_...)

Public REST API (/api/v1/*) only

REST API Only

Ideal for personal scripts, spreadsheets, or scheduled backups. Create and revoke scoped keys in Account Settings. The plaintext secret is shown once at creation and stored as a SHA-256 hash.

Accepted REST headers

Authorization: Bearer sa_live_your_key_hereX-API-Key: sa_live_your_key_here

MCP Server requires OAuth 2.1

The /api/mcp endpoint strictly requires an OAuth 2.1 access token (sa_oauth_...). Presenting a raw Personal API Key (sa_live_...) to /api/mcp is rejected with HTTP 401 and a WWW-Authenticate challenge pointing to /.well-known/oauth-protected-resource.

Granular Access Scopes

Requests lacking the endpoint or tool scope return HTTP 403 INSUFFICIENT_SCOPE (or an MCP INSUFFICIENT_SCOPE tool error).

contracts:readREST API + MCP

Read installment contracts, schedules, calendar charges, lenders, FX rates, and exports.

contracts:writeREST API + MCP

Create, update, settle, import, and delete contracts, overrides, and custom lenders.

profile:readREST API

Read authenticated user profile, avatar settings, and home currency preferences.

profile:writeREST API

Update user preferences, manage personal API keys, revoke OAuth consents, and delete account.

Model Context Protocol

Remote MCP Server (/api/mcp)

Connect compatible AI assistants directly to your SplitArc ledger over Streamable HTTP with zero-config OAuth 2.1 auto-discovery.

Streamable HTTP Endpoint

Supports POST, GET, and DELETE on the standard MCP Streamable HTTP transport with CORS enabled for browser and desktop clients.

https://splitarc.app/api/mcp

Zero-config OAuth 2.1 auto-discovery

Unauthenticated requests return 401 with WWW-Authenticate pointing to /.well-known/oauth-protected-resource, allowing MCP clients to register via /api/oauth/register and launch your SplitArc consent screen automatically.

Client Setup Snippets

Add SplitArc as a Custom Connector in Claude.ai or Claude Desktop. OAuth 2.1 + PKCE discovery runs automatically.

Claude configuration
{
  "mcpServers": {
    "splitarc": {
      "url": "https://splitarc.app/api/mcp"
    }
  }
}

MCP Tools Catalog (14)

Every tool enforces its declared OAuth 2.1 scope before reading or mutating your ledger.

list_contractscontracts:read

List user BNPL and installment contracts along with portfolio summary

Parameters

  • status'active' | 'archived' | 'all'- Filter contracts by lifecycle bucket (defaults to all)
  • currencyCurrencyCode- Optional ISO-4217 currency filter (e.g. EUR, USD, GBP)
  • todayYYYY-MM-DD- Reference evaluation date in ISO format
get_contractcontracts:read

Get evaluated schedule and overrides for a single contract by ID

Parameters

  • contractIdstringrequired- Unique contract identifier
  • todayYYYY-MM-DD- Reference evaluation date in ISO format
create_contractcontracts:write

Create a new BNPL or installment contract

Parameters

  • namestringrequired- Contract display name
  • contractNumberstring | null- Optional agreement or contract number from the lender portal
  • presetLenderKeyPresetLenderKey | null- Optional preset lender key (klarna, humm, clearpay, etc.)
  • customLenderIdstring | null- Optional user custom lender identifier
  • currencyCurrencyCoderequired- ISO-4217 currency
  • principalMinorintegerrequired- Original purchase amount in minor currency units
  • aprBpsinteger- Annual percentage rate in basis points (0 to 100000)
  • installmentMinorintegerrequired- Recurring installment amount in minor units
  • finalInstallmentMinorinteger | null- Optional distinct final installment amount in minor units
  • installmentCountintegerrequired- Total scheduled installments (1 to 600)
  • frequencyPaymentFrequencyrequired- monthly, biweekly, or weekly
  • setupFeeMinorinteger- Optional upfront setup fee in minor units
  • accountKeepingFeeMinorinteger- Optional monthly account keeping fee in minor units added to installments
  • upfrontDepositMinorinteger- Optional upfront deposit paid at checkout in minor units
  • firstChargeDateYYYY-MM-DDrequired- Date of the first scheduled installment
  • statusContractStatus- active, paused, settled_early, or completed
  • pausedAtYYYY-MM-DD | null- Optional pause effective date or null
  • settledDateYYYY-MM-DD | null- Optional early settlement date or null
  • settledAmountMinorinteger | null- Optional settlement payment amount in minor units
  • todayYYYY-MM-DD- Reference evaluation date in ISO format
update_contractcontracts:write

Update an existing BNPL or installment contract

Parameters

  • contractIdstringrequired- Target contract ID
  • namestring- Updated contract title
  • contractNumberstring | null- Updated agreement or contract number from the lender portal, or null
  • presetLenderKeyPresetLenderKey | null- Updated preset lender key or null
  • customLenderIdstring | null- Updated custom lender identifier or null
  • currencyCurrencyCode- Updated ISO-4217 currency
  • principalMinorinteger- Updated principal amount in minor units
  • aprBpsinteger- Updated APR in basis points (0 to 100000)
  • installmentMinorinteger- Updated installment amount in minor units
  • finalInstallmentMinorinteger | null- Updated final installment amount in minor units or null
  • installmentCountinteger- Updated total scheduled installments (1 to 600)
  • frequencyPaymentFrequency- Updated frequency (monthly, biweekly, or weekly)
  • setupFeeMinorinteger- Updated setup fee in minor units
  • accountKeepingFeeMinorinteger- Updated monthly account keeping fee in minor units
  • upfrontDepositMinorinteger- Updated upfront deposit in minor units
  • firstChargeDateYYYY-MM-DD- Updated first scheduled installment date
  • statusContractStatus- Updated status (active, paused, settled_early, or completed)
  • pausedAtYYYY-MM-DD | null- Pause effective date or null to resume
  • settledDateYYYY-MM-DD | null- Early settlement date or null
  • settledAmountMinorinteger | null- Settlement payment amount in minor units or null
  • todayYYYY-MM-DD- Reference evaluation date in ISO format
delete_contractcontracts:write

Delete an owned contract by ID

Parameters

  • contractIdstringrequired- Target contract ID
settle_contractcontracts:write

Settle an owned contract early

Parameters

  • contractIdstringrequired- Target contract ID
  • settledDateYYYY-MM-DDrequired- Early settlement date
  • settledAmountMinorinteger | null- Optional settlement payment amount in minor units
  • todayYYYY-MM-DD- Reference evaluation date in ISO format
upsert_installment_overridecontracts:write

Create or update an installment override (paid_early, skipped, rescheduled)

Parameters

  • contractIdstringrequired- Target contract ID
  • installmentIndexintegerrequired- Zero-based installment index (0 to 599)
  • overrideStatus'paid_early' | 'skipped' | 'rescheduled'required- Override state for the installment
  • overrideDateYYYY-MM-DD | null- Actual or rescheduled charge date
  • overrideAmountMinorinteger | null- Optional override amount in minor units
  • todayYYYY-MM-DD- Reference evaluation date in ISO format
delete_installment_overridecontracts:write

Remove an installment override from an owned contract

Parameters

  • contractIdstringrequired- Target contract ID
  • installmentIndexintegerrequired- Zero-based installment index to clear
  • todayYYYY-MM-DD- Reference evaluation date in ISO format
get_charge_calendarcontracts:read

Get monthly charge calendar across user contracts

Parameters

  • monthYYYY-MM- Calendar month (defaults to current month)
  • todayYYYY-MM-DD- Reference evaluation date in ISO format
list_lenderscontracts:read

List preset lenders and user custom lenders

Takes no input arguments.

create_custom_lendercontracts:write

Create a custom lender for the authenticated user

Parameters

  • namestringrequired- Custom lender name
  • colorHexstringrequired- 6-digit hex color (e.g. #E65C32)
get_fx_ratescontracts:read

Get latest cached EUR-based exchange rates

Parameters

  • todayYYYY-MM-DD- Reference evaluation date in ISO format
import_contracts_csvcontracts:write

Atomically import contracts from a CSV payload

Parameters

  • csvstringrequired- Raw CSV document text
  • mappingRecord<string, string>- Optional column mapping dictionary
  • todayYYYY-MM-DD- Reference evaluation date in ISO format
export_contractscontracts:read

Export user contracts as JSON backup or CSV

Parameters

  • format'json' | 'csv'- Export output format (defaults to json)
  • todayYYYY-MM-DD- Reference evaluation date in ISO format

MCP Resources (3)

Read-only JSON resources exposed directly for context retrieval.

SplitArc Portfolio Summarycontracts:read
splitarc://portfolio

Current portfolio totals, currency breakdown, and debt-free date

MIME: application/json

SplitArc Active Contractscontracts:read
splitarc://contracts/active

Evaluated active installment contracts for the authenticated user

MIME: application/json

SplitArc OpenAPI 3.1 SpecificationPublic
splitarc://openapi

Machine-readable OpenAPI 3.1 specification for the SplitArc REST API

MIME: application/json

OpenAPI 3.1.0 Reference

Public REST API Reference (/api/v1/*)

Interactive endpoint explorer generated directly from the live SplitArc OpenAPI 3.1 specification.

curl auth header:
GET/api/v1/auth/providersgetAuthProviders

List enabled authentication providers

Public
GET/api/v1/megetMe

Get authenticated user profile and preferences

profile:read
PATCH/api/v1/meupdateMe

Update authenticated user profile and preferences

profile:write
DELETE/api/v1/medeleteMe

Permanently delete user account and cascade all user data

profile:write
GET/api/v1/lenderslistLenders

List preset lenders and user custom lenders

contracts:read
POST/api/v1/lenderscreateCustomLender

Create a user custom lender

contracts:write
PATCH/api/v1/lenders/{id}updateCustomLender

Update an owned custom lender

contracts:write
DELETE/api/v1/lenders/{id}deleteCustomLender

Delete an unused owned custom lender

contracts:write
GET/api/v1/contractslistContracts

Evaluate user contracts and compute portfolio summary

contracts:read
POST/api/v1/contractscreateContract

Create a new BNPL or installment contract

contracts:write
GET/api/v1/contracts/{id}getContract

Get a single evaluated contract and its installment overrides

contracts:read
PATCH/api/v1/contracts/{id}updateContract

Update an owned contract

contracts:write
DELETE/api/v1/contracts/{id}deleteContract

Delete an owned contract

contracts:write
POST/api/v1/contracts/{id}/overridesupsertContractOverride

Create or update an installment override on an owned contract

contracts:write
DELETE/api/v1/contracts/{id}/overridesdeleteContractOverride

Remove an installment override from an owned contract

contracts:write
POST/api/v1/contracts/{id}/settlesettleContract

Settle an owned contract early

contracts:write
GET/api/v1/calendargetCalendarMonth

Build monthly charge calendar across user contracts

contracts:read
GET/api/v1/fxgetLatestFxRates

Get latest cached EUR-based exchange rates

contracts:read
POST/api/v1/import/csvimportContractsCsv

Atomically import contracts from a CSV payload

contracts:write
GET/api/v1/exportexportContracts

Export user contracts and preferences as JSON or CSV

contracts:read
GET/api/v1/api-keyslistApiKeys

List personal API keys owned by the authenticated user

profile:write
POST/api/v1/api-keyscreateApiKey

Create a scoped personal API key (plaintext key returned once)

profile:write
DELETE/api/v1/api-keys/{id}revokeApiKey

Revoke a personal API key owned by the authenticated user

profile:write
GET/api/v1/oauth/consentslistOAuthConsents

List OAuth 2.1 client consents granted by the authenticated user

profile:write
DELETE/api/v1/oauth/consents/{id}revokeOAuthConsent

Revoke an OAuth 2.1 client consent and all active tokens for that client

profile:write