Skip to main content

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 minutes

Prerequisites

  • A deployed Triform Project
  • API key for authentication
  • Basic knowledge of HTTP requests

Step 1: Deploy your Project

Before integrating, deploy your Project:
  1. Open your Project on the Canvas
  2. Click Deploy in the Top Bar
  3. Select the target environment (staging or production)
  4. 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)
  5. Click Deploy Now
  6. Copy the generated endpoint URL:

Step 2: Generate an API key

  1. Go to Profile → API Keys
  2. Click Create New Key
  3. Name it: Production Integration
  4. Set permissions: Execute Projects
  5. Copy the key (shown only once!)
  6. 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 Unauthorized
Solution: 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

Next steps

Continue exploring the documentation to learn about deployments, API key management, monitoring, quotas, and security best practices.