Zora Support

Zora Support/Docs

PHP API

PHP helper functions for users, conversations, and agents when integrating Zora Support from PHP applications.

The PHP API exposes function-style helpers (for example sb_get_user(), sb_add_user()) for applications that already run PHP and need to talk to Zora Support without hand-writing every HTTP call.

Cloud note: Prefer the Web API from any language when you only need HTTPS access to your cloud workspace. Use PHP helpers when you maintain a PHP app that includes the documented Zora PHP client libraries.

Setup

  1. Include the PHP API bootstrap provided for your integration.
  2. Authenticate with an admin token or the documented cloud credentials.
  3. Call helpers; they return arrays/objects mirroring the Web API payloads.

Users

| Function | Purpose | | --- | --- | | sb_login() / sb_logout() | Session helpers | | sb_get_active_user() / sb_get_active_user_ID() | Current user | | sb_get_user() / sb_get_user_by() | Lookup | | sb_get_users() / sb_get_new_users() / sb_get_online_users() | Lists | | sb_search_users() | Search | | sb_add_user() / sb_add_user_and_login() | Create (+ optional login) | | sb_update_user() / sb_update_user_value() | Update fields | | sb_delete_user() / sb_delete_users() / sb_delete_leads() | Removal | | sb_is_online() / sb_is_user_online() | Presence | | sb_get_avatar() / sb_get_bot_ID() | Media / bot IDs | | sb_password_verify() | Credential checks when applicable |

Agents

Helpers under the agents section cover listing agents, checking online agents, and related admin operations—mirroring Web API agent endpoints. Use them to assign conversations or display availability in a custom PHP portal.

Conversations and messages

PHP wrappers typically include create/list/update conversation helpers and send/update/delete message helpers with the same names as the Web API (sb_new_conversation, sb_send_message, and similar). Treat the Web API method table as the canonical catalog of capabilities; PHP names follow the sb_snake_case convention.

Example: create a user

$user = sb_add_user([
  'first_name' => 'Ada',
  'last_name' => 'Lovelace',
  'email' => 'ada@example.com',
]);

Always validate input in your app before calling the API, and never expose admin tokens to the browser.

Related