Skip to content
ajan.io

Docs menu

On this page

Create Integration

Create a new custom integration in your workspace

Creates a new custom integration in your workspace. After creation, you can add actions and triggers to the integration.

Base URL

https://api.ajan.io/integrations/v1/create

Required Scopes

This endpoint requires the INTEGRATION_API scope.

Parameters

ParameterTypeRequiredDescription
namestringYesIntegration name (max 40 characters)
descriptionstringNoIntegration description (max 90 characters)

Example

javascript
const axios = require("axios");

async function createIntegration() {
  const response = await axios.post(
    "https://api.ajan.io/integrations/v1/create",
    {
      name: "My Custom Integration",
      description: "Connects to my internal company API for data retrieval"
    },
    {
      headers: {
        Authorization: "Bearer YOUR_API_KEY",
        "Content-Type": "application/json"
      }
    }
  );

  console.log("Created integration:", response.data.integration);
  return response.data.integration.id;
}

createIntegration();

Response Format

Success Response (201 Created)

typescript
{
  integration: {
    id: string;          // UUID of the created integration
    name: string;        // Integration name
    description: string; // Integration description
    createdAt: string;   // ISO 8601 timestamp
  };
}

Example Response

json
{
  "integration": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "My Custom Integration",
    "description": "Connects to my internal company API for data retrieval",
    "createdAt": "2025-02-18T10:30:00.000Z"
  }
}

Error Handling

Status CodeDescription
400Invalid request body (name too long, invalid characters)
401Invalid or missing API key
429Rate limit exceeded
500Internal server error

Next Steps

After creating an integration, you'll typically want to:

  1. Add actions that agents can execute
  2. Add triggers that start workflows
  3. Configure authentication if your integration requires it