{"success":true,"message":"Rubix API","version":"1.0.0","endpoints":{"sip":{"GET \/api\/sip?action=free":"Get free available SIPs","GET \/api\/sip?action=status&sip=1001":"Get SIP status","POST \/api\/sip":"Forward or transfer calls"},"inbound":{"GET \/api\/inbound?action=available-agents&caller=0041582352422":"Get available agents for inbound call forwarding"},"outbound":{"GET \/api\/outbound?action=available-agents":"Get available agents for outbound call forwarding"},"objective-form":{"GET \/api\/objective-form?action=form-types":"Get available form types","GET \/api\/objective-form?action=form-structure&form_type=49":"Get form structure by type","GET \/api\/objective-form?action=check-existing-form&form_type=42&sip=916":"Check if phone number already has a completed form for the given form type","GET \/api\/objective-form?action=search-client-termin&country_code=0041&number=791234567&postal_code=8000":"Self-service: find termin + client_data by mobile (no live call)","GET \/api\/objective-form?action=get-by-termin&termin_id=12345":"Read one termin client_data (same fields as PATCH)","GET \/api\/objective-form?action=termin-states":"List objective states (cancel_button vs postponed)","POST \/api\/objective-form action=cancel-termin":"Cancel termin like the form state button + reason","POST \/api\/objective-form action=move-termin":"Move meeting date like the form Date\/Time postpone path","POST \/api\/objective-form action=approve-termin":"Approve a termin from the Inbox like Submit on the form (state stays)","POST \/api\/objective-form action=reactivate-termin":"Cancelled termin back to a positive state (default 1 Active) + reason","POST \/api\/objective-form action=return-to-agent":"Return objective to agent with a reason (agent message panel), state stays","POST \/api\/objective-form?action=submit-form":"Submit form data (full submission)","POST \/api\/objective-form?action=validate-form":"Validate form data","PATCH \/api\/objective-form":"Update existing form data incrementally (requires termin_id)"},"disposition":{"GET \/api\/disposition?action=get-dispositions&sip=100":"Get dispositions by SIP","POST \/api\/disposition?action=change-disposition":"Change disposition for a client"},"datetime":{"GET \/api\/datetime":"Get current date\/time in UTC","GET \/api\/datetime?timezone=Europe\/Zurich":"Get current date\/time in Zurich timezone","GET \/api\/datetime?action=timezone&timezone=Europe\/Zurich":"Get Zurich timezone information"},"ai-agent-settings":{"GET \/api\/ai-agent-settings":"Get all active agent settings","GET \/api\/ai-agent-settings?active_only=1":"Get only active agent settings","GET \/api\/ai-agent-settings?action=get-by-name&agent_name=Michaela":"Get settings for specific agent","GET \/api\/ai-agent-settings?action=check-demo-sip&sip=888":"Whether this human SIP has user.demo_agent=yes","POST \/api\/ai-agent-settings?action=demo-level":"Body {sip, lead_id, call_id}: level of a new DemoClient call (LEICHT \/ MITTEL \/ ANSPRUCHSVOLL, shuffle bag per SIP), saved in demo_client_level"},"dialer-form-assistant":{"GET \/api\/dialer-form-assistant?action=form-schema&termin_type_id=1":"Get dialer_termin_2026 field schema","GET \/api\/dialer-form-assistant?action=suggestions&sip=916":"Poll AI field suggestions for right panel","GET \/api\/dialer-form-assistant?action=session&sip=916":"Get active copilot session","POST \/api\/dialer-form-assistant":"start-session, store-suggestions, apply-suggestion, dismiss-suggestion, end-session"},"free-call":{"GET \/api\/free-call?action=actions":"List POST actions (call\/stop)","GET \/api\/free-call?action=countries":"List call country codes","GET \/api\/free-call?action=formulars&sip=1001":"List Formular select options for agent SIP (termin_type_id)","GET \/api\/free-call?action=search-termin&sip=1001&country_code=0041&number=791234567&termin_type_id=25":"Check if client already has termin","GET \/api\/free-call?action=call-history&sip=1001&country_code=0041&number=791234567":"Successful client call list","GET \/api\/free-call?action=status&sip=1001":"Agent free-call \/ softphone status","POST \/api\/free-call":"Start or stop free call (action=call|stop; termin_type_id from formulars)"},"call-status":{"GET \/api\/call-status":"Live Call Status Monitor (same as agent_status.php)","GET \/api\/call-status?action=filters":"List Call Status filter options","GET \/api\/call-status?work_status=start&group_id=19&call_type=TALKING":"Filter like the Call Status panel"},"objective-monitor":{"GET \/api\/objective-monitor":"Live Objective Monitor board (same as turbo_monitoring_new.php)","GET \/api\/objective-monitor?action=filters":"List Objective Monitor filter options","GET \/api\/objective-monitor?date=2026-09-12&group_id=19&termin_type_id=42&sentiment=positive":"Same header filters as the Objective Monitor panel"},"ai-usage":{"POST \/api\/ai-usage":"Body {rows: [{feature, model, requests, input_tokens, cached_input_tokens, output_tokens, reasoning_tokens, audio_input_tokens, audio_output_tokens, audio_seconds, lc_id, lead_id, agent_sip, ref}]} (permission ai_agent_settings)"},"ai-conversations":{"GET \/api\/ai-conversations?date_from=2026-09-29&date_to=2026-09-29&sip=241":"AI agent calls list (same as ai_agent_monitor.php; max 7 days)","GET \/api\/ai-conversations?agent_name=DialerFormAssistant-TX&include_transcript=1":"Filter by AI agent and embed transcripts","GET \/api\/ai-conversations\/{call_id}":"One call: transcript, tool calls, suggestions, audio_url (also ?action=conversation&call_id=)","GET \/api\/ai-conversations\/agents":"AI agents and SIPs with calls in the range (default last 7 days)"},"call-counting":{"GET \/api\/call-counting?group_id=19&include_usage=1":"Agents with daily dialer \/ free call limits (same as counting_calling_and_stopping.php)","GET \/api\/call-counting\/{sip}":"One agent: limits plus today's calls and whether dialer \/ free call is blocked","POST \/api\/call-counting\/{sip}":"Change one agent (active, dialer_limit, free_call_limit, termin_limit, time_ranges)","POST \/api\/call-counting":"Change many agents at once (sips or group_id)"},"agent-calls":{"GET \/api\/agent-calls?date_from=2026-10-06 08:00&date_to=2026-10-06 18:00":"Agents Calls search (same as agent_daily_calls.php): calls + Call \/ Disposition statistic","GET \/api\/agent-calls?date_from=2026-10-01&date_to=2026-10-06&group_id=19&call_type=dialer_outbound&disposition=3&client_ping_detection=no&talk_over=30":"Same filters as the panel (agent\/group, country, region, campaign, device, call type, disposition, ping, talk over)","GET \/api\/agent-calls?display=statistic&date_from=2026-10-06":"Only the statistic (Display only statistic)","GET \/api\/agent-calls?date_from=2026-10-01&date_to=2026-10-19&demo_only=1":"Demo only: returns only training calls of demo agents","GET \/api\/agent-calls\/filters":"Options for every filter (groups, agents, countries, regions, campaigns, dispositions, ...)"},"agents":{"GET \/api\/agents?group_id=19&active=true&search=Muster":"Agent accounts in the key's groups (name, email, username, group, active)","GET \/api\/agents\/groups":"Groups this key can see and move agents to","GET \/api\/agents\/{sip}":"One agent account","POST \/api\/agents\/{sip}":"Change any of: realname, lastname, email, username, password, sip_password (Bria), group_id, active","POST \/api\/agents\/{sip}\/photo":"Upload the profile picture (multipart \"photo\" or JSON photo_base64, JPG\/PNG, max 5 MB), replaces the old one","DELETE \/api\/agents\/{sip}\/photo":"Remove the profile picture (back to the default)","GET \/api\/agents\/objective-types":"Termin types of the Objective fill permission checkboxes","GET \/api\/agents\/objective-permissions?type_ids=42,52&group_id=19":"Objective fill permission of the agents for the termin types asked for","POST \/api\/agents\/{sip}\/objective-permissions":"Tick \/ untick termin types, body {\"permissions\": {\"42\": true, \"52\": false}}"},"objectives":{"GET \/api\/objectives?view=inbox":"Inbox: termine submitted by agents and not processed yet","GET \/api\/objectives?view=not_exported&created_from=2026-10-01&created_to=2026-10-31&group_id=27":"Not exported termine (max 31 days per range, 500 per page)","GET \/api\/objectives?view=exported&exported_from=2026-10-01&exported_to=2026-10-31&company_id=49":"Exported termine","GET \/api\/objectives?updated_since=2026-10-16 08:00":"Termine changed since a time (max 7 days back)","GET \/api\/objectives\/{id}":"One termin with form data, recording, exports and state history","GET \/api\/objectives\/email-templates":"Customer email templates (ids for template_id, e.g. 74 = Sentinel mail)","GET \/api\/objectives\/emails?ids=725130,725157&template_id=74":"Customer emails that were really sent for these termine","GET \/api\/objectives\/verification\/{code}?termin_id=512345":"Termin of a confirmation link security code (OBJECTIVE_SECURITY_CODE), for the opticheck verifizierung page","GET \/api\/contacts\/{lead_id}\/calls?days=30":"Calls with the contact with recordings, incl. free calls (default 30, max 90 days)","GET \/api\/companies":"Companies","GET \/api\/statuses":"Objective states, termin types and views","GET \/api\/objective-stats?date=2026-10-15&by_hour=1":"Objective monitor KPIs (AS, AC, HT, ATS, ...) for one day","GET \/api\/objectives\/{id}\/export-options":"Companies this termin can be exported to (Objectives read + write)","POST \/api\/objectives\/{id}\/export":"Export to one company like the panel button, body {company_id} (Objectives read + write)","DELETE \/api\/objectives\/{id}\/export\/{company_id}":"Undo the export, termin goes back to Not exported (Objectives read + write)"},"quality_monitoring":{"GET \/api\/quality-monitoring?date=2026-10-21":"Who listened to \/ whispered to which agent that day: sessions and seconds per admin and agent, and every session","GET \/api\/quality-monitoring?date=2026-10-21&admin_sip=3014&sip=808":"One admin, one agent"},"calls":"Call management (coming soon)","campaigns":"Campaign management (coming soon)","auth":"Authentication & token management"},"authentication":{"methods":["Bearer Token"],"headers":["Authorization: Bearer <token>"],"description":"Use your API token as Bearer token in Authorization header"},"documentation":{"swagger_ui":"\/api\/docs","swagger_json":"\/api\/docs\/swagger.json","interactive_testing":true},"timestamp":"2026-11-06 03:58:56"}