Welcome to the SlopeAI API

SlopeAI helps you ingest bank transaction data, enrich transactions, and evaluate customer cashflow (features, monthly financials, and optionally a Slope Score) via an async job workflow.

  • Base URL: https://slopeai.slopepay.com
  • Versioning: All endpoints are under /v1/*

Authentication

Send your API key on every request:

  • Header: Authorization: Bearer <api_key>

How it works

1) Submit a batch job

Use POST /v1/batch to submit 1–100 customers. Choose an operation:

  • INGEST: store data only
  • ENRICH: run transaction enrichment
  • EVALUATE: compute features + financials (and optionally score)

You’ll receive a 202 response with a job_id.

2) Poll job status

Use GET /v1/jobs/{job_id} to check progress and per-customer results.

3) Fetch outputs

After completion, fetch the latest outputs per customer:

Idempotency (recommended)

To safely retry POST /v1/batch, include:

  • Header: Idempotency-Key: <your-key>

Semantics:

  • Same key + same request body → returns the original response
  • Same key + different request body → 400 IDEMPOTENCY_MISMATCH

Quickstart (cURL)

curl -X POST "https://slopeai.slopepay.com/api/v1/batch" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: example-req-002" \
  -d '{
    "operation": "EVALUATE",
    "include_score": true,
    "customers": [
      {
        "customer": {
          "customer_id": "cust_123",
          "type": "business",
          "business_name": "Acme Inc"
        },
        "accounts": [
          { "account_id": "acct_1", "type": "depository", "number_mask": "1234" }
        ],
        "balances": [
          { "account_id": "acct_1", "date": "2026-01-01T00:00:00Z", "current": 250000, "currency": "usd" }
        ],
        "transactions": [
          { "transaction_id": "txn_1", "account_id": "acct_1", "description": "Stripe payout", "amount": -50000, "date": "2026-01-01T00:00:00Z", "currency": "usd" }
        ]
      }
    ]
  }'
curl "https://slopeai.slopepay.com/api/v1/jobs/JOB_ID" \
  -H "Authorization: Bearer YOUR_API_KEY"

What to expect in errors

Errors use a consistent shape:

  • code: machine-readable error code
  • message: human-readable description

Many responses also include a request id via the X-Request-ID response header for support/debugging.