Overview
The Raad API uses JWT (JSON Web Tokens) for authentication. Obtain a token by signing in
with an API key, then include the token as a Bearer token in the
Authorization header of subsequent requests. Tokens expire after 24 hours.
You can also authenticate with your email and password if you do not have an API key.
POST
/api/v1/auth/sign_in
Authenticate and obtain a JWT token.
Request Body
First generate a new API key for your account, then exchange it for a JWT:
cURL
curl -X POST https://app.raad.com/api/v1/auth/sign_in \
-H "Content-Type: application/json" \
-d '{"api_key":"raad_mx5avcd0..."}'
Alternatively, authenticate with your email and password:
cURL
curl -X POST https://app.raad.com/api/v1/auth/sign_in \
-H "Content-Type: application/json" \
-d '{"email":"you@raad.com","password":"your_password"}'
Responses
200
Authentication successful
The returned JWT token is valid for 24 hours.
Response
{
"token": "eyJhbGciOiJIUzI1NiJ9...",
"expires_at": 1709683200
}
401
Invalid credentials
DELETE
/api/v1/auth/sign_out
Requires Auth
Sign out and invalidate the current token.
cURL Example
cURL
curl -X DELETE https://app.raad.com/api/v1/auth/sign_out \
-H "Authorization: Bearer <JWT_TOKEN>"
Responses
200
Successfully signed out
Response
{
"message": "Signed out successfully"
}
401
Unauthorized