# Accounts

The accounts you have access to.

# The account object

  • id integer

    The system-generated ID of the account.

  • name string

    The name of the account.

  • realtime_channel string

    The channel where realtime communication are sent for the account.

  • next_conversation_number integer

    The incremental conversation number for the account.

  • default_sites_domain string

    The default domain used to serve knowledge base sites.

  • default_locale string

    The default language for the account. This language is used to automatically determine the translation's source locale and to redirect users to this locale if no language were specified when visiting a knowledge base site.

  • languages array of languages expandable

    The list of languages enabled for the account.

# The account object

{
  "id": 1,
  "name": "Jane Doe's Account",
  "realtime_channel": "account.1",
  "next_conversation_number": 21,
  "default_sites_domain": "example.org",
  "default_locale": "en-US",
  "languages": [
    {
      "id": 1,
      "name": "English",
      "native": "English (US)",
      "code": "en-US",
    }
  ]
}

# Create a account

  • name string required

    The name of the account.

  • next_conversation_number integer optional, default=1

    The incremental conversation number for the account.

# Sample request

curl https://www.yourdomain.com/api/v1/accounts \
  --request POST \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <access-token>" \
  -d name="ACME, LLC"

# Sample successful response

{
  "data": {
    "id": 1,
    "name": "ACME, LLC",
    "realtime_channel": "account.1",
    "next_conversation_number": 1,
    "default_sites_domain": "example.org",
    "default_locale": "en-US",
    "languages": [
      {
        "id": 1,
        "name": "English",
        "native": "English (US)",
        "code": "en-US",
      }
    ]
  }
}

# Update a account

  • name string required

    The name of the account.

  • next_conversation_number integer optional

    The incremental conversation number for the account.

# Sample request

curl https://www.yourdomain.com/api/v1/accounts/1 \
  --request PUT \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <access-token>" \
  -d name="ACME, LLC"

# Sample successful response

{
  "data": {
    "id": 1,
    "name": "ACME, LLC",
    "realtime_channel": "account.1",
    "next_conversation_number": 1,
    "default_sites_domain": "example.org",
    "default_locale": "en-US",
    "languages": [
      {
        "id": 1,
        "name": "English",
        "native": "English (US)",
        "code": "en-US",
      }
    ]
  }
}

# Delete a account

curl https://www.yourdomain.com/api/v1/accounts/1 \
  --request DELETE
  -H "Accept: application/json" \
  -H "Authorization: Bearer <access-token>"

If successful, the above request will return an empty response with 204 HTTP status code.