Corral
Learn > Documentation

API Access

Build custom integrations using the Corral AI REST API.

Authentication

Use OAuth 2.0 client credentials flow:

curl -X POST https://your-instance.azurewebsites.net/api/connect/token 
  -H "Content-Type: application/x-www-form-urlencoded" 
  -d "grant_type=client_credentials&client_id=YOUR_CLIENT_ID&client_secret=YOUR_SECRET"

Base URL

All API requests use:

https://your-instance.azurewebsites.net/api

Endpoints

Conversations

MethodEndpointDescription
POST/conversationsStart a new conversation
POST/conversations/{id}/messagesSend a message
GET/conversations/{id}Get conversation history

Example: Send a Message

curl -X POST https://your-instance.azurewebsites.net/api/conversations/{id}/messages 
  -H "Authorization: Bearer YOUR_TOKEN" 
  -H "Content-Type: application/json" 
  -d '{"content": "Hello, I need help with my order"}'

Response

{
  "id": "msg_123",
  "content": "I'd be happy to help! Could you provide your order number?",
  "role": "assistant",
  "timestamp": "2024-01-15T10:30:00Z"
}

Rate Limits

TierRequests/minute
Standard60
Premium300

SDKs

Coming soon:

  • JavaScript/TypeScript
  • Python
  • C#/.NET

Next Steps