API Key Developer Guide
Overview
API keys provide a secure way to authenticate with the Oxy API without requiring user credentials. This guide covers everything you need to know about implementing API key authentication in your applications.
What are Oxy API Keys?
API keys are secure tokens that identify your application to the Oxy API. A unique string prefixed with oxy_
API Documentation
For a complete reference of all available API endpoints, visit our live Swagger API documentation at /apidoc
. This interactive documentation allows you to:
- Browse all available endpoints
- View request/response schemas
- Test API calls directly from your browser
- Download OpenAPI specifications
The Swagger documentation is automatically updated and always reflects the current API version running on your Oxy instance.
Creating API Keys
Through the Web Interface
- Log into your Oxy
- User menu -> API Keys
- Click Create New API Key
- Provide a descriptive name for your key
- Set an optional expiration date
- Click Create API Key
Important: Copy your API key immediately after creation. For security reasons, you won’t be able to view the full key again.
Using API Keys
Include your API key in the X-API-Key
header with every request:
curl -H "X-API-Key: oxy_your_api_key_here" \
https://api.oxy.com/your-endpoint
Examples
Quick Start Examples
Here are some quick examples to get you started with different programming languages:
Python
import requests
import os
# Set up your API key
api_key = os.getenv('OXY_API_KEY')
headers = {'X-API-Key': api_key}
# List your workflows
response = requests.get('https://api.oxy.com/workflows', headers=headers)
workflows = response.json()
print(f"Found {len(workflows)} workflows")
JavaScript (Node.js)
const axios = require('axios');
const client = axios.create({
baseURL: 'https://api.oxy.com',
headers: {
'X-API-Key': process.env.OXY_API_KEY
}
});
// List your workflows
client.get('/workflows')
.then(response => {
console.log(`Found ${response.data.length} workflows`);
})
.catch(error => {
console.error('Error:', error.response.data);
});
cURL
# List your workflows
curl -H "X-API-Key: $OXY_API_KEY" \
https://api.oxy.com/workflows
# Create a new workflow
curl -X POST \
-H "X-API-Key: $OXY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "My Workflow", "description": "A sample workflow"}' \
https://api.oxy.com/workflows