Skip to main content

Quickstart

This guide will walk you through making your first API requests to Covered.

Prerequisites

  • A Covered account with completed KYB verification
  • An API key from your dashboard

Step 1: Get your API key

  1. Log in to your Covered Dashboard
  2. Navigate to SettingsAPI Keys
  3. Click Create API Key and copy the generated key

Step 2: Check your balance

Let’s verify your API key works by fetching your treasury balance:
curl https://api.allcovered.xyz/v1/treasury/balance \
  -H "Authorization: Bearer cov_xxxxxxxxxxxxx"
Response:
{
  "data": {
    "balance": 10000.00,
    "currency": "USDC",
    "network": "BASE"
  }
}

Step 3: Create a vendor

Create a vendor you’ll be paying:
curl -X POST https://api.allcovered.xyz/v1/vendors \
  -H "Authorization: Bearer cov_xxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Software",
    "email": "[email protected]",
    "payment_method": "ach"
  }'
Response:
{
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Acme Software",
    "email": "[email protected]",
    "payment_method": "ach",
    "bank_account_configured": false,
    "created_at": "2024-01-15T10:30:00Z"
  }
}

Step 4: Create a payable

Create a bill to pay:
curl -X POST https://api.allcovered.xyz/v1/payables \
  -H "Authorization: Bearer cov_xxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "invoice_number": "INV-001",
    "vendor_id": "550e8400-e29b-41d4-a716-446655440000",
    "vendor_name": "Acme Software",
    "amount": 5000.00,
    "due_date": "2024-02-15",
    "payment_method": "ach"
  }'
Response:
{
  "data": {
    "id": "660e8400-e29b-41d4-a716-446655440001",
    "invoice_number": "INV-001",
    "vendor_id": "550e8400-e29b-41d4-a716-446655440000",
    "vendor_name": "Acme Software",
    "amount": 5000.00,
    "status": "pending_review",
    "payment_method": "ach",
    "created_at": "2024-01-15T10:35:00Z"
  }
}

Step 5: Set up webhooks

Configure a webhook to receive payment notifications:
curl -X POST https://api.allcovered.xyz/v1/webhooks \
  -H "Authorization: Bearer cov_xxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your-app.com/webhooks/covered",
    "description": "Production webhook",
    "filter_types": ["payable.paid", "receivable.paid"]
  }'

Next steps