Skip to main content

Getting Started with the ECOSIRE API

The ECOSIRE REST API gives you programmatic access to your entire ERP platform — contacts, orders, inventory, manufacturing, billing, licenses, and analytics. All responses are JSON.

Base URL

https://api.ecosire.com/api

Current API version: v1 (all endpoints are prefixed at the base URL above — no version segment in the path).


Content Type

All request bodies must use application/json. Set the header on every mutating request:

Content-Type: application/json

File uploads (product ZIPs) use multipart/form-data — see the Products reference for details.


Authentication

Every request requires a Bearer token in the Authorization header.

Authorization: Bearer eco_live_xxxxxxxxxxxxxxxxxxxxxxxx

Generate API keys from your Dashboard → API Keys. See the full Authentication guide for OAuth2/JWT flows.


Rate Limits

Endpoint groupLimit
General API (authenticated)60 req / min
POST /licenses/validate30 req / min
POST /licenses/activate10 req / min
POST /support (public)5 req / min
POST /crm/capture (public)10 req / min

Rate limit status is returned in every response via headers:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 58
X-RateLimit-Reset: 1710000060

When you exceed the limit, the API returns 429 Too Many Requests. Wait until X-RateLimit-Reset (Unix timestamp) before retrying.


Pagination

List endpoints return paginated results. Pass page and limit as query parameters:

GET /api/contacts?page=1&limit=25

The response envelope always contains a meta object:

{
"data": [ ... ],
"meta": {
"total": 342,
"page": 1,
"limit": 25,
"totalPages": 14
}
}

Default limit is 20; maximum is 100. See Pagination for sorting and filtering details.


Error Handling

Errors follow a consistent shape:

{
"statusCode": 422,
"message": "Validation failed",
"error": "Unprocessable Entity"
}

See Errors for the full error reference.


Quick Start

Step 1 — Get your API key

  1. Log in at ecosire.com/dashboard.
  2. Go to Settings → API Keys.
  3. Click Generate new key and copy the value. Store it securely — it is displayed once.

Step 2 — Make your first request

Fetch your contact list:

curl https://api.ecosire.com/api/contacts \
-H "Authorization: Bearer eco_live_YOUR_KEY_HERE"

Expected response:

{
"data": [
{
"id": "018e1234-abcd-7000-8000-000000000001",
"name": "Acme Corp",
"email": "[email protected]",
"phone": "+1-555-000-1234",
"type": "company",
"createdAt": "2026-01-15T09:00:00Z"
}
],
"meta": {
"total": 1,
"page": 1,
"limit": 20,
"totalPages": 1
}
}

Step 3 — Create a resource

Create a new contact:

curl -X POST https://api.ecosire.com/api/contacts \
-H "Authorization: Bearer eco_live_YOUR_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"name": "Globex Industries",
"email": "[email protected]",
"phone": "+1-555-999-0000",
"type": "company"
}'

A 201 Created response returns the full resource:

{
"id": "018e1234-abcd-7000-8000-000000000042",
"name": "Globex Industries",
"email": "[email protected]",
"phone": "+1-555-999-0000",
"type": "company",
"organizationId": "018e0000-0000-7000-8000-000000000001",
"createdAt": "2026-03-20T12:00:00Z",
"updatedAt": "2026-03-20T12:00:00Z"
}

Step 4 — Handle the response in code

TypeScript / Node.js

const BASE_URL = 'https://api.ecosire.com/api';

async function getContacts(page = 1, limit = 20) {
const res = await fetch(`${BASE_URL}/contacts?page=${page}&limit=${limit}`, {
headers: {
Authorization: `Bearer ${process.env.ECOSIRE_API_KEY}`,
},
});

if (!res.ok) {
const err = await res.json();
throw new Error(`${err.statusCode}: ${err.message}`);
}

return res.json(); // { data: Contact[], meta: PaginationMeta }
}

Python

import os
import requests

BASE_URL = "https://api.ecosire.com/api"
headers = {"Authorization": f"Bearer {os.environ['ECOSIRE_API_KEY']}"}

resp = requests.get(f"{BASE_URL}/contacts", headers=headers, params={"page": 1, "limit": 20})
resp.raise_for_status()
result = resp.json()
print(result["data"])

SDKs & Tools

ToolLink
Swagger UI (interactive)api.ecosire.com/docs
Postman CollectionAvailable in your dashboard under API Keys → Download Postman Collection
TypeScript SDKnpm install @ecosire/sdk (coming soon)

Next Steps