API Reference
Complete reference for the IriSync API endpoints
List Users
Retrieves a list of users, paginated and with optional filtering.
Parameters
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
page | integer | query | Optional | Page number for pagination (1-based) |
limit | integer | query | Optional | Number of results per page (default: 50, max: 100) |
role | string | query | Optional | Filter users by role (e.g., "admin", "user") |
Responses
| Code | Description |
|---|---|
200 | Successful operation |
401 | Unauthorized - Authentication token is missing or invalid |
403 | Forbidden - Insufficient permissions to list users |
Example Request
curl -X GET "https://api.irisync.com/api/users?page=1&limit=50" \
-H "Authorization: Bearer YOUR_API_KEY"Example Response
{
"data": [
{
"id": "u12345",
"name": "John Doe",
"email": "john@example.com",
"role": "user",
"createdAt": "2025-01-15T10:30:00Z"
},
// More users...
],
"pagination": {
"total": 125,
"page": 1,
"limit": 50,
"pages": 3
}
}Get User
Retrieves a single user by ID.
Parameters
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
userId | string | path | Required | ID of the user to retrieve |
Responses
| Code | Description |
|---|---|
200 | Successful operation |
401 | Unauthorized - Authentication token is missing or invalid |
404 | Not Found - User with the specified ID does not exist |
Example Request
curl -X GET "https://api.irisync.com/api/users/u12345" \
-H "Authorization: Bearer YOUR_API_KEY"Example Response
{
"id": "u12345",
"name": "John Doe",
"email": "john@example.com",
"role": "user",
"createdAt": "2025-01-15T10:30:00Z",
"lastLogin": "2025-05-09T08:45:00Z",
"settings": {
"notifications": true,
"twoFactorAuth": false
}
}Create User
Creates a new user account.
Parameters
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
name | string | body | Required | Full name of the user |
email | string | body | Required | Email address of the user (must be unique) |
password | string | body | Required | User password (min 8 characters) |
role | string | body | Optional | User role (default: "user") |
Responses
| Code | Description |
|---|---|
201 | User created successfully |
400 | Bad Request - Validation errors or email already exists |
401 | Unauthorized - Authentication token is missing or invalid |
403 | Forbidden - Insufficient permissions to create users |
Example Request
curl -X POST "https://api.irisync.com/api/users" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "New User",
"email": "newuser@example.com",
"password": "securepassword123",
"role": "user"
}'Example Response
{
"id": "u12347",
"name": "New User",
"email": "newuser@example.com",
"role": "user",
"createdAt": "2025-05-09T10:30:00Z"
}Delete User
Deletes a user account permanently.
Parameters
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
userId | string | path | Required | ID of the user to delete |
Responses
| Code | Description |
|---|---|
204 | No Content - User successfully deleted |
401 | Unauthorized - Authentication token is missing or invalid |
403 | Forbidden - Insufficient permissions to delete users |
404 | Not Found - User with the specified ID does not exist |
Example Request
curl -X DELETE "https://api.irisync.com/api/users/u12345" \
-H "Authorization: Bearer YOUR_API_KEY"Example Response
List Integrations
Retrieves a list of all available integrations that can be connected to your account.
Parameters
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
category | string | query | Optional | Filter integrations by category (e.g., "social", "design", "storage") |
status | string | query | Optional | Filter by status ("active", "coming_soon") |
Responses
| Code | Description |
|---|---|
200 | Successful operation |
401 | Unauthorized - Authentication token is missing or invalid |
Example Request
curl -X GET "https://api.irisync.com/api/integrations?category=social" \
-H "Authorization: Bearer YOUR_API_KEY"Example Response
{
"data": [
{
"id": "facebook",
"name": "Facebook",
"type": "social",
"description": "Connect and manage Facebook pages and groups",
"status": "active",
"icon": "https://api.irisync.com/icons/facebook.svg"
},
{
"id": "instagram",
"name": "Instagram",
"type": "social",
"description": "Schedule posts and stories on Instagram",
"status": "active",
"icon": "https://api.irisync.com/icons/instagram.svg"
}
]
}Get Integration Details
Retrieves detailed information about a specific integration.
Parameters
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
integrationId | string | path | Required | ID of the integration to retrieve |
Responses
| Code | Description |
|---|---|
200 | Successful operation |
401 | Unauthorized - Authentication token is missing or invalid |
404 | Not Found - Integration with the specified ID does not exist |
Example Request
curl -X GET "https://api.irisync.com/api/integrations/facebook" \
-H "Authorization: Bearer YOUR_API_KEY"Example Response
{
"id": "facebook",
"name": "Facebook",
"type": "social",
"description": "Connect and manage Facebook pages and groups",
"status": "active",
"icon": "https://api.irisync.com/icons/facebook.svg",
"authMethod": "oauth2",
"scopes": ["pages_manage_posts", "pages_read_engagement"],
"endpoints": {
"authorize": "/api/integrations/connect/facebook",
"callback": "/api/platforms/callback?provider=facebook"
},
"setupSteps": [
"Connect your Facebook account",
"Select pages to manage",
"Grant required permissions"
]
}List Connected Integrations
Retrieves all integrations that are connected to the user's account.
Responses
| Code | Description |
|---|---|
200 | Successful operation |
401 | Unauthorized - Authentication token is missing or invalid |
Example Request
curl -X GET "https://api.irisync.com/api/integrations/connected" \
-H "Authorization: Bearer YOUR_API_KEY"Example Response
{
"data": [
{
"integrationId": "facebook",
"status": "connected",
"connectedAt": "2025-03-15T14:30:00Z",
"lastSyncAt": "2025-03-15T15:45:00Z",
"meta": {
"pages": ["Page 1", "Page 2"],
"accountName": "Jane Smith"
}
}
]
}Connect Integration
Initiates the connection process for a specific integration. For OAuth flows, this returns an authorization URL. For API key integrations, the connection is established directly.
Parameters
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
integrationId | string | path | Required | ID of the integration to connect |
redirectUrl | string | body | Optional | URL to redirect after OAuth authentication (for OAuth flows) |
apiKey | string | body | Optional | API key for the service (for API key-based integrations) |
Responses
| Code | Description |
|---|---|
200 | Connection process initiated successfully |
201 | Connection established successfully (for API key integrations) |
400 | Bad Request - Missing required parameters or invalid data |
401 | Unauthorized - Authentication token is missing or invalid |
404 | Not Found - Integration with the specified ID does not exist |
Example Request
curl -X POST "https://api.irisync.com/api/integrations/connect/facebook" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"redirectUrl": "https://app.irisync.com/dashboard/settings/connections"
}'Example Response
{
"status": "pending",
"authUrl": "https://facebook.com/oauth/authorize?client_id=xyz&redirect_uri=https://app.irisync.com/api/platforms/callback&state=abc123",
"provider": "facebook"
}Disconnect Integration
Disconnects a specific integration from the user's account.
Parameters
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
integrationId | string | path | Required | ID of the integration to disconnect |
Responses
| Code | Description |
|---|---|
200 | Integration successfully disconnected |
401 | Unauthorized - Authentication token is missing or invalid |
404 | Not Found - Integration connection not found |
Example Request
curl -X DELETE "https://api.irisync.com/api/integrations/disconnect/facebook" \
-H "Authorization: Bearer YOUR_API_KEY"Example Response
{
"status": "disconnected",
"provider": "facebook"
}