Create Assistant

Create Assistant

Method: POST

Endpoint: https://api.assistable.ai/v2/create-assistant

This endpoint allows you to programmatically create a new AI assistant. You can define its personality, voice, and connection to specific locations.

1. Authorizations

To use this endpoint, you must include your API Key in the Header.

  • Header Name: Authorization

  • Value: Bearer <your_token_here>


2. Body Parameters

These are the settings you can configure for the assistant. Ensure you include the Required fields.

Field

Type

Required?

Description

location_id

string

Yes

The unique ID of the location where this assistant belongs.

name

string

No

The name of the assistant (e.g., "Front Desk Bot").

description

string

No

Internal description of what this assistant does.

ambient_noise

string

No

Background noise setting (e.g., "office", "cafe").

prompt

string

No

The system instructions that tell the AI how to behave.

temperature

integer

No

Controls creativity. Higher numbers = more creative.

model

string

No

The AI brain to use. Options: gpt-4, claude-3, gpt-3.5-turbo.

queue

integer

No

Queue priority setting.

knowledge_id

string

No

The ID of the Knowledge Base this assistant can access.

voice_id

string

No

The specific ID for the voice the assistant uses.


3. Example Request (Code)

Copy the code below to test this endpoint.

Bash

curl --request POST \
--url https://api.assistable.ai/v2/create-assistant \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"location_id": "loc_12345",
"name": "My Support Bot",
"description": "Handles inbound support queries",
"ambient_noise": "office-ambience",
"prompt": "You are a helpful assistant...",
"temperature": 0.7,
"model": "gpt-4",
"queue": 1,
"knowledge_id": "kb_98765",
"voice_id": "voice_abc123"
}'

4. Success Response

If the assistant is created successfully, you will receive a 201 status code and the following JSON data:

JSON

{
"status": 201,
"data": {
"status": "active",
"id": "asst_56789"
}
}

5. Troubleshooting (Data Types)

  • Status 201: Success. The assistant was created.

  • Status 401: Unauthorized. Check your Bearer token.

  • Model Enum: Ensure you spelled the model name exactly as gpt-4, claude-3, or gpt-3.5-turbo. Other names will fail.


Was this article helpful?