Skip to main content

API Agent Selection Control

Overview

This document provides an overview of the API endpoint created for controlling agent selection settings and sending WebSocket messages based on specific actions. This API can be accessed from Softwave Dashboard.

API URL: https://api.v1.softwave.dev

Endpoint: /v1/controller/agent-selection/:action/:userId

Companion Preset

Download our companion preset: https://sftw.link/companion-api

You will only need to replace your user ID and your API key.

Description

The /v1/controller/agent-selection/:action/:userId endpoint allows you to perform specific actions for a given user ID. These actions include controlling agent selection animations.

HTTP Method

POST

Parameters

  • action: The action to perform. Possible values: play, remove, restart.
  • userId: The ID of the user.

Headers

  • softwave-api-key: The API key associated with the user.

Request Example

URL: POST /v1/controller/agent-selection/play/user_id

Headers

{
"softwave-api-key": "your-api-key"
}

Curl Request

curl --location --request POST 'https://api.v1.softwave.dev/v1/controller/agent-selection/play/user_id' \
--header 'softwave-api-key: api-key'

Actions

  • play: Play the in animation.
  • remove: Play the out animation.
  • restart: Restart the agent selection.

Response Example

{
"message": "Action sides executed for user :user_id"
}

Error Response Example

Invalid API Key

{
"error": "Invalid API key"
}

General Error

{
"error": "An error occurred while processing your request"
}