Welcome to the NenAI API
The NenAI API enables you to programmatically trigger and manage automated workflows. Built for reliability and ease of use, our API uses simple REST principles with JSON payloads and standard HTTP response codes.All API requests use
https://api.getnen.ai as the base URL.Quick Start
Get started with the NenAI API in three steps:1
Get your API key
Retrieve your API key from your engineering contact. Keep this secure and never expose it in client-side code.
2
Start a workflow run
Use the Start a Workflow Run endpoint to trigger your workflow with the required parameters.
3
Handle webhook callbacks
Implement a webhook endpoint to retrieve workflow payloads such as documents and execution results.
Core Endpoints
Start a Workflow Run
Trigger workflow execution with custom parameters
Webhook Integration
Receive real-time status updates and results
Authentication
All API requests require authentication using an API key sent in thex-api-key header.
Response Format
All API responses use JSON format with standard HTTP status codes:- 2xx: Success - Your request was processed successfully
- 4xx: Client Error - There was an issue with your request
- 5xx: Server Error - Something went wrong on our end
Success Response Example
Error Response Example
Workflow Execution Flow
1
Submit workflow
POST to
/runs with your workflow ID, parameters, and webhook callback URL. You’ll receive an immediate 202 Accepted response with a unique messageId.2
Processing begins
Your workflow starts executing in the background. You’ll receive a webhook callback with status
processing.3
Receive results
When complete, you’ll receive another webhook with status
success or failed, including presigned URLs to download results.Best Practices
Use environment variables
Use environment variables
Store your API key and webhook URLs in environment variables, not in your source code.
Implement webhook signature verification
Implement webhook signature verification
Always verify webhook signatures to ensure requests are genuinely from NenAI. See the Webhook Security section for implementation details.
Monitor webhook delivery
Monitor webhook delivery
Set up monitoring to alert you if webhooks stop arriving. This helps catch issues with your webhook endpoint early.
Need Help?
Start a Workflow Run
Detailed guide with code examples
Webhook Integration
Complete webhook implementation guide
API Version: 1.0.0 | Last Updated: January 2024