Renewly API Documentation

Programmatic access to your contract data with a simple REST API

60/min
Rate Limit
API Key
Authentication
REST
API Format

Getting Started

1. Create an API Key

Navigate to Settings → API Keys and create a new API key. Save it securely - it will only be shown once.

2. Make Your First Request

Include your API key in the X-API-Key header:

curl https://renewly.gg/api/v1/contracts \
  -H "X-API-Key: rnwly_live_abc123..."

Authentication

All API requests must include your API key in the X-API-Key header:

X-API-Key: rnwly_live_abc123...

Security: Never commit API keys to version control. Use environment variables in your applications.

Rate Limits

General Endpoints60 requests/min
Export Endpoint10 requests/hour

Rate limits are per API key. If you exceed the limit, you'll receive a 429 Too Many Requests response with a Retry-After header.

Error Codes

401Unauthorized

Invalid, missing, expired, or revoked API key

403Forbidden

You don't have permission to access this resource

429Too Many Requests

Rate limit exceeded. Check Retry-After header

500Internal Server Error

Something went wrong on our end. Contact support if this persists

Endpoints

GET/api/v1/contracts

List all contracts you have access to (personal + organization contracts).

Query Parameters

statusFilter by status (e.g., completed, pending)
organization_idFilter by organization UUID
limitResults per page (default: 50, max: 100)
offsetPagination offset (default: 0)

Example Request

curl https://renewly.gg/api/v1/contracts?status=completed&limit=10 \
  -H "X-API-Key: rnwly_live_abc123..."

Example Response

{
  "success": true,
  "data": {
    "contracts": [
      {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "title": "SaaS Subscription Agreement",
        "status": "completed",
        "file_name": "contract.pdf",
        "file_size": 245678,
        "created_at": "2024-01-15T10:30:00Z",
        "updated_at": "2024-01-15T11:00:00Z",
        "organization_id": null
      }
    ],
    "pagination": {
      "limit": 10,
      "offset": 0,
      "total": 42
    }
  }
}
GET/api/v1/contracts/:id

Get detailed information about a specific contract, including extracted data.

Example Request

curl https://renewly.gg/api/v1/contracts/550e8400-e29b-41d4-a716-446655440000 \
  -H "X-API-Key: rnwly_live_abc123..."

Example Response

{
  "success": true,
  "data": {
    "contract": {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "title": "SaaS Subscription Agreement",
      "status": "completed",
      "file_name": "contract.pdf",
      "data": {
        "expiration_date": "2025-12-31",
        "renewal_date": "2025-11-01",
        "auto_renewal": true,
        "contract_value": 50000,
        "currency": "USD",
        "parties": {
          "provider": "Acme Corp",
          "client": "Example Inc"
        },
        "summary": "Annual SaaS subscription...",
        "confidence_score": 0.95
      }
    }
  }
}
POST/api/v1/contracts/export

Export contracts to CSV format. Rate limited to 10 requests/hour.

Request Body (Optional)

{
  "status": "completed",
  "organization_id": "org-uuid"
}

Example Request

curl -X POST https://renewly.gg/api/v1/contracts/export \
  -H "X-API-Key: rnwly_live_abc123..." \
  -H "Content-Type: application/json" \
  -d '{"status":"completed"}' \
  --output contracts.csv

Returns a CSV file with contract data. The response will have Content-Type: text/csv.

Code Examples

JavaScript / TypeScript

// List contracts
const response = await fetch('https://renewly.gg/api/v1/contracts', {
  headers: {
    'X-API-Key': process.env.RENEWLY_API_KEY
  }
});

const { data } = await response.json();
console.log(`Found ${data.contracts.length} contracts`);

// Get contract details
const contract = await fetch(`https://renewly.gg/api/v1/contracts/${contractId}`, {
  headers: {
    'X-API-Key': process.env.RENEWLY_API_KEY
  }
}).then(r => r.json());

console.log(`Expires: ${contract.data.contract.data.expiration_date}`);

Python

import os
import requests

API_KEY = os.getenv('RENEWLY_API_KEY')
BASE_URL = 'https://renewly.gg/api/v1'

# List contracts
response = requests.get(
    f'{BASE_URL}/contracts',
    headers={'X-API-Key': API_KEY}
)
contracts = response.json()['data']['contracts']
print(f'Found {len(contracts)} contracts')

# Get contract details
contract_id = '550e8400-e29b-41d4-a716-446655440000'
response = requests.get(
    f'{BASE_URL}/contracts/{contract_id}',
    headers={'X-API-Key': API_KEY}
)
contract = response.json()['data']['contract']
print(f'Expires: {contract["data"]["expiration_date"]}')

Need Help?

If you have questions or run into issues, we're here to help.

Contact Support