Skip to content

Ping Tier 3

GET/api/pingCopied!

Checks whether the API key is valid and returns the workspace bound to that key.

Example

ts
const ping = await client.ping();
bash
youvico auth ping
bash
curl 'https://api.youvico.com/api/ping' \
  -H 'Authorization: Bearer YOUR_API_KEY'
json
{
  "data": {
    "PONG": true,
    "workspace": {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "name": "Acme Inc.",
      "avatarUrl": "https://cdn.youvico.com/workspaces/acme/avatar.avif"
    }
  }
}

Request

No parameters.

Response

Returns 200 OK.

dataobject
Ping result
data.PONGboolean
Whether API key authentication succeeded

Example: true

data.workspaceobject
Workspace bound to the API key
data.workspace.idstring
Workspace ID

Example: a1b2c3d4-e5f6-7890-abcd-ef1234567890

data.workspace.namestring
Workspace name

Example: Acme Inc.

data.workspace.avatarUrlstring?
Workspace avatar URL

Example: https://cdn.youvico.com/workspaces/acme/avatar.avif