Skip to main content

Assistants

Use these endpoints to manage assistants for your organization.

Authentication & scope

  • Header: X-API-Key: YOUR_API_KEY
  • Read operations: assistants:read
  • Write operations: assistants:write

GET /v1/assistants

Returns assistants available to your organization.

Bash

curl -X GET "https://api.indigenius.ai/v1/assistants" \
  -H "X-API-Key: YOUR_API_KEY"

Node

const response = await fetch('https://api.indigenius.ai/v1/assistants', {
  method: 'GET',
  headers: {
    'X-API-Key': process.env.INDIGENIUS_API_KEY,
  },
});

const data = await response.json();
console.log(data);

Python

import requests

response = requests.get(
    "https://api.indigenius.ai/v1/assistants",
    headers={"X-API-Key": "YOUR_API_KEY"},
    timeout=30,
)
print(response.status_code)
print(response.json())

200 OK

{
  "status": true,
  "message": "Assistants fetched",
  "data": [
    {
      "id": "665e4a34c65bb95f2f2d72e1",
      "name": "Sales Assistant"
    }
  ]
}

Common errors

  • 403 missing assistants:read scope
  • 404 key/org context not found

POST /v1/assistants

Creates a new assistant. Body is DTO-accurate to NewCreateAssistantDTO.

Bash

curl -X POST "https://api.indigenius.ai/v1/assistants" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Sales Assistant",
    "company_name": "Acme Inc",
    "industry": "ecommerce",
    "language": "English",
    "voice": "female",
    "task_type": "lead_qualification"
  }'

Node

const response = await fetch('https://api.indigenius.ai/v1/assistants', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-API-Key': process.env.INDIGENIUS_API_KEY,
  },
  body: JSON.stringify({
    name: 'Sales Assistant',
    company_name: 'Acme Inc',
    industry: 'ecommerce',
    language: 'English',
    voice: 'female',
    task_type: 'lead_qualification',
  }),
});

console.log(await response.json());

Python

import requests

payload = {
    "name": "Sales Assistant",
    "company_name": "Acme Inc",
    "industry": "ecommerce",
    "language": "English",
    "voice": "female",
    "task_type": "lead_qualification",
}

response = requests.post(
    "https://api.indigenius.ai/v1/assistants",
    headers={
        "X-API-Key": "YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json=payload,
    timeout=30,
)
print(response.status_code)
print(response.json())

201 Created

{
  "status": true,
  "message": "Assistant created successfully"
}

Common errors

  • 400 validation error (missing required fields)
  • 403 missing assistants:write scope

GET /v1/assistants/{id}

Returns one assistant by id.

Bash

curl -X GET "https://api.indigenius.ai/v1/assistants/665e4a34c65bb95f2f2d72e1" \
  -H "X-API-Key: YOUR_API_KEY"

Node

const assistantId = '665e4a34c65bb95f2f2d72e1';
const response = await fetch(
  `https://api.indigenius.ai/v1/assistants/${assistantId}`,
  {
    method: 'GET',
    headers: {
      'X-API-Key': process.env.INDIGENIUS_API_KEY,
    },
  },
);

console.log(await response.json());

Python

import requests

assistant_id = "665e4a34c65bb95f2f2d72e1"
response = requests.get(
    f"https://api.indigenius.ai/v1/assistants/{assistant_id}",
    headers={"X-API-Key": "YOUR_API_KEY"},
    timeout=30,
)
print(response.status_code)
print(response.json())

200 OK

{
  "status": true,
  "message": "Assistant details fetched",
  "data": {
    "id": "665e4a34c65bb95f2f2d72e1",
    "name": "Sales Assistant",
    "language": "English"
  }
}

Common errors

  • 403 missing assistants:read scope
  • 404 assistant not found

PATCH /v1/assistants/{id}

Updates an assistant. Body is DTO-accurate to AISettingsDTO.

Bash

curl -X PATCH "https://api.indigenius.ai/v1/assistants/665e4a34c65bb95f2f2d72e1" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "first_message": "Hello, I can help with product questions.",
    "system_prompt": "You are a concise support assistant.",
    "provider": "open_ai",
    "model": "gpt-4o-mini",
    "temperature": 0.7,
    "response_count": 3,
    "max_tokens": 400,
    "name": "Sales Assistant",
    "language": "English",
    "emotion": false,
    "hipaa": false,
    "id": "665e4a34c65bb95f2f2d72e1"
  }'

Node

const assistantId = '665e4a34c65bb95f2f2d72e1';
const response = await fetch(
  `https://api.indigenius.ai/v1/assistants/${assistantId}`,
  {
    method: 'PATCH',
    headers: {
      'Content-Type': 'application/json',
      'X-API-Key': process.env.INDIGENIUS_API_KEY,
    },
    body: JSON.stringify({
      first_message: 'Hello, I can help with product questions.',
      system_prompt: 'You are a concise support assistant.',
      provider: 'open_ai',
      model: 'gpt-4o-mini',
      temperature: 0.7,
      response_count: 3,
      max_tokens: 400,
      name: 'Sales Assistant',
      language: 'English',
      emotion: false,
      hipaa: false,
      id: assistantId,
    }),
  },
);

console.log(await response.json());

Python

import requests

assistant_id = "665e4a34c65bb95f2f2d72e1"
payload = {
    "first_message": "Hello, I can help with product questions.",
    "system_prompt": "You are a concise support assistant.",
    "provider": "open_ai",
    "model": "gpt-4o-mini",
    "temperature": 0.7,
    "response_count": 3,
    "max_tokens": 400,
    "name": "Sales Assistant",
    "language": "English",
    "emotion": False,
    "hipaa": False,
    "id": assistant_id,
}

response = requests.patch(
    f"https://api.indigenius.ai/v1/assistants/{assistant_id}",
    headers={
        "X-API-Key": "YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json=payload,
    timeout=30,
)
print(response.status_code)
print(response.json())

200 OK

{
  "status": true,
  "message": "Assistant updated successfully"
}

Common errors

  • 400 validation error (missing required update fields)
  • 403 missing assistants:write scope
  • 404 assistant not found
  1. Create an assistant with your base persona/instructions.
  2. Retrieve the assistant id.
  3. Use the assistant id when creating widget/call/workflow resources.
  4. Patch assistant settings as your use case evolves.