Skip to main content
POST
/
test
{
  "input": "check"
}
{
  "success": true,
  "message": "API token is valid"
}

Authentication

All requests require Bearer token authentication. Get your API token from the Developer Portal
input
string
default:"check"
required
Enter check to test
{
  "input": "check"
}
curl -X POST https://api.toughtongueai.com/api/public/test \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"input": "check"}'
{
  "success": true,
  "message": "API token is valid"
}

Endpoints

Scenarios

MethodEndpointDescription
GET/scenariosList all scenarios
POST/scenariosCreate scenario
GET/scenarios/{id}Get scenario
PATCH/scenarios/{id}Update scenario
DELETE/scenarios/{id}Delete scenario
GET/featured-scenariosList featured (public)

Sessions

MethodEndpointDescription
GET/sessionsList sessions
GET/sessions/{id}Get session details
POST/sessions/analyzeTrigger analysis
POST/v2/sessionsCreate session

Miscellaneous Utilities

MethodEndpointDescription
POST/testTest API token
GET/balanceCheck wallet balance

Errors

In case of an error from any of the API endpoints, the response will contain error and details fields. It shall also be accompanied with appropriate HTTP status codes.
CodeMeaning
400Bad request
401Invalid token
403Forbidden
404Not found
429Rate limited
500Server error
{
  "error": "Error message",
  "details": {}
}