You can use the API to get or set account information.

If you created your Zendesk Chat account in Zendesk Support, access to the Chat Accounts and Agents APIs is restricted to GET requests. You can still use the other Chat APIs normally.

JSON Format

Accounts are represented as JSON objects with the following properties:

Name Type Read-only Mandatory Description
account_key string true false The widget key for the account
billing object false false The billing information of the account (only available to the owner of the account)
create_date string true false The date of creation of the account
plan object true false Information about the package of the account
status string true false The status of the account

Example

{  "account_key": "zendesk-chat-account-key",  "billing": {},  "create_date": "2014-08-06T11:02:09Z",  "plan": {},  "status": "active"}

Show Account

  • GET /api/v2/account

Shows all the information about your account.

Allowed for

  • Owner
  • Admin

Using curl

curl https://www.zopim.com/api/v2/account \  -v -u {email_address}:{password}

Example Response

Status 200 OK
{  "account_key": "zendesk-chat-account-key",  "billing": {    "additional_info": "",    "address1": "123 Fictional Street",    "address2": "",    "city": "West Fiction",    "company": "John and Friends",    "country_code": "US",    "cycle": 1,    "email": "[email protected]",    "first_name": "Jonathan",    "last_name": "Doe",    "phone": "+12(1)123456",    "postal_code": "12345",    "state": "Oklahoma"  },  "create_date": "2014-08-06T11:02:09Z",  "plan": {    "analytics": false,    "file_upload": true,    "integrations": true,    "long_desc": "Ideal for most Lean Teams to Engage Customers.",    "max_advanced_triggers": 2,    "max_agents": 2,    "max_basic_triggers": 2,    "max_concurrent_chats": "unlimited",    "max_departments": 2,    "max_history_search_days": "unlimited",    "name": "team",    "operating_hours": false,    "short_desc": "Great for Lean Teams",    "weekly_reports": false,    "widget_customization": "full"  },  "status": "active"}

Update Account

  • PUT /api/v2/account

Updates the details of your account.

Allowed for

  • Owner

Example Body

{  "billing": {    "email": "[email protected]",    "first_name": "John"  }}

Using curl

curl https://www.zopim.com/api/v2/account \  -d '{"billing": {"email": "[email protected]", "first_name": "John"}}' \  -v -u {email_address}:{password} \  -X PUT -H "Content-Type: application/json"

Example Response

Status 200 OK
{  "account_key": "zendesk-chat-account-key",  "billing": {    "first_name": "John",    "last_name": "[email protected]"  },  "create_date": "2014-08-06T11:02:09Z",  "plan": {    "file_upload": true  },  "status": "active"}