Request an authentication token from the authentication endpoint, then include it in the Authorization header for subsequent requests.
Get an Authentication Token
Endpoint
POST https://app.searchstax.com/api/rest/v2/obtain-auth-token/
Headers
| Name | Type | Description |
|---|---|---|
Content-Type | string | application/x-www-form-urlencoded or application/json for JavaScript Object Notation (JSON). |
Body Parameters
| Name | Type | Description |
|---|---|---|
username | string | The email address you use to log in to SearchStax. Required. |
password | string | The password for that account. Required. |
tfa_token | string | Two-factor authentication token. Required if 2FA is enabled; otherwise optional. Constraints: 6-digit authenticator code or 8-character backup code. |
Note: In Bash, make sure you escape special characters in values (like passwords) or URL-encode them.
Request
Use a form-encoded request:
curl -s -X POST \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "username=<username>&password=<password>&tfa_token=<tfa_token>" \
https://app.searchstax.com/api/rest/v2/obtain-auth-token/Use JSON if your client expects a JSON body:
curl -s -X POST \
-H "Content-Type: application/json" \
-d '{"username":"<username>","password":"<password>","tfa_token":"<tfa_token>"}' \
https://app.searchstax.com/api/rest/v2/obtain-auth-token/Use this PowerShell example to request a token and capture it for later calls:
$USER = "<username>"
$PASSWORD = "<password>"
$TFA = "<tfa_token>"
$body = @{ username=$USER; password=$PASSWORD; tfa_token=$TFA } | ConvertTo-Json
$TOKEN = Invoke-RestMethod -Method Post -Body $body -ContentType 'application/json' `
-uri "https://app.searchstax.com/api/rest/v2/obtain-auth-token/"
$TOKEN = $TOKEN.tokenResponse
The response looks like this:
{
"token": "abcdefg1234567"
}Verify an Authentication Token
Endpoint
GET https://app.searchstax.com/api/rest/v2/verify-auth-token/
Headers
| Name | Type | Description |
|---|---|---|
Authorization | string | Token <token> |
Request
Use this curl example to verify a token:
curl -s \
-H "Authorization: Token <token>" \
https://app.searchstax.com/api/rest/v2/verify-auth-token/Response
The response looks like this:
{
"token": {
"created": "2026-01-13T20:55:45Z",
"duration_days": 1,
"expires": "2026-01-14T20:55:45Z",
"key": "<token_key>"
}
}