Skip to main content

API Hud Control

Overview

This document provides an overview of the API endpoint created for controlling HUD 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/: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/:action/:userId endpoint allows you to perform specific actions for a given user ID. These actions include toggling HUD settings such as hiding sides, scores, timeouts, and sending related WebSocket messages.

HTTP Method

POST

Parameters

  • action: The action to perform. Possible values: sides, score, timeout1, timeout2, tactical, technical.
  • userId: The ID of the user.

Headers

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

Request Example

URL: POST /v1/controller/sides/user_id

Headers

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

Curl Request

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

Actions

  • sides: Toggles the hide_sides setting.
  • score: Toggles the hide_score setting.
  • timeout1: Toggles the timeout_1 setting.
  • timeout2: Toggles the timeout_2 setting.
  • tactical: Toggles the tactical_timeout setting.
  • technical: Toggles the technical_timeout setting.

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"
}