Skip to main content

Overview

The Create Job API allows you to programmatically create new customer journey jobs in Agentix. This endpoint is the primary way to initiate automated workflows through the Agentix platform.

How It Works

When you create a job through the API:
  1. Workflow Assignment: Specify which workflow ID to execute
  2. Customer Data: Provide customer information (name, mobile, email, etc.)
  3. Job Configuration: Set expiration time, language, and metadata
  4. Input Parameters: Pass dynamic data to customize the workflow execution

Key Concepts

Workflow ID

Every job must be associated with a pre-configured workflow in your Agentix dashboard. The workflow defines the customer journey steps and automation logic.

Expiration Time

Jobs have a validity period (validUntil) specified in seconds. After this time, the job becomes inaccessible to customers.

Customer Information

Provide customer details to personalize the experience and enable agent handoffs when needed.

Dynamic Inputs

Use the input array to pass variable data that workflows can utilize for personalization and decision-making.

Authentication

All API requests require authentication using your API key in the x-api-key header.
Getting your API Key: Contact your organization administrator to generate an Integration API key. Only administrators can create API keys.

Interactive Testing

Try the API Now

Test the Create Job endpoint with your own data and server URL in our interactive API playground.

Request Structure

{
  "data": {
    "workflow": 123,
    "validUntil": 86400,
    "language": "en",
    "customer": {
      "name": "John Doe",
      "mobile": "+1234567890",
      "email": "[email protected]",
      "customerID": "CUST-001"
    },
    "externalRefNumber": "REF-12345",
    "metadata": "Additional context data",
    "input": [
      {
        "key": "productType",
        "value": "premium",
        "type": "string",
        "description": "Product tier for customization"
      }
    ]
  }
}

Response Structure

{
  "success": true,
  "data": {
    "jobId": "job_abc123def456",
    "status": "active",
    "workflow": {
      "id": 123,
      "name": "Customer Onboarding"
    },
    "customer": {
      "name": "John Doe",
      "mobile": "+1234567890",
      "email": "[email protected]",
      "customerID": "CUST-001"
    },
    "externalRefNumber": "REF-12345",
    "createdAt": "2024-01-15T10:30:00Z",
    "validUntil": "2024-01-16T10:30:00Z",
    "accessUrl": "https://launch.agentixhub.ai/j/abc123def456"
  }
}

Error Responses

Status CodeDescription
400Bad request - Invalid request format or missing required fields
401Unauthorized - Invalid or missing API key
404Workflow not found - The specified workflow ID doesn’t exist
429Rate limit exceeded - Too many requests

Next Steps

  1. Get Your API Key: Contact your administrator to obtain API credentials
  2. Test the Endpoint: Use the interactive playground in the API Reference section
  3. Integrate: Add the API calls to your application workflow
  4. Monitor: Track job creation and customer engagement through the Agentix dashboard
For real-time testing with your own server configuration, visit the API Reference β†’ Create Job where you can enter custom server URLs and test with live data.