Skip to content

API reference

Account

Your WeGuard account: plan, license usage, enabled platforms and the labels of the device tag slots.

Every API key belongs to exactly one account, so this endpoint always returns the account that owns the calling key. If you only need to know which account a key belongs to, call GET /v1/me. It needs no scope.

The account object

id
string
Account id.
object
string
Always account.
name
stringnullable
Company name of the account.
state
stringnullable
Subscription state. null for internal test accounts and states not listed here.
One oflivetrialdemo
plan
stringnullable
Name of the feature plan as shown in the console, for example Enterprise. This is free text, not a fixed set. null if no plan is assigned.
licenses
object
License usage.
licenses.purchased
integernullable
Number of device licenses purchased. null when no purchased count is recorded for the account.
licenses.provisionedDevices
integernullable
Number of enrolled devices. This counter is refreshed periodically, so it is not a live count.
licenses.unprovisionedDevices
integernullable
Number of device records created but not yet enrolled. This counter is refreshed periodically, so it is not a live count.
licenseValidFrom
timestampnullable
Start of the license period.
licenseValidUntil
timestampnullable
End of the license period.
trialEndsAt
timestampnullable
End of the trial period. null unless state is trial.
platforms
array of strings
Device platforms enabled for the account. ios means Apple device management is enabled, which also covers Macs (macos) and Apple TVs (tvos).
Each item is one ofandroidiosmacostvoswindows
mfaRequired
boolean
true when multi-factor sign-in is enforced for the account’s console users.
tagLabels
object
The names the account gave its device tag slots in the console, for example {"tag6": "Region"}. Use them to label the values in a device’s tags. Admins can label slots tag6 to tag9 in the console. Slots without a label, or still showing the console’s “Tag N” placeholder, are omitted, so the object can be empty.
createdAt
timestamp
When the account was created.
Example
{
  "id": "5f1d7c0e9b1e8a3f2c4d6e8a",
  "object": "account",
  "name": "Acme Logistics",
  "state": "live",
  "plan": "Enterprise",
  "licenses": {
    "purchased": 500,
    "provisionedDevices": 312,
    "unprovisionedDevices": 14
  },
  "licenseValidFrom": "2026-01-01T00:00:00Z",
  "licenseValidUntil": "2026-12-31T23:59:59Z",
  "trialEndsAt": null,
  "platforms": [
    "android",
    "ios",
    "windows"
  ],
  "mfaRequired": true,
  "tagLabels": {
    "tag6": "Region",
    "tag7": "Cost centre"
  },
  "createdAt": "2024-05-02T10:11:12Z"
}

Retrieve the account

GET/v1/account
Requiresaccount:read

Returns the account that owns the API key. This endpoint takes no parameters.

Example request

curl https://api-gw.weguard.ai/core/v1/account \
  -H "Authorization: Bearer $WEGUARD_API_KEY"

Response

Returns an account object.

200 OK
{
  "id": "5f1d7c0e9b1e8a3f2c4d6e8a",
  "object": "account",
  "name": "Acme Logistics",
  "state": "live",
  "plan": "Enterprise",
  "licenses": {
    "purchased": 500,
    "provisionedDevices": 312,
    "unprovisionedDevices": 14
  },
  "licenseValidFrom": "2026-01-01T00:00:00Z",
  "licenseValidUntil": "2026-12-31T23:59:59Z",
  "trialEndsAt": null,
  "platforms": [
    "android",
    "ios",
    "windows"
  ],
  "mfaRequired": true,
  "tagLabels": {
    "tag6": "Region",
    "tag7": "Cost centre"
  },
  "createdAt": "2024-05-02T10:11:12Z"
}

Errors

Common errors

Besides the errors listed for each endpoint, any request can fail authentication, exceed the rate limit, ask for a format other than JSON, or fail with a server error. See Errors for the response format and retry guidance.

  • The request has no Authorization header.

  • The Authorization header does not use the Bearer scheme, or has no key after it. The WWW-Authenticate header carries error="invalid_request".

  • The key is malformed, does not exist, or its secret does not match. The WWW-Authenticate header carries error="invalid_token".

  • The key is past its expiresAt.

  • An account admin revoked the key. Revocation takes effect immediately and cannot be undone.

  • The WeGuard account that owns the key has been deleted or disabled.

  • The Accept header excludes JSON.

  • The key has used up its request budget. See Rate limits.

  • An unexpected error occurred on our side.

  • A service WeGuard depends on is temporarily unavailable, or reading the data took longer than the time WeGuard allows for it. This can also happen while your key is being checked, so it can be returned before authentication completes. The response carries Retry-After.

We use cookies

We use cookies to ensure you get the best experience on our website. For more information on how we use cookies, please see our cookie policy.

By clicking "Accept", you agree to our use of cookies.

Learn more