API Documentation

The Barnabas AI API enables churches to integrate AI-powered prayer guidance into their websites and applications.

https://barnabasai.com/api/v2

Overview

The Barnabas AI API provides simple REST endpoints for submitting prayer requests and receiving AI-generated guidance. The API is designed for easy integration with any church website or application.

Authentication

All API requests require authentication using your church's API key. Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY_HERE
Security: Never expose your API key in client-side code. Make API calls from your server.

API Endpoints

POST /api/v2/submit-prayer

Submit a prayer request for processing.

Request Body

{
  "name": "John Smith",
  "category": "health",
  "request": "Please pray for my mother's healing",
  "privacy": "private"
}

Response

{
  "success": true,
  "requestId": "pr_2025_123456",
  "message": "Prayer request received"
}
POST /api/v2/generate-guidance

Generate AI-powered prayer guidance for a request.

Request Body

{
  "requestId": "pr_2025_123456",
  "category": "health"
}

Response

{
  "success": true,
  "guidance": {
    "response": "Prayer guidance text...",
    "scriptures": ["Psalm 147:3", "James 5:15"],
    "prayerPoints": ["Point 1", "Point 2", "Point 3"]
  }
}
GET /api/health

Check API health status.

Response

{
  "status": "healthy",
  "timestamp": "2025-11-27T12:00:00Z"
}

Rate Limits

API rate limits vary by subscription tier:

Tier Requests/Month Rate Limit
Starter 50 10/hour
Growth 200 50/hour
Professional 500 100/hour
Enterprise Unlimited 500/hour

All API responses include rate limit headers:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1732712400

Error Handling

The API uses standard HTTP response codes:

Code Meaning
200 Success
400 Bad Request - Invalid parameters
401 Unauthorized - Invalid API key
429 Too Many Requests - Rate limit exceeded
500 Server Error - Something went wrong

Error Response Format

{
  "success": false,
  "error": {
    "code": "invalid_request",
    "message": "Missing required field: request"
  }
}

Support

For API support and questions:

Ready to Integrate?

Contact our team to get your API key and start building.

Get API Access