Documentation/ API/ Quick Start

API Quick Start

Get started with the Organiko.ai API in 5 minutes

⏱️
Estimated Time: 5 minutes
By the end of this guide, you'll make your first authenticated API call and retrieve your subscription data.
1

Create an Account

If you don't have an account yet, sign up for free at:

Sign Up for Free →
2

Get Your API Credentials

You'll use your account email and password to authenticate with the API. For production applications, you should create API keys in your account settings.

💡
Tip: Create API Keys
For production use, navigate to Settings → API Keys to create dedicated API credentials with specific permissions.
3

Authenticate and Get Access Token

First, obtain an access token by logging in with your credentials:

Using cURL

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

Using JavaScript/TypeScript

const response = await fetch('https://api.organiko.ai/v1/auth/login', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ email: 'your-email@example.com', password: 'your-password', }), }); const data = await response.json(); const accessToken = data.data.access_token; console.log('Access Token:', accessToken);

Using Python

import requests response = requests.post( 'https://api.organiko.ai/v1/auth/login', json={ 'email': 'your-email@example.com', 'password': 'your-password' } ) data = response.json() access_token = data['data']['access_token'] print(f'Access Token: {access_token}')

Response

{ "success": true, "data": { "access_token": "eyJhbGciOiJIUzI1NiIs...", "refresh_token": "eyJhbGciOiJIUzI1NiIs...", "token_type": "Bearer", "expires_in": 3600 } }

Save the access_token - you'll use it to authenticate subsequent requests.

4

Make an Authenticated Request

Now use your access token to retrieve your subscription information:

Using cURL

curl https://api.organiko.ai/v1/subscriptions/current \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Using JavaScript/TypeScript

const response = await fetch('https://api.organiko.ai/v1/subscriptions/current', { headers: { 'Authorization': `Bearer ${accessToken}`, }, }); const subscription = await response.json(); console.log('Subscription:', subscription);

Using Python

headers = {'Authorization': f'Bearer {access_token}'} response = requests.get( 'https://api.organiko.ai/v1/subscriptions/current', headers=headers ) subscription = response.json() print('Subscription:', subscription)

Response

{ "success": true, "data": { "subscription_id": "sub_abc123", "tier": "professional", "status": "active", "features": { "transactions_limit": 10000, "users_limit": 10, "integrations_limit": 5 } } }
🎉

Congratulations!

You've successfully made your first authenticated API call. You're now ready to integrate Organiko.ai into your applications.

Common Issues

401 Unauthorized Error

Make sure you're including the Authorization header with your access token:

Authorization: Bearer YOUR_ACCESS_TOKEN

Token Expired

Access tokens expire after 60 minutes. Use your refresh token to get a new access token:

POST /auth/refresh

CORS Errors (Browser)

Our API supports CORS for browser-based applications. Make sure you're making requests from an allowed origin. For server-to-server communication, CORS is not an issue.

Rate Limit Exceeded

Check the rate limit headers in the response. If you're exceeding limits, consider upgrading your plan or implementing request throttling.

Use Our Official SDKs

Skip the boilerplate and use our official SDKs for popular languages:

🟦
TypeScript / Node.js
npm install @organiko/api-client
🐍
Python
pip install organiko-api
View SDK Documentation →

Need Help?

Our developer support team is here to help you get started.