Overview
Once you’ve built and tested a Project in Triform, you’ll want to integrate it into your application. This tutorial covers API integration, authentication, and best practices. Time required: 20-30 minutesPrerequisites
- A deployed Triform Project
- API key for authentication
- Basic knowledge of HTTP requests
Step 1: Deploy your Project
Before integrating, deploy your Project:- Open your Project on the Canvas
- Click Deploy in the Top Bar
- Select the target environment (staging or production)
-
Configure the deployment:
- Endpoint name: Choose a memorable name (e.g.,
news-digest
) - HTTP method: POST (most common) or GET
- Authentication: API key required (recommended)
- Endpoint name: Choose a memorable name (e.g.,
- Click Deploy Now
-
Copy the generated endpoint URL:
Step 2: Generate an API key
- Go to Profile → API Keys
- Click Create New Key
- Name it:
Production Integration
- Set permissions: Execute Projects
- Copy the key (shown only once!)
- Store securely (use environment variables)
Security note: Never commit API keys to version control. Use environment variables or secret managers.
Step 3: Make your first API call
Using cURL
Using Python
Using JavaScript (Node.js)
Using JavaScript (Browser/React)
Step 4: Handle responses
Triform API responses follow this structure:Success response (200 OK)
Error response (4xx/5xx)
Handling in code
Step 5: Implement error handling
Retry logic with exponential backoff
Timeout handling
Always set timeouts to prevent hanging requests:Step 6: Integrate into your application
Example: Web dashboard
Example: Scheduled job
Example: Real-time processing
Step 7: Monitor and optimize
Track API usage
Caching results
Best practices
Use environment variables — Never hardcode API keys
Implement retries — Network issues happen; retry with backoff
Set timeouts — Don’t let requests hang indefinitely
Log everything — Track success/failure for debugging
Cache when appropriate — Save API calls for expensive operations
Monitor quota — Track usage against your plan limits
Test error paths — Ensure your app handles API failures gracefully
Version your integration — Track which API version you’re using
Troubleshooting
Problem: 401 UnauthorizedSolution: Check API key is correct and has Execute permissions Problem: 429 Too Many Requests
Solution: Implement rate limiting, add delays between requests Problem: 500 Server Error
Solution: Retry with backoff, check Triform status page Problem: Slow responses
Solution: Optimize your Project, add caching, use async requests Problem: Unexpected output format
Solution: Verify Project schema matches your expectations, check docs