API Reference

Build on Auctra

APIs for enterprise-side agent intent validation, spending authority setup, credential bindings, and processor-side real-time authorization decisions.

Base URL:https://api.auctra.io/v1
Auth:JWT bearer tokens
Primary callers:Enterprise + Processor

Categories

Endpoints (29)

INFO

JWT Authentication

API endpoints use JWT bearer authentication with API credentials from the portal. Enterprise JWTs are used for every setup, management, policy, binding, simulation, and intent-validation endpoint. Processor JWTs are used only for POST /authorize.

Caller
Enterprise / Processor
Authentication
Enterprise JWT / Processor JWT
Category
Authentication

Setup Steps

1

Get API Credentials

Sign up at the dashboard and navigate to Settings → API Credentials to generate your api_key and shared_secret

2

Generate JWT Token

Use your credentials to create a JWT with HS256 algorithm. Token should include key_id, iat, and exp fields.

3

Include in API Requests

Add the JWT to the Authorization header as \"Bearer <token>\" for all API requests

Python Example

import jwt
import time

# Your credentials from dashboard
api_key = "api_key_abc123..."
shared_secret = "sec_xyz789..."

# Create JWT payload
payload = {
    "key_id": api_key,
    "iat": int(time.time()),      # Issued at
    "exp": int(time.time()) + 3600  # Expires in 1 hour
}

# Generate JWT
token = jwt.encode(payload, shared_secret, algorithm="HS256")

# Use token in requests
import requests
headers = {"Authorization": f"Bearer {token}"}
response = requests.get(
    "https://api.auctra.io/v1/agents/{agent_id}",
    headers=headers
)

Node.js Example

const jwt = require('jsonwebtoken');

// Your credentials from dashboard
const apiKey = 'api_key_abc123...';
const sharedSecret = 'sec_xyz789...';

// Create JWT payload
const payload = {
  key_id: apiKey,
  iat: Math.floor(Date.now() / 1000),
  exp: Math.floor(Date.now() / 1000) + 3600
};

// Generate JWT
const token = jwt.sign(payload, sharedSecret, {
  algorithm: 'HS256'
});

// Use token in requests
const response = await fetch(
  'https://api.auctra.io/v1/agents/{agent_id}',
  {
    headers: {
      'Authorization': `Bearer ${token}`
    }
  }
);

cURL Example

# 1. Generate JWT (using jwt.io or a library)
# 2. Use in curl request:
curl -X GET https://api.auctra.io/v1/agents/{agent_id} \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

Authentication

Most endpoints require JWT authentication. Use your API key and shared secret to generate a JWT token before making requests.

Dashboard & Portal Access

Enterprise dashboard and processor portal features are not part of the public API. These endpoints require session-based authentication and can only be accessed through the web portal. All API endpoints shown here use JWT authentication with programmatic access credentials.

Need the integration narrative?

The API reference is for field-level details. The documentation guide explains portal setup, enterprise validation, processor decisioning, and production readiness.

Read integration guide →