Skip to content
Getting Started

Quickstart

Make your first Vitable API call and embed the Employee Dashboard in under 5 minutes.

Contact us to receive your API key and base URL.

Verify your credentials by listing employers on your account:

Terminal window
curl -X GET https://api.vitablehealth.com/v1/employers \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
import requests
response = requests.get(
"https://api.vitablehealth.com/v1/employers",
headers={"Authorization": "Bearer YOUR_API_KEY"},
)
print(response.json())
const response = await fetch("https://api.vitablehealth.com/v1/employers", {
headers: { Authorization: "Bearer YOUR_API_KEY" },
})
const data = await response.json()
console.log(data)

You should get back a JSON response with your employers list. If you see 200 OK, your credentials are working.

Install the SDK and drop the widget into your React app:

Terminal window
npm install @vitable/connect
import { VitableConnectProvider, EmployeeViewWidget } from "@vitable/connect/react"
import type { AccessTokenResponse } from "@vitable/connect/react"
async function fetchToken(): Promise<AccessTokenResponse> {
const res = await fetch("https://my.backend.com/api/token", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ employee_id: "empl_abc123" }),
})
if (!res.ok) throw new Error(`Token fetch failed: ${res.status}`)
const data = await res.json()
return { token: data.token, expiresIn: data.expiresIn }
}
export default function App() {
return (
<VitableConnectProvider
baseUrl="https://widget.vitablehealth.com"
fetchToken={fetchToken}
>
<EmployeeViewWidget height="800px" />
</VitableConnectProvider>
)
}