Intentions
The Intentions endpoint provides access to user intention data, including subjective inputs and intention information collected during user sessions.
GET /v1/intentions/{user_id}
Parameters
| Name | Type | In | Description |
|---|---|---|---|
user_id |
UUID | Path | The unique identifier for the user. |
start_date |
Date | Query | The start date for the query period (format: YYYY-MM-DD). |
end_date |
Date | Query | The end date for the query period (format: YYYY-MM-DD). |
days |
Integer | Query | Days per page (default 1, max 7). Only applies to application/json cursor-based pagination. |
cursor |
String | Query | Pagination cursor from the previous response. Only supported on application/json; returns 400 for CSV. |
Responses
200 OK
{
"data": [
{
"id": "489901eb-5476-46e5-9d06-595205126e0e",
"start_datetime": "2024-04-01T08:00:00Z",
"end_datetime": "2024-04-01T08:30:00Z",
"name": "Morning Focus Session",
"last_updated": "2024-04-01T08:30:00Z",
"created": "2024-04-01T08:00:00Z",
"subjective_inputs": [
{
"date_time": "2024-04-01T08:00:00Z",
"tag": "FOCUS",
"value": 8,
"type": "MOOD"
},
{
"date_time": "2024-04-01T08:15:00Z",
"tag": "ENERGY",
"value": 7,
"type": "FEELING"
}
],
"info_data": {
"goal": "Complete project tasks",
"environment": "quiet office"
}
}
],
"next_cursor": null
}
404 Not Found
{
"type": "about:blank",
"title": "Not Found",
"status": 404,
"detail": "No Intentions for user between 2024-04-01 and 2024-04-02 found in database",
"instance": "/v1/intentions/YOUR_USER_ID",
"code": "not_found",
"request_id": "3a7b2c1d-..."
}
Example Request
cURL
curl -X GET "https://research-api.nowatch.com/v1/intentions/123e4567-e89b-12d3-a456-426614174000?start_date=2024-04-01&end_date=2024-04-02" \
-H "X-API-KEY: YOUR_API_KEY"
Intention Tags
The tag field in subjective inputs can have the following values:
| Tag | Value | Description |
|---|---|---|
CALM |
0 | Calm and relaxed state |
FOCUS |
1 | Focused and concentrated state |
ENERGY |
2 | High energy and active state |
POSITIVITY |
3 | Positive and optimistic state |
Subjective Input Types
The type field in subjective inputs can have the following values:
| Type | Value | Description |
|---|---|---|
UNDEFINED |
0 | Undefined input type |
MOOD |
1 | General mood assessment |
FEELING |
2 | Specific feeling or emotion |
CHECK_IN_CONTEXT_CATEGORY |
3 | Context category during check-in |
DAY |
4 | Overall day assessment |
SLEEP |
5 | Sleep-related assessment |
RELATED_FEELING |
6 | Related feeling or secondary emotion |
For more information
See the Intention Feature Guide.