API Integration Guide: Connecting Custom Systems
Learn how to integrate Octacer with custom APIs and build workflows that connect to any system.
API Integration Guide
Need to connect a custom system or unsupported app? Use Octacer API integration.
When to Use API Integration
Use API integration when:
Use API Integration
You have a custom internal system
You want to use an app not in the 500 plus integrated apps
You need custom logic not available in pre-built connectors
You are building a new integration for your team
Avoid API Integration
We have a pre-built integration (use that instead)
You are not comfortable with JSON and API basics
The external API requires complex OAuth
Do not use API integration when:
API Integration Basics
Definition
API equals Application Programming Interface
In Plain English
English: A way for two software systems to talk to each other
Analogy
Real-world analogy: Without API you call a restaurant and give your order verbally. With API you submit order form to restaurant online (automated process).
Key Components
Endpoint
Endpoint: Where the API is located
https://api.company.com/invoices
Method
Method: What you want to do
Headers
Headers: Metadata about your request
Authorization equals Bearer YOUR_API_KEY
Content-Type equals application slash json
Body
Body: The data you are sending
customer_name equals John Doe
amount equals 150.00
date equals 2024-12-20
Response
Response: What the API sends back
status equals success
invoice_id equals INV-12345
created_at equals 2024-12-20T10 colon 15 colon 00Z
- GET equals Read or retrieve data
- POST equals Create new data
- PUT equals Update existing data
- DELETE equals Remove data
Setting Up Your First API Integration
Step 1: Get API Credentials
-
1
Get API Credentials
From your app settings:
-
2
Create Integration
Go to Integrations - Custom API
Click Add Custom Integration
Name: Company Name API
Base URL: https://api.company.com
Authentication: API Key
Paste your API key
Test connection -
3
Use in Workflow
Create new workflow
Add action: API Call
Select your integration
Choose method: GET or POST or PUT or DELETE
Enter endpoint: /invoices
Add body with data from previous steps
Test and deploy
- Find API or Developers section
- Create a new API key
- Note the base URL
- Store the key securely
Error Handling
APIs fail sometimes. Handle it:
Status Codes:
Status Codes
200: Success (Invoice created successfully)
400: Bad request (Missing required field)
401: Unauthorized (Invalid API key)
404: Not found (Customer ID does not exist)
429: Rate limited (Too many requests)
500: Server error (API is down)
Response Handling
IF status equals 200 THEN Success (proceed)
IF status equals 400 OR 404 THEN Bad data (notify person and stop)
IF status equals 401 THEN Invalid key (check configuration)
IF status equals 429 THEN Rate limited (retry in 60 seconds)
IF status equals 500 THEN API down (retry in 5 minutes)
Response Handling:
Rate Limiting
Most APIs have rate limits. Best practice:
Security Best Practices
DON'T:
Don'ts
Store API keys in workflow code
Share API keys in emails or chat
Use production API key for testing
Hardcode sensitive data
Dos
Store keys in secure environment variables
Create separate keys for dev, staging, production
Rotate keys regularly
Monitor API usage for suspicious activity
Use HTTPS for all API calls
Validate all data from external APIs
DO:
Testing Your API Integration
Test 1: Connection Test - Can I reach the API (Expected: Status 200 or 401)
Test 2: Authentication Test - Is my API key valid (Expected: Status 200 with valid key)
Test 3: Happy Path - Does a normal request work (Expected: Create an object, get ID back)
Test 4: Error Handling - What happens with bad data (Expected: Status 400 and error message)
Test 5: Load Test - Can it handle 100 requests (Expected: All succeed or proper rate limiting)
Troubleshooting
Error: 401 Unauthorized - Check API key, verify it is not expired, check if key has required permissions
Error: 404 Not Found - Check endpoint URL, verify the object exists, check endpoint spelling
Error: 429 Too Many Requests - Add delays, implement retry logic, contact API provider
Error: 500 Internal Server Error - API is temporarily down, wait a few minutes, contact provider
Getting Help
- API docs: Check your system's developer documentation
- Community: Ask in number api-integrations channel
- Support: Email support@octacer.com with API documentation link
Was this article helpful? Thanks for your feedback.
Ready to build your first automation?
Get started with Octacer and transform how your team works.
Schedule Consultation