VarisDocs
Dashboard

Overview

Every endpoint of the Varis API, with the credential each one takes.

The base URL is

https://api.usevaris.com

Requests and responses are JSON.

Endpoints

EndpointDescriptionCredential
POST /v1/invokeAPIInvoke a serviceAgent key
GET /v1/servicesAPISearch published servicesEither
GET /v1/services/{service_id}APIGet a serviceEither
POST /v1/servicesAPIPublish a serviceDevice token
PATCH /v1/services/{service_id}APIUpdate your own serviceDevice token
POST /v1/cli/device/codeAPIStart a CLI sign-inNone
POST /v1/cli/device/tokenAPICollect a CLI sign-in's tokenNone
POST /v1/cli/logoutAPISign this machine out of the CLIDevice token
GET /v1/me/ownersAPIList the owners you belong toDevice token
GET /.well-known/varis-signing-keysAPIList signing keysNone

Authentication

Send the credential in the Authorization: Bearer header.

  • Agent key (var_ak_...): invokes services and spends from its owner's balance. Create one in the dashboard.
  • Device token (var_dt_...): identifies a developer signed in with varis login. Send it with X-Varis-Owner-Identifier, set to the owner you're acting for, to publish and update that owner's services. A device token never invokes and never spends.

If you send a valid credential of the wrong kind, the API returns 403, not 401.

Errors

Every error has the same body:

{
  "error": {
    "code": "insufficient_funds",
    "message": "The balance does not cover this call."
  },
  "request_id": "var_req_fc8e8702-6a7f-4f3f-9147-748936e5fee1"
}

Branch on error.code, not on message, whose wording can change. Quote request_id in support requests. Each endpoint's page lists the errors it can return.