Authentication

Learn how to authenticate your API requests.

API Keys

All API requests require authentication using an API key. Include your key in the Authorization header:

Authorization Header
1Authorization: Bearer sk_live_your_api_key_here

Environment Keys

sk_live_*

Production keys for live environment

sk_test_*

Sandbox keys for development and testing

Example Request

authenticated-request.js
1const response = await fetch("https://api.watheeq.app/v1/documents", {
2 method: "POST",
3 headers: {
4 "Authorization": "Bearer sk_live_your_api_key",
5 "Content-Type": "application/json"
6 },
7 body: JSON.stringify({
8 subjectName: "Test User",
9 category: "test_certificate"
10 })
11});
12
13if (response.status === 401) {
14 console.error("Invalid API key");
15}