Skip to main content
All Octavia AI CMS endpoints require authentication using an API key.
You can generate and manage your keys directly from your Octavia Dashboard.
Include your key in every API request using the x-api-key header:
x-api-key: YOUR_API_KEY
Any request without this header will be rejected with a 401 Unauthorized response.

Example (JavaScript)

Here’s a simple example using fetch to authenticate and retrieve articles:
const API_URL = "https://api.octaviatech.app/cms/articles/getAll";
const API_KEY = "YOUR_API_KEY";

async function fetchArticles() {
  try {
    const response = await fetch(API_URL, {
      method: "GET",
      headers: {
        "Content-Type": "application/json",
        "x-api-key": API_KEY,
      },
    });

    if (!response.ok) {
      throw new Error(`Request failed with status ${response.status}`);
    }

    const data = await response.json();
    console.log("Articles:", data.data.articles);
  } catch (error) {
    console.error("Error fetching articles:", error.message);
  }
}

fetchArticles();
💡 Replace YOUR_API_KEY with your actual key from the Octavia dashboard. Always keep your API keys private and never expose them in client-side code.