> ## Documentation Index
> Fetch the complete documentation index at: https://developers.soxai.co.jp/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Sign in and retrieve SOXAI daily data.

Use the v2 endpoints for a new integration. They return standardized field names and JSON by default.

## 1. Sign in

Call `POST /api/login` with the email address and password for a SOXAI app account. Keep the returned `localId` as the user ID and send the returned `idToken` as a Bearer token.

```bash theme={null}
curl --request POST https://web-api.soxai.site/api/login \
  --header 'Content-Type: application/json' \
  --data '{"email":"you@example.com","password":"YOUR_PASSWORD"}'
```

The response includes `localId`, `idToken`, and `refreshToken`. An ID token expires after one hour. Use the refresh token to obtain a new ID token before it expires.

## 2. Get daily data

Replace `YOUR_UID` with `localId` and send the ID token in the request.

```bash theme={null}
curl --request GET \
  'https://web-api.soxai.site/api/v2/DailyInfoData/YOUR_UID?start_day=2025-01-01&end_day=2025-01-31' \
  --header 'Authorization: Bearer YOUR_ID_TOKEN'
```

`DailyInfoData` returns daily summary data. Use `DailyDetailData` for finer-grained data and `DailyTrendData` for trend data. See the API reference for their fields and parameters.

## Request sizes and pagination

Keep requests within the limits below and divide larger exports into multiple requests.

| Request | Maximum | Recommendation |
| - | - | - |
| One user's v2 data | 366 days | Split longer periods into requests of no more than 366 days. |
| Organization or company v2 data | 31 days | Split date ranges into monthly requests. |
| `uid_list` | 100 users | Send multiple requests for larger user sets. |
| `page` | 100 users per page | Used only when `uid_list` is omitted. Start at zero and increment it for each additional page. |

The v1 single-user data endpoints do not currently enforce a date-range maximum. Still divide large v1 exports into manageable periods to avoid long-running requests.

For organization-wide JSON requests, pagination is based on users, not measurement records. A successful result for at most 100 eligible users is an array. With more users, it is an object containing `data` and `pagination`. The metadata contains `total_users`, `total_pages`, `current_page` (zero-based), and `page_size` (100 users). Request the next page while `pagination.current_page + 1 < pagination.total_pages`. A user can contribute many records or none, so neither the record count nor an empty data result determines the last page.

If a requested page has no measurements, the API can return `{"msg":"No data found"}` without pagination metadata. Continue using a previously obtained `total_pages`; if none is available, this response alone cannot tell you how many pages remain. For predictable bulk exports, send explicit batches of at most 100 eligible user IDs with `uid_list`. With a non-empty `uid_list`, `page` is ignored. See the [organization summary reference](https://developers.soxai.co.jp/api-reference/data-v2/fetch-daily-summary-data-for-a-whole-organization-or-company-v2.md) and [organization detail reference](https://developers.soxai.co.jp/api-reference/data-v2/fetch-intra-day-detail-data-for-a-whole-organization-or-company-v2.md).

All three v1 data endpoints and the five v2 data endpoints support `format=csv`. `GET /api/v2/GroupView/{group_id}` does not support CSV.

## Build for compatible additions

The API can add response fields in a backward-compatible release. Configure your client to ignore fields it does not recognize instead of rejecting an otherwise valid response.

## Next steps

* Read [Authentication](https://developers.soxai.co.jp/guides/authentication.md) before using a long-lived API key.
* Review [Data fields](https://developers.soxai.co.jp/guides/data-fields.md) to understand v1 and v2 field naming.
* Use [Troubleshooting](https://developers.soxai.co.jp/guides/troubleshooting.md) when expected data is missing.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.