Page Introduction

Profile namespace

This namespace page is optimized for frontend implementation with endpoint index, request/response examples, and code snippets.

  • Use auth and summary fields to configure your API client.
  • Use code snippets as starter references, not production-ready final code.
  • Validate critical mutations in interactive console before release.

CarOwner Namespace

Profile

Namespace details with request/response examples and code snippets.

4Endpoint methods

Endpoint Quick Index

Detailed Endpoints

PUT/api/co/presence

Endpoint operation.

Update user presence status. When going 'online', queued offline events are delivered.

Auth: Bearer token (`Authorization: Bearer <token>`)Source: CAROWNER-API-COMPLETE.md

Request Example

{
  "status": "online"
}

Response Example

{
  "status": "string_value",
  "queued_delivered": 1
}
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: "put",
    url: BASE_URL + "/api/co/presence",
    headers: {
      "Content-Type": "application/json",
      Authorization: "Bearer " + ACCESS_TOKEN,
    },
    data: {
        "status": "online"
    },
    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 PUT 'https://api.minbil.no/api/co/presence'\
  -H 'Accept: application/json'\
  -H 'Authorization: Bearer <access-token>'\
  -H 'Content-Type: application/json'\
  -d '{"status": "online"}'
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/presence", {
  method: "PUT",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer " + ACCESS_TOKEN,
  },
  body: JSON.stringify({
    "status": "online"
  }),
});
const data = await response.json();
console.log(response.status, data);
DELETE/api/co/profile

Endpoint operation.

Removes the stored profile image reference for the authenticated user. Notes - This does not delete the user account. - Returns `204` if there is no image to delete.

Auth: Bearer token (`Authorization: Bearer <token>`)Source: CAROWNER-API-COMPLETE.md

Request Example

{}

Response Example

{
  "data": {},
  "meta": {
    "request_id": "f59ee325-0445-4bd0-9bf1-73edcd7da151",
    "generated_at": "2026-02-12T10:00:00Z"
  }
}
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: "delete",
    url: BASE_URL + "/api/co/profile",
    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 DELETE 'https://api.minbil.no/api/co/profile'\
  -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/profile", {
  method: "DELETE",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer " + ACCESS_TOKEN,
  },
});
const data = await response.json();
console.log(response.status, data);
GET/api/co/profile

Endpoint operation.

Returns the authenticated user's profile. Caching - Supports `If-None-Match` and may return `304 Not Modified`.

Auth: Bearer token (`Authorization: Bearer <token>`)Source: CAROWNER-API-COMPLETE.md

Request Example

{}

Response Example

{
  "uid": "string_value",
  "email": "owner@minbil.io",
  "username": "string_value",
  "firstName": "string_value",
  "lastName": "string_value",
  "phone_number": "+4799999999",
  "address": "string_value",
  "profileImage": "string_value",
  "verify_vehicles": true,
  "created_at": "string_value",
  "updated_at": "2026-02-12"
}
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: "get",
    url: BASE_URL + "/api/co/profile",
    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 GET 'https://api.minbil.no/api/co/profile'\
  -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/profile", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer " + ACCESS_TOKEN,
  },
});
const data = await response.json();
console.log(response.status, data);
PUT/api/co/profile

Endpoint operation.

Updates profile fields for the authenticated user. Accepts JSON or multipart/form-data. Notes - `username` must be unique (case-insensitive). - When uploading a file, use `file` or `profile_image`. - Only provided fields are updated.

Auth: Bearer token (`Authorization: Bearer <token>`)Source: CAROWNER-API-COMPLETE.md

Request Example

{
  "username": "string_value",
  "first_name": "string_value",
  "last_name": "string_value",
  "phone_number": "+4799999999",
  "address": "string_value"
}

Response Example

{
  "uid": "string_value",
  "email": "owner@minbil.io",
  "username": "string_value",
  "firstName": "string_value",
  "lastName": "string_value",
  "phone_number": "+4799999999",
  "address": "string_value",
  "profileImage": "string_value",
  "verify_vehicles": true,
  "created_at": "string_value",
  "updated_at": "2026-02-12"
}
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: "put",
    url: BASE_URL + "/api/co/profile",
    headers: {
      "Content-Type": "application/json",
      Authorization: "Bearer " + ACCESS_TOKEN,
    },
    data: {
        "username": "string_value",
        "first_name": "string_value",
        "last_name": "string_value",
        "phone_number": "+4799999999",
        "address": "string_value"
    },
    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 PUT 'https://api.minbil.no/api/co/profile'\
  -H 'Accept: application/json'\
  -H 'Authorization: Bearer <access-token>'\
  -H 'Content-Type: application/json'\
  -d '{"username": "string_value", "first_name": "string_value", "last_name": "string_value", "phone_number": "+4799999999", "address": "string_value"}'
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/profile", {
  method: "PUT",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer " + ACCESS_TOKEN,
  },
  body: JSON.stringify({
    "username": "string_value",
    "first_name": "string_value",
    "last_name": "string_value",
    "phone_number": "+4799999999",
    "address": "string_value"
  }),
});
const data = await response.json();
console.log(response.status, data);