GET
/
classifications
const options = {
  method: "GET",
  headers: {
    "x-api-key": "<your-api-key>",
    "Content-Type": "application/json",
  },
};

fetch("https://api.getomni.ai/classifications", options)
  .then((response) => response.json())
  .then((response) => console.log(response))
  .catch((err) => console.error(err));
{
  "classifications": [
    {
      "id": "7c5e30cb-4ec9-4935-8aa5-5b4da2f9be5a",
      "name": "Financial Document Classification"
    }
  ]
}

This API endpoint returns a list of classifications for the workspace.

Response

classifications
array

An array of classification objects.

const options = {
  method: "GET",
  headers: {
    "x-api-key": "<your-api-key>",
    "Content-Type": "application/json",
  },
};

fetch("https://api.getomni.ai/classifications", options)
  .then((response) => response.json())
  .then((response) => console.log(response))
  .catch((err) => console.error(err));
{
  "classifications": [
    {
      "id": "7c5e30cb-4ec9-4935-8aa5-5b4da2f9be5a",
      "name": "Financial Document Classification"
    }
  ]
}