Skip to content

Projects API

Projects are the primary organizational unit in Connix. They provide isolated workspaces for your agents, environments, and resources.

Projects allow you to:

  • Organize related agents and workflows
  • Isolate resources and permissions
  • Track usage and costs per project
  • Manage team access and collaboration

Create a new project in your organization.

POST /api/v1/projects

Request Body:

{
"name": "string"
}

Parameters:

FieldTypeRequiredDescription
namestringProject name (3-50 characters, alphanumeric and hyphens)

Response:

{
"id": 123,
"name": "my-ai-project",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}

Example:

Terminal window
curl -X POST https://api.connix.io/api/v1/projects \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key" \
-d '{"name": "ml-training-pipeline"}'

Retrieve all projects in your organization.

GET /api/v1/projects

Query Parameters:

ParameterTypeDescription
pageintegerPage number (default: 1)
limitintegerItems per page (default: 20, max: 100)
searchstringSearch projects by name
sortstringSort field (name, created_at, updated_at)
orderstringSort order (asc, desc)

Response:

{
"projects": [
{
"id": 123,
"name": "ml-training-pipeline"
},
{
"id": 124,
"name": "data-processing-workflow"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 2,
"pages": 1,
"has_next": false,
"has_prev": false
}
}

Example:

Terminal window
curl -X GET "https://api.connix.io/api/v1/projects?limit=10&search=ml" \
-H "X-API-Key: your-api-key"
FieldTypeDescription
idintegerUnique project identifier
namestringProject name
created_atstringISO 8601 timestamp of creation
updated_atstringISO 8601 timestamp of last update

Project names must follow these rules:

  • Length: 3-50 characters
  • Characters: Alphanumeric characters and hyphens only
  • Format: Must start and end with alphanumeric character
  • Uniqueness: Must be unique within your organization

Valid Examples:

  • ml-training-pipeline
  • data-processing-v2
  • customer-analytics
  • test123

Invalid Examples:

  • -invalid-start (starts with hyphen)
  • invalid-end- (ends with hyphen)
  • too_many_underscores (contains underscores)
  • ab (too short)
StatusError CodeDescription
400INVALID_PROJECT_NAMEProject name doesn’t meet requirements
400PROJECT_NAME_TAKENProject name already exists
400VALIDATION_ERRORRequest validation failed
401UNAUTHORIZEDInvalid or missing API key
403FORBIDDENInsufficient permissions
429RATE_LIMIT_EXCEEDEDToo many requests

Invalid Project Name:

{
"error": {
"code": "INVALID_PROJECT_NAME",
"message": "Project name must be 3-50 characters long and contain only alphanumeric characters and hyphens",
"details": {
"field": "name",
"value": "ab",
"issue": "too short"
}
}
}

Project Name Already Exists:

{
"error": {
"code": "PROJECT_NAME_TAKEN",
"message": "A project with this name already exists",
"details": {
"field": "name",
"value": "existing-project"
}
}
}
import { ConnixClient } from '@connix/sdk';
const client = new ConnixClient({ apiKey: 'your-api-key' });
async function setupDataScienceProject() {
try {
// Create the main project
const project = await client.createProject({
name: 'customer-churn-analysis'
});
console.log(`✅ Created project: ${project.name} (ID: ${project.id})`);
// You can now launch agents in this project
const agent = await client.launchAgent({
name: 'data-preprocessor',
projectId: project.id
});
console.log(`🚀 Launched agent: ${agent.message}`);
return project;
} catch (error) {
if (error.code === 'PROJECT_NAME_TAKEN') {
console.log('Project already exists, using existing project');
// Handle existing project logic
} else {
console.error('Failed to create project:', error.message);
throw error;
}
}
}
const project = await setupDataScienceProject();
async function manageProjects() {
// List all projects
const allProjects = await client.listProjects();
console.log(`Total projects: ${allProjects.pagination.total}`);
// Search for machine learning projects
const mlProjects = await client.listProjects({
search: 'ml',
limit: 5
});
// List projects sorted by creation date
const recentProjects = await client.listProjects({
sort: 'created_at',
order: 'desc',
limit: 10
});
// Display project information
recentProjects.projects.forEach(project => {
console.log(`Project: ${project.name} (ID: ${project.id})`);
});
return {
total: allProjects.pagination.total,
ml: mlProjects.projects.length,
recent: recentProjects.projects
};
}
const stats = await manageProjects();
  • Use descriptive, consistent naming conventions
  • Group related workflows in the same project
  • Create separate projects for different environments (dev, staging, prod)
  • Use project names that reflect business domains or use cases
  • Monitor project resource usage regularly
  • Clean up unused projects to avoid unnecessary costs
  • Use meaningful project names for easier identification
  • Document project purposes and ownership
  • Limit project access to necessary team members
  • Regularly audit project permissions
  • Use separate projects for sensitive workloads
  • Implement proper naming conventions to avoid data leaks