Authentication

Sign up, exchange credentials for an access token, and issue API keys for server-to-server calls.

Interactive clients send the JWT returned by a session call; integrations send a long-lived API key. Both travel in the Authorization header.

Base URL
https://api.reportauto.eu

Authentication

Every authenticated call carries an Authorization header. Interactive clients send the JWT access token returned by a session call; server-to-server integrations send a long-lived API key as `API_KEY <key>`. Tokens are scoped to the rights granted to the account that issued them.

Create an account

POST/api/session/signup

Registers a user and returns an access token, so a freshly created account can call the API immediately. Set send_verification_code to have the API email a code the account is later verified with.

Authentication None

Parameters

usernamestringRequired

Login handle. An email address is accepted here too.

emailstringRequired

Email address the account is reachable at.

typeenum

Kind of account being created.

fullnamestring

Display name of the person behind the account.

passwordstring

Optional. Omit it to create a passwordless account that signs in with emailed codes.

send_verification_codeboolean

Whether to email a verification code on signup.

countrystring

ISO country, e.g. USA.

languagestring

Preferred language code, e.g. en.

  • Send `x-api-version: 2` to get the current signup behaviour.
  • The returned token is the access token — pass it verbatim as the Authorization header.
cURL
1curl -X POST "https://api.reportauto.eu/api/session/signup" \
2  -H "Content-Type: application/json" \
3  -H "x-api-version: 2" \
4  -d '{
5    "username": "jamie",
6    "type": "Seller",
7    "email": "jamie@example.com",
8    "fullname": "Jamie Rivera",
9    "send_verification_code": false,
10    "country": "USA",
11    "language": "en"
12  }'
Response
{
  "id": 2616,
  "name": "Jamie Rivera",
  "type": "Seller",
  "token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9...",
  "username": "jamie",
  "role": "User",
  "agreement": {
    "signed": 0,
    "timestamp": null
  }
}
Response schema
{
  "id": integer,
  "name": string,
  "email": string,
  "phone": string,
  "type": enum,
}

Create an anonymous device account

POST/api/session/signup

Registers a device rather than a person, so a mobile app can start capturing before the user signs up. Same endpoint as above, distinguished by sending device fields instead of a username.

Authentication None

Parameters

devicestringRequired

Platform, e.g. IOS or ANDROID.

device_idstringRequired

Stable per-install device identifier.

device_modelstring

Hardware model, e.g. "12 mini".

cURL
1curl -X POST "https://api.reportauto.eu/api/session/signup" \
2  -H "Content-Type: application/json" \
3  -d '{
4    "device": "IOS",
5    "device_id": "some_device_id",
6    "device_model": "12 mini"
7  }'

Create a session

POST/api/session

Exchanges credentials for an access token. Three credential shapes are accepted: username and password, username and an emailed verification code, or a request ID paired with the session key from a capture link.

Authentication None

Parameters

usernamestring

Used with either password or verification_code.

passwordstring

Account password.

verification_codestring

Code emailed by the authorization-code request below. Use instead of a password.

request_idinteger

Listing request the session belongs to, for capture-link sign-in.

session_keystring

Short key issued with a capture link, paired with request_id.

cURL
1curl -X POST "https://api.reportauto.eu/api/session" \
2  -H "Content-Type: application/json" \
3  -d '{
4    "username": "jamie@example.com",
5    "password": "Some_user_passphrase"
6  }'

Request an authorization code

POST/api/session/request

Emails a one-time verification code to the address behind the username. Feed the code back into the session call to sign in without a password.

Authentication None

Parameters

usernamestringRequired

Username or email address to send the code to.

cURL
1curl -X POST "https://api.reportauto.eu/api/session/request" \
2  -H "Content-Type: application/json" \
3  -d '{ "username": "jamie@example.com" }'

Retrieve the current session

GET/api/session

Returns the account behind the credential, including profile, theme, verification state and notification preferences. Use it to validate a token and to read back settings after an update.

Authentication Access token or API key

cURL
1curl "https://api.reportauto.eu/api/session" \
2  -H "Authorization: API_KEY $CAROOM_API_KEY"
Response
{
  "user": {
    "id": 2616,
    "name": "Jamie Rivera",
    "type": "Seller",
    "project": 1,
    "username": "jamie",
    "role": "User",
    "email": "jamie@example.com",
    "phone": null,
    "avatar": "https://d30s8rpq2bfonk.cloudfront.net/avatars/2616.png",
    "agreement": { "signed": 0, "timestamp": null },
    "public_name": null,
    "theme": "light",
    "visibility": null,
    "device_model": null,
    "verified": "VERIFIED"
  }
}
Response schema
{
  "user": {
    "id": string,
    "name": string,
    "email": string
  }
}

Verify an account

PATCH/api/users/verify

Confirms an email address with the code sent at signup, moving the account out of the unverified state.

Authentication None

Parameters

emailstringRequired

Address being verified.

codestringRequired

Verification code from the email.

cURL
1curl -X PATCH "https://api.reportauto.eu/api/users/verify" \
2  -H "Content-Type: application/json" \
3  -H "x-api-version: 2" \
4  -d '{
5    "email": "jamie@example.com",
6    "code": "301705"
7  }'

Resend the verification email

POST/api/session/verify/resend

Sends a fresh verification code to an unverified account.

Authentication None

Parameters

usernamestringRequired

Account to resend the code to.

cURL
1curl -X POST "https://api.reportauto.eu/api/session/verify/resend" \
2  -H "Content-Type: application/json" \
3  -d '{ "username": "jamie@example.com" }'

Start a password reset

POST/api/session/forgot

Emails a reset token to the address on the account.

Authentication None

Parameters

emailstringRequired

Address to send the reset token to.

cURL
1curl -X POST "https://api.reportauto.eu/api/session/forgot" \
2  -H "Content-Type: application/json" \
3  -H "x-api-version: 2" \
4  -d '{ "email": "jamie@example.com" }'

Complete a password reset

POST/api/session/reset

Sets a new password using the token from the reset email.

Authentication None

Parameters

reset_tokenstringRequired

Token from the reset email.

passwordstringRequired

The new password.

cURL
1curl -X POST "https://api.reportauto.eu/api/session/reset" \
2  -H "Content-Type: application/json" \
3  -H "x-api-version: 2" \
4  -d '{
5    "reset_token": "729098",
6    "password": "A_new_phrase_pass"
7  }'

Create an API key

POST/api/api_keys

Issues a long-lived key for server-to-server use. Send it on later requests as `Authorization: API_KEY <key>`. Name each key after the integration that holds it so it can be revoked on its own.

Authentication Access token

Parameters

namestringRequired

Label for the key, e.g. "Claims Key".

cURL
1curl -X POST "https://api.reportauto.eu/api/api_keys" \
2  -H "Authorization: $CAROOM_ACCESS_TOKEN" \
3  -H "Content-Type: application/json" \
4  -d '{ "name": "Claims Key" }'