Page Introduction

Presence namespace

This namespace page contains request/response examples, endpoint matrix, and implementation-ready method details for frontend API clients.

  • Use quick index for direct navigation to endpoint details.
  • Use matrix view to verify auth and method-path combinations.
  • Test namespace calls in Workshop Try-It before integrating UI actions.

Workshop Namespace

Presence

User presence (online/away/offline) for realtime messaging.

1Endpoint methods

Endpoint Quick Index

Click an endpoint to jump to details and code examples.

Endpoint Matrix

MethodPathAuthSummary
PUT/api/ws/presenceBearerNot specified in source.

Detailed Endpoints

PUT/api/ws/presence

Not specified in source.

Auth: BearerSource: API-DOC/workshop-rules/presence.md

Request Example

{
  "body": {
    "example_field": "example_value"
  }
}

Response Example

{
  "success": true,
  "message": "Operation completed"
}
Node.js Axios example
import axios from "axios";

const BASE_URL = process.env.MINBIL_API_BASE_URL ?? "http://localhost:5000";
const API_KEY = process.env.MINBIL_API_KEY ?? "YOUR_API_KEY";
const ACCESS_TOKEN = process.env.MINBIL_WS_ACCESS_TOKEN ?? "YOUR_BEARER_TOKEN";

async function run() {
  const response = await axios({
    method: "put",
    url: `${BASE_URL}/api/ws/presence`,
    headers: {
      "Content-Type": "application/json",
      Authorization: `Bearer ${ACCESS_TOKEN}`,
    },
    data: {
      "example_field": "example_value"
    },
    timeout: 20000,
  });

  console.log(response.data);
}

run().catch((error) => {
  console.error(error.response?.data ?? error.message);
});
cURL example
BASE_URL="${MINBIL_API_BASE_URL:-http://localhost:5000}"
API_KEY="${MINBIL_API_KEY:-YOUR_API_KEY}"
ACCESS_TOKEN="${MINBIL_WS_ACCESS_TOKEN:-YOUR_BEARER_TOKEN}"

curl -X PUT "${BASE_URL}/api/ws/presence" \\
  -H "Content-Type: application/json" \\
  -H "Authorization: Bearer ${ACCESS_TOKEN}" \\
  -d '{
  "example_field": "example_value"
}'
Fetch example
const BASE_URL = process.env.MINBIL_API_BASE_URL ?? "http://localhost:5000";
const API_KEY = process.env.MINBIL_API_KEY ?? "YOUR_API_KEY";
const ACCESS_TOKEN = process.env.MINBIL_WS_ACCESS_TOKEN ?? "YOUR_BEARER_TOKEN";

const response = await fetch(`${BASE_URL}/api/ws/presence`, {
  method: "PUT",
  headers: {
    "Content-Type": "application/json",
    Authorization: `Bearer ${ACCESS_TOKEN}`,
  },
  body: JSON.stringify({
    "example_field": "example_value"
  }),
});

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