Skip to content

chore: update Web Console API spec with tsoa-generated endpoints#263

Merged
calthejuggler merged 2 commits into
masterfrom
chore/update-api-spec
May 12, 2026
Merged

chore: update Web Console API spec with tsoa-generated endpoints#263
calthejuggler merged 2 commits into
masterfrom
chore/update-api-spec

Conversation

@calthejuggler
Copy link
Copy Markdown
Collaborator

@calthejuggler calthejuggler commented May 12, 2026

This PR updates the API spec with the auto-generated docs from release/26-03

Summary by CodeRabbit

Documentation

  • Added documentation for 17+ new Web Console API endpoints, including Event Summary, Events Quota, Notifications operations, Platform Alerts, Segment management, and Usage Alerts functionality.
  • Reorganised and updated existing API documentation structure with refreshed example payloads and response schemas.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 12, 2026

Walkthrough

This pull request refactors the Web Console API documentation by migrating the backend reference identifier from absmartly-web-console-api to backend. The main reference file is updated with new metadata, and all existing endpoint documentation files have their info_path frontmatter migrated to point to the new backend source. Additionally, the PR introduces 15 new API endpoint documentation pages across four feature areas: notifications (4 endpoints), usage alerts (5 endpoints), segments (3 endpoints), and events/platform operations (3 endpoints). Example response timestamps are refreshed throughout the documentation, and the Examples category is repositioned in the sidebar.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested reviewers

  • marcio-absmartly
  • mario-silva
  • bmsilva

🐰 A documentation hop through the woods so neat,
Backend paths now dance to a simpler beat,
Notifications, alerts, and segments take flight,
API docs shine with examples so bright!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and specifically describes the main change: updating the Web Console API specification with tsoa-generated endpoints, which aligns with the comprehensive documentation updates across 40+ API endpoint files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/update-api-spec

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Comment @coderabbitai help to get the list of available commands and usage tips.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 12, 2026

Deploy Preview for absmartly-docs ready!

Name Link
🔨 Latest commit 9ca33de
🔍 Latest deploy log https://app.netlify.com/projects/absmartly-docs/deploys/6a030b071cc4780008b4dd9a
😎 Deploy Preview https://deploy-preview-263--absmartly-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 9

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/APIs-and-SDKs/Web-Console-API/cors-allowed-origin-get.api.mdx (1)

29-37: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Path parameter name does not match the endpoint placeholder.

MethodEndpoint uses {corsId} (Line 29), but the declared path parameter is applicationId (Line 37). This mismatch can break binding in the explorer and mislead consumers.

🔧 Proposed fix
-<details style={{"marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collapsed={false} open={true}><summary style={{}}><h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3></summary><div><ul><ParamsItem className={"paramsItem"} param={{"name":"applicationId","in":"path","required":true,"schema":{"type":"integer"},"description":"The id of the CORS Allowed Origin that you wish to get data from."}}></ParamsItem></ul></div></details><div><div><ApiTabs label={undefined} id={undefined}><TabItem label={"200"} value={"200"}><div>
+<details style={{"marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collapsed={false} open={true}><summary style={{}}><h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3></summary><div><ul><ParamsItem className={"paramsItem"} param={{"name":"corsId","in":"path","required":true,"schema":{"type":"integer"},"description":"The id of the CORS Allowed Origin that you wish to get data from."}}></ParamsItem></ul></div></details><div><div><ApiTabs label={undefined} id={undefined}><TabItem label={"200"} value={"200"}><div>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/APIs-and-SDKs/Web-Console-API/cors-allowed-origin-get.api.mdx` around
lines 29 - 37, The path placeholder in MethodEndpoint uses "{corsId}" but the
ParamsItem declares "applicationId", causing a mismatch; update either the
MethodEndpoint path to use "{applicationId}" or change the ParamsItem param.name
to "corsId" so they match (choose the name consistent with your API model),
ensuring MethodEndpoint's path and the ParamsItem param.name are identical and
keep the description in ParamsItem consistent with the chosen identifier.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/APIs-and-SDKs/Web-Console-API/api-key-get.api.mdx`:
- Line 39: Update the response description text in the API doc so it reads "A
JSON Object containing a particular API key's data." — locate the sentence "A
JSON Object a particular API key's data." in the Web-Console-API file
(api-key-get.api.mdx) and insert the missing word "containing" to correct the
description.

In `@docs/APIs-and-SDKs/Web-Console-API/backend.info.mdx`:
- Around line 2-3: The redirect mapping in test-all-urls.js still points its
"to" destination at "absmartly-web-console-api"; update the redirect entry (the
mapping in the redirects array/object at the entry referenced around
test-all-urls.js:199) so its "to" path uses the new page ID "backend" instead of
"absmartly-web-console-api", ensuring any associated slug or full path string
that references the old ID is replaced with "backend".

In `@docs/APIs-and-SDKs/Web-Console-API/event-summary-get.api.mdx`:
- Line 38: The query parameters "from" and "to" are documented as millisecond
Unix timestamps but their schemas use format "int32"; update the ParamsItem
entries for param.name "from" and param.name "to" to use an integer schema with
format "int64" (i.e., type "integer" and format "int64") so millisecond
timestamps fit the documented range.

In `@docs/APIs-and-SDKs/Web-Console-API/notification-see.api.mdx`:
- Line 41: The response schema incorrectly types the "errors" field as
undefined[] and the example contains null; update the SchemaItem for name
"errors" (currently schemaName "undefined[]") to be an array of strings
(schema.type="array", items.type="string") and update the responseExample JSON
to show "errors": ["string message"] (or an empty array when appropriate) so it
matches other notification update endpoints and clarifies the contract for
clients.

In `@docs/APIs-and-SDKs/Web-Console-API/segment-delete.api.mdx`:
- Line 41: The response schema's errors array is currently unspecified (items:
{}) and rendered as undefined[] with a sample containing null; update the
response schema for the 200 success to define a concrete item type (e.g., change
items:{} to items: { "type": "string" } so errors becomes string[]) and update
the ResponseSamples example to use an empty array ( "errors": [] ) instead of
[null]; locate the SchemaItem/ResponseSamples entries for the 200 response and
make these two changes so the contract is explicit.
- Line 29: The MethodEndpoint usage for segment routes mixes versioned and
unversioned paths; pick a single scheme and make all segment endpoints
consistent (either change the delete path "/v1/segments/{id}" to
"/segments/{id}" or change the unversioned GET paths to include "/v1"). Update
every MethodEndpoint instances that reference "/segments" or
"/segments/{segmentId}" (including the one with path "/v1/segments/{id}") so
they all use the same path prefix, and ensure any related documentation text and
examples reflect the chosen versioning.

In `@docs/APIs-and-SDKs/Web-Console-API/segment-update.api.mdx`:
- Line 42: The 200 response schema currently defines the field "errors" as an
ambiguous undefined[] (and the example shows [null]); update the 200 response
shape so "errors" is explicit: either remove/omit "errors" from successful
responses or change its schema to a concrete type (e.g., "errors": string[] or
"errors": object[]), and make it optional if it only appears on failure. Edit
the response/schema block that defines the top-level fields (look for the
SchemaItem named "errors" and the ResponseSamples for the 200 example) and
update both the schema definition and the example JSON so they match the chosen
explicit contract.

In `@docs/APIs-and-SDKs/Web-Console-API/unit-get.api.mdx`:
- Line 41: The response example violates the schema: the SchemaItem for
created_by.created_by_user_id specifies "minimum": 1 but the JSON in
ResponseSamples (responseExample) uses 0; update the example JSON inside
ResponseSamples so created_by.created_by_user_id (and created_by_user_id at
top-level if present) are >= 1 (e.g., change 0 to 1) to match the SchemaItem
minimum constraint.

In `@docs/APIs-and-SDKs/Web-Console-API/usage-alert-get-all.api.mdx`:
- Line 39: Replace the response label "Ok" with the uppercase "OK" in the API
doc (the response/status label currently set to "Ok" in usage-alert-get-all API
content); locate the literal string "Ok" in the response section and change it
to "OK", and verify there are no other "Ok" occurrences in that file so response
wording is consistent.

---

Outside diff comments:
In `@docs/APIs-and-SDKs/Web-Console-API/cors-allowed-origin-get.api.mdx`:
- Around line 29-37: The path placeholder in MethodEndpoint uses "{corsId}" but
the ParamsItem declares "applicationId", causing a mismatch; update either the
MethodEndpoint path to use "{applicationId}" or change the ParamsItem param.name
to "corsId" so they match (choose the name consistent with your API model),
ensuring MethodEndpoint's path and the ParamsItem param.name are identical and
keep the description in ParamsItem consistent with the chosen identifier.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d9446120-1f0a-4daf-865c-ca153c72dd30

📥 Commits

Reviewing files that changed from the base of the PR and between d7d7d47 and 9ca33de.

📒 Files selected for processing (66)
  • docs/APIs-and-SDKs/Web-Console-API/Examples/_category_.json
  • docs/APIs-and-SDKs/Web-Console-API/api-key-get.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/api-keys-list.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/application-get.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/applications-list.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/backend.info.mdx
  • docs/APIs-and-SDKs/Web-Console-API/cors-allowed-origin-get.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/cors-allowed-origins-list.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/environment-get.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/environments-list.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/event-summary-get.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/events-quota-get.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/experiment-activity-get.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/experiment-annotation-get.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/experiment-annotations-list.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/experiment-archive.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/experiment-comment-create.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/experiment-comment-reply-create.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/experiment-full-on.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/experiment-get.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/experiment-main-metrics-data.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/experiment-main-metrics-history-data.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/experiment-participants-history-data.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/experiment-start.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/experiment-stop.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/experiment-tag-get.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/experiment-tags-list.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/experiments-list.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/goal-get.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/goal-tag-get.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/goal-tags-list.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/goals-list.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/metric-get.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/metric-tag-get.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/metric-tags-list.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/metrics-list.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/notification-has-new.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/notification-read.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/notification-see.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/notification-summary.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/permission-categories-list.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/permissions-list.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/platform-alerts-list.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/role-get.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/roles-list.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/segment-create.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/segment-delete.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/segment-get.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/segment-update.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/segments-list.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/team-get.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/teams-list.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/unit-get.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/units-list.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/usage-alert-add.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/usage-alert-delete.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/usage-alert-get-all.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/usage-alert-patch.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/usage-alert-update.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/user-api-keys-get.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/user-get.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/users-list.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/webhook-events-list.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/webhook-get.api.mdx
  • docs/APIs-and-SDKs/Web-Console-API/webhooks-list.api.mdx
  • nodeapi-spec.yaml

@@ -38,5 +38,5 @@ import TabItem from "@theme/TabItem";

A JSON Object a particular API key's data.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix missing word in response description.

Line 39 should read “A JSON Object containing a particular API key’s data.”

🧰 Tools
🪛 LanguageTool

[uncategorized] ~39-~39: Possible missing comma found.
Context: ...bel={"200"} value={"200"}>

A JSON Object a particular API key's data.
<di...

(AI_HYDRA_LEO_MISSING_COMMA)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/APIs-and-SDKs/Web-Console-API/api-key-get.api.mdx` at line 39, Update
the response description text in the API doc so it reads "A JSON Object
containing a particular API key's data." — locate the sentence "A JSON Object a
particular API key's data." in the Web-Console-API file (api-key-get.api.mdx)
and insert the missing word "containing" to correct the description.

Comment on lines +2 to +3
id: backend
title: "backend"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find stale references to the previous Web Console API info-page id/path.
rg -n 'absmartly-web-console-api'

Repository: absmartly/docs

Length of output: 227


Update redirect rule in test-all-urls.js to use the new page ID.

A stale reference was found in the redirect mapping at test-all-urls.js:199. The to path still targets absmartly-web-console-api instead of the new page ID backend. Update the redirect destination to match the new page identifier.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/APIs-and-SDKs/Web-Console-API/backend.info.mdx` around lines 2 - 3, The
redirect mapping in test-all-urls.js still points its "to" destination at
"absmartly-web-console-api"; update the redirect entry (the mapping in the
redirects array/object at the entry referenced around test-all-urls.js:199) so
its "to" path uses the new page ID "backend" instead of
"absmartly-web-console-api", ensuring any associated slug or full path string
that references the old ID is replaced with "backend".


## Request

<details style={{"marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collapsed={false} open={true}><summary style={{}}><h3 className={"openapi-markdown__details-summary-header-params"}>Query Parameters</h3></summary><div><ul><ParamsItem className={"paramsItem"} param={{"description":"Unix timestamp (ms) for the start of the range. Defaults to 30 days ago.","in":"query","name":"from","required":false,"schema":{"format":"int32","type":"integer"}}}></ParamsItem><ParamsItem className={"paramsItem"} param={{"description":"Unix timestamp (ms) for the end of the range. Defaults to now.","in":"query","name":"to","required":false,"schema":{"format":"int32","type":"integer"}}}></ParamsItem></ul></div></details><div><div><ApiTabs label={undefined} id={undefined}><TabItem label={"200"} value={"200"}><div>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Use int64 for millisecond timestamps in query params.

At Line 38, from and to are documented as Unix time in milliseconds but typed as int32. Current ms timestamps exceed int32 range, so this schema is invalid for real requests.

Suggested fix
-<ParamsItem className={"paramsItem"} param={{"description":"Unix timestamp (ms) for the start of the range. Defaults to 30 days ago.","in":"query","name":"from","required":false,"schema":{"format":"int32","type":"integer"}}}></ParamsItem>
-<ParamsItem className={"paramsItem"} param={{"description":"Unix timestamp (ms) for the end of the range. Defaults to now.","in":"query","name":"to","required":false,"schema":{"format":"int32","type":"integer"}}}></ParamsItem>
+<ParamsItem className={"paramsItem"} param={{"description":"Unix timestamp (ms) for the start of the range. Defaults to 30 days ago.","in":"query","name":"from","required":false,"schema":{"format":"int64","type":"integer"}}}></ParamsItem>
+<ParamsItem className={"paramsItem"} param={{"description":"Unix timestamp (ms) for the end of the range. Defaults to now.","in":"query","name":"to","required":false,"schema":{"format":"int64","type":"integer"}}}></ParamsItem>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<details style={{"marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collapsed={false} open={true}><summary style={{}}><h3 className={"openapi-markdown__details-summary-header-params"}>Query Parameters</h3></summary><div><ul><ParamsItem className={"paramsItem"} param={{"description":"Unix timestamp (ms) for the start of the range. Defaults to 30 days ago.","in":"query","name":"from","required":false,"schema":{"format":"int32","type":"integer"}}}></ParamsItem><ParamsItem className={"paramsItem"} param={{"description":"Unix timestamp (ms) for the end of the range. Defaults to now.","in":"query","name":"to","required":false,"schema":{"format":"int32","type":"integer"}}}></ParamsItem></ul></div></details><div><div><ApiTabs label={undefined} id={undefined}><TabItem label={"200"} value={"200"}><div>
<details style={{"marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collapsed={false} open={true}><summary style={{}}><h3 className={"openapi-markdown__details-summary-header-params"}>Query Parameters</h3></summary><div><ul><ParamsItem className={"paramsItem"} param={{"description":"Unix timestamp (ms) for the start of the range. Defaults to 30 days ago.","in":"query","name":"from","required":false,"schema":{"format":"int64","type":"integer"}}}></ParamsItem><ParamsItem className={"paramsItem"} param={{"description":"Unix timestamp (ms) for the end of the range. Defaults to now.","in":"query","name":"to","required":false,"schema":{"format":"int64","type":"integer"}}}></ParamsItem></ul></div></details><div><div><ApiTabs label={undefined} id={undefined}><TabItem label={"200"} value={"200"}><div>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/APIs-and-SDKs/Web-Console-API/event-summary-get.api.mdx` at line 38, The
query parameters "from" and "to" are documented as millisecond Unix timestamps
but their schemas use format "int32"; update the ParamsItem entries for
param.name "from" and param.name "to" to use an integer schema with format
"int64" (i.e., type "integer" and format "int64") so millisecond timestamps fit
the documented range.


Ok

</div><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"errors"} required={true} schemaName={"undefined[]"} qualifierMessage={undefined} schema={{"items":{},"type":"array"}}></SchemaItem><SchemaItem collapsible={false} name={"ok"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean"}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"errors\": [\n null\n ],\n \"ok\": true\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem></ApiTabs></div></div>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Fix incorrect errors response type and sample payload.

At Line 41, errors is documented as undefined[] and the example returns null, which breaks the contract clarity for clients. This should be a string array, consistent with the other notification update endpoints.

Suggested fix
-<SchemaItem collapsible={false} name={"errors"} required={true} schemaName={"undefined[]"} qualifierMessage={undefined} schema={{"items":{},"type":"array"}}></SchemaItem>
+<SchemaItem collapsible={false} name={"errors"} required={true} schemaName={"string[]"} qualifierMessage={undefined} schema={{"items":{"type":"string"},"type":"array"}}></SchemaItem>
...
-<ResponseSamples responseExample={"{\n  \"errors\": [\n    null\n  ],\n  \"ok\": true\n}"} language={"json"}></ResponseSamples>
+<ResponseSamples responseExample={"{\n  \"errors\": [\n    \"string\"\n  ],\n  \"ok\": true\n}"} language={"json"}></ResponseSamples>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
</div><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"errors"} required={true} schemaName={"undefined[]"} qualifierMessage={undefined} schema={{"items":{},"type":"array"}}></SchemaItem><SchemaItem collapsible={false} name={"ok"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean"}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"errors\": [\n null\n ],\n \"ok\": true\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem></ApiTabs></div></div>
</div><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"errors"} required={true} schemaName={"string[]"} qualifierMessage={undefined} schema={{"items":{"type":"string"},"type":"array"}}></SchemaItem><SchemaItem collapsible={false} name={"ok"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean"}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"errors\": [\n \"string\"\n ],\n \"ok\": true\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem></ApiTabs></div></div>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/APIs-and-SDKs/Web-Console-API/notification-see.api.mdx` at line 41, The
response schema incorrectly types the "errors" field as undefined[] and the
example contains null; update the SchemaItem for name "errors" (currently
schemaName "undefined[]") to be an array of strings (schema.type="array",
items.type="string") and update the responseExample JSON to show "errors":
["string message"] (or an empty array when appropriate) so it matches other
notification update endpoints and clarifies the contract for clients.


<h1 className={"openapi__heading"}>Segment DELETE</h1>

<MethodEndpoint method={"delete"} path={"/v1/segments/{id}"}></MethodEndpoint>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify documented segment endpoint prefixes and spot mixed versioning.
rg -nP 'MethodEndpoint method=\{"(get|post|put|patch|delete)"\} path=\{"/[^"]*segments[^"]*"\}' docs/APIs-and-SDKs/Web-Console-API -C1

Repository: absmartly/docs

Length of output: 1358


Segment endpoint versioning is inconsistent across the API documentation.

Currently, GET endpoints use unversioned paths (/segments, /segments/{segmentId}), while POST, PUT, and DELETE operations use versioned paths (/v1/segments, /v1/segments/{id}). If these reference the same API surface, this mixing will confuse users and cause client generation issues. Ensure all segment endpoints use the same versioning scheme.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/APIs-and-SDKs/Web-Console-API/segment-delete.api.mdx` at line 29, The
MethodEndpoint usage for segment routes mixes versioned and unversioned paths;
pick a single scheme and make all segment endpoints consistent (either change
the delete path "/v1/segments/{id}" to "/segments/{id}" or change the
unversioned GET paths to include "/v1"). Update every MethodEndpoint instances
that reference "/segments" or "/segments/{segmentId}" (including the one with
path "/v1/segments/{id}") so they all use the same path prefix, and ensure any
related documentation text and examples reflect the chosen versioning.


Ok

</div><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"errors"} required={true} schemaName={"undefined[]"} qualifierMessage={undefined} schema={{"items":{},"type":"array"}}></SchemaItem><SchemaItem collapsible={false} name={"ok"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean"}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"errors\": [\n null\n ],\n \"ok\": true\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"404"} value={"404"}><div>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

The 200 response errors type is ambiguous (undefined[]).

Line 41 renders errors as undefined[] (items: {}) and the success example includes null. This weakens the contract for consumers. Please define a concrete item type (commonly string) and use an empty array in the success example when no errors exist.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/APIs-and-SDKs/Web-Console-API/segment-delete.api.mdx` at line 41, The
response schema's errors array is currently unspecified (items: {}) and rendered
as undefined[] with a sample containing null; update the response schema for the
200 success to define a concrete item type (e.g., change items:{} to items: {
"type": "string" } so errors becomes string[]) and update the ResponseSamples
example to use an empty array ( "errors": [] ) instead of [null]; locate the
SchemaItem/ResponseSamples entries for the 200 response and make these two
changes so the contract is explicit.


Ok

</div><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"errors"} required={true} schemaName={"undefined[]"} qualifierMessage={undefined} schema={{"items":{},"type":"array"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>segment</strong><span className={"openapi-schema__name"}> object</span><span className={"openapi-schema__divider"}></span><span className={"openapi-schema__required"}>required</span></span></summary><div style={{"marginLeft":"1rem"}}><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>created_by</strong><span className={"openapi-schema__name"}> object</span><span className={"openapi-schema__divider"}></span><span className={"openapi-schema__required"}>required</span></span></summary><div style={{"marginLeft":"1rem"}}><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>avatar</strong><span className={"openapi-schema__name"}> object</span><span className={"openapi-schema__divider"}></span><span className={"openapi-schema__required"}>required</span></span></summary><div style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"crop_height"} required={true} schemaName={"double"} qualifierMessage={undefined} schema={{"type":"number","format":"double"}}></SchemaItem><SchemaItem collapsible={false} name={"crop_width"} required={true} schemaName={"double"} qualifierMessage={undefined} schema={{"type":"number","format":"double"}}></SchemaItem><SchemaItem collapsible={false} name={"crop_top"} required={true} schemaName={"double"} qualifierMessage={undefined} schema={{"type":"number","format":"double"}}></SchemaItem><SchemaItem collapsible={false} name={"crop_left"} required={true} schemaName={"double"} qualifierMessage={undefined} schema={{"type":"number","format":"double"}}></SchemaItem><SchemaItem collapsible={false} name={"base_url"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"content_type"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"file_name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"file_size"} required={true} schemaName={"double"} qualifierMessage={undefined} schema={{"type":"number","format":"double"}}></SchemaItem><SchemaItem collapsible={false} name={"height"} required={true} schemaName={"double"} qualifierMessage={undefined} schema={{"type":"number","format":"double"}}></SchemaItem><SchemaItem collapsible={false} name={"width"} required={true} schemaName={"double"} qualifierMessage={undefined} schema={{"type":"number","format":"double"}}></SchemaItem><SchemaItem collapsible={false} name={"file_usage_id"} required={true} schemaName={"double"} qualifierMessage={undefined} schema={{"type":"number","format":"double"}}></SchemaItem><SchemaItem collapsible={false} name={"created_by_user_id"} required={true} schemaName={"double"} qualifierMessage={undefined} schema={{"type":"number","format":"double"}}></SchemaItem><SchemaItem collapsible={false} name={"created_at"} required={true} schemaName={"date-time"} qualifierMessage={undefined} schema={{"type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"double"} qualifierMessage={undefined} schema={{"type":"number","format":"double"}}></SchemaItem></div></details></SchemaItem><SchemaItem collapsible={false} name={"date_format_locale"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"demo_user"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"last_login_failure_at"} required={true} schemaName={"date-time"} qualifierMessage={undefined} schema={{"type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"last_login_at"} required={true} schemaName={"date-time"} qualifierMessage={undefined} schema={{"type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"consecutive_login_failures"} required={true} schemaName={"double"} qualifierMessage={undefined} schema={{"type":"number","format":"double"}}></SchemaItem><SchemaItem collapsible={false} name={"archived"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"avatar_file_upload_id"} required={true} schemaName={"double"} qualifierMessage={undefined} schema={{"type":"number","format":"double"}}></SchemaItem><SchemaItem collapsible={false} name={"job_title"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"department"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"last_name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"first_name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"email"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"external_id"} required={true} schemaName={"double"} qualifierMessage={undefined} schema={{"type":"number","format":"double"}}></SchemaItem><SchemaItem collapsible={false} name={"updated_by_user_id"} required={true} schemaName={"double"} qualifierMessage={undefined} schema={{"type":"number","format":"double"}}></SchemaItem><SchemaItem collapsible={false} name={"updated_at"} required={true} schemaName={"date-time"} qualifierMessage={undefined} schema={{"type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"created_by_user_id"} required={true} schemaName={"double"} qualifierMessage={undefined} schema={{"type":"number","format":"double"}}></SchemaItem><SchemaItem collapsible={false} name={"created_at"} required={true} schemaName={"date-time"} qualifierMessage={undefined} schema={{"type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"double"} qualifierMessage={undefined} schema={{"type":"number","format":"double"}}></SchemaItem></div></details></SchemaItem><SchemaItem collapsible={false} name={"updated_by_user_id"} required={true} schemaName={"double"} qualifierMessage={undefined} schema={{"type":"number","format":"double"}}></SchemaItem><SchemaItem collapsible={false} name={"updated_at"} required={true} schemaName={"date-time"} qualifierMessage={undefined} schema={{"type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"created_by_user_id"} required={true} schemaName={"double"} qualifierMessage={undefined} schema={{"type":"number","format":"double"}}></SchemaItem><SchemaItem collapsible={false} name={"created_at"} required={true} schemaName={"date-time"} qualifierMessage={undefined} schema={{"type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"value_source_attribute"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"description"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"double"} qualifierMessage={undefined} schema={{"type":"number","format":"double"}}></SchemaItem></div></details></SchemaItem><SchemaItem collapsible={false} name={"ok"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean"}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"errors\": [\n null\n ],\n \"segment\": {\n \"created_by\": {\n \"avatar\": {\n \"crop_height\": 0,\n \"crop_width\": 0,\n \"crop_top\": 0,\n \"crop_left\": 0,\n \"base_url\": \"string\",\n \"content_type\": \"string\",\n \"file_name\": \"string\",\n \"file_size\": 0,\n \"height\": 0,\n \"width\": 0,\n \"file_usage_id\": 0,\n \"created_by_user_id\": 0,\n \"created_at\": \"2026-05-12T11:04:56.042Z\",\n \"id\": 0\n },\n \"date_format_locale\": \"string\",\n \"demo_user\": true,\n \"last_login_failure_at\": \"2026-05-12T11:04:56.042Z\",\n \"last_login_at\": \"2026-05-12T11:04:56.042Z\",\n \"consecutive_login_failures\": 0,\n \"archived\": true,\n \"avatar_file_upload_id\": 0,\n \"job_title\": \"string\",\n \"department\": \"string\",\n \"last_name\": \"string\",\n \"first_name\": \"string\",\n \"email\": \"string\",\n \"external_id\": 0,\n \"updated_by_user_id\": 0,\n \"updated_at\": \"2026-05-12T11:04:56.042Z\",\n \"created_by_user_id\": 0,\n \"created_at\": \"2026-05-12T11:04:56.042Z\",\n \"id\": 0\n },\n \"updated_by_user_id\": 0,\n \"updated_at\": \"2026-05-12T11:04:56.042Z\",\n \"created_by_user_id\": 0,\n \"created_at\": \"2026-05-12T11:04:56.042Z\",\n \"value_source_attribute\": \"string\",\n \"description\": \"string\",\n \"name\": \"string\",\n \"id\": 0\n },\n \"ok\": true\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

200 response contract is ambiguous (errors: undefined[] / [null])

On Line 42, the success schema exposes errors as required undefined[], and the example shows errors: [null]. That is not a clear JSON contract and can produce poor generated SDK types. Please make the 200 shape explicit (e.g., omit errors on success, or use a concrete type such as string[] with []).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/APIs-and-SDKs/Web-Console-API/segment-update.api.mdx` at line 42, The
200 response schema currently defines the field "errors" as an ambiguous
undefined[] (and the example shows [null]); update the 200 response shape so
"errors" is explicit: either remove/omit "errors" from successful responses or
change its schema to a concrete type (e.g., "errors": string[] or "errors":
object[]), and make it optional if it only appears on failure. Edit the
response/schema block that defines the top-level fields (look for the SchemaItem
named "errors" and the ResponseSamples for the 200 example) and update both the
schema definition and the example JSON so they match the chosen explicit
contract.

A JSON Object containing a unit's data.

</div><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>unit_type</strong><span className={"openapi-schema__name"}> object</span></span></summary><div style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={false} schemaName={"integer"} qualifierMessage={undefined} schema={{"type":"integer"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"user_id"}}></SchemaItem><SchemaItem collapsible={false} name={"description"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"The ids of our users"}}></SchemaItem><SchemaItem collapsible={false} name={"created_at"} required={false} schemaName={"date-time"} qualifierMessage={undefined} schema={{"type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"created_by_user_id"} required={false} schemaName={"integer"} qualifierMessage={undefined} schema={{"type":"integer"}}></SchemaItem><SchemaItem collapsible={false} name={"updated_at"} required={false} schemaName={"date-time"} qualifierMessage={undefined} schema={{"nullable":true,"type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"updated_by_user_id"} required={false} schemaName={"integer"} qualifierMessage={undefined} schema={{"nullable":true,"type":"integer"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>created_by</strong><span className={"openapi-schema__name"}> object</span></span></summary><div style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"archived"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean","example":false}}></SchemaItem><SchemaItem collapsible={false} name={"avatar"} required={false} schemaName={"object"} qualifierMessage={undefined} schema={{"type":"object","nullable":true}}></SchemaItem><SchemaItem collapsible={false} name={"avatar_file_upload_url"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"/cropUrl/100x100/1.png"}}></SchemaItem><SchemaItem collapsible={false} name={"created_at"} required={false} schemaName={"date-time"} qualifierMessage={undefined} schema={{"type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"created_by_user_id"} required={false} schemaName={"integer"} qualifierMessage={"**Possible values:** `>= 1`"} schema={{"type":"integer","minimum":1}}></SchemaItem><SchemaItem collapsible={false} name={"department"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"Marketing"}}></SchemaItem><SchemaItem collapsible={false} name={"email"} required={false} schemaName={"email"} qualifierMessage={undefined} schema={{"type":"string","format":"email"}}></SchemaItem></div></details></SchemaItem><SchemaItem collapsible={false} name={"archived"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean","example":false}}></SchemaItem></div></details></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"unit_type\": {\n \"id\": 0,\n \"name\": \"user_id\",\n \"description\": \"The ids of our users\",\n \"created_at\": \"2026-01-14T09:35:17.647Z\",\n \"created_by_user_id\": 0,\n \"updated_at\": \"2026-01-14T09:35:17.647Z\",\n \"updated_by_user_id\": 0,\n \"created_by\": {\n \"archived\": false,\n \"avatar\": {},\n \"avatar_file_upload_url\": \"/cropUrl/100x100/1.png\",\n \"created_at\": \"2026-01-14T09:35:17.647Z\",\n \"created_by_user_id\": 0,\n \"department\": \"Marketing\",\n \"email\": \"user@example.com\"\n },\n \"archived\": false\n }\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem></ApiTabs></div></div>
</div><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>unit_type</strong><span className={"openapi-schema__name"}> object</span></span></summary><div style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={false} schemaName={"integer"} qualifierMessage={undefined} schema={{"type":"integer"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"user_id"}}></SchemaItem><SchemaItem collapsible={false} name={"description"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"The ids of our users"}}></SchemaItem><SchemaItem collapsible={false} name={"created_at"} required={false} schemaName={"date-time"} qualifierMessage={undefined} schema={{"type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"created_by_user_id"} required={false} schemaName={"integer"} qualifierMessage={undefined} schema={{"type":"integer"}}></SchemaItem><SchemaItem collapsible={false} name={"updated_at"} required={false} schemaName={"date-time"} qualifierMessage={undefined} schema={{"nullable":true,"type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"updated_by_user_id"} required={false} schemaName={"integer"} qualifierMessage={undefined} schema={{"nullable":true,"type":"integer"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>created_by</strong><span className={"openapi-schema__name"}> object</span></span></summary><div style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"archived"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean","example":false}}></SchemaItem><SchemaItem collapsible={false} name={"avatar"} required={false} schemaName={"object"} qualifierMessage={undefined} schema={{"type":"object","nullable":true}}></SchemaItem><SchemaItem collapsible={false} name={"avatar_file_upload_url"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"/cropUrl/100x100/1.png"}}></SchemaItem><SchemaItem collapsible={false} name={"created_at"} required={false} schemaName={"date-time"} qualifierMessage={undefined} schema={{"type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"created_by_user_id"} required={false} schemaName={"integer"} qualifierMessage={"**Possible values:** `>= 1`"} schema={{"type":"integer","minimum":1}}></SchemaItem><SchemaItem collapsible={false} name={"department"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"Marketing"}}></SchemaItem><SchemaItem collapsible={false} name={"email"} required={false} schemaName={"email"} qualifierMessage={undefined} schema={{"type":"string","format":"email"}}></SchemaItem></div></details></SchemaItem><SchemaItem collapsible={false} name={"archived"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean","example":false}}></SchemaItem></div></details></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"unit_type\": {\n \"id\": 0,\n \"name\": \"user_id\",\n \"description\": \"The ids of our users\",\n \"created_at\": \"2026-05-12T11:04:56.032Z\",\n \"created_by_user_id\": 0,\n \"updated_at\": \"2026-05-12T11:04:56.032Z\",\n \"updated_by_user_id\": 0,\n \"created_by\": {\n \"archived\": false,\n \"avatar\": {},\n \"avatar_file_upload_url\": \"/cropUrl/100x100/1.png\",\n \"created_at\": \"2026-05-12T11:04:56.032Z\",\n \"created_by_user_id\": 0,\n \"department\": \"Marketing\",\n \"email\": \"user@example.com\"\n },\n \"archived\": false\n }\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem></ApiTabs></div></div>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Example value breaks its own schema constraint

On Line 41, created_by.created_by_user_id is documented with minimum: 1, but the response example still uses 0. Please align the example with the schema to avoid confusing integrators.

Suggested patch
-      \"created_by_user_id\": 0,
+      \"created_by_user_id\": 1,
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
</div><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>unit_type</strong><span className={"openapi-schema__name"}> object</span></span></summary><div style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={false} schemaName={"integer"} qualifierMessage={undefined} schema={{"type":"integer"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"user_id"}}></SchemaItem><SchemaItem collapsible={false} name={"description"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"The ids of our users"}}></SchemaItem><SchemaItem collapsible={false} name={"created_at"} required={false} schemaName={"date-time"} qualifierMessage={undefined} schema={{"type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"created_by_user_id"} required={false} schemaName={"integer"} qualifierMessage={undefined} schema={{"type":"integer"}}></SchemaItem><SchemaItem collapsible={false} name={"updated_at"} required={false} schemaName={"date-time"} qualifierMessage={undefined} schema={{"nullable":true,"type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"updated_by_user_id"} required={false} schemaName={"integer"} qualifierMessage={undefined} schema={{"nullable":true,"type":"integer"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>created_by</strong><span className={"openapi-schema__name"}> object</span></span></summary><div style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"archived"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean","example":false}}></SchemaItem><SchemaItem collapsible={false} name={"avatar"} required={false} schemaName={"object"} qualifierMessage={undefined} schema={{"type":"object","nullable":true}}></SchemaItem><SchemaItem collapsible={false} name={"avatar_file_upload_url"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"/cropUrl/100x100/1.png"}}></SchemaItem><SchemaItem collapsible={false} name={"created_at"} required={false} schemaName={"date-time"} qualifierMessage={undefined} schema={{"type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"created_by_user_id"} required={false} schemaName={"integer"} qualifierMessage={"**Possible values:** `>= 1`"} schema={{"type":"integer","minimum":1}}></SchemaItem><SchemaItem collapsible={false} name={"department"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"Marketing"}}></SchemaItem><SchemaItem collapsible={false} name={"email"} required={false} schemaName={"email"} qualifierMessage={undefined} schema={{"type":"string","format":"email"}}></SchemaItem></div></details></SchemaItem><SchemaItem collapsible={false} name={"archived"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean","example":false}}></SchemaItem></div></details></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"unit_type\": {\n \"id\": 0,\n \"name\": \"user_id\",\n \"description\": \"The ids of our users\",\n \"created_at\": \"2026-05-12T11:04:56.032Z\",\n \"created_by_user_id\": 0,\n \"updated_at\": \"2026-05-12T11:04:56.032Z\",\n \"updated_by_user_id\": 0,\n \"created_by\": {\n \"archived\": false,\n \"avatar\": {},\n \"avatar_file_upload_url\": \"/cropUrl/100x100/1.png\",\n \"created_at\": \"2026-05-12T11:04:56.032Z\",\n \"created_by_user_id\": 0,\n \"department\": \"Marketing\",\n \"email\": \"user@example.com\"\n },\n \"archived\": false\n }\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem></ApiTabs></div></div>
</div><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>unit_type</strong><span className={"openapi-schema__name"}> object</span></span></summary><div style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={false} schemaName={"integer"} qualifierMessage={undefined} schema={{"type":"integer"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"user_id"}}></SchemaItem><SchemaItem collapsible={false} name={"description"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"The ids of our users"}}></SchemaItem><SchemaItem collapsible={false} name={"created_at"} required={false} schemaName={"date-time"} qualifierMessage={undefined} schema={{"type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"created_by_user_id"} required={false} schemaName={"integer"} qualifierMessage={undefined} schema={{"type":"integer"}}></SchemaItem><SchemaItem collapsible={false} name={"updated_at"} required={false} schemaName={"date-time"} qualifierMessage={undefined} schema={{"nullable":true,"type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"updated_by_user_id"} required={false} schemaName={"integer"} qualifierMessage={undefined} schema={{"nullable":true,"type":"integer"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>created_by</strong><span className={"openapi-schema__name"}> object</span></span></summary><div style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"archived"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean","example":false}}></SchemaItem><SchemaItem collapsible={false} name={"avatar"} required={false} schemaName={"object"} qualifierMessage={undefined} schema={{"type":"object","nullable":true}}></SchemaItem><SchemaItem collapsible={false} name={"avatar_file_upload_url"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"/cropUrl/100x100/1.png"}}></SchemaItem><SchemaItem collapsible={false} name={"created_at"} required={false} schemaName={"date-time"} qualifierMessage={undefined} schema={{"type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"created_by_user_id"} required={false} schemaName={"integer"} qualifierMessage={"**Possible values:** `>= 1`"} schema={{"type":"integer","minimum":1}}></SchemaItem><SchemaItem collapsible={false} name={"department"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"Marketing"}}></SchemaItem><SchemaItem collapsible={false} name={"email"} required={false} schemaName={"email"} qualifierMessage={undefined} schema={{"type":"string","format":"email"}}></SchemaItem></div></details></SchemaItem><SchemaItem collapsible={false} name={"archived"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean","example":false}}></SchemaItem></div></details></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"unit_type\": {\n \"id\": 0,\n \"name\": \"user_id\",\n \"description\": \"The ids of our users\",\n \"created_at\": \"2026-05-12T11:04:56.032Z\",\n \"created_by_user_id\": 0,\n \"updated_at\": \"2026-05-12T11:04:56.032Z\",\n \"updated_by_user_id\": 0,\n \"created_by\": {\n \"archived\": false,\n \"avatar\": {},\n \"avatar_file_upload_url\": \"/cropUrl/100x100/1.png\",\n \"created_at\": \"2026-05-12T11:04:56.032Z\",\n \"created_by_user_id\": 1,\n \"department\": \"Marketing\",\n \"email\": \"user@example.com\"\n },\n \"archived\": false\n }\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem></ApiTabs></div></div>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/APIs-and-SDKs/Web-Console-API/unit-get.api.mdx` at line 41, The response
example violates the schema: the SchemaItem for created_by.created_by_user_id
specifies "minimum": 1 but the JSON in ResponseSamples (responseExample) uses 0;
update the example JSON inside ResponseSamples so created_by.created_by_user_id
(and created_by_user_id at top-level if present) are >= 1 (e.g., change 0 to 1)
to match the SchemaItem minimum constraint.


<div><div><ApiTabs label={undefined} id={undefined}><TabItem label={"200"} value={"200"}><div>

Ok
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use “OK” instead of “Ok” in response labels.

At Line 39, change Ok to OK for consistent HTTP/status wording across docs.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/APIs-and-SDKs/Web-Console-API/usage-alert-get-all.api.mdx` at line 39,
Replace the response label "Ok" with the uppercase "OK" in the API doc (the
response/status label currently set to "Ok" in usage-alert-get-all API content);
locate the literal string "Ok" in the response section and change it to "OK",
and verify there are no other "Ok" occurrences in that file so response wording
is consistent.

@calthejuggler calthejuggler merged commit bc414a9 into master May 12, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant