POST/api/co/auth/forgot-passwordEndpoint operation.
Triggers a password reset email for the provided account. Response is generic to avoid account enumeration.
Auth: None (public endpoint).Source: CAROWNER-API-COMPLETE.md
Request Example
{
"email": "owner@minbil.io",
"redirect_to": "https://platform.minbil.no/reset-password"
}
Response Example
{
"message": "Sign-out successful."
}
Node.js Axios example
import axios from "axios";
const BASE_URL = process.env.MINBIL_API_BASE_URL ?? "http://localhost:5000";
const API_KEY = process.env.MINBIL_API_KEY ?? "YOUR_API_KEY";
const ACCESS_TOKEN = process.env.MINBIL_ACCESS_TOKEN ?? "YOUR_BEARER_TOKEN";
async function run() {
const response = await axios({
method: "post",
url: BASE_URL + "/api/co/auth/forgot-password",
headers: {
"Content-Type": "application/json",
},
data: {
"email": "owner@minbil.io",
"redirect_to": "https://platform.minbil.no/reset-password"
},
timeout: 20000,
});
console.log(response.status, response.data);
}
run().catch((error) => {
console.error(error.response?.status, error.response?.data ?? error.message);
});
cURL example
curl -X POST 'https://api.minbil.no/api/co/auth/forgot-password'\
-H 'Accept: application/json'\
-H 'Content-Type: application/json'\
-d '{"email": "owner@minbil.io", "redirect_to": "https://platform.minbil.no/reset-password"}'
Fetch example
const BASE_URL = process.env.MINBIL_API_BASE_URL ?? "http://localhost:5000";
const API_KEY = process.env.MINBIL_API_KEY ?? "YOUR_API_KEY";
const ACCESS_TOKEN = process.env.MINBIL_ACCESS_TOKEN ?? "YOUR_BEARER_TOKEN";
const response = await fetch(BASE_URL + "/api/co/auth/forgot-password", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
"email": "owner@minbil.io",
"redirect_to": "https://platform.minbil.no/reset-password"
}),
});
const data = await response.json();
console.log(response.status, data);
Refresh access token
Returns a new access token using a refresh token.
Auth: Bearer token (`Authorization: Bearer <token>`)Source: CAROWNER-API-COMPLETE.md
Response Example
{
"message": "Token refreshed.",
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refresh_token": "zbb5d6vmyfqc",
"expires_in": 3600,
"expires_at": "2026-02-03T15:31:45Z",
"expires_at_unix": 1770132705,
"token_type": "bearer"
}
Node.js Axios example
import axios from "axios";
const BASE_URL = process.env.MINBIL_API_BASE_URL ?? "http://localhost:5000";
const API_KEY = process.env.MINBIL_API_KEY ?? "YOUR_API_KEY";
const ACCESS_TOKEN = process.env.MINBIL_ACCESS_TOKEN ?? "YOUR_BEARER_TOKEN";
async function run() {
const response = await axios({
method: "post",
url: BASE_URL + "/api/co/auth/refresh",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer " + ACCESS_TOKEN,
},
timeout: 20000,
});
console.log(response.status, response.data);
}
run().catch((error) => {
console.error(error.response?.status, error.response?.data ?? error.message);
});
cURL example
curl -X POST 'https://api.minbil.no/api/co/auth/refresh'\
-H 'Accept: application/json'\
-H 'Authorization: Bearer <access-token>'
Fetch example
const BASE_URL = process.env.MINBIL_API_BASE_URL ?? "http://localhost:5000";
const API_KEY = process.env.MINBIL_API_KEY ?? "YOUR_API_KEY";
const ACCESS_TOKEN = process.env.MINBIL_ACCESS_TOKEN ?? "YOUR_BEARER_TOKEN";
const response = await fetch(BASE_URL + "/api/co/auth/refresh", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer " + ACCESS_TOKEN,
},
});
const data = await response.json();
console.log(response.status, data);
Sign in Car Owner user
Authenticates a Car Owner user and returns access + refresh tokens.
Auth: None (public endpoint).Source: CAROWNER-API-COMPLETE.md
Request Example
{
"email": "owner@minbil.io",
"password": "StrongPass123!"
}
Response Example
{
"message": "Login successful.",
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refresh_token": "zbb5d6vmyfqc",
"expires_in": 3600,
"expires_at": "2026-02-03T15:31:45Z",
"expires_at_unix": 1770132705,
"token_type": "bearer",
"user": {}
}
Node.js Axios example
import axios from "axios";
const BASE_URL = process.env.MINBIL_API_BASE_URL ?? "http://localhost:5000";
const API_KEY = process.env.MINBIL_API_KEY ?? "YOUR_API_KEY";
const ACCESS_TOKEN = process.env.MINBIL_ACCESS_TOKEN ?? "YOUR_BEARER_TOKEN";
async function run() {
const response = await axios({
method: "post",
url: BASE_URL + "/api/co/auth/sign-in",
headers: {
"Content-Type": "application/json",
},
data: {
"email": "owner@minbil.io",
"password": "StrongPass123!"
},
timeout: 20000,
});
console.log(response.status, response.data);
}
run().catch((error) => {
console.error(error.response?.status, error.response?.data ?? error.message);
});
cURL example
curl -X POST 'https://api.minbil.no/api/co/auth/sign-in'\
-H 'Accept: application/json'\
-H 'Content-Type: application/json'\
-d '{"email": "owner@minbil.io", "password": "StrongPass123!"}'
Fetch example
const BASE_URL = process.env.MINBIL_API_BASE_URL ?? "http://localhost:5000";
const API_KEY = process.env.MINBIL_API_KEY ?? "YOUR_API_KEY";
const ACCESS_TOKEN = process.env.MINBIL_ACCESS_TOKEN ?? "YOUR_BEARER_TOKEN";
const response = await fetch(BASE_URL + "/api/co/auth/sign-in", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
"email": "owner@minbil.io",
"password": "StrongPass123!"
}),
});
const data = await response.json();
console.log(response.status, data);
POST/api/co/auth/sign-outSign out Car Owner user
Signs out the current user and invalidates the refresh token where possible.
Auth: Bearer token (`Authorization: Bearer <token>`)Source: CAROWNER-API-COMPLETE.md
Response Example
{
"message": "Sign-out successful."
}
Node.js Axios example
import axios from "axios";
const BASE_URL = process.env.MINBIL_API_BASE_URL ?? "http://localhost:5000";
const API_KEY = process.env.MINBIL_API_KEY ?? "YOUR_API_KEY";
const ACCESS_TOKEN = process.env.MINBIL_ACCESS_TOKEN ?? "YOUR_BEARER_TOKEN";
async function run() {
const response = await axios({
method: "post",
url: BASE_URL + "/api/co/auth/sign-out",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer " + ACCESS_TOKEN,
},
timeout: 20000,
});
console.log(response.status, response.data);
}
run().catch((error) => {
console.error(error.response?.status, error.response?.data ?? error.message);
});
cURL example
curl -X POST 'https://api.minbil.no/api/co/auth/sign-out'\
-H 'Accept: application/json'\
-H 'Authorization: Bearer <access-token>'
Fetch example
const BASE_URL = process.env.MINBIL_API_BASE_URL ?? "http://localhost:5000";
const API_KEY = process.env.MINBIL_API_KEY ?? "YOUR_API_KEY";
const ACCESS_TOKEN = process.env.MINBIL_ACCESS_TOKEN ?? "YOUR_BEARER_TOKEN";
const response = await fetch(BASE_URL + "/api/co/auth/sign-out", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer " + ACCESS_TOKEN,
},
});
const data = await response.json();
console.log(response.status, data);