REST API v1

API Reference

Complete documentation for integrating Elephas AI into your applications

Secure Authentication

JWT-based auth with refresh tokens and rate limiting

RESTful Design

Clean, predictable endpoints following REST principles

Comprehensive Docs

Detailed examples and interactive Swagger UI

Quick Start

Get up and running with the Elephas AI API in minutes

1

Get API Credentials

Login to your dashboard and navigate to Settings > API Keys

2

Authenticate

Use your credentials to obtain a JWT access token

curl -X POST https://api.elephas.ai/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "your@email.com",
    "password": "your_password"
  }'
3

Make API Calls

Include the access token in the Authorization header

curl -X GET https://api.elephas.ai/api/v1/campaigns \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

API Endpoints

Explore all available endpoints organized by category

POST
/auth/login

User login - Rate limited to 5 attempts/min

Parameters

emailstringrequiredUser email address
passwordstringrequiredUser password

Response

{
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "user": {
    "id": "uuid",
    "email": "user@example.com",
    "role": "FRANCHISE_OWNER"
  }
}
POST
/auth/refresh

Refresh access token - Rate limited to 10 attempts/min

Parameters

refreshTokenstringrequiredValid refresh token

Response

{
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
POST
/auth/forgot-password

Request password reset - Rate limited to 3 attempts/10min

Parameters

emailstringrequiredUser email address

Response

{
  "message": "If the email exists, a password reset link has been sent"
}
POST
/auth/reset-password

Reset password using token - Rate limited to 5 attempts/min

Parameters

tokenstringrequiredPassword reset token
passwordstringrequiredNew password (min 8 chars)

Response

{
  "message": "Password reset successfully"
}

Configuration

Base URL

https://api.elephas.ai/api/v1

Required Headers

Content-Type: application/json
Authorization: Bearer YOUR_TOKEN

Rate Limits

Authentication endpoints3-10 requests/min
Standard API calls100 requests/min
Bulk operations10 requests/min

Need Help?

Our developer support team is here to help you integrate successfully