Authentication
Sign up, sign in and refresh tokens.
Credentials
sessionStorage) and are sent only to https://api.indexone.io. They are cleared when the tab closes.Cognito-backed sign-up, sign-in, token refresh and password reset. Signing up and signing in need no credentials; refreshing a token and resetting a password need the API key.
Start a password reset
/forgot_passwordEmails a password-reset confirmation code. Complete the reset with POST /forgot_password/confirm.
Request body
| Field | Type | Description |
|---|---|---|
usernamerequired | string |
curl -X POST "https://api.indexone.io/forgot_password" \-H "x-api-key: YOUR_API_KEY" \-H "Content-Type: application/json" \-d '{"username": "quant@example.com"}'
Try it
Example response
{"CodeDeliveryDetails": {"Destination": "q***@e***.com","DeliveryMedium": "EMAIL","AttributeName": "email"}}
Errors
| Field | Type | Description |
|---|---|---|
400 | Error | Unknown user, or Cognito rate-limited the reset. The Cognito exception is uncaught, so the body is a generic gateway error. |
401 | Error | The API key is missing or invalid ( invalid_api_key). |
429 | object | API key usage-plan rate limit exceeded. |
Complete a password reset
/forgot_password/confirmSets a new password using the code emailed by POST /forgot_password.
Request body
| Field | Type | Description |
|---|---|---|
usernamerequired | string | |
passwordrequired | string | The new password. |
confirmation_coderequired | string |
curl -X POST "https://api.indexone.io/forgot_password/confirm" \-H "x-api-key: YOUR_API_KEY" \-H "Content-Type: application/json" \-d '{"username": "quant@example.com","password": "N3w-Passw0rd!","confirmation_code": "482913"}'
Try it
Example response
{}
Errors
| Field | Type | Description |
|---|---|---|
400 | Error | Wrong or expired code, or the new password violates the Cognito policy. |
401 | Error | The API key is missing or invalid ( invalid_api_key). |
429 | object | API key usage-plan rate limit exceeded. |
Exchange a refresh token for a new id token
/refresh_tokenReturns a fresh id token from the refresh token issued by POST /signin. No new refresh token is issued — keep using the original.
An expired, revoked or malformed refresh token returns 401 with {"error": …} — treat it as a sign-out and re-authenticate.
Request body
| Field | Type | Description |
|---|---|---|
refresh_tokenrequired | string |
curl -X POST "https://api.indexone.io/refresh_token" \-H "x-api-key: YOUR_API_KEY" \-H "Content-Type: application/json" \-d '{"refresh_token": "eyJjdHkiOiJKV1QiLCJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiUlNBLU9BRVAifQ.refresh"}'
Try it
Example response
{"id_token": "eyJraWQiOiJ4WGZQK0k9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI3ZGNkMjIxZS00Y2Y0LTRjYjUtODQ1ZS0zMmVmYzE4MDNlZTYifQ.sig","expires_in": 3600,"status": "success"}
Errors
| Field | Type | Description |
|---|---|---|
401 | Error | The refresh token is expired, revoked or invalid — re-authenticate with POST /signin. Also when the API key is missing or invalid (invalid_api_key). |
429 | object | API key usage-plan rate limit exceeded. |
Sign in and get tokens
/signinAuthenticates against Cognito using the USER_PASSWORD_AUTH flow and returns an id token, a refresh token and primary_team, the team the account acts as. Needs no credentials.
Send id_token as the Authorization header on every authenticated request — raw, with no Bearer prefix. It expires after expires_in seconds (3600 by default); use POST /refresh_token to get a new one without re-prompting for the password.
Request body
| Field | Type | Description |
|---|---|---|
usernamerequired | string | Lower-cased server-side, so case does not matter. |
passwordrequired | string |
curl -X POST "https://api.indexone.io/signin" \-H "Content-Type: application/json" \-d '{"username": "quant@example.com","password": "S3cure-Passw0rd!"}'
Try it
Example response
{"id_token": "eyJraWQiOiJ4WGZQK0k9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI3ZGNkMjIxZS00Y2Y0LTRjYjUtODQ1ZS0zMmVmYzE4MDNlZTYiLCJlbWFpbCI6InF1YW50QGV4YW1wbGUuY29tIiwiZXhwIjoxNzg0NTUyMDAwfQ.sig","refresh_token": "eyJjdHkiOiJKV1QiLCJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiUlNBLU9BRVAifQ.refresh","expires_in": 3600,"primary_team": "33a36e74-b36a-4a50-9a99-edeff5144a43"}
Errors
| Field | Type | Description |
|---|---|---|
400 | Error | username or password is missing. |
401 | Error | Wrong password, too many failed attempts, or no such account. code is the Cognito exception (NotAuthorizedException, UserNotFoundException). |
403 | Error | The account was never confirmed: resend the code with POST /signup/resend and confirm it. |
429 | Error | The sign-in service is throttling ( TooManyRequestsException, LimitExceededException). Wait and retry. |
502 | Error | The sign-in service failed. Retry. |
Create a user account
/signupCreates an account, unconfirmed, and emails a six-digit confirmation code to the address: call POST /signup/confirm with it next. Needs no credentials, so a script or an agent can sign up without the console; a person still has to read the code.
The account cannot sign in, and has no team, until it is confirmed. Confirming joins the team that invited the address, or makes a new team with the account as its admin.
The optional profile fields (firstname, lastname, company, position, industry, use_case, country, company_type, heard_about) are kept on the account.
Without a captcha_token, a sign-up counts against its IP address's limit of 5 an hour. Disposable-email domains are refused.
The same route doubles as the marketing contact form: {"hubspot_only": true, ...} records a contact and makes no account.
Request body
| Field | Type | Description |
|---|---|---|
usernamerequired | string | Email address. Lower-cased server-side. |
passwordrequired | string | At least 8 characters, with an upper-case letter, a lower-case letter, a number and a symbol, and no space at either end. |
firstname | string | |
lastname | string | |
company | string | |
position | string | |
industry | string | |
use_case | string | |
country | string | |
company_type | string | |
heard_about | string | |
captcha_token | string | A reCAPTCHA token (the console's form sends one). Without it, the per-IP limit applies. |
hubspot_only | boolean | Create only a CRM contact, no user account. |
curl -X POST "https://api.indexone.io/signup" \-H "Content-Type: application/json" \-d '{"username": "quant@example.com","password": "S3cure-Passw0rd!","firstname": "Ada","lastname": "Lovelace","company": "Example Capital"}'
Try it
Example response
"7dcd221e-4cf4-4cb5-845e-32efc1803ee6"
Errors
| Field | Type | Description |
|---|---|---|
400 | Error | username or password is missing, the body is not JSON, or the request looks automated (invalid_request); or Cognito refused a field (InvalidParameterException). |
409 | Error | The address has a confirmed account: sign in, or reset the password with POST /forgot_password. |
422 | Error | The password breaks the rules ( InvalidPasswordException), or the address is at a disposable-email domain (UserLambdaValidationException). |
429 | Error | Too many sign-ups from this IP address this hour ( rate_limited), or the sign-in service is throttling (TooManyRequestsException, LimitExceededException). Wait and retry. |
502 | Error | The sign-in service failed. Retry. |
Confirm a new account
/signup/confirmConfirms the address with the code POST /signup emailed, and sets the account up: it joins the team that invited the address (as an admin if the invite says so), or a new team is made with the account as its admin. After this the account can sign in. Confirming an account that is already confirmed also succeeds. Needs no credentials.
Request body
| Field | Type | Description |
|---|---|---|
usernamerequired | string | |
confirmation_coderequired | string |
curl -X POST "https://api.indexone.io/signup/confirm" \-H "Content-Type: application/json" \-d '{"username": "quant@example.com","confirmation_code": "482913"}'
Try it
Example response
"success"
Errors
| Field | Type | Description |
|---|---|---|
400 | Error | username or confirmation_code is missing. |
404 | Error | No account has that address. |
422 | Error | The code is wrong ( CodeMismatchException), expired (ExpiredCodeException, after 24 hours: get a new one with POST /signup/resend) or was not accepted (NotAuthorizedException). |
429 | Error | Too many wrong codes ( TooManyFailedAttemptsException, LimitExceededException). Wait and retry. |
500 | Error | The address is confirmed, but setting up its team failed. Contact support@indexone.io. |
Resend the confirmation code
/signup/resendEmails a new confirmation code for an account that POST /signup created and nobody has confirmed yet. Needs no credentials.
Request body
| Field | Type | Description |
|---|---|---|
usernamerequired | string |
curl -X POST "https://api.indexone.io/signup/resend" \-H "Content-Type: application/json" \-d '{"username": "ada@example.com"}'
Try it
Example response
{"status": "sent"}
Errors
| Field | Type | Description |
|---|---|---|
400 | Error | username is missing, or the account is already confirmed (InvalidParameterException). |
404 | Error | No account has that address. |
429 | Error | Too many codes requested. |
502 | Error | The sign-in service failed. Retry. |