API reference
A broker between wearable data and AI agents. Ask a question; receive a small computed context packet at the level the user's grant allows. Developer requests are signed: HMAC-SHA256 over timestamp\nnonce\nMETHOD\npath\nsha256(body) with your signing secret, a single-use nonce and a 300-second window.
| Base URL | https://api.askwearables.app |
| Version | AskWearables API 1.0.0, OpenAPI 3.1.0 |
| Authentication | An OAuth access token for an agent, or an API key: aw_own_ (owner), aw_dev_ (developer), aw_sync_ (device sync). |
| Machine-readable | openapi.json |
Each endpoint lists the credentials that can call it. Errors and gate decisions are described in the overview, and the packet in packets and levels.
Endpoints
POST /v1/ask
Ask a question in plain language
operationId askOAuth tokenaw_dev_ (signed)signed for developer keys
Parameters
| Name | In | Type | Notes |
|---|
X-AskWearables-User | header | string | Developer keys: your end user's external id. |
|---|
With a developer key, also send X-AskWearables-Timestamp, X-AskWearables-Nonce and X-AskWearables-Signature; see signing.
Request body required
| Field | Type | Notes |
|---|
question required | string | min length 3; max length 500 |
|---|
purpose | string | Recorded, never used: the purpose is fixed in the grant. |
|---|
Responses
POST /v1/query
Run a QuerySpec directly (agents: gated; owner keys: level 3)
operationId queryOAuth tokenaw_dev_ (signed)aw_own_ (level 3)signed for developer keys
Parameters
| Name | In | Type | Notes |
|---|
X-AskWearables-User | header | string | Developer keys: your end user's external id. |
|---|
With a developer key, also send X-AskWearables-Timestamp, X-AskWearables-Nonce and X-AskWearables-Signature; see signing.
Request body required
Responses
GET /v1/capabilities
Metrics, operations, levels and this agent's grant
operationId capabilitiesOAuth tokenaw_dev_ (signed)signed for developer keys
Parameters
| Name | In | Type | Notes |
|---|
X-AskWearables-User | header | string | Developer keys: your end user's external id. |
|---|
With a developer key, also send X-AskWearables-Timestamp, X-AskWearables-Nonce and X-AskWearables-Signature; see signing.
Responses
| Status | Description | Body |
|---|
| 200 | OK | object |
|---|
GET /v1/packets/{packet_id}
A packet this agent received in the last 24 hours
operationId getPacketOAuth tokenaw_dev_ (signed)signed for developer keys
Parameters
| Name | In | Type | Notes |
|---|
packet_id required | path | string | |
|---|
X-AskWearables-User | header | string | Developer keys: your end user's external id. |
|---|
With a developer key, also send X-AskWearables-Timestamp, X-AskWearables-Nonce and X-AskWearables-Signature; see signing.
Responses
| Status | Description | Body |
|---|
| 200 | OK | Packet |
|---|
| 404 | Not found | object |
|---|
GET /v1/receipts
Owner: receipts, newest first, with chain verification
operationId receiptsaw_own_
Parameters
| Name | In | Type | Notes |
|---|
limit | query | integer | |
|---|
before | query | integer | |
|---|
Responses
| Status | Description | Body |
|---|
| 200 | OK | object |
|---|
POST /v1/grants
Developer: a one-time link to the hosted consent screen for your user
operationId createGrantLinkaw_dev_signed for developer keys
Parameters
| Name | In | Type | Notes |
|---|
X-AskWearables-User | header | string | Developer keys: your end user's external id. |
|---|
With a developer key, also send X-AskWearables-Timestamp, X-AskWearables-Nonce and X-AskWearables-Signature; see signing.
Request body required
GrantRequest
Responses
| Status | Description | Body |
|---|
| 200 | OK | url, expires_in |
|---|
DELETE /v1/grants/{grant_id}
Owner: revoke a grant
operationId revokeGrantaw_own_
Parameters
| Name | In | Type | Notes |
|---|
grant_id required | path | string | |
|---|
Responses
| Status | Description | Body |
|---|
| 200 | OK | object |
|---|
POST /v1/users
Developer: register an end user by your own id
operationId createUseraw_dev_
Request body required
| Field | Type | Notes |
|---|
external_id required | string | |
|---|
tz | string | |
|---|
Responses
| Status | Description | Body |
|---|
| 200 | OK | object |
|---|
POST /v1/ingest
Push normalized records (sync keys, owner keys, developer keys)
operationId ingestaw_dev_aw_own_aw_sync_
Parameters
| Name | In | Type | Notes |
|---|
X-AskWearables-User | header | string | Developer keys: your end user's external id. |
|---|
Request body required
| Field | Type | Notes |
|---|
source | object | |
|---|
records | object[] | max items 2000 |
|---|
Responses
| Status | Description | Body |
|---|
| 200 | OK | object |
|---|
GET /v1/usage
Developer: calls, packets and denials per day
operationId usageaw_dev_
Responses
| Status | Description | Body |
|---|
| 200 | OK | any[] |
|---|
GET /v1/export
Owner: export everything
operationId exportaw_own_
Responses
| Status | Description | Body |
|---|
| 200 | OK | object |
|---|
Schemas
QuerySpec
| Field | Type | Notes |
|---|
metrics required | string[] | one of steps, active_energy, resting_hr, heart_rate, hrv_rmssd, hrv_sdnn, sleep_duration, sleep_efficiency, sleep_stages, spo2, respiratory_rate, skin_temp_deviation, vo2max, weight, workout; min items 1; max items 2 |
|---|
operation required | string | one of latest, aggregate, trend, compare_to_baseline, compare_periods, threshold_check, correlate, list_sessions |
|---|
window required | object | no other keys |
|---|
window.start required | string | pattern ^\d{4}-\d{2}-\d{2}$ |
|---|
window.end required | string | pattern ^\d{4}-\d{2}-\d{2}$ |
|---|
granularity | string | one of day, week |
|---|
params | object | no other keys |
|---|
params.comparator | string | one of <, <=, >, >= |
|---|
params.threshold | number | |
|---|
params.threshold_unit | string | |
|---|
params.mode | string | one of any, all, count |
|---|
params.compare_window | object | no other keys |
|---|
params.compare_window.start required | string | pattern ^\d{4}-\d{2}-\d{2}$ |
|---|
params.compare_window.end required | string | pattern ^\d{4}-\d{2}-\d{2}$ |
|---|
params.lag_days | integer | one of 0, 1 |
|---|
params.session_kind | string | one of workout, sleep |
|---|
params.statistic | string | one of total, mean, min, max |
|---|
GrantRequest
| Field | Type | Notes |
|---|
purpose required | string | one of scheduling, training_advice, sleep_coaching, general_wellness, personal_research |
|---|
metrics required | string[] | one of steps, active_energy, resting_hr, heart_rate, hrv_rmssd, hrv_sdnn, sleep_duration, sleep_efficiency, sleep_stages, spo2, respiratory_rate, skin_temp_deviation, vo2max, weight, workout, blood_glucose, menstrual_cycle, ecg_classification, breathing_disturbances |
|---|
max_level required | integer | one of 0, 1, 2, 3 |
|---|
max_window_days required | integer | min 1; max 365 |
|---|
daily_packet_budget required | integer | min 1 |
|---|
days required | integer | min 1; max 90 |
|---|
return_url | string | format uri |
|---|
Finding
| Field | Type | Notes |
|---|
metric required | string | |
|---|
statement required | string | |
|---|
flag | string | one of yes, no, unknown |
|---|
direction | string | |
|---|
magnitude | string | |
|---|
value | number | |
|---|
unit | string | |
|---|
values | object[] | |
|---|
unknown_reason | string | |
|---|
Packet
| Field | Type | Notes |
|---|
packet_version required | "1" | |
|---|
packet_id required | string | |
|---|
level required | integer | |
|---|
operation | string | one of latest, aggregate, trend, compare_to_baseline, compare_periods, threshold_check, correlate, list_sessions |
|---|
metrics | string[] | |
|---|
window | object | |
|---|
findings required | Finding[] | |
|---|
data_quality required | object | |
|---|
data_quality.freshness_hours | number | null | |
|---|
data_quality.coverage | number | null | |
|---|
data_quality.sources | string[] | |
|---|
data_quality.baseline_days | integer | null | |
|---|
data_quality.caveats | string[] | |
|---|
as_of | string | |
|---|
data_version required | string | |
|---|
not_medical_advice required | true | |
|---|
AskResponse
| Field | Type | Notes |
|---|
status required | string | one of ok, denied, unsupported |
|---|
packet | Packet | |
|---|
receipt_id | string | |
|---|
reasons | string[] | |
|---|
supported | string[] | |
|---|