Skip to content

API Overview

Programmatic access to all Automatum platform features through a secure RESTful API with OAuth 2.0 authentication.

Introduction

The Automatum API allows you to integrate marketplace operations into your existing workflows, automate repetitive tasks, and build custom solutions. Whether you're syncing customer data to your CRM, automating metering submissions, or building a custom dashboard, our API provides comprehensive access to all platform features.

Base URL

https://api.automatum.io/api/v1

Quick Start

Get started with the Automatum API in 3 steps:

1. Create OAuth Application

Navigate to Settings > Integrations > API Access in your Automatum dashboard and create a new OAuth application:

json
{
  "name": "My Integration",
  "description": "Production integration for CRM sync",
  "scopes": ["read:customers", "read:entitlements", "write:metering"]
}

You'll receive a client_id and client_secret.

2. Get Access Token

Exchange your credentials for an access token:

bash
curl -X POST https://api.automatum.io/oauth/token \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=client_credentials" \
  -d "client_id=YOUR_CLIENT_ID" \
  -d "client_secret=YOUR_CLIENT_SECRET"

Response:

json
{
  "access_token": "eyJhbGc...",
  "token_type": "Bearer",
  "expires_in": 3600,
  "scope": "read:customers read:entitlements write:metering"
}

3. Make API Requests

Use the access token to make authenticated requests:

bash
curl -X GET https://api.automatum.io/api/v1/customers \
  -H "Authorization: Bearer eyJhbGc..."

Need More Details?

See the complete Authentication Guide for OAuth 2.0 setup, token management, and security best practices.

Authentication

The Automatum API uses OAuth 2.0 Client Credentials flow for secure, server-to-server authentication.

Why OAuth 2.0?

  • Secure: Industry-standard authentication
  • Scoped Access: Fine-grained permissions control
  • Revocable: Tokens can be invalidated immediately
  • Auditable: Track all API access by application

OAuth Scopes

Control what your application can access:

ScopeDescription
read:customersView customer information
write:customersCreate and update customers
read:entitlementsView entitlements
read:analyticsAccess analytics data
write:meteringSubmit metering data
read:private-offersView private offers
write:private-offersCreate and update private offers

Security Best Practices

Keep Credentials Secure

  • Never commit client_secret to version control
  • Store credentials in environment variables or secrets manager
  • Rotate credentials regularly (recommended: every 30-90 days)
  • Use minimum required scopes for each application
  • Monitor API usage for anomalies

Request Format

Headers

Required headers:

http
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Optional headers:

http
X-Idempotency-Key: unique-request-id
X-Request-ID: custom-tracking-id

Request Body

Send data as JSON:

json
{
  "vendor": "aws",
  "customerId": "cust_123",
  "listingId": "listing_456"
}

Response Format

Success Response

json
{
  "code": 200,
  "data": {
    "id": "obj_123",
    "status": "active",
    "createdAt": "2026-01-16T10:00:00Z"
  }
}

Error Response

json
{
  "code": 400,
  "message": "Invalid request parameters",
  "errors": [
    {
      "field": "customerId",
      "message": "Customer ID is required"
    }
  ]
}

Status Codes

CodeMeaningDescription
200OKRequest successful
201CreatedResource created successfully
400Bad RequestInvalid request parameters
401UnauthorizedInvalid or missing API key
403ForbiddenInsufficient permissions
404Not FoundResource doesn't exist
429Too Many RequestsRate limit exceeded
500Internal Server ErrorServer error

Rate Limits

Standard Limits

  • 1000 requests per hour per API key
  • 50 requests per minute burst limit

Headers

Check your rate limit status:

http
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 987
X-RateLimit-Reset: 1642334400

Exceeding Limits

When rate limited:

json
{
  "code": 429,
  "message": "Rate limit exceeded",
  "retryAfter": 60
}

Wait for the retryAfter seconds before retrying.

Pagination

List endpoints support pagination:

bash
GET /api/listing?page=2&limit=50

Parameters

  • page: Page number (default: 1)
  • limit: Items per page (default: 20, max: 100)

Response

json
{
  "code": 200,
  "data": [...],
  "pagination": {
    "page": 2,
    "limit": 50,
    "total": 247,
    "pages": 5
  }
}

Filtering

Filter results using query parameters:

bash
GET /api/private-offer?status=active&vendor=aws

Common Filters

  • status: Filter by status
  • vendor: Filter by marketplace (aws, azure)
  • listing: Filter by listing ID
  • customer: Filter by customer ID
  • createdAt: Filter by creation date

Date Filtering

bash
# Greater than
?createdAt[gt]=2026-01-01

# Less than
?createdAt[lt]=2026-12-31

# Range
?createdAt[gte]=2026-01-01&createdAt[lte]=2026-12-31

Sorting

Sort results:

bash
GET /api/customer?sort=-createdAt,name
  • Prefix with - for descending order
  • Multiple fields separated by commas

Idempotency

Prevent duplicate operations using idempotency keys:

bash
curl -X POST https://api.automatum.io/v1/private-offer \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Idempotency-Key: unique-key-123" \
  -H "Content-Type: application/json" \
  -d '{"vendor": "aws", ...}'

TIP

Use UUIDs or unique transaction IDs as idempotency keys

Webhooks

Receive real-time notifications for events:

Supported Events

  • privateOffer.created
  • privateOffer.accepted
  • contract.expiring
  • metering.confirmed
  • metering.failed
  • customer.created
  • entitlement.updated

Webhook Payload

json
{
  "event": "privateOffer.accepted",
  "timestamp": "2026-01-16T10:00:00Z",
  "data": {
    "id": "offer_123",
    "customerId": "cust_456",
    "status": "accepted"
  }
}

Signature Verification

Verify webhook authenticity:

typescript
import crypto from 'crypto';

function verifyWebhook(payload, signature, secret) {
  const hmac = crypto.createHmac('sha256', secret);
  const digest = hmac.update(payload).digest('hex');
  return digest === signature;
}

SDKs and Libraries

Official SDKs

Node.js:

bash
npm install @automatum/sdk
typescript
import Automatum from '@automatum/sdk';

const automatum = new Automatum({
  apiKey: process.env.AUTOMATUM_API_KEY
});

const offers = await automatum.privateOffers.list();

Python:

bash
pip install automatum-sdk
python
from automatum import Automatum

automatum = Automatum(api_key=os.environ['AUTOMATUM_API_KEY'])
offers = automatum.private_offers.list()

Coming Soon:

  • Go
  • Java
  • Ruby
  • PHP

API Resources

Core Resources

All API endpoints are documented in the API Reference:

  • Private Offers - Manage custom deals
  • Listings - Product management
  • Customers - Customer data
  • Metering Events - Usage reporting
  • Entitlements - Access rights

Examples

Create a Private Offer

typescript
const offer = await fetch('https://api.automatum.io/v1/private-offer', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer sk_live_abc123...',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    vendor: 'aws',
    listingId: 'listing_123',
    customerId: 'cust_456',
    pricing: {
      discountPercentage: 20,
      duration: 12
    }
  })
});

Report Usage

typescript
const metering = await fetch('https://api.automatum.io/v1/metering-event', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer sk_live_abc123...',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    vendor: 'aws',
    customerId: 'cust_123',
    listingId: 'listing_456',
    dimension: 'api_calls',
    quantity: 1000,
    timestamp: new Date().toISOString()
  })
});

Get Customer List

typescript
const customers = await fetch(
  'https://api.automatum.io/v1/customer?status=active',
  {
    headers: {
      'Authorization': 'Bearer sk_live_abc123...'
    }
  }
);

Testing

Sandbox Environment

Test API calls without affecting production:

https://sandbox-api.automatum.io/v1

Test Credentials

Use test API keys (prefix: sk_test_) for development.

Best Practices

  1. Use HTTPS: Always use secure connections
  2. Handle Errors: Implement proper error handling
  3. Retry Logic: Use exponential backoff for retries
  4. Cache Responses: Cache when appropriate
  5. Monitor Usage: Track API usage and errors
  6. Keep Keys Secure: Never expose API keys

Error Handling

typescript
try {
  const response = await automatumAPI.createOffer(data);
} catch (error) {
  if (error.code === 400) {
    // Handle validation errors
    console.error('Validation failed:', error.errors);
  } else if (error.code === 429) {
    // Handle rate limiting
    await sleep(error.retryAfter * 1000);
    // Retry request
  } else {
    // Handle other errors
    console.error('API error:', error.message);
  }
}

Support

Documentation

Help

Next Steps

Automatum GTM Platform