API Playground

Operações maduras da API v1 com samples por linguagem

Este playground não inventa endpoints nem tokens de demo. O Try It está ligado apenas ao health público. As restantes operações usam payloads e responses reais como referência de integração.

O Try It está limitado a operações públicas e estáveis que podemos executar de verdade sem depender de segredos ou tenants escondidos.
As operações que exigem installation token ou login continuam documentadas com exemplos concretos e payloads válidos.
A OpenAPI continua a ser a fonte única de contrato; o playground é apenas uma superfície de exploração em cima dela.

Try It result

{
  "ready": true,
  "message": "Execute o health público para validar o contrato ao vivo."
}
GET

Health público

Confirma o estado da plataforma, checks básicos e envelopes operacionais.

https://sandbox.chatbeep.app/api/v1/health · Público

Response example

{
    "success": true,
    "data": {
        "status": "ok",
        "checks": {
            "database": {
                "status": "ok"
            },
            "queue": {
                "status": "ok"
            },
            "storage": {
                "status": "ok"
            }
        }
    },
    "meta": {
        "request_id": "cb_req_123"
    }
}

cURL

curl --request GET \
  --url https://sandbox.chatbeep.app/api/v1/health \
  --header 'accept: application/json'

PHP

<?php

$ch = curl_init('https://sandbox.chatbeep.app/api/v1/health');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Accept: application/json']);

$response = curl_exec($ch);
curl_close($ch);

echo $response;

Laravel

use Illuminate\Support\Facades\Http;

$response = Http::baseUrl('https://sandbox.chatbeep.app/api/v1')->acceptJson()->get('/health');

return $response->json();

JavaScript

const response = await fetch('https://sandbox.chatbeep.app/api/v1/health', { method: 'GET', headers: { Accept: 'application/json' } });
const json = await response.json();
console.log(json);

Node.js

const response = await fetch('https://sandbox.chatbeep.app/api/v1/health', { method: 'GET', headers: { Accept: 'application/json' } });
const json = await response.json();
console.log(json);

.NET

using System.Net.Http;
using System.Text;
using System.Text.Json;

using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://sandbox.chatbeep.app/api/v1/health");
request.Headers.Add("Accept", "application/json");

using var response = await client.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();
Console.WriteLine(json);
GET

Carregar config do widget

Lê branding, greeting, posição, departamentos e estado do widget.

https://sandbox.chatbeep.app/api/v1/widget/config/{token} · Token público da installation

Response example

{
    "success": true,
    "data": {
        "tenant": {
            "name": "Demo Company",
            "widget_color": "#6d5efc",
            "widget_color_secondary": "#0ea5e9",
            "widget_position": "bottom-right"
        }
    }
}

cURL

curl --request GET \
  --url https://sandbox.chatbeep.app/api/v1/widget/config/{token} \
  --header 'accept: application/json'

PHP

<?php

$ch = curl_init('https://sandbox.chatbeep.app/api/v1/widget/config/{token}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Accept: application/json']);

$response = curl_exec($ch);
curl_close($ch);

echo $response;

Laravel

use Illuminate\Support\Facades\Http;

$response = Http::baseUrl('https://sandbox.chatbeep.app/api/v1')->acceptJson()->get('/widget/config/{token}');

return $response->json();

JavaScript

const response = await fetch('https://sandbox.chatbeep.app/api/v1/widget/config/{token}', { method: 'GET', headers: { Accept: 'application/json' } });
const json = await response.json();
console.log(json);

Node.js

const response = await fetch('https://sandbox.chatbeep.app/api/v1/widget/config/{token}', { method: 'GET', headers: { Accept: 'application/json' } });
const json = await response.json();
console.log(json);

.NET

using System.Net.Http;
using System.Text;
using System.Text.Json;

using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://sandbox.chatbeep.app/api/v1/widget/config/{token}");
request.Headers.Add("Accept", "application/json");

using var response = await client.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();
Console.WriteLine(json);
GET

Installation health do widget

Valida domínio, heartbeat, versão e readiness da installation.

https://sandbox.chatbeep.app/api/v1/widget/installations/{token}/health · Token público da installation

Response example

{
    "success": true,
    "data": {
        "installation": {
            "public_key": "inst_demo_public_key",
            "health": "healthy",
            "status": "active"
        }
    }
}

cURL

curl --request GET \
  --url https://sandbox.chatbeep.app/api/v1/widget/installations/{token}/health \
  --header 'accept: application/json'

PHP

<?php

$ch = curl_init('https://sandbox.chatbeep.app/api/v1/widget/installations/{token}/health');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Accept: application/json']);

$response = curl_exec($ch);
curl_close($ch);

echo $response;

Laravel

use Illuminate\Support\Facades\Http;

$response = Http::baseUrl('https://sandbox.chatbeep.app/api/v1')->acceptJson()->get('/widget/installations/{token}/health');

return $response->json();

JavaScript

const response = await fetch('https://sandbox.chatbeep.app/api/v1/widget/installations/{token}/health', { method: 'GET', headers: { Accept: 'application/json' } });
const json = await response.json();
console.log(json);

Node.js

const response = await fetch('https://sandbox.chatbeep.app/api/v1/widget/installations/{token}/health', { method: 'GET', headers: { Accept: 'application/json' } });
const json = await response.json();
console.log(json);

.NET

using System.Net.Http;
using System.Text;
using System.Text.Json;

using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://sandbox.chatbeep.app/api/v1/widget/installations/{token}/health");
request.Headers.Add("Accept", "application/json");

using var response = await client.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();
Console.WriteLine(json);
POST

Criar visitante público

Cria ou atualiza o visitante antes da primeira conversa.

https://sandbox.chatbeep.app/api/v1/widget/visitors · Token público da installation no body

Response example

{
    "success": true,
    "data": {
        "visitor": {
            "uuid": "11111111-1111-4111-8111-111111111111",
            "name": "Visitante Demo",
            "email": "visitante@example.com"
        }
    }
}

cURL

curl --request POST \
  --url https://sandbox.chatbeep.app/api/v1/widget/visitors \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{
    "token": "pub_demo_installation_token",
    "uuid": "11111111-1111-4111-8111-111111111111",
    "name": "Visitante Demo",
    "email": "visitante@example.com"
}'

PHP

<?php

$ch = curl_init('https://sandbox.chatbeep.app/api/v1/widget/visitors');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array (
  'token' => 'pub_demo_installation_token',
  'uuid' => '11111111-1111-4111-8111-111111111111',
  'name' => 'Visitante Demo',
  'email' => 'visitante@example.com',
)));
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Accept: application/json', 'Content-Type: application/json']);

$response = curl_exec($ch);
curl_close($ch);

echo $response;

Laravel

use Illuminate\Support\Facades\Http;

$response = Http::baseUrl('https://sandbox.chatbeep.app/api/v1')->acceptJson()->post('/widget/visitors', array (
  'token' => 'pub_demo_installation_token',
  'uuid' => '11111111-1111-4111-8111-111111111111',
  'name' => 'Visitante Demo',
  'email' => 'visitante@example.com',
));

return $response->json();

JavaScript

const response = await fetch('https://sandbox.chatbeep.app/api/v1/widget/visitors', {
  method: 'POST',
  headers: {
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "token": "pub_demo_installation_token",
    "uuid": "11111111-1111-4111-8111-111111111111",
    "name": "Visitante Demo",
    "email": "visitante@example.com"
}),
});
const json = await response.json();
console.log(json);

Node.js

const response = await fetch('https://sandbox.chatbeep.app/api/v1/widget/visitors', {
  method: 'POST',
  headers: {
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "token": "pub_demo_installation_token",
    "uuid": "11111111-1111-4111-8111-111111111111",
    "name": "Visitante Demo",
    "email": "visitante@example.com"
}),
});
const json = await response.json();
console.log(json);

.NET

using System.Net.Http;
using System.Text;
using System.Text.Json;

using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Post, "https://sandbox.chatbeep.app/api/v1/widget/visitors");
request.Headers.Add("Accept", "application/json");
var payload = @"{
    ""token"": ""pub_demo_installation_token"",
    ""uuid"": ""11111111-1111-4111-8111-111111111111"",
    ""name"": ""Visitante Demo"",
    ""email"": ""visitante@example.com""
}";
request.Content = new StringContent(payload, Encoding.UTF8, "application/json");

using var response = await client.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();
Console.WriteLine(json);
POST

Abrir conversa pública

Abre a conversa, grava a primeira mensagem e dispara o runtime do widget.

https://sandbox.chatbeep.app/api/v1/widget/conversations · Token público da installation no body

Response example

{
    "success": true,
    "data": {
        "conversation": {
            "id": "cb_conv_public_123",
            "status": "waiting"
        }
    }
}

cURL

curl --request POST \
  --url https://sandbox.chatbeep.app/api/v1/widget/conversations \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{
    "token": "pub_demo_installation_token",
    "visitor_uuid": "11111111-1111-4111-8111-111111111111",
    "subject": "Pedido de suporte",
    "message": "Preciso de ajuda"
}'

PHP

<?php

$ch = curl_init('https://sandbox.chatbeep.app/api/v1/widget/conversations');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array (
  'token' => 'pub_demo_installation_token',
  'visitor_uuid' => '11111111-1111-4111-8111-111111111111',
  'subject' => 'Pedido de suporte',
  'message' => 'Preciso de ajuda',
)));
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Accept: application/json', 'Content-Type: application/json']);

$response = curl_exec($ch);
curl_close($ch);

echo $response;

Laravel

use Illuminate\Support\Facades\Http;

$response = Http::baseUrl('https://sandbox.chatbeep.app/api/v1')->acceptJson()->post('/widget/conversations', array (
  'token' => 'pub_demo_installation_token',
  'visitor_uuid' => '11111111-1111-4111-8111-111111111111',
  'subject' => 'Pedido de suporte',
  'message' => 'Preciso de ajuda',
));

return $response->json();

JavaScript

const response = await fetch('https://sandbox.chatbeep.app/api/v1/widget/conversations', {
  method: 'POST',
  headers: {
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "token": "pub_demo_installation_token",
    "visitor_uuid": "11111111-1111-4111-8111-111111111111",
    "subject": "Pedido de suporte",
    "message": "Preciso de ajuda"
}),
});
const json = await response.json();
console.log(json);

Node.js

const response = await fetch('https://sandbox.chatbeep.app/api/v1/widget/conversations', {
  method: 'POST',
  headers: {
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "token": "pub_demo_installation_token",
    "visitor_uuid": "11111111-1111-4111-8111-111111111111",
    "subject": "Pedido de suporte",
    "message": "Preciso de ajuda"
}),
});
const json = await response.json();
console.log(json);

.NET

using System.Net.Http;
using System.Text;
using System.Text.Json;

using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Post, "https://sandbox.chatbeep.app/api/v1/widget/conversations");
request.Headers.Add("Accept", "application/json");
var payload = @"{
    ""token"": ""pub_demo_installation_token"",
    ""visitor_uuid"": ""11111111-1111-4111-8111-111111111111"",
    ""subject"": ""Pedido de suporte"",
    ""message"": ""Preciso de ajuda""
}";
request.Content = new StringContent(payload, Encoding.UTF8, "application/json");

using var response = await client.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();
Console.WriteLine(json);
POST

Login mobile do operador

Emite bearer token para clientes mobile e backend tooling autorizado.

https://sandbox.chatbeep.app/api/v1/mobile/login · Credenciais do operador

Response example

{
    "success": true,
    "data": {
        "token": "cbp_demo_bearer_token",
        "token_type": "Bearer"
    }
}

cURL

curl --request POST \
  --url https://sandbox.chatbeep.app/api/v1/mobile/login \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{
    "email": "operator@example.com",
    "password": "SUA_PASSWORD",
    "device_name": "sandbox-cli"
}'

PHP

<?php

$ch = curl_init('https://sandbox.chatbeep.app/api/v1/mobile/login');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array (
  'email' => 'operator@example.com',
  'password' => 'SUA_PASSWORD',
  'device_name' => 'sandbox-cli',
)));
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Accept: application/json', 'Content-Type: application/json']);

$response = curl_exec($ch);
curl_close($ch);

echo $response;

Laravel

use Illuminate\Support\Facades\Http;

$response = Http::baseUrl('https://sandbox.chatbeep.app/api/v1')->acceptJson()->post('/mobile/login', array (
  'email' => 'operator@example.com',
  'password' => 'SUA_PASSWORD',
  'device_name' => 'sandbox-cli',
));

return $response->json();

JavaScript

const response = await fetch('https://sandbox.chatbeep.app/api/v1/mobile/login', {
  method: 'POST',
  headers: {
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "email": "operator@example.com",
    "password": "SUA_PASSWORD",
    "device_name": "sandbox-cli"
}),
});
const json = await response.json();
console.log(json);

Node.js

const response = await fetch('https://sandbox.chatbeep.app/api/v1/mobile/login', {
  method: 'POST',
  headers: {
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "email": "operator@example.com",
    "password": "SUA_PASSWORD",
    "device_name": "sandbox-cli"
}),
});
const json = await response.json();
console.log(json);

.NET

using System.Net.Http;
using System.Text;
using System.Text.Json;

using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Post, "https://sandbox.chatbeep.app/api/v1/mobile/login");
request.Headers.Add("Accept", "application/json");
var payload = @"{
    ""email"": ""operator@example.com"",
    ""password"": ""SUA_PASSWORD"",
    ""device_name"": ""sandbox-cli""
}";
request.Content = new StringContent(payload, Encoding.UTF8, "application/json");

using var response = await client.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();
Console.WriteLine(json);