AI Assistants

Base Path: /v1/assistants

Endpoints

Get All AI Assistants

Method: GET Endpoint: https://api.tokensource.com/v1/assistants Description: Retrieves all AI assistants associated with the authenticated user.

Response (200 OK):

{
  "status": 200,
  "data": [
    {
      "id": 1,
      "externalId": "uuid-1",
      "name": "Assistant Alpha",
      "instruction": "Provide helpful answers.",
      "objective": {},
      "ecosystem": "openai",
      "model": "gpt-4",
      "agentEnabled": true,
      "createdAt": "2023-10-27T09:00:00Z",
      "updatedAt": "2023-10-27T12:00:00Z"
    }
  ],
  "message": "Assistants retrieved successfully"
}

Get AI Assistant by External ID

Method: GET Endpoint: https://api.tokensource.com/v1/assistants/{externalId} Description: Retrieves a specific AI assistant by its external ID.

Parameters:

  • externalId (string, required)

Response (200 OK):

Response (404 Not Found):

Create AI Assistant

Method: POST Endpoint: https://api.tokensource.com/v1/assistants Description: Creates a new AI assistant.

Request Body:

Response (201 Created):

Update AI Assistant

Method: PUT Endpoint: https://api.tokensource.com/v1/assistants/{externalId} Description: Updates an existing AI assistant and handles agent creation/deletion based on agentEnabled.

Parameters:

  • externalId (string, required)

Request Body:

Response (200 OK):

Response (404 Not Found):

Last updated