From 8ab4d77830830d5ca0f465024b4f2ff2d556d2a2 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 24 Sep 2026 00:12:54 +0000 Subject: [PATCH 1/2] =?UTF-8?q?##=20Typescript=20SDK=20Changes:=20*=20`not?= =?UTF-8?q?ra.agent.createAgentSession()`:=20=20`response.continuationToke?= =?UTF-8?q?n`=20**Removed**=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20*=20`notra?= =?UTF-8?q?.agent.sendAgentSessionMessage()`:=20=20=20*=20=20`request.body?= =?UTF-8?q?.continuationToken`=20**Removed**=20(Breaking=20=E2=9A=A0?= =?UTF-8?q?=EF=B8=8F)=20*=20`notra.geo.getGeoSettings()`:=20=20`response.s?= =?UTF-8?q?ettings.trackWithoutSearch`=20**Added**=20*=20`notra.geo.update?= =?UTF-8?q?GeoSettings()`:=20=20=20*=20=20`request.body.trackWithoutSearch?= =?UTF-8?q?`=20**Added**=20=20=20*=20=20`response.settings.trackWithoutSea?= =?UTF-8?q?rch`=20**Added**=20*=20`notra.geo.listGeoChanges()`:=20=20`resp?= =?UTF-8?q?onse.events[].kind.enum(competitorCited)`=20**Added**=20*=20`no?= =?UTF-8?q?tra.geo.listGeoTrafficJourneys()`:=20=20`response.journeys[].en?= =?UTF-8?q?tryPath`=20**Added**=20*=20`notra.geo.getGeoIngestSetup()`:=20?= =?UTF-8?q?=20`response.snippets`=20**Changed**=20*=20`notra.geo.issueGeoI?= =?UTF-8?q?ngestToken()`:=20=20`response.snippets`=20**Changed**=20*=20`no?= =?UTF-8?q?tra.geo.rotateGeoIngestToken()`:=20=20`response.snippets`=20**C?= =?UTF-8?q?hanged**?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .speakeasy/gen.lock | 132 +++++++++--------- .speakeasy/gen.yaml | 2 +- .speakeasy/out.openapi.yaml | 2 +- .speakeasy/workflow.lock | 12 +- RELEASES.md | 12 +- docs/models/create-agent-session-response.md | 10 +- docs/models/geo-changes-response-kind.md | 2 +- .../geo-ingest-setup-response-snippets.md | 8 +- docs/models/geo-ingest-setup-response.md | 3 + .../geo-ingest-token-response-snippets.md | 8 +- docs/models/geo-ingest-token-response.md | 3 + docs/models/geo-settings-response.md | 15 +- docs/models/geo-settings.md | 15 +- docs/models/journey.md | 2 + .../create-agent-session-response.md | 1 - .../send-agent-session-message-request.md | 4 +- docs/models/patch-geo-settings-request.md | 1 + docs/models/send-agent-message-request.md | 7 +- docs/sdks/agent/README.md | 8 +- examples/package-lock.json | 2 +- jsr.json | 2 +- package-lock.json | 4 +- package.json | 2 +- src/lib/config.ts | 6 +- src/models/create-agent-session-response.ts | 2 - src/models/geo-changes-response.ts | 1 + src/models/geo-ingest-setup-response.ts | 6 + src/models/geo-ingest-token-response.ts | 6 + src/models/geo-settings.ts | 2 + src/models/geo-traffic-journeys-response.ts | 2 + src/models/patch-geo-settings-request.ts | 6 + src/models/send-agent-message-request.ts | 6 - 32 files changed, 168 insertions(+), 126 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 75d939a..d9e33ee 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 104db2d6-9bbd-4701-8824-eae3c56579e7 management: - docChecksum: e5e6d33760d9c75d7ec2599ee87671d1 + docChecksum: 8272af2f2d56f9b6f0581eae21e42d3e docVersion: 1.0.0 - speakeasyVersion: 1.797.0 - generationVersion: 2.937.18 - releaseVersion: 1.3.6 - configChecksum: 452b307c1bfd579b8b5f91c9f7ede984 + speakeasyVersion: 1.798.0 + generationVersion: 2.938.0 + releaseVersion: 1.3.7 + configChecksum: 9dd68191f65c838c51c79e9c69da072f repoURL: https://github.com/usenotra/typescript-sdk.git installationURL: https://github.com/usenotra/typescript-sdk published: true persistentEdits: - generation_id: 9279176f-501c-4ca1-a23c-ab17f2d86c46 - pristine_commit_hash: c8071882470a9147d390ee57bc665ecad9f0393d - pristine_tree_hash: dd2fb52d97d02c0d8b6923425614dda618b11ca6 + generation_id: ea71478c-5284-4e69-bea2-82e713e84aca + pristine_commit_hash: 3acc0b760a3a086edb115a9c6f449f6f203d0513 + pristine_tree_hash: c49fcb45728df08f2a8332a023ad859a429c569c features: typescript: additionalDependencies: 0.1.0 @@ -172,8 +172,8 @@ trackedFiles: pristine_git_object: 9769787b34d145664fa3b604d82cdf6650f9f3a7 docs/models/create-agent-session-response.md: id: b367a40a236d - last_write_checksum: sha1:5ec69a409ca43363db53f93d3a8e44e7abdb536c - pristine_git_object: f413066836643ab4605b968936755f413167002d + last_write_checksum: sha1:04a11e376a89be90e99f27fd0bb6198bfb9e2088 + pristine_git_object: 38c1217b8b3eb35647664a2c241074af6bd3d8b4 docs/models/create-geo-project-request.md: id: 2308622b1788 last_write_checksum: sha1:4281ad6f5b421fcbddc82e10345522bb1ed271e2 @@ -348,8 +348,8 @@ trackedFiles: pristine_git_object: 7bedade663805f208584e7a87901987a65227741 docs/models/geo-changes-response-kind.md: id: 0966cc747b6b - last_write_checksum: sha1:4d092726a8d1b64d76ece03d0546d2f5f97c38f1 - pristine_git_object: 8d2c5e67f8380df46042d0c9eeb87a1dedc52b03 + last_write_checksum: sha1:eab413c2beebb01283a3c9c8f95b794f08c0c9ed + pristine_git_object: 79d34ef65bfdfd791ac9a37c91f174118071e0d1 docs/models/geo-changes-response-organization.md: id: 736b0f2d4b81 last_write_checksum: sha1:2a13c91e52de3dcf6c4a46b2c1cf2297959206de @@ -440,24 +440,24 @@ trackedFiles: pristine_git_object: 47d7b8043a357419d6faefd1a74d3cc1766fcff1 docs/models/geo-ingest-setup-response-snippets.md: id: f062a318a6cb - last_write_checksum: sha1:c3bc3fb49879a14c3070cc5dea0c3588514ae4e5 - pristine_git_object: c9c90b18c9643189cc426d33f6e34d57ed05f7ef + last_write_checksum: sha1:bfc5d582a9afcfe407f4726682e429a0ac27e996 + pristine_git_object: 598c73e583fb054527e7e859c875b2c5b71337ee docs/models/geo-ingest-setup-response.md: id: 7f69a1a95527 - last_write_checksum: sha1:68be26095e9b8122de7fb380bdaca510bac34229 - pristine_git_object: 55cd36492891ad6096576bd39a43b8a21b536401 + last_write_checksum: sha1:ff3f4a18fb78e8f45ae6950fc288b46abdafb363 + pristine_git_object: 2e04750ac720e3a430caf25ce553b333b6118426 docs/models/geo-ingest-token-response-organization.md: id: 9924d9df67f8 last_write_checksum: sha1:557edcb8d84563fafcf2df73bf3b917d543ed593 pristine_git_object: 933573f4a56929cfa030839d50b93f04be01bb33 docs/models/geo-ingest-token-response-snippets.md: id: c336e57ea19c - last_write_checksum: sha1:91429fd52a34a426f66167665bd430af973aabfd - pristine_git_object: 9f2ff66ecd6ede598ab1b883499a3cbc0a73e8cf + last_write_checksum: sha1:d3f8617c7e2f3f16f4cf45c5e1e8dc385d3bfaa9 + pristine_git_object: 009a52afe9d7e8140991547d1e539d1fe9dd992f docs/models/geo-ingest-token-response.md: id: ce028ae09547 - last_write_checksum: sha1:fafab2f0c46e2f32c5193504e391d0308ba9c113 - pristine_git_object: 468a70399cfd540f19d4b6c04bb508f7249b4f1c + last_write_checksum: sha1:060565aaa3580fc9afd02b39476272e533a80539 + pristine_git_object: 3911b397abcf4d77c87dee1287802de4d87304bf docs/models/geo-journey-detail-response-event.md: id: a1913d1e4202 last_write_checksum: sha1:db2e0627876fbd357c2f78b9715e0c117326b5b8 @@ -604,12 +604,12 @@ trackedFiles: pristine_git_object: 68513223181f2e25a64aca2e27cba86f0f0779ee docs/models/geo-settings-response.md: id: 7a172061dedd - last_write_checksum: sha1:9493609154ee70b3d6dd8ce67cf6616837e469a7 - pristine_git_object: 98b68711414f866667b0b2b07fffd15f0d2f5f67 + last_write_checksum: sha1:9154a22068b8f5a325e0ccd318a95caaaccc1298 + pristine_git_object: 68e5c96895e791bbf2cb334eddcbe7f266b14f90 docs/models/geo-settings.md: id: 1dc43ead5a0c - last_write_checksum: sha1:456334ac7523d55dc6be73abbe09d387de1f0e5d - pristine_git_object: 2c86551e0b549d0dee80f51e40c750f6d433bfc8 + last_write_checksum: sha1:69c8117fa6401df9b65c83102c18d3edbee04a17 + pristine_git_object: c8610f7db6783a655efe3cdc3dc61b4f24a1b364 docs/models/geo-shelf-list-response-kind.md: id: e1531ee588b6 last_write_checksum: sha1:f8e5e6e234a457f20c8b128994cf1cd6fb7e96fc @@ -868,8 +868,8 @@ trackedFiles: pristine_git_object: 8c9b0eed51df0d63de28f22e792d1bc96f4e027b docs/models/journey.md: id: 2e6d978311da - last_write_checksum: sha1:b7fd4339b964db8ea44747769cd7dd932ae4305c - pristine_git_object: 9b0da8f57a01e10a54ba0952242186f305873e29 + last_write_checksum: sha1:79add7b60257e12cd5783121b2818bf8df5407dc + pristine_git_object: cdfc5a65c1451ace8925c9eadd870923801a774d docs/models/list-agent-chats-response.md: id: 2e9a7c3c6579 last_write_checksum: sha1:885580e01eccc85dd910dbccb152f68891829b3c @@ -960,8 +960,8 @@ trackedFiles: pristine_git_object: 60e94d19aad56748ab872cec9f2892ebe6601cc2 docs/models/operations/create-agent-session-response.md: id: 8e7b37cd4dec - last_write_checksum: sha1:122221e1da91a8fe077cb1f20da6870d3e776e9e - pristine_git_object: 5b9794953ed5522b7a20e83a23ded2b1add30d55 + last_write_checksum: sha1:0c2febd54df602196c3d01fd5b6a6145cc1b4934 + pristine_git_object: 5ed142776da0140c4570167bbaeef167d180d2ab docs/models/operations/create-brand-identity-job.md: id: 8e78c2c1950b last_write_checksum: sha1:50d98fe4258041dc4a16864c192aea659ab96463 @@ -1924,8 +1924,8 @@ trackedFiles: pristine_git_object: 8461d059b1ad83a70bd37fd8dc9fb7bc118a0ec3 docs/models/operations/send-agent-session-message-request.md: id: 278d44c7dc53 - last_write_checksum: sha1:2352b035274d040aaa8b127e2209b66ca83797ab - pristine_git_object: 4ccf84cb330f991955b53cfa42cf238354733d7b + last_write_checksum: sha1:230a8c5f8fee33cd35d22992d42c22d56499af7f + pristine_git_object: 9199ad6487819d400f660f62efa3bb9ee3acd609 docs/models/operations/send-agent-session-message-response-body.md: id: c0e713de5456 last_write_checksum: sha1:99ddb0f438053f5cd3ae5920641e529c42699780 @@ -2224,8 +2224,8 @@ trackedFiles: pristine_git_object: 6fae3e78af87617ec5ca24387b50a037fbd54527 docs/models/patch-geo-settings-request.md: id: 4162c82bc0b2 - last_write_checksum: sha1:0ae25e40ef70a51ef8e5e7c4cb85a6d92740cca3 - pristine_git_object: fad3b8066d41dcdea248c530cf97c1cc9e3b9ccf + last_write_checksum: sha1:f8460de9ae687345d02c321fb2a2e35e132dfaca + pristine_git_object: 3d098ac27dadd52ddd075abf9ff9c17103273530 docs/models/patch-schedule-request-output-config.md: id: 1ba152a96688 last_write_checksum: sha1:86bc3cb24f784a4243c7535024509d1a5024c0b4 @@ -2408,8 +2408,8 @@ trackedFiles: pristine_git_object: 9224384295d93cd566ab540021dd0d2c6081b78a docs/models/send-agent-message-request.md: id: e8bfad2e115a - last_write_checksum: sha1:6481834138eace26425a6e5deeea99b0d84ac5aa - pristine_git_object: d5f1faf2c3fa10ad6d734d3ff617a15302e94620 + last_write_checksum: sha1:a92026d3eba5b4c77e6060b19446e657aa85d97d + pristine_git_object: b2212bd3665bf5c4f0e2b2636e26853f9faa1e72 docs/models/send-chat-message-request.md: id: 927ebbf56e9f last_write_checksum: sha1:aaaa41b580f1a0d756aa767470f0b21434aafe48 @@ -2500,8 +2500,8 @@ trackedFiles: pristine_git_object: c5af018bb115f0e04b86baf7d5b413c00cf1bac3 docs/sdks/agent/README.md: id: 6e1cf5aab95b - last_write_checksum: sha1:398a8c83d5d82d5dd336fa46bffcd18467190c9e - pristine_git_object: ce779d0b43381570b39c77a8a376f499507e7cce + last_write_checksum: sha1:75cfee54ae73a6eee35535ad8461243434d48c5b + pristine_git_object: c2b2567d3c165fab791a2c981bfcf63101db8746 docs/sdks/chats/README.md: id: ea139ac0a476 last_write_checksum: sha1:38b7065479ac6887870365dcbeb17ca34c18f44c @@ -2556,12 +2556,12 @@ trackedFiles: pristine_git_object: 3023ce82381e2e8aa2d621788c5bf096cc0419b4 jsr.json: id: 7f6ab7767282 - last_write_checksum: sha1:0537e530deebcd8e794ef3fb0fdd9541358c6f0e - pristine_git_object: 2e104046f3b78f1678b4446554082991a86a3235 + last_write_checksum: sha1:8498c16e16d343ea9b91ca9edb2e9bf7ba5a7f2b + pristine_git_object: 150c3c92559c2c7f7448b084fa74f10f863994d4 package.json: id: 7030d0b2f71b - last_write_checksum: sha1:5135fc731e0db8d58a6a710cc4a0756f982c7751 - pristine_git_object: e3230e083bcd5157e452252f42c9251249ff8d48 + last_write_checksum: sha1:f307d79c4374145f99f90cddd7ffaf875c872a53 + pristine_git_object: 1717fff630423ce054c486428f3cddc3067eb2ea src/core.ts: id: f431fdbcd144 last_write_checksum: sha1:e8d638e0e6a2cda3f4c932a136d971d10a1ef6f4 @@ -2988,8 +2988,8 @@ trackedFiles: pristine_git_object: 0b2543a00780f8844dcd1fbdcbc51a91262d91bc src/lib/config.ts: id: 320761608fb3 - last_write_checksum: sha1:29fc5c964cd89fa14d4f365616df0a251671de4e - pristine_git_object: ac5561405a8e0af0e402df4a68dbb6055871021f + last_write_checksum: sha1:3b153f8de74d3bbd26381a4e012e418b38818f55 + pristine_git_object: 1ca1cfad76fb68ce354e332dfc47a894dcb39649 src/lib/encodings.ts: id: 3bd8ead98afd last_write_checksum: sha1:b68a019ff91cf3d6e99cc0cad3f09c9517133713 @@ -3056,8 +3056,8 @@ trackedFiles: pristine_git_object: d764e9e0a99cea655f2838e787aee0d6c2010be1 src/models/create-agent-session-response.ts: id: de7d9fce3f8d - last_write_checksum: sha1:76e15504d02d3249efca77ead5a0aa8932dd809a - pristine_git_object: edc2140eb0be79d153452a14eae545e682e8894f + last_write_checksum: sha1:e57bcb945efb937da557f61cc159dbfb09677e31 + pristine_git_object: 07cda4b3a45ea2473c4e3afb1948e19520f7297c src/models/create-geo-project-request.ts: id: fbca6261ca44 last_write_checksum: sha1:7b6c279b89d4a1816a209782084489853c444a30 @@ -3160,8 +3160,8 @@ trackedFiles: pristine_git_object: 23e47b68ce0a8ddb9eaf01ab23277fb41c85deb3 src/models/geo-changes-response.ts: id: f09282ecbf7f - last_write_checksum: sha1:1e297848bcab90fec9be102bb6eaa43659c48622 - pristine_git_object: 49689caa6b7db1c5e75f4182af2f1bb2c71bc5d5 + last_write_checksum: sha1:6f75aea0585c05bcdbc90c3ecd5ff930e85e8036 + pristine_git_object: e2bd9f36e7e219431426f10e43474b779a54b7dd src/models/geo-competitor-suggestions-response.ts: id: 897a4445c7c1 last_write_checksum: sha1:a80efcf59d4f31dbc6de792cffe8549948d6af2f @@ -3192,12 +3192,12 @@ trackedFiles: pristine_git_object: b180aa7930d000c2827a2940c5ff68c546694e2e src/models/geo-ingest-setup-response.ts: id: 2c50e87fb509 - last_write_checksum: sha1:7e2cd4bb539cef678a4b6ecf53338f56376bdeb0 - pristine_git_object: 746d12e5268fb1e44f9a820d3645f85a79a8f72f + last_write_checksum: sha1:390df51cda5463c79e86d7c537d9c9bf555b550d + pristine_git_object: 949b3dcfd0cf8e762ec4ec5ec074cd6b78ef5e98 src/models/geo-ingest-token-response.ts: id: de36f7f12371 - last_write_checksum: sha1:7fee3c96c7923640aaaaa6b7e97d35670b7466da - pristine_git_object: 660cd772c2af89d676f9e1d2f6f607be03078e42 + last_write_checksum: sha1:2831fc05817ae74f112e589b7d46927d935134a7 + pristine_git_object: fb1420af335ca05e6ddc562d6c3fc145268369bc src/models/geo-journey-detail-response.ts: id: 39eac6c70519 last_write_checksum: sha1:6c95e43fbfd020bbcfcd1b43201d8faa2a49d361 @@ -3256,16 +3256,16 @@ trackedFiles: pristine_git_object: c7cdfdf668043d00043feeb3b4e93e9f7cff1384 src/models/geo-settings.ts: id: ccdbac684933 - last_write_checksum: sha1:b18686d2270acc02847c8296f13296afe1268ec0 - pristine_git_object: 6b729f2bd5c120998f00877c1ab55f2234eedd9a + last_write_checksum: sha1:304ad9124e3c9f4009d29e4a97cec1e5196e6b77 + pristine_git_object: f6490e7fd42b87ba4d813bf202279226cc968aa7 src/models/geo-shelf-list-response.ts: id: f1eeaac29e2a last_write_checksum: sha1:54e460e650adc209b1fdd8bc17e33ec917080e2c pristine_git_object: 4e0a33f0d115952450ed9cb75749b3021663f8d1 src/models/geo-traffic-journeys-response.ts: id: 9d38fca29039 - last_write_checksum: sha1:58e3aa459e1727e19b38b8044710d4f42066f99b - pristine_git_object: 424514b9e5ac97429042a459e483c2790e66b2ec + last_write_checksum: sha1:68642380d6d471ad638bf231ab90ff47254e5667 + pristine_git_object: 8e678ae862f6fc19e4eeaa321b3da5c477bbadd1 src/models/geo-traffic-log-response.ts: id: 66ca02213875 last_write_checksum: sha1:b12f208053e592dacd3ee68b63c31ec6d4e555aa @@ -3772,8 +3772,8 @@ trackedFiles: pristine_git_object: b0f279bd31f735abdcc34889ea4065bdb1d659ec src/models/patch-geo-settings-request.ts: id: af0e72b4357f - last_write_checksum: sha1:ae581ff9ed4a2ed634a8b88914b8f214b712d71b - pristine_git_object: eb4878e57eb332f71ce5bf7dd9277d6c2d672469 + last_write_checksum: sha1:ab853f5cedf792b5da0ba4f50f33e0fc672c523a + pristine_git_object: 036a35d3d01e3994f67e42490e2b094ab3f529a2 src/models/patch-schedule-request.ts: id: 531ca59f85e3 last_write_checksum: sha1:afe200365c409cb9d9cba8000a49959cde796b65 @@ -3816,8 +3816,8 @@ trackedFiles: pristine_git_object: abdbeb9934be467e8d5b38c009530844f7fe57c5 src/models/send-agent-message-request.ts: id: 34a6f3a7a66a - last_write_checksum: sha1:08211ed6e41a1e3fca53c6d4db5414acdbe59b93 - pristine_git_object: c135f4123d22d6f1fe2aaedca8b6a43c6957b9e9 + last_write_checksum: sha1:35f864c54469361ade202d220fd3441d799b9af6 + pristine_git_object: 8bc5dfcf829e2a5eaf5523e04779bc1a0588754a src/models/send-chat-message-request.ts: id: 1b781361675a last_write_checksum: sha1:450d544d4757ad06631dae5a7a2f9d2c86709165 @@ -4449,7 +4449,7 @@ examples: application/json: {"message": ""} responses: "200": - application/json: {"ok": true, "sessionId": "", "continuationToken": ""} + application/json: {"ok": true, "sessionId": ""} "400": application/json: {"error": ""} "429": @@ -4462,7 +4462,7 @@ examples: path: sessionId: "" requestBody: - application/json: {"continuationToken": ""} + application/json: {} responses: "200": application/json: {} @@ -4633,7 +4633,7 @@ examples: projectId: "b1f2c3d4-0000-4000-8000-000000000000" responses: "200": - application/json: {"configured": true, "settings": {"id": "", "organizationId": "", "projectId": "", "companyName": "Ruecker and Sons", "aliases": ["", ""], "conversionPaths": [""], "domains": [], "competitors": ["", "", ""], "languages": ["", ""], "engines": [""], "enforceZdr": false, "nonZdrApprovedEngines": ["", ""], "pausedAutoPromptIds": ["", ""], "removedAutoPromptIds": ["", "", ""], "enabled": true, "scanIntervalHours": 942361, "scanStartedAt": "", "lastScanAt": "", "isScanning": false, "createdAt": "1706897241327", "updatedAt": "1735627633525"}, "organization": {"id": "", "slug": "", "name": "", "logo": ""}} + application/json: {"configured": true, "settings": {"id": "", "organizationId": "", "projectId": "", "companyName": "Ruecker and Sons", "aliases": ["", ""], "conversionPaths": [""], "domains": [], "competitors": ["", "", ""], "languages": ["", ""], "engines": [""], "enforceZdr": false, "nonZdrApprovedEngines": ["", ""], "trackWithoutSearch": true, "pausedAutoPromptIds": ["", ""], "removedAutoPromptIds": ["", "", ""], "enabled": true, "scanIntervalHours": 942361, "scanStartedAt": "", "lastScanAt": "", "isScanning": false, "createdAt": "1706897241327", "updatedAt": "1735627633525"}, "organization": {"id": "", "slug": "", "name": "", "logo": ""}} "400": application/json: {"error": ""} "500": @@ -4647,7 +4647,7 @@ examples: application/json: {"companyName": "Ratke - Welch", "aliases": [""], "languages": ["", ""], "engines": ["", "", ""], "enforceZdr": true, "nonZdrApprovedEngines": [""], "enabled": false, "scanIntervalHours": 563097} responses: "200": - application/json: {"configured": true, "settings": {"id": "", "organizationId": "", "projectId": "", "companyName": "Smith LLC", "aliases": ["", ""], "conversionPaths": [], "domains": ["", ""], "competitors": [], "languages": ["", "", ""], "engines": ["", "", ""], "enforceZdr": false, "nonZdrApprovedEngines": [""], "pausedAutoPromptIds": ["", "", ""], "removedAutoPromptIds": [""], "enabled": true, "scanIntervalHours": 115436, "scanStartedAt": "", "lastScanAt": "", "isScanning": false, "createdAt": "1723836966699", "updatedAt": "1735677429138"}, "organization": {"id": "", "slug": "", "name": "", "logo": ""}} + application/json: {"configured": true, "settings": {"id": "", "organizationId": "", "projectId": "", "companyName": "Smith LLC", "aliases": ["", ""], "conversionPaths": [], "domains": ["", ""], "competitors": [], "languages": ["", "", ""], "engines": ["", "", ""], "enforceZdr": false, "nonZdrApprovedEngines": [""], "trackWithoutSearch": true, "pausedAutoPromptIds": ["", "", ""], "removedAutoPromptIds": [""], "enabled": true, "scanIntervalHours": 115436, "scanStartedAt": "", "lastScanAt": "", "isScanning": false, "createdAt": "1723836966699", "updatedAt": "1735677429138"}, "organization": {"id": "", "slug": "", "name": "", "logo": ""}} "400": application/json: {"error": ""} "500": @@ -5166,7 +5166,7 @@ examples: speakeasy-default-get-geo-ingest-setup: responses: "200": - application/json: {"ingestUrl": "https://ashamed-sarong.biz/", "snippet": "", "snippets": {"next": "", "nuxt": "", "netlify": ""}, "organization": {"id": "", "slug": "", "name": "", "logo": null}} + application/json: {"ingestUrl": "https://ashamed-sarong.biz/", "snippet": "", "snippets": {"next": "", "nuxt": "", "netlify": "", "tanstack": "", "astro": "", "sveltekit": ""}, "organization": {"id": "", "slug": "", "name": "", "logo": null}} "400": application/json: {"error": ""} "500": @@ -5175,7 +5175,7 @@ examples: speakeasy-default-issue-geo-ingest-token: responses: "200": - application/json: {"ingestUrl": "https://trained-representation.net", "snippet": "", "snippets": {"next": "", "nuxt": "", "netlify": ""}, "organization": {"id": "", "slug": "", "name": "", "logo": null}, "token": ""} + application/json: {"ingestUrl": "https://trained-representation.net", "snippet": "", "snippets": {"next": "", "nuxt": "", "netlify": "", "tanstack": "", "astro": "", "sveltekit": ""}, "organization": {"id": "", "slug": "", "name": "", "logo": null}, "token": ""} "400": application/json: {"error": ""} "500": @@ -5184,7 +5184,7 @@ examples: speakeasy-default-rotate-geo-ingest-token: responses: "200": - application/json: {"ingestUrl": "https://shocked-swath.name/", "snippet": "", "snippets": {"next": "", "nuxt": "", "netlify": ""}, "organization": {"id": "", "slug": "", "name": "", "logo": ""}, "token": ""} + application/json: {"ingestUrl": "https://shocked-swath.name/", "snippet": "", "snippets": {"next": "", "nuxt": "", "netlify": "", "tanstack": "", "astro": "", "sveltekit": ""}, "organization": {"id": "", "slug": "", "name": "", "logo": ""}, "token": ""} "400": application/json: {"error": ""} "500": @@ -5326,4 +5326,4 @@ examples: "500": application/json: {"error": ""} examplesVersion: 1.0.2 -releaseNotes: "## Typescript SDK Changes:\n* `notra.discovery.getWorkspaces()`: **Added**\n* `notra.content.createPost()`: **Added**\n* `notra.geo.listGeoPromptResultSummaries()`: **Added**\n* `notra.geo.getGeoPromptResultDetail()`: **Added**\n* `notra.geo.listGeoChanges()`: **Added**\n* `notra.geo.getGeoPromptHistory()`: **Added**\n* `notra.geo.getGeoSentiment()`: **Added**\n* `notra.geo.getGeoSentimentAnalysis()`: **Added**\n* `notra.geo.listGeoSentimentEvidence()`: **Added**\n* `notra.geo.listGeoShelfSources()`: **Added**\n* `notra.eventTriggers.listEventTriggers()`: `response.eventTriggers[].sourceConfig.ignoreCommitPatterns` **Added**\n* `notra.eventTriggers.createEventTrigger()`: \n * `request.sourceConfig.ignoreCommitPatterns` **Added**\n * `response.eventTrigger.sourceConfig.ignoreCommitPatterns` **Added**\n* `notra.eventTriggers.getEventTrigger()`: `response.eventTrigger.sourceConfig.ignoreCommitPatterns` **Added**\n* `notra.eventTriggers.updateEventTrigger()`: \n * `request.body.sourceConfig.ignoreCommitPatterns` **Added**\n * `response.eventTrigger.sourceConfig.ignoreCommitPatterns` **Added**\n* `notra.geo.listGeoScans()`: `response.scans[]` **Changed**\n* `notra.geo.getGeoScan()`: `response.scan` **Changed**\n" +releaseNotes: "## Typescript SDK Changes:\n* `notra.agent.createAgentSession()`: `response.continuationToken` **Removed** (Breaking ⚠️)\n* `notra.agent.sendAgentSessionMessage()`: \n * `request.body.continuationToken` **Removed** (Breaking ⚠️)\n* `notra.geo.getGeoSettings()`: `response.settings.trackWithoutSearch` **Added**\n* `notra.geo.updateGeoSettings()`: \n * `request.body.trackWithoutSearch` **Added**\n * `response.settings.trackWithoutSearch` **Added**\n* `notra.geo.listGeoChanges()`: `response.events[].kind.enum(competitorCited)` **Added**\n* `notra.geo.listGeoTrafficJourneys()`: `response.journeys[].entryPath` **Added**\n* `notra.geo.getGeoIngestSetup()`: `response.snippets` **Changed**\n* `notra.geo.issueGeoIngestToken()`: `response.snippets` **Changed**\n* `notra.geo.rotateGeoIngestToken()`: `response.snippets` **Changed**\n" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index f31ad96..dc0d920 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -35,7 +35,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: false typescript: - version: 1.3.6 + version: 1.3.7 acceptHeaderEnum: false additionalDependencies: dependencies: {} diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 819a2b7..d12542e 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -1 +1 @@ -{"openapi":"3.1.1","info":{"title":"Notra API","version":"1.0.0","description":"OpenAPI schema for Notra content endpoints. Use GET /v1/status for public reachability. Error responses include recovery guidance."},"servers":[{"url":"https://api.usenotra.com","description":"Production"}],"security":[{"BearerAuth":[]}],"tags":[{"name":"Discovery","description":"Public API status and authenticated workspace discovery."},{"name":"Content","description":"Manage posts, brand identities, and GitHub or Linear integrations, and queue content generation. Organization is inferred from the API key (identity.externalId)."},{"name":"Schedules","description":"Manage scheduled content generation. Organization is inferred from the API key (identity.externalId)."},{"name":"Event Triggers","description":"Manage event-based content generation triggered by GitHub webhooks. Organization is inferred from the API key (identity.externalId)."},{"name":"Chats","description":"Manage chat sessions. Organization is inferred from the API key (identity.externalId)."},{"name":"Skills","description":"Manage reusable writing skills. Organization is inferred from the API key (identity.externalId)."},{"name":"Feedback","description":"Collect and triage feedback submitted by AI agents. Agents post to the organization's feedback URL without credentials; reading and triage require an API key with feedback.read or feedback.write."},{"name":"GEO","description":"Manage generative engine optimization: projects, tracking settings, prompts, prompt sequences, competitors, scans, visibility reads, content gaps and briefs, agent readiness and AI traffic. Project-scoped endpoints require the GEO plan entitlement in addition to their scope; organization-level ingest endpoints require only the traffic scope."}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"Send your API key in the Authorization header as Bearer API_KEY."}},"schemas":{"PublicStatusResponse":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"service":{"type":"string","enum":["Notra API"]},"version":{"type":"string"},"public":{"type":"boolean","enum":[true]},"authentication":{"type":"object","properties":{"type":{"type":"string","enum":["bearer"]},"resource_metadata":{"type":"string","format":"uri"},"guide":{"type":"string","format":"uri"}},"required":["type","resource_metadata","guide"]}},"required":["status","service","version","public","authentication"]},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"recovery":{"type":"string"}},"required":["error"]},"RateLimitErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"limit":{"type":"integer","minimum":1},"remaining":{"type":"integer","minimum":0},"reset":{"type":"integer"}},"required":["error","limit","remaining","reset"]},"PatchScheduleRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"Display name shown in the dashboard.","example":"Weekly changelog"},"sourceType":{"type":"string","enum":["cron"],"description":"Always cron for schedules."},"sourceConfig":{"type":"object","properties":{"cron":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly","custom"],"description":"How often the schedule runs.","example":"weekly"},"hour":{"type":"integer","minimum":0,"maximum":23,"description":"Hour of the day to run, in UTC (0-23).","example":9},"minute":{"type":"integer","minimum":0,"maximum":59,"description":"Minute of the hour to run (0-59).","example":0},"dayOfWeek":{"type":"integer","minimum":0,"maximum":6,"description":"Day of the week for weekly schedules, 0 (Sunday) to 6 (Saturday). Required when frequency is weekly.","example":1},"dayOfMonth":{"type":"integer","minimum":1,"maximum":31,"description":"Day of the month for monthly schedules (1-31). Required when frequency is monthly.","example":1},"intervalDays":{"type":"integer","minimum":2,"maximum":90,"description":"Run every N days (2-90). Required when frequency is custom.","example":3},"anchorDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"UTC calendar date (YYYY-MM-DD) a custom interval counts from. Defaults to today.","example":"2026-09-03"}},"required":["frequency","hour","minute"]}},"required":["cron"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"description":"GitHub integration IDs to generate from, as returned by GET /v1/integrations.","example":["51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"]}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"],"description":"Type of content each run generates.","example":"changelog"},"outputConfig":{"type":"object","properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"],"description":"Where auto-published posts are sent."},"brandVoiceId":{"type":"string","minLength":1,"description":"Brand identity ID to write in. Defaults to the organization's default brand identity.","example":"51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"},"instructions":{"type":"string","minLength":1,"maxLength":2000,"description":"Free-text brief for this schedule, passed to the writer on every run on top of the brand's custom instructions. Use it to steer the angle of the content, for example tutorial-style blog posts.","example":"Write a tutorial-style post that walks through one feature shipped in this window, with code samples."}}},"enabled":{"type":"boolean","description":"Whether the schedule runs. Disabled schedules are stored but never fire.","example":true},"autoPublish":{"type":"boolean","default":false,"description":"Publish generated posts automatically instead of saving them as drafts.","example":false},"lookbackWindow":{"type":"string","enum":["current_day","yesterday","last_7_days","last_14_days","last_30_days"],"default":"last_7_days","description":"How far back each run collects source activity.","example":"last_7_days"}},"required":["name","sourceType","sourceConfig","targets","outputType","enabled"]},"PatchEventTriggerRequest":{"type":"object","properties":{"sourceType":{"type":"string","enum":["github_webhook"]},"sourceConfig":{"type":"object","properties":{"eventTypes":{"type":"array","items":{"type":"string","enum":["release","push"]},"minItems":1},"includePreReleases":{"type":"boolean","default":true},"ignoreCommitPatterns":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"maxItems":10,"default":[]}},"required":["eventTypes"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"outputConfig":{"type":"object","properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"]},"brandVoiceId":{"type":"string","minLength":1}}},"enabled":{"type":"boolean"},"autoPublish":{"type":"boolean","default":false}},"required":["sourceType","sourceConfig","targets","outputType","enabled"]},"GetChatsResponse":{"type":"object","properties":{"chats":{"type":"array","items":{"$ref":"#/components/schemas/ChatSessionSummary"}}},"required":["chats"]},"ChatSessionSummary":{"type":"object","properties":{"chatId":{"type":"string"},"title":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"pinnedAt":{"type":["string","null"]},"externalChannelId":{"$ref":"#/components/schemas/ExternalChannelId"}},"required":["chatId","title","createdAt","updatedAt","pinnedAt"]},"ExternalChannelId":{"type":["object","null"],"properties":{"source":{"type":"string","enum":["discord","slack","dashboard","agent"]},"id":{"type":"string","maxLength":200}},"required":["source"]},"GetChatResponse":{"type":"object","properties":{"chat":{"$ref":"#/components/schemas/ChatSessionSummary"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessage"}}},"required":["chat","messages"]},"ChatMessage":{},"SendChatMessageRequest":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":50000,"description":"The user message to send.","example":"Summarize what shipped in the last week."},"model":{"type":"string","enum":["auto","anthropic/claude-opus-5","anthropic/claude-opus-4.8","anthropic/claude-sonnet-5","anthropic/claude-sonnet-4.6","anthropic/claude-haiku-4.5","openai/gpt-5.4","openai/gpt-5.5"],"description":"Model to respond with. Defaults to auto, which lets Notra choose.","example":"auto"},"enableThinking":{"type":"boolean","description":"Allow the model to reason before answering.","example":false},"thinkingLevel":{"type":"string","enum":["off","low","medium","high"],"description":"How much reasoning effort to spend when thinking is enabled.","example":"medium"},"timezone":{"type":"string","minLength":1,"maxLength":100,"description":"IANA time zone used to interpret dates in the conversation.","example":"Europe/Berlin"},"context":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["github-repo"]},"integrationId":{"type":"string"},"owner":{"type":"string"},"repo":{"type":"string"}},"required":["type","integrationId","owner","repo"]},{"type":"object","properties":{"type":{"type":"string","enum":["linear-team"]},"integrationId":{"type":"string"},"teamName":{"type":"string"}},"required":["type","integrationId"]},{"type":"object","properties":{"type":{"type":"string","enum":["mcp-server"]},"integrationId":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":200}},"required":["type","integrationId","name"]}]},"description":"Integrations the assistant may use as tools in this chat: connected GitHub repositories, Linear teams, or MCP servers."},"externalChannelId":{"$ref":"#/components/schemas/PublicExternalChannelId"}},"required":["message"]},"PublicExternalChannelId":{"type":"object","properties":{"source":{"type":"string","enum":["discord","slack","dashboard"]},"id":{"type":"string","maxLength":200}},"required":["source"],"description":"Link the chat to a Discord or Slack channel so it can be found later with GET /v1/chats/by-external."},"ListSkillsResponse":{"type":"object","properties":{"skills":{"type":"array","items":{"$ref":"#/components/schemas/SkillSummary"}}},"required":["skills"]},"SkillSummary":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"isSystem":{"type":"boolean","description":"True for built-in skills provided by Notra. System skills cannot be renamed or deleted."},"updatedAt":{"type":"string"}},"required":["id","name","description","isSystem","updatedAt"]},"SkillResponse":{"type":"object","properties":{"skill":{"$ref":"#/components/schemas/Skill"}},"required":["skill"]},"Skill":{"allOf":[{"$ref":"#/components/schemas/SkillSummary"},{"type":"object","properties":{"content":{"type":"string"},"createdAt":{"type":"string"}},"required":["content","createdAt"]}]},"CreateSkillResponse":{"type":"object","properties":{"skill":{"$ref":"#/components/schemas/Skill"}},"required":["skill"]},"CreateSkillRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]$","description":"Skill name. Lowercase letters, digits, and hyphens only.","example":"humanizer"},"description":{"type":"string","minLength":1,"maxLength":1000,"description":"Short description of when the skill should be used.","example":"Polish near-final drafts so they sound natural and specific."},"content":{"type":"string","minLength":1,"maxLength":200000,"description":"Full skill instructions, typically Markdown.","example":"# Humanizer\n\nRewrite the draft so it reads like a person wrote it. Remove filler, vary sentence length, and keep concrete details."}},"required":["name","description","content"]},"PatchSkillResponse":{"type":"object","properties":{"skill":{"$ref":"#/components/schemas/Skill"}},"required":["skill"]},"PatchSkillRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]$","description":"Skill name. Lowercase letters, digits, and hyphens only.","example":"humanizer"},"description":{"type":"string","minLength":1,"maxLength":1000,"description":"Short description of when the skill should be used.","example":"Polish near-final drafts so they sound natural and specific."},"content":{"type":"string","minLength":1,"maxLength":200000,"description":"Full skill instructions, typically Markdown.","example":"# Humanizer\n\nRewrite the draft so it reads like a person wrote it. Remove filler, vary sentence length, and keep concrete details."}}},"DeleteSkillResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"]},"GetWorkspacesResponse":{"type":"object","properties":{"currentWorkspace":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]},"role":{"type":["string","null"]},"status":{"type":"string","enum":["active","pending"]},"isCurrent":{"type":"boolean"}},"required":["id","slug","name","logo","role","status","isCurrent"]}},"authentication":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["apiKey"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["oauth"]},"accountId":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}}},"required":["type","accountId","scopes"]}]}},"required":["currentWorkspace","workspaces","authentication"]},"SubmitFeedbackResponse":{"type":"object","properties":{"feedback":{"$ref":"#/components/schemas/Feedback"},"deduplicated":{"type":"boolean","description":"True when an existing feedback with the same idempotencyKey was returned."}},"required":["feedback","deduplicated"]},"Feedback":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":["string","null"]},"source":{"type":"string","enum":["mcp","api","sdk"],"description":"Channel the feedback arrived through.","example":"mcp"},"kind":{"type":"string","enum":["bug","feature","praise","question","other"],"description":"What kind of feedback this is.","example":"bug"},"sentiment":{"type":["string","null"],"enum":["negative","neutral","positive",null],"description":"Overall sentiment of the feedback.","example":"negative"},"status":{"type":"string","enum":["new","triaged","resolved","archived"],"description":"Triage status.","example":"new"},"title":{"type":["string","null"]},"message":{"type":"string"},"agentClient":{"type":["string","null"]},"agentModel":{"type":["string","null"]},"toolVersion":{"type":["string","null"]},"userAgent":{"type":["string","null"]},"contextUrl":{"type":["string","null"]},"externalId":{"type":["string","null"]},"idempotencyKey":{"type":["string","null"]},"metadata":{"type":["object","null"],"additionalProperties":{}},"resolvedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","projectId","source","kind","sentiment","status","title","message","agentClient","agentModel","toolVersion","userAgent","contextUrl","externalId","idempotencyKey","metadata","resolvedAt","createdAt","updatedAt"]},"SubmitFeedbackRequest":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":4000,"description":"The feedback itself.","example":"The search tool times out when the query has quotes."},"title":{"type":"string","minLength":1,"maxLength":200,"description":"Short summary. When omitted, Notra writes one.","example":"Search times out on quoted queries"},"kind":{"type":"string","enum":["bug","feature","praise","question","other"],"description":"What kind of feedback this is. When omitted, Notra classifies it.","example":"bug"},"sentiment":{"type":"string","enum":["negative","neutral","positive"],"description":"Overall sentiment. When omitted, Notra classifies it from the message.","example":"negative"},"source":{"type":"string","enum":["mcp","api","sdk"],"default":"api","description":"Channel the feedback arrived through.","example":"mcp"},"projectId":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","description":"Project to file the feedback under."},"agentClient":{"type":"string","minLength":1,"maxLength":200,"description":"The agent or client that submitted the feedback.","example":"claude-code"},"agentModel":{"type":"string","minLength":1,"maxLength":200,"example":"claude-opus-5"},"toolVersion":{"type":"string","minLength":1,"maxLength":200,"example":"1.2.0"},"userAgent":{"type":"string","minLength":1,"maxLength":2048},"contextUrl":{"type":"string","maxLength":2048,"format":"uri","description":"Page or resource the feedback is about.","example":"https://docs.example.com/api/search"},"externalId":{"type":"string","minLength":1,"maxLength":200,"description":"Your own identifier for the user or session."},"idempotencyKey":{"type":"string","minLength":1,"maxLength":200,"description":"Submitting the same key twice returns the original feedback instead of creating a duplicate."},"metadata":{"type":"object","additionalProperties":{},"description":"Arbitrary JSON attached to the feedback, up to 8 KB."}},"required":["message"]},"ListFeedbackResponse":{"type":"object","properties":{"feedback":{"type":"array","items":{"$ref":"#/components/schemas/Feedback"}},"pagination":{"type":"object","properties":{"limit":{"type":"integer","minimum":1},"currentPage":{"type":"integer","minimum":1},"nextPage":{"type":["integer","null"],"minimum":1},"previousPage":{"type":["integer","null"],"minimum":1},"totalPages":{"type":"integer","minimum":1},"totalItems":{"type":"integer","minimum":0}},"required":["limit","currentPage","nextPage","previousPage","totalPages","totalItems"]}},"required":["feedback","pagination"]},"FeedbackResponse":{"type":"object","properties":{"feedback":{"$ref":"#/components/schemas/Feedback"}},"required":["feedback"]},"UpdateFeedbackRequest":{"type":"object","properties":{"status":{"type":"string","enum":["new","triaged","resolved","archived"],"description":"Triage status.","example":"new"}},"required":["status"]},"ListGeoProjectsResponse":{"type":"object","properties":{"projects":{"type":"array","items":{"$ref":"#/components/schemas/GeoProject"}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["projects","organization"]},"GeoProject":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"brandSettingsId":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","name","brandSettingsId","createdAt"]},"GeoProjectResponse":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/GeoProject"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["project","organization"]},"CreateGeoProjectRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"brandSettingsId":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","description":"Brand identity to link. Defaults to the organization's default identity."}},"required":["name"]},"PatchGeoProjectRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"brandSettingsId":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$"}}},"DeleteGeoProjectResponse":{"type":"object","properties":{"id":{"type":"string"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["id","organization"]},"GeoSettingsResponse":{"type":"object","properties":{"configured":{"type":"boolean","description":"Whether the analytics backend is configured."},"settings":{"$ref":"#/components/schemas/GeoSettings"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["configured","settings","organization"]},"GeoSettings":{"type":["object","null"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"projectId":{"type":"string"},"companyName":{"type":"string"},"aliases":{"type":"array","items":{"type":"string"}},"conversionPaths":{"type":"array","items":{"type":"string"}},"domains":{"type":"array","items":{"type":"string"}},"competitors":{"type":"array","items":{"type":"string"}},"languages":{"type":"array","items":{"type":"string"}},"engines":{"type":"array","items":{"type":"string"}},"enforceZdr":{"type":"boolean"},"nonZdrApprovedEngines":{"type":"array","items":{"type":"string"}},"pausedAutoPromptIds":{"type":"array","items":{"type":"string"}},"removedAutoPromptIds":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"scanIntervalHours":{"type":"integer"},"scanStartedAt":{"type":["string","null"]},"lastScanAt":{"type":["string","null"]},"isScanning":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","projectId","companyName","aliases","conversionPaths","domains","competitors","languages","engines","enforceZdr","nonZdrApprovedEngines","pausedAutoPromptIds","removedAutoPromptIds","enabled","scanIntervalHours","scanStartedAt","lastScanAt","isScanning","createdAt","updatedAt"]},"PatchGeoSettingsRequest":{"type":"object","properties":{"companyName":{"type":"string","minLength":1,"maxLength":128},"aliases":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":10},"conversionPaths":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":20,"description":"Paths that count as a conversion when an AI referral reaches them. Prefix match. Omit to keep the stored list."},"domains":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":20,"description":"Additional hostnames that send AI traffic to this project, besides the brand website. Subdomains of a listed domain are included. Omit to keep the stored list."},"languages":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"minItems":1,"maxItems":4},"engines":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"minItems":1,"maxItems":64},"enforceZdr":{"type":"boolean"},"nonZdrApprovedEngines":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":64},"pausedAutoPromptIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":8,"description":"Ids of auto-generated prompts to skip in scans. Omit to keep the current list."},"removedAutoPromptIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":8,"description":"Ids of auto-generated prompts removed from tracking. Omit to keep the current list."},"enabled":{"type":"boolean"},"scanIntervalHours":{"type":"integer","minimum":24,"maximum":2160,"description":"Hours between automatic scans, 24-2160, in whole days (multiple of 24). Presets: 24, 48, 72, 168, 336, 720."}},"required":["companyName","aliases","languages","engines","enforceZdr","nonZdrApprovedEngines","enabled","scanIntervalHours"]},"ListGeoPromptsResponse":{"type":"object","properties":{"configured":{"type":"boolean"},"prompts":{"type":"array","items":{"$ref":"#/components/schemas/GeoPrompt"}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["configured","prompts","organization"]},"GeoPrompt":{"type":"object","properties":{"id":{"type":"string"},"prompt":{"type":"string"},"enabled":{"type":"boolean"},"source":{"type":"string","enum":["custom","auto"]},"tags":{"type":"array","items":{"type":"string"}},"createdAt":{"type":["string","null"]}},"required":["id","prompt","enabled","source","tags","createdAt"]},"GeoPromptResponse":{"type":"object","properties":{"prompt":{"$ref":"#/components/schemas/GeoPrompt"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["prompt","organization"]},"CreateGeoPromptRequest":{"type":"object","properties":{"prompt":{"type":"string","minLength":8,"maxLength":300},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":40},"maxItems":20,"description":"Free-form labels for grouping custom prompts. Lowercased and deduplicated on save."}},"required":["prompt"]},"PatchGeoPromptRequest":{"type":"object","properties":{"enabled":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":40},"maxItems":20,"description":"Free-form labels for grouping custom prompts. Lowercased and deduplicated on save."}}},"DeleteGeoPromptResponse":{"type":"object","properties":{"id":{"type":"string"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["id","organization"]},"ImportGeoPromptsResponse":{"type":"object","properties":{"imported":{"type":"integer"},"updated":{"type":"integer"},"skipped":{"type":"integer"},"issues":{"type":"array","items":{"type":"object","properties":{"line":{"type":"integer"},"message":{"type":"string"}},"required":["line","message"]},"description":"Rows rejected while parsing CSV. Always empty for `rows`."},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["imported","updated","skipped","issues","organization"]},"ImportGeoPromptsRequest":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"prompt":{"type":"string","minLength":8,"maxLength":300},"enabled":{"type":"boolean"}},"required":["prompt"]},"minItems":1,"maxItems":500},"csv":{"type":"string","minLength":1,"maxLength":1048576,"description":"Raw CSV text with a `prompt` column (optionally `enabled`). Used when `rows` is omitted."}}},"ListGeoSequencesResponse":{"type":"object","properties":{"sequences":{"type":"array","items":{"$ref":"#/components/schemas/GeoSequence"}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["sequences","organization"]},"GeoSequence":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"steps":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","name","steps","enabled","createdAt"]},"GeoSequenceResponse":{"type":"object","properties":{"sequence":{"$ref":"#/components/schemas/GeoSequence"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["sequence","organization"]},"CreateGeoSequenceRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"steps":{"type":"array","items":{"type":"string","minLength":8,"maxLength":300},"minItems":1,"maxItems":5}},"required":["name","steps"]},"PatchGeoSequenceRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"steps":{"type":"array","items":{"type":"string","minLength":8,"maxLength":300},"minItems":1,"maxItems":5},"enabled":{"type":"boolean"}}},"DeleteGeoSequenceResponse":{"type":"object","properties":{"id":{"type":"string"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["id","organization"]},"RunGeoSequenceResponse":{"type":"object","properties":{"checks":{"type":"integer","description":"Recorded answers across every engine that responded."},"mentions":{"type":"integer","description":"How many of those answers mentioned the tracked brand."},"engines":{"type":"array","items":{"type":"string"},"description":"Engines the conversation was played against."},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["checks","mentions","engines","organization"]},"ListGeoCompetitorsResponse":{"type":"object","properties":{"competitors":{"type":"array","items":{"$ref":"#/components/schemas/GeoCompetitor"}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["competitors","organization"]},"GeoCompetitor":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"domain":{"type":["string","null"]},"synonyms":{"type":"array","items":{"type":"string"}},"kind":{"type":"string","enum":["direct","indirect"]},"color":{"type":["string","null"]}},"required":["id","name","domain","synonyms","kind","color"]},"PutGeoCompetitorRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"previousName":{"type":"string","minLength":1,"maxLength":128,"description":"Set to rename an existing competitor."},"domain":{"type":["string","null"],"maxLength":128},"synonyms":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":8},"kind":{"type":"string","enum":["direct","indirect"]},"color":{"type":["string","null"],"maxLength":128}},"required":["name","domain"]},"GeoCompetitorSuggestionsResponse":{"type":"object","properties":{"domain":{"type":"string"},"field":{"type":["string","null"]},"competitors":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"domain":{"type":["string","null"]},"description":{"type":["string","null"]},"confidence":{"type":["string","null"],"enum":["high","medium",null]}},"required":["name","domain","description","confidence"]}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["domain","field","competitors","organization"]},"ImportGeoCompetitorsResponse":{"type":"object","properties":{"imported":{"type":"integer"},"updated":{"type":"integer"},"skipped":{"type":"integer"},"issues":{"type":"array","items":{"type":"object","properties":{"line":{"type":"integer"},"message":{"type":"string"}},"required":["line","message"]}},"competitors":{"type":"array","items":{"$ref":"#/components/schemas/GeoCompetitor"}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["imported","updated","skipped","issues","competitors","organization"]},"ImportGeoCompetitorsRequest":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"domain":{"type":["string","null"],"maxLength":128},"kind":{"type":"string","enum":["direct","indirect"]},"synonyms":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":8}},"required":["name"]},"minItems":1,"maxItems":25},"csv":{"type":"string","minLength":1,"maxLength":1048576,"description":"Raw CSV text with a `name` column (optionally `domain`, `kind`, `synonyms`). Used when `rows` is omitted."}}},"CreateGeoScanResponse":{"type":"object","properties":{"scanId":{"type":"string"},"statusUrl":{"type":"string"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["scanId","statusUrl","organization"]},"ListGeoScansResponse":{"type":"object","properties":{"scans":{"type":"array","items":{"$ref":"#/components/schemas/GeoScan"}},"pagination":{"type":"object","properties":{"limit":{"type":"integer","minimum":1},"currentPage":{"type":"integer","minimum":1},"nextPage":{"type":["integer","null"],"minimum":1},"previousPage":{"type":["integer","null"],"minimum":1},"totalPages":{"type":"integer","minimum":1},"totalItems":{"type":"integer","minimum":0}},"required":["limit","currentPage","nextPage","previousPage","totalPages","totalItems"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["scans","pagination","organization"]},"GeoScan":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"status":{"type":"string","enum":["running","completed","failed"]},"startedAt":{"type":"string"},"finishedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"summary":{"type":"object","properties":{"plannedChecks":{"type":["integer","null"],"minimum":0},"completedChecks":{"type":"integer","minimum":0},"mentionCount":{"type":"integer","minimum":0},"failedChecks":{"type":"integer","minimum":0},"engines":{"type":"array","items":{"type":"object","properties":{"engine":{"type":"string"},"plannedChecks":{"type":["integer","null"],"minimum":0},"completedChecks":{"type":"integer","minimum":0},"mentionCount":{"type":"integer","minimum":0},"failedChecks":{"type":"integer","minimum":0}},"required":["engine","plannedChecks","completedChecks","mentionCount","failedChecks"]}}},"required":["plannedChecks","completedChecks","mentionCount","failedChecks","engines"]},"errorCode":{"type":["string","null"]},"errorMessage":{"type":["string","null"]},"failedStage":{"type":["string","null"],"enum":["handoff","execution","stale",null]},"retryable":{"type":["boolean","null"]}},"required":["id","projectId","status","startedAt","finishedAt","createdAt","summary","errorCode","errorMessage","failedStage","retryable"]},"GeoScanResponse":{"type":"object","properties":{"scan":{"$ref":"#/components/schemas/GeoScan"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["scan","organization"]},"GeoVisibilityOverviewResponse":{"type":"object","properties":{"configured":{"type":"boolean","description":"Whether the analytics backend is configured."},"engines":{"type":"array","items":{"type":"object","properties":{"engine":{"type":"string"},"checks":{"type":"integer"},"mentions":{"type":"integer"},"mentionRate":{"type":"number"},"citations":{"type":"integer"},"visibility":{"type":"integer"},"visibilityRate":{"type":"number"},"avgPosition":{"type":["number","null"]},"lastCheckedAt":{"type":"string"}},"required":["engine","checks","mentions","mentionRate","citations","visibility","visibilityRate","avgPosition","lastCheckedAt"]}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["configured","engines","organization"]},"GeoVisibilityTimeseriesResponse":{"type":"object","properties":{"configured":{"type":"boolean"},"points":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"engine":{"type":"string"},"checks":{"type":"integer"},"mentions":{"type":"integer"},"citations":{"type":"integer"},"visibility":{"type":"integer"},"avgPosition":{"type":["number","null"]}},"required":["day","engine","checks","mentions","citations","visibility"]}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["configured","points","organization"]},"GeoVisibilityPromptResultsResponse":{"type":"object","properties":{"configured":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"promptId":{"type":"string"},"engine":{"type":"string"},"prompt":{"type":"string"},"answer":{"type":"string"},"mentioned":{"type":"boolean"},"ownedSourceCited":{"type":"boolean"},"position":{"type":["integer","null"]},"sentiment":{"type":["string","null"]},"competitors":{"type":"array","items":{"type":"string"}},"excerpt":{"type":"string"},"searchQueries":{"type":"array","items":{"type":"string"}},"sources":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"},"domain":{"type":"string"}},"required":["title","url","domain"]}},"lastCheckedAt":{"type":"string"}},"required":["promptId","engine","prompt","answer","mentioned","ownedSourceCited","position","sentiment","competitors","excerpt","searchQueries","sources","lastCheckedAt"]}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["configured","results","organization"]},"GeoVisibilityPromptResultSummariesResponse":{"type":"object","properties":{"configured":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"promptId":{"type":"string"},"engine":{"type":"string"},"prompt":{"type":"string"},"mentioned":{"type":"boolean"},"ownedSourceCited":{"type":"boolean"},"position":{"type":["integer","null"]},"sentiment":{"type":["string","null"]},"competitors":{"type":"array","items":{"type":"string"}},"lastCheckedAt":{"type":"string"},"checkId":{"type":"string"}},"required":["promptId","engine","prompt","mentioned","ownedSourceCited","position","sentiment","competitors","lastCheckedAt","checkId"]}},"nextCursor":{"type":["string","null"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["configured","results","nextCursor","organization"]},"GeoVisibilityPromptResultDetailResponse":{"type":"object","properties":{"result":{"type":"object","properties":{"promptId":{"type":"string"},"engine":{"type":"string"},"prompt":{"type":"string"},"answer":{"type":"string"},"mentioned":{"type":"boolean"},"ownedSourceCited":{"type":"boolean"},"position":{"type":["integer","null"]},"sentiment":{"type":["string","null"]},"competitors":{"type":"array","items":{"type":"string"}},"excerpt":{"type":"string"},"searchQueries":{"type":"array","items":{"type":"string"}},"sources":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"},"domain":{"type":"string"}},"required":["title","url","domain"]}},"lastCheckedAt":{"type":"string"},"finishReason":{"type":["string","null"]},"promptTokens":{"type":["integer","null"]},"outputTokens":{"type":["integer","null"]},"reasoningTokens":{"type":["integer","null"]},"truncated":{"type":["boolean","null"]}},"required":["promptId","engine","prompt","answer","mentioned","ownedSourceCited","position","sentiment","competitors","excerpt","searchQueries","sources","lastCheckedAt","finishReason","promptTokens","outputTokens","reasoningTokens","truncated"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["result","organization"]},"GeoVisibilityCompetitorShareResponse":{"type":"object","properties":{"configured":{"type":"boolean"},"points":{"type":"array","items":{"type":"object","properties":{"brand":{"type":"string"},"mentions":{"type":"integer"},"trend":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"value":{"type":"number"}},"required":["day","value"]}}},"required":["brand","mentions"]}},"timeseries":{"type":"array","items":{"type":"object","properties":{"brand":{"type":"string"},"day":{"type":"string"},"mentions":{"type":"integer"}},"required":["brand","day","mentions"]}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["configured","points","timeseries","organization"]},"GeoVisibilityLanguageShareResponse":{"type":"object","properties":{"configured":{"type":"boolean"},"points":{"type":"array","items":{"type":"object","properties":{"language":{"type":"string"},"checks":{"type":"integer"},"mentions":{"type":"integer"},"mentionRate":{"type":"number"},"citations":{"type":"integer"},"visibility":{"type":"integer"},"visibilityRate":{"type":"number"},"avgPosition":{"type":["number","null"]},"trend":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"value":{"type":"number"}},"required":["day","value"]}}},"required":["language","checks","mentions","mentionRate","citations","visibility","visibilityRate","avgPosition"]}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["configured","points","organization"]},"GeoVisibilityCompetitorDetailResponse":{"type":"object","properties":{"configured":{"type":"boolean"},"points":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"mentions":{"type":"integer"},"checks":{"type":"integer"}},"required":["day","mentions","checks"]}},"prompts":{"type":"array","items":{"type":"object","properties":{"promptId":{"type":"string"},"prompt":{"type":"string"},"engine":{"type":"string"},"capturedAt":{"type":"string"},"mentioned":{"type":"boolean"},"position":{"type":["integer","null"]}},"required":["promptId","prompt","engine","capturedAt","mentioned","position"]}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["configured","points","prompts","organization"]},"GeoChangesResponse":{"type":"object","properties":{"previousScan":{"type":["object","null"],"properties":{"id":{"type":"string"},"finishedAt":{"type":["string","null"]}},"required":["id","finishedAt"]},"currentScan":{"type":["object","null"],"properties":{"id":{"type":"string"},"finishedAt":{"type":["string","null"]}},"required":["id","finishedAt"]},"summary":{"type":"object","properties":{"gained":{"type":"integer"},"lost":{"type":"integer"},"positionImproved":{"type":"integer"},"positionDropped":{"type":"integer"},"citationsAdded":{"type":"integer"},"citationsRemoved":{"type":"integer"}},"required":["gained","lost","positionImproved","positionDropped","citationsAdded","citationsRemoved"]},"events":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["gained_mention","lost_mention","position_improved","position_dropped","competitor_displaced","citation_added","citation_removed","new_engine"]},"promptId":{"type":"string"},"prompt":{"type":"string"},"engine":{"type":"string"},"previous":{"type":["object","null"],"properties":{"mentioned":{"type":"boolean"},"position":{"type":["number","null"]}},"required":["mentioned","position"]},"current":{"type":"object","properties":{"mentioned":{"type":"boolean"},"position":{"type":["number","null"]}},"required":["mentioned","position"]},"competitors":{"type":"array","items":{"type":"string"}},"domains":{"type":"array","items":{"type":"string"}}},"required":["kind","promptId","prompt","engine","previous","current","competitors","domains"]}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["previousScan","currentScan","summary","events","organization"]},"GeoPromptHistoryResponse":{"type":"object","properties":{"configured":{"type":"boolean"},"promptId":{"type":"string"},"checks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"scanId":{"type":"string"},"engine":{"type":"string"},"mentioned":{"type":"boolean"},"ownedSourceCited":{"type":"boolean"},"position":{"type":["number","null"]},"sentiment":{"type":["string","null"]},"competitors":{"type":"array","items":{"type":"string"}},"language":{"type":"string"},"capturedAt":{"type":"string"}},"required":["id","scanId","engine","mentioned","position","sentiment","competitors","language","capturedAt"]}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["configured","promptId","checks","organization"]},"GeoSentimentResponse":{"type":"object","properties":{"configured":{"type":"boolean","enum":[true]},"summary":{"type":"object","properties":{"totalChecks":{"type":"integer"},"mentions":{"type":"integer"},"positive":{"type":"integer"},"neutral":{"type":"integer"},"negative":{"type":"integer"},"lastCheckedAt":{"type":["string","null"]},"score":{"type":["number","null"]},"classifiedMentions":{"type":"integer"},"unknownMentions":{"type":"integer"},"notMentioned":{"type":"integer"},"positiveShare":{"type":["number","null"]},"neutralShare":{"type":["number","null"]},"negativeShare":{"type":["number","null"]},"classificationCoverage":{"type":["number","null"]}},"required":["totalChecks","mentions","positive","neutral","negative","lastCheckedAt","score","classifiedMentions","unknownMentions","notMentioned","positiveShare","neutralShare","negativeShare","classificationCoverage"]},"engines":{"type":"array","items":{"type":"object","properties":{"totalChecks":{"type":"integer"},"mentions":{"type":"integer"},"positive":{"type":"integer"},"neutral":{"type":"integer"},"negative":{"type":"integer"},"lastCheckedAt":{"type":["string","null"]},"score":{"type":["number","null"]},"classifiedMentions":{"type":"integer"},"unknownMentions":{"type":"integer"},"notMentioned":{"type":"integer"},"positiveShare":{"type":["number","null"]},"neutralShare":{"type":["number","null"]},"negativeShare":{"type":["number","null"]},"classificationCoverage":{"type":["number","null"]},"engine":{"type":"string"}},"required":["totalChecks","mentions","positive","neutral","negative","lastCheckedAt","score","classifiedMentions","unknownMentions","notMentioned","positiveShare","neutralShare","negativeShare","classificationCoverage","engine"]}},"points":{"type":"array","items":{"type":"object","properties":{"totalChecks":{"type":"integer"},"mentions":{"type":"integer"},"positive":{"type":"integer"},"neutral":{"type":"integer"},"negative":{"type":"integer"},"lastCheckedAt":{"type":["string","null"]},"score":{"type":["number","null"]},"classifiedMentions":{"type":"integer"},"unknownMentions":{"type":"integer"},"notMentioned":{"type":"integer"},"positiveShare":{"type":["number","null"]},"neutralShare":{"type":["number","null"]},"negativeShare":{"type":["number","null"]},"classificationCoverage":{"type":["number","null"]},"day":{"type":"string"}},"required":["totalChecks","mentions","positive","neutral","negative","lastCheckedAt","score","classifiedMentions","unknownMentions","notMentioned","positiveShare","neutralShare","negativeShare","classificationCoverage","day"]}},"comparison":{"type":"object","properties":{"current":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]},"previous":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]},"summary":{"type":"object","properties":{"totalChecks":{"type":"integer"},"mentions":{"type":"integer"},"positive":{"type":"integer"},"neutral":{"type":"integer"},"negative":{"type":"integer"},"lastCheckedAt":{"type":["string","null"]},"score":{"type":["number","null"]},"classifiedMentions":{"type":"integer"},"unknownMentions":{"type":"integer"},"notMentioned":{"type":"integer"},"positiveShare":{"type":["number","null"]},"neutralShare":{"type":["number","null"]},"negativeShare":{"type":["number","null"]},"classificationCoverage":{"type":["number","null"]}},"required":["totalChecks","mentions","positive","neutral","negative","lastCheckedAt","score","classifiedMentions","unknownMentions","notMentioned","positiveShare","neutralShare","negativeShare","classificationCoverage"]},"points":{"type":"array","items":{"type":"object","properties":{"totalChecks":{"type":"integer"},"mentions":{"type":"integer"},"positive":{"type":"integer"},"neutral":{"type":"integer"},"negative":{"type":"integer"},"lastCheckedAt":{"type":["string","null"]},"score":{"type":["number","null"]},"classifiedMentions":{"type":"integer"},"unknownMentions":{"type":"integer"},"notMentioned":{"type":"integer"},"positiveShare":{"type":["number","null"]},"neutralShare":{"type":["number","null"]},"negativeShare":{"type":["number","null"]},"classificationCoverage":{"type":["number","null"]},"day":{"type":"string"}},"required":["totalChecks","mentions","positive","neutral","negative","lastCheckedAt","score","classifiedMentions","unknownMentions","notMentioned","positiveShare","neutralShare","negativeShare","classificationCoverage","day"]}},"delta":{"type":["number","null"]}},"required":["current","previous","summary","points","delta"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["configured","summary","engines","points","organization"]},"GeoSentimentAnalysisResponse":{"type":"object","properties":{"status":{"type":"string","enum":["ready","pending","stale","failed","unavailable"]},"result":{"type":["object","null"],"properties":{"fingerprint":{"type":"string"},"generatedAt":{"type":"string"},"sampled":{"type":"integer"},"eligible":{"type":"integer"},"themes":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"polarity":{"type":"string","enum":["positive","negative"]},"claims":{"type":"array","items":{"type":"object","properties":{"statement":{"type":"string"},"evidence":{"type":"array","items":{"type":"object","properties":{"checkId":{"type":"string"},"quote":{"type":"string"},"prompt":{"type":"string"},"engine":{"type":"string"},"capturedAt":{"type":"string"}},"required":["checkId","quote","prompt","engine","capturedAt"]}}},"required":["statement","evidence"]}},"evidence":{"type":"array","items":{"type":"object","properties":{"checkId":{"type":"string"},"quote":{"type":"string"},"prompt":{"type":"string"},"engine":{"type":"string"},"capturedAt":{"type":"string"}},"required":["checkId","quote","prompt","engine","capturedAt"]}}},"required":["title","polarity","claims","evidence"]}}},"required":["fingerprint","generatedAt","sampled","eligible","themes"]},"message":{"type":["string","null"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["status","result","message","organization"]},"GeoSentimentEvidenceResponse":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"scanId":{"type":"string"},"promptId":{"type":"string"},"prompt":{"type":"string"},"engine":{"type":"string"},"language":{"type":"string"},"capturedAt":{"type":"string"},"answer":{"type":"string"},"excerpt":{"type":"string"}},"required":["id","scanId","promptId","prompt","engine","language","capturedAt","answer","excerpt"]}},"nextCursor":{"type":["string","null"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["items","nextCursor","organization"]},"GeoShelfListResponse":{"type":"object","properties":{"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"url":{"type":"string","maxLength":2048,"format":"uri"},"domain":{"type":"string","minLength":1},"title":{"type":["string","null"],"maxLength":200},"kind":{"type":"string","enum":["listicle","review_site","community","news","docs","video","other"]},"ownership":{"type":"string","enum":["third_party","own","competitor"]},"origin":{"type":"string","enum":["scan","manual"]},"fetchStatus":{"type":"string","enum":["pending","ok","blocked","failed"]},"lastFetchedAt":{"type":["string","null"],"format":"date-time"},"citations":{"type":"object","properties":{"windowCount":{"type":"integer","minimum":0},"totalCount":{"type":"integer","minimum":0},"promptCount":{"type":"integer","minimum":0},"engines":{"type":"array","items":{"type":"string","minLength":1}},"firstCitedAt":{"type":["string","null"],"format":"date-time"},"lastCitedAt":{"type":["string","null"],"format":"date-time"}},"required":["windowCount","totalCount","promptCount","engines","firstCitedAt","lastCitedAt"]},"placements":{"type":"array","items":{"type":"object","properties":{"competitorId":{"type":["string","null"],"minLength":1},"brandName":{"type":"string","minLength":1},"brandDomain":{"type":["string","null"]},"status":{"type":"string","enum":["present","absent","unknown"]},"position":{"type":["integer","null"],"exclusiveMinimum":0},"hasLink":{"type":"boolean"},"evidence":{"type":"string","enum":["fetch","manual"]},"excerpt":{"type":["string","null"]},"checkedAt":{"type":"string","format":"date-time"}},"required":["competitorId","brandName","brandDomain","status","position","hasLink","evidence","excerpt","checkedAt"]}},"opportunity":{"type":["object","null"],"properties":{"status":{"type":"string","enum":["open","in_progress","won","lost","dismissed"]},"priority":{"type":["string","null"],"enum":["low","medium","high",null]},"assigneeMemberId":{"type":["string","null"],"minLength":1},"pocMemberId":{"type":["string","null"],"minLength":1},"notes":{"type":["string","null"],"maxLength":2000},"dueAt":{"type":["string","null"],"format":"date-time"},"id":{"type":"string","minLength":1},"createdByUserId":{"type":["string","null"],"minLength":1},"resolvedAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["status","priority","assigneeMemberId","pocMemberId","notes","dueAt","id","createdByUserId","resolvedAt","createdAt","updatedAt"]},"createdByUserId":{"type":["string","null"],"minLength":1},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","url","domain","title","kind","ownership","origin","fetchStatus","lastFetchedAt","citations","placements","opportunity","createdByUserId","createdAt","updatedAt"]}},"nextOffset":{"type":["integer","null"],"minimum":0},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["sources","nextOffset","organization"]},"GeoContentGapsResponse":{"type":"object","properties":{"promptGaps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"prompt":{"type":"string"},"title":{"type":["string","null"]},"engines":{"type":"array","items":{"type":"string"}},"mentionedEngines":{"type":"array","items":{"type":"string"}},"competitors":{"type":"array","items":{"type":"string"}},"discoveredCompetitors":{"type":"array","items":{"type":"string"}},"ownMentionRate":{"type":"number"},"engineCoverage":{"type":"number"},"opportunity":{"type":"number"},"won":{"type":"boolean"},"brief":{"type":["object","null"],"properties":{"briefId":{"type":"string"},"status":{"type":"string","enum":["draft","approved","writing","completed","failed"]},"postId":{"type":["string","null"]},"workingTitle":{"type":["string","null"]},"publishedAt":{"type":["string","null"]},"baseline":{"type":["object","null"],"properties":{"mentionedEngines":{"type":"number"},"totalEngines":{"type":"number"}},"required":["mentionedEngines","totalEngines"]},"rescanned":{"type":"boolean"}},"required":["briefId","status","postId","workingTitle","publishedAt","baseline","rescanned"]}},"required":["id","prompt","title","engines","mentionedEngines","competitors","discoveredCompetitors","ownMentionRate","engineCoverage","opportunity","won","brief"]}},"searchGaps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"prompt":{"type":"string"},"title":{"type":["string","null"]},"impressions":{"type":["number","null"]},"clicks":{"type":["number","null"]},"position":{"type":["number","null"]},"queries":{"type":"array","items":{"type":"object","properties":{"query":{"type":"string"},"clicks":{"type":"number"},"impressions":{"type":"number"},"position":{"type":"number"}},"required":["query","clicks","impressions","position"]}},"brief":{"type":["object","null"],"properties":{"briefId":{"type":"string"},"status":{"type":"string","enum":["draft","approved","writing","completed","failed"]},"postId":{"type":["string","null"]},"workingTitle":{"type":["string","null"]},"publishedAt":{"type":["string","null"]},"baseline":{"type":["object","null"],"properties":{"mentionedEngines":{"type":"number"},"totalEngines":{"type":"number"}},"required":["mentionedEngines","totalEngines"]},"rescanned":{"type":"boolean"}},"required":["briefId","status","postId","workingTitle","publishedAt","baseline","rescanned"]},"recommendation":{"type":"object","properties":{"action":{"type":"string","enum":["create","update","merge","ignore"],"description":"What to do with this query cluster: create a new page, update the strongest existing page, merge overlapping pages, or ignore thin demand."},"reason":{"type":"string"},"targets":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["page","post"]},"id":{"type":"string"},"url":{"type":["string","null"]},"title":{"type":"string"},"score":{"type":"number"}},"required":["kind","id","url","title","score"]}}},"required":["action","reason","targets"]}},"required":["id","prompt","title","impressions","clicks","position","queries","brief","recommendation"]}},"hasScanData":{"type":"boolean","description":"False until the project has at least one scan result."},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["promptGaps","searchGaps","hasScanData","organization"]},"ListGeoContentBriefsResponse":{"type":"object","properties":{"briefs":{"type":"array","items":{"$ref":"#/components/schemas/GeoContentBriefSummary"}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["briefs","organization"]},"GeoContentBriefSummary":{"type":"object","properties":{"id":{"type":"string"},"topic":{"type":"string"},"workingTitle":{"type":"string"},"status":{"type":"string","enum":["draft","approved","writing","completed","failed"]},"postId":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","topic","workingTitle","status","postId","createdAt"]},"GeoContentBriefResponse":{"type":"object","properties":{"brief":{"$ref":"#/components/schemas/GeoContentBriefDetail"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["brief","organization"]},"GeoContentBriefDetail":{"type":"object","properties":{"id":{"type":"string"},"topic":{"type":"string"},"brief":{"$ref":"#/components/schemas/GeoContentBriefDocument"},"status":{"type":"string","enum":["draft","approved","writing","completed","failed"]},"autoApproved":{"type":"boolean"},"runId":{"type":["string","null"]},"postId":{"type":["string","null"]},"humanized":{"type":"boolean"},"error":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","topic","brief","status","autoApproved","runId","postId","humanized","error","createdAt","updatedAt","completedAt"]},"GeoContentBriefDocument":{"type":"object","properties":{"targetPrompt":{"type":"string"},"intent":{"type":"string"},"contentSubtype":{"type":"string","enum":["guide","comparison","listicle","how-to","faq","alternatives"]},"workingTitle":{"type":"string"},"audience":{"type":"string"},"jobToBeDone":{"type":"string"},"sections":{"type":"array","items":{"type":"object","properties":{"heading":{"type":"string"},"goal":{"type":"string"},"claims":{"type":"array","items":{"type":"string"}}},"required":["heading","goal","claims"]}},"questionsToAnswer":{"type":"array","items":{"type":"string"}},"internalLinks":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"anchor":{"type":"string"},"why":{"type":"string"}},"required":["url","anchor","why"]}},"acceptanceChecklist":{"type":"array","items":{"type":"string"}},"recommendedAngle":{"type":"string"},"competitorsToCounter":{"type":"array","items":{"type":"string"}},"sourcesToReference":{"type":"array","items":{"type":"string"}},"missingCoverage":{"type":"array","items":{"type":"string"}},"baseline":{"type":["object","null"],"properties":{"sourcePromptId":{"type":"string"},"mentionedEngines":{"type":"number"},"totalEngines":{"type":"number"},"engines":{"type":"array","items":{"type":"object","properties":{"engine":{"type":"string"},"mentioned":{"type":"boolean"},"position":{"type":["number","null"]}},"required":["engine","mentioned","position"]}},"competitorMentions":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"engines":{"type":"number"}},"required":["name","engines"]}},"citedDomains":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"engines":{"type":"number"}},"required":["domain","engines"]}},"capturedAt":{"type":["string","null"]}},"required":["sourcePromptId","mentionedEngines","totalEngines","engines","competitorMentions","citedDomains","capturedAt"]}},"required":["targetPrompt","intent","contentSubtype","workingTitle","audience","jobToBeDone","sections","questionsToAnswer","internalLinks","acceptanceChecklist"]},"PlanGeoContentBriefResponse":{"type":"object","properties":{"briefId":{"type":"string"},"brief":{"$ref":"#/components/schemas/GeoContentBriefDocument"},"status":{"type":"string","enum":["draft","approved","writing","completed","failed"]},"runId":{"type":["string","null"]},"postId":{"type":["string","null"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["briefId","brief","status","runId","postId","organization"]},"PlanGeoContentBriefRequest":{"type":"object","properties":{"topic":{"type":"string","minLength":3,"maxLength":200,"description":"What the article should target. Replaced by the source prompt when sourceKind is gap, prompt or search_console."},"autoApprove":{"type":"boolean","default":false,"description":"Start the writer immediately instead of leaving the brief in draft."},"contentSubtype":{"type":"string","enum":["guide","comparison","listicle","how-to","faq","alternatives"]},"brandVoiceIds":{"type":"array","items":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$"},"maxItems":8,"description":"Only the first entry is used; it overrides the project's brand identity."},"competitorIds":{"type":"array","items":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$"},"maxItems":25},"sitemapId":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$"},"sourceKind":{"type":"string","enum":["manual","gap","prompt","search_console"]},"sourceId":{"type":"string","minLength":1,"description":"Gap, prompt or search-console suggestion id. An open brief for the same source is reused instead of planning a new one."},"existingPageUrl":{"type":"string","maxLength":2048,"format":"uri","description":"Existing page the article should refresh instead of creating a competing page."}},"required":["topic"]},"ApproveGeoContentBriefResponse":{"type":"object","properties":{"runId":{"type":"string"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["runId","organization"]},"GeoAgentReadinessResponse":{"type":"object","properties":{"targetUrl":{"type":"string"},"report":{"$ref":"#/components/schemas/GeoAgentReadinessReport"},"scan":{"allOf":[{"$ref":"#/components/schemas/GeoAgentReadinessReport"},{"description":"Latest run newer than the completed report, if any."}]},"history":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"score":{"type":["number","null"]},"failedCount":{"type":"integer"},"partialCount":{"type":"integer"},"scannedAt":{"type":"string"}},"required":["id","score","failedCount","partialCount","scannedAt"]},"description":"Completed scans, oldest first."},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["targetUrl","report","scan","history","organization"]},"GeoAgentReadinessReport":{"type":["object","null"],"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["running","completed","failed"]},"targetUrl":{"type":"string"},"score":{"type":["number","null"]},"scoreLabel":{"type":["string","null"]},"scoreBreakdown":{"type":["object","null"],"properties":{"essential":{"type":"object","properties":{"earned":{"type":"number"},"available":{"type":"number"},"passing":{"type":"number"},"total":{"type":"number"}},"required":["earned","available","passing","total"]},"recommended":{"type":"object","properties":{"earned":{"type":"number"},"available":{"type":"number"},"passing":{"type":"number"},"total":{"type":"number"}},"required":["earned","available","passing","total"]},"bonus":{"type":"object","properties":{"points":{"type":"number"},"positiveSignals":{"type":"number"}},"required":["points","positiveSignals"]}},"required":["essential","recommended","bonus"]},"issues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tier":{"type":"string","enum":["essential","recommended","bonus"]},"result":{"type":"string","enum":["failed","partial"]},"details":{"type":["string","null"]},"recommendation":{"type":["string","null"]}},"required":["id","name","tier","result","details","recommendation"]}},"eligibleChecks":{"type":["integer","null"]},"reportUrl":{"type":["string","null"]},"errorMessage":{"type":["string","null"]},"scannedAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","status","targetUrl","score","scoreLabel","scoreBreakdown","issues","eligibleChecks","reportUrl","errorMessage","scannedAt","createdAt"],"description":"Latest completed report, if any."},"GeoAgentReadinessScanResponse":{"type":"object","properties":{"reportId":{"type":"string"},"alreadyRunning":{"type":"boolean","description":"True when an in-flight scan for the same URL was reused instead of starting a new one."},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["reportId","alreadyRunning","organization"]},"GeoTrafficOverviewResponse":{"type":"object","properties":{"configured":{"type":"boolean","description":"False when the traffic backend is not configured for this deployment; the payload is then empty rather than an error."},"totals":{"type":"object","properties":{"crawler":{"type":"integer"},"cited":{"type":"integer"},"aiReferral":{"type":"integer"},"conversions":{"type":["integer","null"],"description":"AI referral visits that reached a configured conversion path. Null when no conversion paths are set."}},"required":["crawler","cited","aiReferral","conversions"]},"previousConversions":{"type":["integer","null"],"description":"Conversions in the previous window of the same length. Null when no conversion paths are set or no comparison data exists."},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"visitorType":{"type":"string","enum":["crawler","ai_referral","human","unknown"]},"agent":{"type":"string"},"category":{"type":"string"},"confidence":{"type":"string"},"visits":{"type":"integer"},"previousVisits":{"type":"integer"},"markdownVisits":{"type":"integer"},"paths":{"type":"integer"},"lastSeenAt":{"type":"string"}},"required":["source","visitorType","agent","category","confidence","visits","markdownVisits","paths","lastSeenAt"]}},"points":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"visitorType":{"type":"string","enum":["crawler","ai_referral","human","unknown"]},"source":{"type":"string"},"visits":{"type":"integer"}},"required":["day","visitorType","source","visits"]}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["configured","totals","previousConversions","sources","points","organization"]},"GeoTrafficLogResponse":{"type":"object","properties":{"configured":{"type":"boolean","description":"False when the traffic backend is not configured for this deployment; the payload is then empty rather than an error."},"log":{"type":"array","items":{"type":"object","properties":{"capturedAt":{"type":"string"},"visitorType":{"type":"string","enum":["crawler","ai_referral","human","unknown"]},"source":{"type":"string"},"agent":{"type":"string"},"category":{"type":"string"},"confidence":{"type":"string"},"path":{"type":"string"},"host":{"type":"string"},"country":{"type":"string"},"ua":{"type":"string"},"journeyId":{"type":"string"},"wantsMarkdown":{"type":"boolean"}},"required":["capturedAt","visitorType","source","agent","category","confidence","path","host","country","ua","journeyId","wantsMarkdown"]}},"total":{"type":"integer"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["configured","log","total","organization"]},"GeoTrafficJourneysResponse":{"type":"object","properties":{"configured":{"type":"boolean","description":"False when the traffic backend is not configured for this deployment; the payload is then empty rather than an error."},"journeys":{"type":"array","items":{"type":"object","properties":{"journeyId":{"type":"string"},"source":{"type":"string"},"visitorType":{"type":"string","enum":["crawler","ai_referral","human","unknown"]},"pages":{"type":"integer"},"distinctPaths":{"type":"integer"},"firstSeenAt":{"type":"string"},"lastSeenAt":{"type":"string"},"samplePaths":{"type":"array","items":{"type":"string"}}},"required":["journeyId","source","visitorType","pages","distinctPaths","firstSeenAt","lastSeenAt","samplePaths"]}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["configured","journeys","organization"]},"GeoJourneyDetailResponse":{"type":"object","properties":{"configured":{"type":"boolean","description":"False when the traffic backend is not configured for this deployment; the payload is then empty rather than an error."},"events":{"type":"array","items":{"type":"object","properties":{"capturedAt":{"type":"string"},"path":{"type":"string"},"host":{"type":"string"},"method":{"type":"string"},"referer":{"type":"string"},"country":{"type":"string"},"agent":{"type":"string"},"category":{"type":"string"}},"required":["capturedAt","path","host","method","referer","country","agent","category"]}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["configured","events","organization"]},"GeoTrafficPagesResponse":{"type":"object","properties":{"configured":{"type":"boolean","description":"False when the traffic backend is not configured for this deployment; the payload is then empty rather than an error."},"pages":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"host":{"type":"string"},"source":{"type":"string"},"visitorType":{"type":"string","enum":["crawler","ai_referral","human","unknown"]},"visits":{"type":"integer"},"previousVisits":{"type":"integer"},"lastSeenAt":{"type":"string"}},"required":["path","host","source","visitorType","visits","lastSeenAt"]}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["configured","pages","organization"]},"GeoIngestSetupResponse":{"type":"object","properties":{"ingestUrl":{"type":"string","description":"Endpoint the tracking snippet posts events to."},"snippet":{"type":"string","description":"Install snippet for the default framework (Next.js)."},"snippets":{"type":"object","properties":{"next":{"type":"string"},"nuxt":{"type":"string"},"netlify":{"type":"string"}},"required":["next","nuxt","netlify"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["ingestUrl","snippet","snippets","organization"]},"GeoIngestTokenResponse":{"type":"object","properties":{"ingestUrl":{"type":"string","description":"Endpoint the tracking snippet posts events to."},"snippet":{"type":"string","description":"Install snippet for the default framework (Next.js)."},"snippets":{"type":"object","properties":{"next":{"type":"string"},"nuxt":{"type":"string"},"netlify":{"type":"string"}},"required":["next","nuxt","netlify"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"token":{"type":"string","description":"Tracking token. Shown once per request; rotating invalidates every previously issued token."}},"required":["ingestUrl","snippet","snippets","organization","token"]},"CreateAgentSessionResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"sessionId":{"type":"string"},"continuationToken":{"type":"string"}},"required":["ok","sessionId","continuationToken"]},"CreateAgentSessionRequest":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":200000,"description":"The first user message of the session."}},"required":["message"]},"SendAgentMessageRequest":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":200000,"description":"The next user message. Omit when only answering a pending input request."},"inputResponses":{"type":"array","items":{"type":"object","properties":{"requestId":{"type":"string","minLength":1},"optionId":{"type":"string","minLength":1,"description":"The chosen option id from the input.requested event, e.g. \"approve\" or \"deny\"."}},"required":["requestId","optionId"]},"description":"Answers to pending input.requested events (tool approvals, questions) from the event stream."},"continuationToken":{"type":"string","minLength":1,"description":"The continuation token returned by the previous request for this session."}},"required":["continuationToken"]},"ListAgentChatsResponse":{"type":"object","properties":{"sessions":{"type":"array","items":{"$ref":"#/components/schemas/AgentSessionSummary"}}},"required":["sessions"]},"AgentSessionSummary":{"type":"object","properties":{"sessionId":{"type":"string"},"chatId":{"type":["string","null"]},"surface":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["sessionId","chatId","surface","status","createdAt","updatedAt"]}},"parameters":{}},"paths":{"/v1/status":{"get":{"tags":["Discovery"],"operationId":"getPublicApiStatus","summary":"Check public API reachability","security":[],"responses":{"200":{"description":"Public reachability and authentication discovery metadata for agents.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicStatusResponse"}}}}}}},"/v1/posts":{"get":{"tags":["Content"],"operationId":"listPosts","summary":"List posts","description":"Returns posts for the organization the API key belongs to, newest first by default. Only published posts are included unless you pass status=draft,published.","parameters":[{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort by creation date","example":"desc"},"required":false,"description":"Sort by creation date","name":"sort","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"Items per page","example":10},"required":false,"description":"Items per page","name":"limit","in":"query"},{"schema":{"type":"integer","minimum":1,"default":1,"description":"Page number","example":1},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"string","description":"Filter by status using a comma-separated list."},"required":false,"description":"Filter by status using a comma-separated list.","name":"status","in":"query"},{"schema":{"type":"string","description":"Filter by content type using a comma-separated list."},"required":false,"description":"Filter by content type using a comma-separated list.","name":"contentType","in":"query"},{"schema":{"type":"string","description":"Filter by brand identity ID using a comma-separated list."},"required":false,"description":"Filter by brand identity ID using a comma-separated list.","name":"brandIdentityId","in":"query"}],"responses":{"200":{"description":"Posts fetched successfully","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"slug":{"type":["string","null"]},"content":{"type":"string","description":"Rendered HTML for text posts. For image posts, this is the public CDN URL of the rendered image."},"htmlUrl":{"type":["string","null"],"description":"Public CDN URL of the generated HTML artifact for image posts. Null for non-image posts."},"markdown":{"type":["string","null"],"description":"Markdown source for text posts. Null for image posts."},"rawHtml":{"type":["string","null"],"description":"Legacy inline generated HTML for image posts. New generated image HTML is stored as htmlUrl. Null for non-image posts."},"recommendations":{"type":["string","null"]},"contentType":{"type":"string","enum":["changelog","linkedin_post","twitter_post","blog_post","investor_update","image"]},"sourceMetadata":{},"status":{"type":"string","enum":["draft","published"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","slug","content","htmlUrl","markdown","rawHtml","recommendations","contentType","status","createdAt","updatedAt"]}},"pagination":{"type":"object","properties":{"limit":{"type":"integer","minimum":1},"currentPage":{"type":"integer","minimum":1},"nextPage":{"type":["integer","null"],"minimum":1},"previousPage":{"type":["integer","null"],"minimum":1},"totalPages":{"type":"integer","minimum":1},"totalItems":{"type":"integer","minimum":0}},"required":["limit","currentPage","nextPage","previousPage","totalPages","totalItems"]}},"required":["organization","posts","pagination"]}}}},"400":{"description":"Invalid path params or query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Content"],"operationId":"createPost","summary":"Create a post","description":"Creates a post directly without generation. Omit markdown to create an empty draft you fill in later through the dashboard or PATCH /v1/posts/{postId}. Slugs are only accepted for blog posts and changelogs.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120},"contentType":{"type":"string","enum":["blog_post","changelog","linkedin_post","twitter_post"]},"slug":{"type":["string","null"],"minLength":1,"maxLength":160},"markdown":{"type":"string","maxLength":100000},"status":{"type":"string","enum":["draft","published"],"default":"draft"}},"required":["title","contentType"],"description":"Slugs are normalized to lowercase letters, numbers, and hyphens and only accepted for blog posts and changelogs. Omit markdown to create an empty post you fill in later.","example":{"title":"Ship notes for week 11","contentType":"blog_post","slug":"ship-notes-week-11","status":"draft"}}}}},"responses":{"201":{"description":"Post created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"post":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"slug":{"type":["string","null"]},"content":{"type":"string","description":"Rendered HTML for text posts. For image posts, this is the public CDN URL of the rendered image."},"htmlUrl":{"type":["string","null"],"description":"Public CDN URL of the generated HTML artifact for image posts. Null for non-image posts."},"markdown":{"type":["string","null"],"description":"Markdown source for text posts. Null for image posts."},"rawHtml":{"type":["string","null"],"description":"Legacy inline generated HTML for image posts. New generated image HTML is stored as htmlUrl. Null for non-image posts."},"recommendations":{"type":["string","null"]},"contentType":{"type":"string","enum":["changelog","linkedin_post","twitter_post","blog_post","investor_update","image"]},"sourceMetadata":{},"status":{"type":"string","enum":["draft","published"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","slug","content","htmlUrl","markdown","rawHtml","recommendations","contentType","status","createdAt","updatedAt"]}},"required":["organization","post"]}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Post slug already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 60 requests per 1 minute per API key.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/posts/{postId}":{"get":{"tags":["Content"],"operationId":"getPost","summary":"Get a single post","description":"Returns the post. When no post with this ID exists in your organization, the response is still 200 with post set to null.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"post_123"},"required":true,"in":"path","name":"postId"}],"responses":{"200":{"description":"Post fetched successfully","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"post":{"type":["object","null"],"properties":{"id":{"type":"string"},"title":{"type":"string"},"slug":{"type":["string","null"]},"content":{"type":"string","description":"Rendered HTML for text posts. For image posts, this is the public CDN URL of the rendered image."},"htmlUrl":{"type":["string","null"],"description":"Public CDN URL of the generated HTML artifact for image posts. Null for non-image posts."},"markdown":{"type":["string","null"],"description":"Markdown source for text posts. Null for image posts."},"rawHtml":{"type":["string","null"],"description":"Legacy inline generated HTML for image posts. New generated image HTML is stored as htmlUrl. Null for non-image posts."},"recommendations":{"type":["string","null"]},"contentType":{"type":"string","enum":["changelog","linkedin_post","twitter_post","blog_post","investor_update","image"]},"sourceMetadata":{},"status":{"type":"string","enum":["draft","published"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","slug","content","htmlUrl","markdown","rawHtml","recommendations","contentType","status","createdAt","updatedAt"]}},"required":["organization","post"]}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Content"],"operationId":"deletePost","summary":"Delete a single post","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"post_123"},"required":true,"in":"path","name":"postId"}],"responses":{"200":{"description":"Post deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["id","organization"]}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Post not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Content"],"operationId":"updatePost","summary":"Update a single post","description":"Updates any combination of title, slug, markdown, and status. Sending markdown re-renders the stored HTML, and when title is omitted it is taken from the first heading in the markdown, keeping the existing title when the markdown has no heading. Slugs are only accepted for blog posts and changelogs.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"post_123"},"required":true,"in":"path","name":"postId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120,"example":"Ship notes for week 11"},"slug":{"type":["string","null"],"minLength":1,"maxLength":160,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","example":"ship-notes-week-11"},"markdown":{"type":"string","minLength":1,"maxLength":100000,"example":"# Ship notes\n\nWe shipped a faster editor."},"status":{"type":"string","enum":["draft","published"],"example":"published"}}}}}},"responses":{"200":{"description":"Post updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"post":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"slug":{"type":["string","null"]},"content":{"type":"string","description":"Rendered HTML for text posts. For image posts, this is the public CDN URL of the rendered image."},"htmlUrl":{"type":["string","null"],"description":"Public CDN URL of the generated HTML artifact for image posts. Null for non-image posts."},"markdown":{"type":["string","null"],"description":"Markdown source for text posts. Null for image posts."},"rawHtml":{"type":["string","null"],"description":"Legacy inline generated HTML for image posts. New generated image HTML is stored as htmlUrl. Null for non-image posts."},"recommendations":{"type":["string","null"]},"contentType":{"type":"string","enum":["changelog","linkedin_post","twitter_post","blog_post","investor_update","image"]},"sourceMetadata":{},"status":{"type":"string","enum":["draft","published"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","slug","content","htmlUrl","markdown","rawHtml","recommendations","contentType","status","createdAt","updatedAt"]}},"required":["organization","post"]}}}},"400":{"description":"Invalid path params or request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Post not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Post slug already exists or concurrent modification","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 60 requests per 1 minute per API key.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/posts/generate":{"post":{"tags":["Content"],"operationId":"createPostGeneration","summary":"Queue async post generation","description":"Queues a generation job for one content type and returns 202 with the job. Select sources with integrations.github, integrations.linear, or github.repositories; when no selector is given at all, every connected GitHub integration is used. Poll GET /v1/posts/generate/{jobId} until job.status is completed, failed, or skipped. Notra does not send webhooks when the job finishes.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contentType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"],"description":"Type of content to generate.","example":"blog_post"},"lookbackWindow":{"type":"string","enum":["current_day","yesterday","last_7_days","last_14_days","last_30_days"],"default":"last_7_days","description":"How far back to collect source activity (commits, pull requests, releases, Linear issues).","example":"last_7_days"},"brandVoiceId":{"type":"string","minLength":1,"description":"Deprecated. Use brandIdentityId instead.","example":"51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"},"brandIdentityId":{"type":["string","null"],"minLength":1,"description":"Brand identity to write in. Defaults to the organization's default brand identity.","example":"51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"},"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"example":["repo_1","repo_2"],"description":"Deprecated. Use integrations.github with GitHub integration IDs instead."},"linearIntegrationIds":{"type":"array","items":{"type":"string","minLength":1},"example":["linear_integration_1"],"description":"Deprecated. Use integrations.linear with Linear integration IDs instead."},"integrations":{"type":"object","properties":{"github":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"description":"GitHub integration IDs to use as sources, as returned by GET /v1/integrations.","example":["integration_1","integration_2"]},"linear":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"description":"Linear integration IDs to use as sources, as returned by GET /v1/integrations.","example":["linear_integration_1"]}},"description":"Source integrations to draw activity from. Omit this and github.repositories to use every connected GitHub integration."},"github":{"type":"object","properties":{"repositories":{"type":"array","items":{"type":"object","properties":{"owner":{"type":"string","minLength":1},"repo":{"type":"string","minLength":1}},"required":["owner","repo"]},"minItems":1}},"required":["repositories"],"description":"Select connected repositories by owner and name instead of integration ID. Cannot be combined with integrations.github.","example":{"repositories":[{"owner":"usenotra","repo":"notra"}]}},"dataPoints":{"type":"object","properties":{"includePullRequests":{"type":"boolean","default":true},"includeCommits":{"type":"boolean","default":true},"includeReleases":{"type":"boolean","default":true},"includeLinearData":{"type":"boolean","default":false}},"default":{"includePullRequests":true,"includeCommits":true,"includeReleases":true,"includeLinearData":false},"description":"Which kinds of activity to collect from the selected sources."},"selectedItems":{"type":"object","properties":{"commitShas":{"type":"array","items":{"type":"string"}},"pullRequestNumbers":{"type":"array","items":{"type":"object","properties":{"repositoryId":{"type":"string"},"number":{"type":"number"}},"required":["repositoryId","number"]}},"releaseTagNames":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"object","properties":{"repositoryId":{"type":"string"},"tagName":{"type":"string"}},"required":["repositoryId","tagName"]}]}},"linearIssueIds":{"type":"array","items":{"type":"object","properties":{"integrationId":{"type":"string"},"issueId":{"type":"string"}},"required":["integrationId","issueId"]}}},"description":"Restrict generation to specific commits, pull requests, releases, or Linear issues instead of everything in the lookback window."},"timezone":{"type":"string","minLength":1,"maxLength":100,"description":"IANA timezone used for relative lookback windows such as current_day and yesterday.","example":"America/New_York"}},"required":["contentType"]}}}},"responses":{"202":{"description":"Post generation queued successfully","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"job":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"status":{"type":"string","enum":["queued","running","completed","failed","skipped"],"description":"Job state. Terminal states are completed, failed, and skipped."},"contentType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"lookbackWindow":{"type":"string","enum":["current_day","yesterday","last_7_days","last_14_days","last_30_days"]},"repositoryIds":{"type":"array","items":{"type":"string"}},"brandVoiceId":{"type":["string","null"]},"workflowRunId":{"type":["string","null"]},"postId":{"type":["string","null"],"description":"ID of the generated post. Set once the job reaches completed."},"error":{"type":["string","null"],"description":"Failure reason when status is failed."},"source":{"type":"string","enum":["api","dashboard"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","organizationId","status","contentType","lookbackWindow","repositoryIds","brandVoiceId","workflowRunId","postId","error","source","createdAt","updatedAt","completedAt"]}},"required":["organization","job"]}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 10 requests per 1 minute per API key.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"503":{"description":"Content generation is unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"jobId":{"type":"string"}},"required":["error"]}}}}}}},"/v1/posts/generate/{jobId}":{"get":{"tags":["Content"],"operationId":"getPostGeneration","summary":"Get async post generation status","description":"Returns the job and its event log. job.status moves from queued to running and ends as completed, failed, or skipped. job.postId is set once the post has been created; fetch it with GET /v1/posts/{postId}.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","description":"Job ID returned by POST /v1/posts/generate.","example":"job_5f0c3b2a9d4e4c1f8a7b6c5d4e3f2a1b"},"required":true,"description":"Job ID returned by POST /v1/posts/generate.","in":"path","name":"jobId"}],"responses":{"200":{"description":"Post generation status fetched successfully","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"status":{"type":"string","enum":["queued","running","completed","failed","skipped"],"description":"Job state. Terminal states are completed, failed, and skipped."},"contentType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"lookbackWindow":{"type":"string","enum":["current_day","yesterday","last_7_days","last_14_days","last_30_days"]},"repositoryIds":{"type":"array","items":{"type":"string"}},"brandVoiceId":{"type":["string","null"]},"workflowRunId":{"type":["string","null"]},"postId":{"type":["string","null"],"description":"ID of the generated post. Set once the job reaches completed."},"error":{"type":["string","null"],"description":"Failure reason when status is failed."},"source":{"type":"string","enum":["api","dashboard"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","organizationId","status","contentType","lookbackWindow","repositoryIds","brandVoiceId","workflowRunId","postId","error","source","createdAt","updatedAt","completedAt"]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"type":{"type":"string","enum":["queued","workflow_triggered","running","fetching_repositories","generating_content","post_created","completed","failed","skipped"]},"message":{"type":"string"},"createdAt":{"type":"string"},"metadata":{"type":["object","null"],"additionalProperties":{}}},"required":["id","jobId","type","message","createdAt","metadata"]}}},"required":["job","events"]}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Generation job not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Content generation is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/brand-identities":{"get":{"tags":["Content"],"operationId":"listBrandIdentities","summary":"List available brand identities","description":"Returns every brand identity in the organization, default identity first.","responses":{"200":{"description":"Brand identities fetched successfully","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"brandIdentities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isDefault":{"type":"boolean"},"websiteUrl":{"type":"string"},"companyName":{"type":["string","null"]},"companyDescription":{"type":["string","null"]},"toneProfile":{"type":["string","null"]},"customTone":{"type":["string","null"]},"customInstructions":{"type":["string","null"]},"audience":{"type":["string","null"]},"language":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","isDefault","websiteUrl","companyName","companyDescription","toneProfile","customTone","customInstructions","audience","language","createdAt","updatedAt"]}}},"required":["organization","brandIdentities"]}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/brand-identities/generate":{"post":{"tags":["Content"],"operationId":"createBrandIdentity","summary":"Queue async brand identity generation","description":"Creates the brand identity immediately, then queues a website analysis that fills in company details, tone, and audience. The first brand identity in an organization becomes the default. Poll GET /v1/brand-identities/generate/{jobId} until job.status is completed or failed.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"Display name. Must be unique within the organization. Defaults to \"Untitled Brand Voice\".","example":"Notra"},"websiteUrl":{"type":"string","minLength":1,"description":"Public website to analyze for company details, tone, and audience. The scheme is optional; https is assumed.","example":"https://usenotra.com"}},"required":["websiteUrl"]}}}},"responses":{"202":{"description":"Brand identity generation queued successfully","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"job":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"brandIdentityId":{"type":"string","description":"ID of the brand identity being analyzed. The identity is created immediately and its details are filled in as the job completes."},"status":{"type":"string","enum":["queued","running","completed","failed"],"description":"Job state. Stop polling once it is completed or failed."},"step":{"type":["string","null"],"enum":["scraping","extracting","saving",null],"description":"Current analysis step while the job is running."},"currentStep":{"type":"integer","minimum":0},"totalSteps":{"type":"integer","minimum":1},"workflowRunId":{"type":["string","null"]},"error":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","organizationId","brandIdentityId","status","step","currentStep","totalSteps","workflowRunId","error","createdAt","updatedAt","completedAt"]}},"required":["organization","job"]}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Brand identity name already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 5 requests per 1 minute per API key.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"503":{"description":"Authentication service or brand analysis unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/brand-identities/generate/{jobId}":{"get":{"tags":["Content"],"operationId":"getBrandIdentityGeneration","summary":"Get async brand identity generation status","description":"Returns the analysis job. job.status moves from queued to running and ends as completed or failed; job.step shows the current stage while running. Fetch the finished identity with GET /v1/brand-identities/{brandIdentityId}.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","description":"Job ID returned by POST /v1/brand-identities/generate.","example":"brand_job_5f0c3b2a9d4e4c1f8a7b6c5d4e3f2a1b"},"required":true,"description":"Job ID returned by POST /v1/brand-identities/generate.","in":"path","name":"jobId"}],"responses":{"200":{"description":"Brand identity generation status fetched successfully","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"job":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"brandIdentityId":{"type":"string","description":"ID of the brand identity being analyzed. The identity is created immediately and its details are filled in as the job completes."},"status":{"type":"string","enum":["queued","running","completed","failed"],"description":"Job state. Stop polling once it is completed or failed."},"step":{"type":["string","null"],"enum":["scraping","extracting","saving",null],"description":"Current analysis step while the job is running."},"currentStep":{"type":"integer","minimum":0},"totalSteps":{"type":"integer","minimum":1},"workflowRunId":{"type":["string","null"]},"error":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","organizationId","brandIdentityId","status","step","currentStep","totalSteps","workflowRunId","error","createdAt","updatedAt","completedAt"]}},"required":["organization","job"]}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Brand identity analysis job not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Brand analysis is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/brand-identities/{brandIdentityId}":{"get":{"tags":["Content"],"operationId":"getBrandIdentity","summary":"Get a single brand identity","description":"Returns the brand identity. When no brand identity with this ID exists in your organization, the response is still 200 with brandIdentity set to null.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"},"required":true,"in":"path","name":"brandIdentityId"}],"responses":{"200":{"description":"Brand identity fetched successfully","content":{"application/json":{"schema":{"type":"object","properties":{"brandIdentity":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"isDefault":{"type":"boolean"},"websiteUrl":{"type":"string"},"companyName":{"type":["string","null"]},"companyDescription":{"type":["string","null"]},"toneProfile":{"type":["string","null"]},"customTone":{"type":["string","null"]},"customInstructions":{"type":["string","null"]},"audience":{"type":["string","null"]},"language":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","isDefault","websiteUrl","companyName","companyDescription","toneProfile","customTone","customInstructions","audience","language","createdAt","updatedAt"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["brandIdentity","organization"]}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Content"],"operationId":"updateBrandIdentity","summary":"Update a single brand identity","description":"Updates brand identity fields. Pass isDefault: true to make the target brand identity the organization's default.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"},"required":true,"in":"path","name":"brandIdentityId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"example":"Notra"},"websiteUrl":{"type":"string","minLength":1,"example":"https://usenotra.com"},"companyName":{"type":["string","null"],"minLength":1,"maxLength":200,"example":"Notra"},"companyDescription":{"type":["string","null"],"minLength":10,"maxLength":4000,"example":"AI-native content workflows for software teams."},"toneProfile":{"type":["string","null"],"enum":["Conversational","Professional","Casual","Formal",null],"example":"Professional","description":"Set a preset tone profile. When provided without customTone, any saved custom tone is cleared."},"customTone":{"type":["string","null"],"maxLength":1000,"example":"Clear, direct, and technically confident","description":"Provide a custom tone override. Send an empty string or null to clear it."},"customInstructions":{"type":["string","null"],"maxLength":4000,"example":"Avoid hype. Prioritize concrete examples."},"audience":{"type":["string","null"],"minLength":10,"maxLength":1000,"example":"Engineering leaders and developer tooling teams."},"language":{"type":["string","null"],"enum":["English","Spanish","French","German","Portuguese","Dutch","Italian","Japanese","Korean","Chinese","Arabic","Hindi","Russian","Turkish","Polish","Swedish","Danish","Norwegian","Finnish","Czech","Romanian","Hungarian","Greek","Thai","Vietnamese","Indonesian","Ukrainian","Hebrew",null],"example":"English"},"isDefault":{"type":"boolean","enum":[true],"example":true,"description":"Set this brand identity as the organization's default. Only true is accepted."}}},"examples":{"setDefault":{"summary":"Set as default","value":{"isDefault":true}},"updateAndSetDefault":{"summary":"Rename and set as default","value":{"name":"Notra Marketing","isDefault":true}},"switchToPresetTone":{"summary":"Switch custom tone to preset","value":{"toneProfile":"Professional"}},"setCustomTone":{"summary":"Set custom tone","value":{"customTone":"Warm, sharp, and opinionated"}}}}}},"responses":{"200":{"description":"Brand identity updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"brandIdentity":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isDefault":{"type":"boolean"},"websiteUrl":{"type":"string"},"companyName":{"type":["string","null"]},"companyDescription":{"type":["string","null"]},"toneProfile":{"type":["string","null"]},"customTone":{"type":["string","null"]},"customInstructions":{"type":["string","null"]},"audience":{"type":["string","null"]},"language":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","isDefault","websiteUrl","companyName","companyDescription","toneProfile","customTone","customInstructions","audience","language","createdAt","updatedAt"]}},"required":["organization","brandIdentity"]}}}},"400":{"description":"Invalid path params or request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Brand identity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Brand identity name already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Content"],"operationId":"deleteBrandIdentity","summary":"Delete a single brand identity","description":"Deletes a non-default brand identity and disables any automation triggers that reference it.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"},"required":true,"in":"path","name":"brandIdentityId"}],"responses":{"200":{"description":"Brand identity deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"disabledSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"disabledEvents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}}},"required":["id","organization","disabledSchedules","disabledEvents"]}}}},"400":{"description":"Cannot delete the default brand identity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Brand identity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Brand identity is in use by a project or content brief","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/integrations":{"get":{"tags":["Content"],"operationId":"listIntegrations","summary":"List available integrations","description":"Returns the enabled GitHub and Linear integrations for the organization. The slack array is always empty.","responses":{"200":{"description":"Integrations fetched successfully","content":{"application/json":{"schema":{"type":"object","properties":{"github":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":"string"},"owner":{"type":["string","null"]},"repo":{"type":["string","null"]},"defaultBranch":{"type":["string","null"]}},"required":["id","displayName","owner","repo","defaultBranch"]},"description":"Enabled GitHub integrations. One entry per connected repository."},"slack":{"type":"array","items":{},"description":"Always empty. Slack is connected from the dashboard and is not exposed through the API."},"linear":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":"string"},"linearOrganizationId":{"type":"string"},"linearOrganizationName":{"type":["string","null"]},"linearTeamId":{"type":["string","null"]},"linearTeamName":{"type":["string","null"]}},"required":["id","displayName","linearOrganizationId","linearOrganizationName","linearTeamId","linearTeamName"]},"description":"Enabled Linear integrations."},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["github","slack","linear","organization"]}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/integrations/github":{"post":{"tags":["Content"],"operationId":"createGitHubIntegration","summary":"Create a GitHub integration","description":"Checks that the repository can be read (a personal access token is required for private repositories), connects it, and enables changelog generation for it; blog post and X post outputs start disabled. A webhook secret is generated on creation. Copy the payload URL and secret from the dashboard to receive push and release events.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"owner":{"type":"string","minLength":1,"description":"GitHub user or organization that owns the repository.","example":"usenotra"},"repo":{"type":"string","minLength":1,"description":"Repository name without the owner.","example":"notra"},"branch":{"type":["string","null"],"minLength":1,"description":"Branch to read activity from. Defaults to the repository's default branch.","example":"main"},"token":{"type":["string","null"],"minLength":1,"description":"GitHub personal access token with read access to the repository. Required for private repositories; public repositories work without one.","example":"github_pat_11ABCDEFG..."}},"required":["owner","repo"]}}}},"responses":{"201":{"description":"GitHub integration created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"github":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":"string"},"owner":{"type":["string","null"]},"repo":{"type":["string","null"]},"defaultBranch":{"type":["string","null"]}},"required":["id","displayName","owner","repo","defaultBranch"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["github","organization"]}}}},"400":{"description":"Invalid request body or GitHub repository access error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Repository already connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 20 requests per 1 minute per API key.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"503":{"description":"Authentication or integration service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/integrations/{integrationId}":{"delete":{"tags":["Content"],"operationId":"deleteIntegration","summary":"Delete a single integration","description":"Deletes a GitHub or Linear integration. Schedules and event triggers that target the integration are disabled and listed in the response.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"},"required":true,"in":"path","name":"integrationId"}],"responses":{"200":{"description":"Integration deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"disabledSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"disabledEvents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}}},"required":["id","organization","disabledSchedules","disabledEvents"]}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Integration not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/schedules":{"get":{"tags":["Schedules"],"operationId":"listSchedules","summary":"List schedules","description":"Returns the organization's cron schedules, newest first. repositoryMap maps each targeted GitHub integration ID to an owner/repo label.","parameters":[{"schema":{"type":"string","description":"Filter by GitHub integration IDs using a comma-separated list. Only schedules targeting at least one of them are returned.","example":"51c2f3aa-efdd-4e28-8e69-23fa2dfd3561,7f9a2b3c-1d4e-4f5a-9b6c-8d7e6f5a4b3c"},"required":false,"description":"Filter by GitHub integration IDs using a comma-separated list. Only schedules targeting at least one of them are returned.","name":"repositoryIds","in":"query"}],"responses":{"200":{"description":"Schedules fetched successfully","content":{"application/json":{"schema":{"type":"object","properties":{"schedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"sourceType":{"type":"string","enum":["cron"]},"sourceConfig":{"type":"object","properties":{"cron":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly","custom"],"description":"How often the schedule runs.","example":"weekly"},"hour":{"type":"integer","minimum":0,"maximum":23,"description":"Hour of the day to run, in UTC (0-23).","example":9},"minute":{"type":"integer","minimum":0,"maximum":59,"description":"Minute of the hour to run (0-59).","example":0},"dayOfWeek":{"type":"integer","minimum":0,"maximum":6,"description":"Day of the week for weekly schedules, 0 (Sunday) to 6 (Saturday). Required when frequency is weekly.","example":1},"dayOfMonth":{"type":"integer","minimum":1,"maximum":31,"description":"Day of the month for monthly schedules (1-31). Required when frequency is monthly.","example":1},"intervalDays":{"type":"integer","minimum":2,"maximum":90,"description":"Run every N days (2-90). Required when frequency is custom.","example":3},"anchorDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"UTC calendar date (YYYY-MM-DD) a custom interval counts from. Defaults to today.","example":"2026-09-03"}},"required":["frequency","hour","minute"]}},"required":["cron"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"description":"GitHub integration IDs to generate from, as returned by GET /v1/integrations.","example":["51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"]}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"outputConfig":{"type":["object","null"],"properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"],"description":"Where auto-published posts are sent."},"brandVoiceId":{"type":"string","minLength":1,"description":"Brand identity ID to write in. Defaults to the organization's default brand identity.","example":"51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"},"instructions":{"type":"string","minLength":1,"maxLength":2000,"description":"Free-text brief for this schedule, passed to the writer on every run on top of the brand's custom instructions. Use it to steer the angle of the content, for example tutorial-style blog posts.","example":"Write a tutorial-style post that walks through one feature shipped in this window, with code samples."}}},"enabled":{"type":"boolean"},"autoPublish":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lookbackWindow":{"type":"string","enum":["current_day","yesterday","last_7_days","last_14_days","last_30_days"]}},"required":["id","organizationId","name","sourceType","sourceConfig","targets","outputType","enabled","autoPublish","createdAt","updatedAt","lookbackWindow"]}},"repositoryMap":{"type":"object","additionalProperties":{"type":"string"}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["schedules","repositoryMap","organization"]}}}},"400":{"description":"Invalid query params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to list schedules","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Schedules"],"operationId":"createSchedule","summary":"Create a schedule","description":"Creates a recurring schedule that generates one content type from the selected GitHub integrations. Times are in UTC. A schedule with the same source, targets, output, and lookback settings as an existing one is rejected with 409.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"Display name shown in the dashboard.","example":"Weekly changelog"},"sourceType":{"type":"string","enum":["cron"],"description":"Always cron for schedules."},"sourceConfig":{"type":"object","properties":{"cron":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly","custom"],"description":"How often the schedule runs.","example":"weekly"},"hour":{"type":"integer","minimum":0,"maximum":23,"description":"Hour of the day to run, in UTC (0-23).","example":9},"minute":{"type":"integer","minimum":0,"maximum":59,"description":"Minute of the hour to run (0-59).","example":0},"dayOfWeek":{"type":"integer","minimum":0,"maximum":6,"description":"Day of the week for weekly schedules, 0 (Sunday) to 6 (Saturday). Required when frequency is weekly.","example":1},"dayOfMonth":{"type":"integer","minimum":1,"maximum":31,"description":"Day of the month for monthly schedules (1-31). Required when frequency is monthly.","example":1},"intervalDays":{"type":"integer","minimum":2,"maximum":90,"description":"Run every N days (2-90). Required when frequency is custom.","example":3},"anchorDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"UTC calendar date (YYYY-MM-DD) a custom interval counts from. Defaults to today.","example":"2026-09-03"}},"required":["frequency","hour","minute"]}},"required":["cron"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"description":"GitHub integration IDs to generate from, as returned by GET /v1/integrations.","example":["51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"]}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"],"description":"Type of content each run generates.","example":"changelog"},"outputConfig":{"type":"object","properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"],"description":"Where auto-published posts are sent."},"brandVoiceId":{"type":"string","minLength":1,"description":"Brand identity ID to write in. Defaults to the organization's default brand identity.","example":"51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"},"instructions":{"type":"string","minLength":1,"maxLength":2000,"description":"Free-text brief for this schedule, passed to the writer on every run on top of the brand's custom instructions. Use it to steer the angle of the content, for example tutorial-style blog posts.","example":"Write a tutorial-style post that walks through one feature shipped in this window, with code samples."}}},"enabled":{"type":"boolean","description":"Whether the schedule runs. Disabled schedules are stored but never fire.","example":true},"autoPublish":{"type":"boolean","default":false,"description":"Publish generated posts automatically instead of saving them as drafts.","example":false},"lookbackWindow":{"type":"string","enum":["current_day","yesterday","last_7_days","last_14_days","last_30_days"],"default":"last_7_days","description":"How far back each run collects source activity.","example":"last_7_days"}},"required":["name","sourceType","sourceConfig","targets","outputType","enabled"]}}}},"responses":{"201":{"description":"Schedule created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"schedule":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"sourceType":{"type":"string","enum":["cron"]},"sourceConfig":{"type":"object","properties":{"cron":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly","custom"],"description":"How often the schedule runs.","example":"weekly"},"hour":{"type":"integer","minimum":0,"maximum":23,"description":"Hour of the day to run, in UTC (0-23).","example":9},"minute":{"type":"integer","minimum":0,"maximum":59,"description":"Minute of the hour to run (0-59).","example":0},"dayOfWeek":{"type":"integer","minimum":0,"maximum":6,"description":"Day of the week for weekly schedules, 0 (Sunday) to 6 (Saturday). Required when frequency is weekly.","example":1},"dayOfMonth":{"type":"integer","minimum":1,"maximum":31,"description":"Day of the month for monthly schedules (1-31). Required when frequency is monthly.","example":1},"intervalDays":{"type":"integer","minimum":2,"maximum":90,"description":"Run every N days (2-90). Required when frequency is custom.","example":3},"anchorDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"UTC calendar date (YYYY-MM-DD) a custom interval counts from. Defaults to today.","example":"2026-09-03"}},"required":["frequency","hour","minute"]}},"required":["cron"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"description":"GitHub integration IDs to generate from, as returned by GET /v1/integrations.","example":["51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"]}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"outputConfig":{"type":["object","null"],"properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"],"description":"Where auto-published posts are sent."},"brandVoiceId":{"type":"string","minLength":1,"description":"Brand identity ID to write in. Defaults to the organization's default brand identity.","example":"51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"},"instructions":{"type":"string","minLength":1,"maxLength":2000,"description":"Free-text brief for this schedule, passed to the writer on every run on top of the brand's custom instructions. Use it to steer the angle of the content, for example tutorial-style blog posts.","example":"Write a tutorial-style post that walks through one feature shipped in this window, with code samples."}}},"enabled":{"type":"boolean"},"autoPublish":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lookbackWindow":{"type":"string","enum":["current_day","yesterday","last_7_days","last_14_days","last_30_days"]}},"required":["id","organizationId","name","sourceType","sourceConfig","targets","outputType","enabled","autoPublish","createdAt","updatedAt","lookbackWindow"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["schedule","organization"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Duplicate schedule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to create schedule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/schedules/{scheduleId}":{"patch":{"tags":["Schedules"],"operationId":"updateSchedule","summary":"Update a schedule","description":"Replaces the schedule. Send the full schedule body; fields that are omitted are not preserved from the existing schedule.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"sched_123"},"required":true,"in":"path","name":"scheduleId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchScheduleRequest"}}}},"responses":{"200":{"description":"Schedule updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"schedule":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"sourceType":{"type":"string","enum":["cron"]},"sourceConfig":{"type":"object","properties":{"cron":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly","custom"],"description":"How often the schedule runs.","example":"weekly"},"hour":{"type":"integer","minimum":0,"maximum":23,"description":"Hour of the day to run, in UTC (0-23).","example":9},"minute":{"type":"integer","minimum":0,"maximum":59,"description":"Minute of the hour to run (0-59).","example":0},"dayOfWeek":{"type":"integer","minimum":0,"maximum":6,"description":"Day of the week for weekly schedules, 0 (Sunday) to 6 (Saturday). Required when frequency is weekly.","example":1},"dayOfMonth":{"type":"integer","minimum":1,"maximum":31,"description":"Day of the month for monthly schedules (1-31). Required when frequency is monthly.","example":1},"intervalDays":{"type":"integer","minimum":2,"maximum":90,"description":"Run every N days (2-90). Required when frequency is custom.","example":3},"anchorDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"UTC calendar date (YYYY-MM-DD) a custom interval counts from. Defaults to today.","example":"2026-09-03"}},"required":["frequency","hour","minute"]}},"required":["cron"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"description":"GitHub integration IDs to generate from, as returned by GET /v1/integrations.","example":["51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"]}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"outputConfig":{"type":["object","null"],"properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"],"description":"Where auto-published posts are sent."},"brandVoiceId":{"type":"string","minLength":1,"description":"Brand identity ID to write in. Defaults to the organization's default brand identity.","example":"51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"},"instructions":{"type":"string","minLength":1,"maxLength":2000,"description":"Free-text brief for this schedule, passed to the writer on every run on top of the brand's custom instructions. Use it to steer the angle of the content, for example tutorial-style blog posts.","example":"Write a tutorial-style post that walks through one feature shipped in this window, with code samples."}}},"enabled":{"type":"boolean"},"autoPublish":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lookbackWindow":{"type":"string","enum":["current_day","yesterday","last_7_days","last_14_days","last_30_days"]}},"required":["id","organizationId","name","sourceType","sourceConfig","targets","outputType","enabled","autoPublish","createdAt","updatedAt","lookbackWindow"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["schedule","organization"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Schedule or organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Duplicate schedule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to update schedule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Schedules"],"operationId":"deleteSchedule","summary":"Delete a schedule","description":"Deletes the schedule and stops future runs. Posts generated by earlier runs are kept.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"sched_123"},"required":true,"in":"path","name":"scheduleId"}],"responses":{"200":{"description":"Schedule deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["id","organization"]}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Schedule or organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to delete schedule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/event-triggers":{"get":{"tags":["Event Triggers"],"operationId":"listEventTriggers","summary":"List event triggers","parameters":[{"schema":{"type":"string","description":"Filter by repository IDs using a comma-separated list","example":"repo_123,repo_456"},"required":false,"description":"Filter by repository IDs using a comma-separated list","name":"repositoryIds","in":"query"}],"responses":{"200":{"description":"Event triggers fetched successfully","content":{"application/json":{"schema":{"type":"object","properties":{"eventTriggers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"sourceType":{"type":"string","enum":["github_webhook"]},"sourceConfig":{"type":"object","properties":{"eventTypes":{"type":"array","items":{"type":"string","enum":["release","push"]},"minItems":1},"includePreReleases":{"type":"boolean","default":true},"ignoreCommitPatterns":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"maxItems":10,"default":[]}},"required":["eventTypes"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"outputConfig":{"type":["object","null"],"properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"]},"brandVoiceId":{"type":"string","minLength":1}}},"enabled":{"type":"boolean"},"autoPublish":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","name","sourceType","sourceConfig","targets","outputType","enabled","autoPublish","createdAt","updatedAt"]}},"repositoryMap":{"type":"object","additionalProperties":{"type":"string"}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["eventTriggers","repositoryMap","organization"]}}}},"400":{"description":"Invalid query params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to list event triggers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Event Triggers"],"operationId":"createEventTrigger","summary":"Create an event trigger","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sourceType":{"type":"string","enum":["github_webhook"]},"sourceConfig":{"type":"object","properties":{"eventTypes":{"type":"array","items":{"type":"string","enum":["release","push"]},"minItems":1},"includePreReleases":{"type":"boolean","default":true},"ignoreCommitPatterns":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"maxItems":10,"default":[]}},"required":["eventTypes"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"outputConfig":{"type":"object","properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"]},"brandVoiceId":{"type":"string","minLength":1}}},"enabled":{"type":"boolean"},"autoPublish":{"type":"boolean","default":false}},"required":["sourceType","sourceConfig","targets","outputType","enabled"]}}}},"responses":{"201":{"description":"Event trigger created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"eventTrigger":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"sourceType":{"type":"string","enum":["github_webhook"]},"sourceConfig":{"type":"object","properties":{"eventTypes":{"type":"array","items":{"type":"string","enum":["release","push"]},"minItems":1},"includePreReleases":{"type":"boolean","default":true},"ignoreCommitPatterns":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"maxItems":10,"default":[]}},"required":["eventTypes"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"outputConfig":{"type":["object","null"],"properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"]},"brandVoiceId":{"type":"string","minLength":1}}},"enabled":{"type":"boolean"},"autoPublish":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","name","sourceType","sourceConfig","targets","outputType","enabled","autoPublish","createdAt","updatedAt"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["eventTrigger","organization"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Duplicate event trigger","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to create event trigger","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/event-triggers/{triggerId}":{"get":{"tags":["Event Triggers"],"operationId":"getEventTrigger","summary":"Get an event trigger","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"trig_123"},"required":true,"in":"path","name":"triggerId"}],"responses":{"200":{"description":"Event trigger fetched successfully","content":{"application/json":{"schema":{"type":"object","properties":{"eventTrigger":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"sourceType":{"type":"string","enum":["github_webhook"]},"sourceConfig":{"type":"object","properties":{"eventTypes":{"type":"array","items":{"type":"string","enum":["release","push"]},"minItems":1},"includePreReleases":{"type":"boolean","default":true},"ignoreCommitPatterns":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"maxItems":10,"default":[]}},"required":["eventTypes"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"outputConfig":{"type":["object","null"],"properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"]},"brandVoiceId":{"type":"string","minLength":1}}},"enabled":{"type":"boolean"},"autoPublish":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","name","sourceType","sourceConfig","targets","outputType","enabled","autoPublish","createdAt","updatedAt"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["eventTrigger","organization"]}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Event trigger or organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to fetch event trigger","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Event Triggers"],"operationId":"updateEventTrigger","summary":"Update an event trigger","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"trig_123"},"required":true,"in":"path","name":"triggerId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchEventTriggerRequest"}}}},"responses":{"200":{"description":"Event trigger updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"eventTrigger":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"sourceType":{"type":"string","enum":["github_webhook"]},"sourceConfig":{"type":"object","properties":{"eventTypes":{"type":"array","items":{"type":"string","enum":["release","push"]},"minItems":1},"includePreReleases":{"type":"boolean","default":true},"ignoreCommitPatterns":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"maxItems":10,"default":[]}},"required":["eventTypes"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"outputConfig":{"type":["object","null"],"properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"]},"brandVoiceId":{"type":"string","minLength":1}}},"enabled":{"type":"boolean"},"autoPublish":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","name","sourceType","sourceConfig","targets","outputType","enabled","autoPublish","createdAt","updatedAt"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["eventTrigger","organization"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Event trigger or organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Duplicate event trigger","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to update event trigger","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Event Triggers"],"operationId":"deleteEventTrigger","summary":"Delete an event trigger","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"trig_123"},"required":true,"in":"path","name":"triggerId"}],"responses":{"200":{"description":"Event trigger deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["id","organization"]}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Event trigger or organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to delete event trigger","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/chats":{"get":{"tags":["Chats"],"operationId":"listChats","summary":"List chats","description":"Returns the organization's chat sessions without their messages. Use GET /v1/chats/{chatId} to load a conversation.","responses":{"200":{"description":"Chats fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetChatsResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Chats"],"operationId":"createChat","summary":"Start a new chat and stream the reply","description":"Creates a chat session, sends the first message, and streams the assistant reply. Read the X-Chat-Id response header to continue the conversation with POST /v1/chats/{chatId}.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendChatMessageRequest"}}}},"responses":{"200":{"description":"Streaming UI message stream (newline-delimited JSON chunks). Read the `X-Chat-Id` response header for the chat id, or take it from the `start` chunk's `messageMetadata.chatId`.","content":{"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden, or usage limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Chat not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 30 requests per 1 minute per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"500":{"description":"Failed to process chat request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/chats/by-external":{"get":{"tags":["Chats"],"operationId":"getChatByExternalChannel","summary":"Get a chat by external channel id","description":"Looks up the chat session linked to a Discord or Slack channel. Link a chat by passing externalChannelId when you create it.","parameters":[{"schema":{"type":"string","enum":["discord","slack"],"description":"Messaging platform the channel belongs to.","example":"discord"},"required":true,"description":"Messaging platform the channel belongs to.","name":"source","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Channel ID on that platform.","example":"channel_123"},"required":true,"description":"Channel ID on that platform.","name":"id","in":"query"}],"responses":{"200":{"description":"Chat fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSessionSummary"}}}},"400":{"description":"Invalid query params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Chat not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/chats/{chatId}":{"get":{"tags":["Chats"],"operationId":"getChat","summary":"Get a single chat with messages","description":"Returns the chat session and its full message history in UI message format.","parameters":[{"schema":{"type":"string","minLength":1,"example":"chat_abc123"},"required":true,"name":"chatId","in":"path"}],"responses":{"200":{"description":"Chat fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetChatResponse"}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Chat not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Chats"],"operationId":"postChatMessage","summary":"Post a message to an existing chat and stream the reply","description":"Appends a user message to the chat and streams the assistant reply. Earlier messages in the chat are included as context automatically.","parameters":[{"schema":{"type":"string","minLength":1,"example":"chat_abc123"},"required":true,"name":"chatId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendChatMessageRequest"}}}},"responses":{"200":{"description":"Streaming UI message stream (newline-delimited JSON chunks). Read the `X-Chat-Id` response header for the chat id, or take it from the `start` chunk's `messageMetadata.chatId`.","content":{"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden, or usage limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Chat not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 30 requests per 1 minute per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"500":{"description":"Failed to process chat request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/skills":{"get":{"tags":["Skills"],"operationId":"listSkills","summary":"List skills","description":"Returns the organization's skills sorted by name, including built-in system skills (isSystem: true). Skill content is omitted; use GET /v1/skills/{name} to read it.","responses":{"200":{"description":"Skills fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSkillsResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Skills"],"operationId":"createSkill","summary":"Create a skill","description":"Creates a custom skill. Names must be unique within the organization.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSkillRequest"}}}},"responses":{"201":{"description":"Skill created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSkillResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Skill name already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/skills/{name}":{"get":{"tags":["Skills"],"operationId":"getSkill","summary":"Get a single skill","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]$","description":"Skill name. Lowercase letters, digits, and hyphens only.","example":"humanizer"},"required":true,"description":"Skill name. Lowercase letters, digits, and hyphens only.","name":"name","in":"path"}],"responses":{"200":{"description":"Skill fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillResponse"}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Skill not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Skills"],"operationId":"patchSkill","summary":"Update a skill","description":"Updates the name, description, or content of a skill. System skills can be edited but not renamed.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]$","description":"Skill name. Lowercase letters, digits, and hyphens only.","example":"humanizer"},"required":true,"description":"Skill name. Lowercase letters, digits, and hyphens only.","name":"name","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchSkillRequest"}}}},"responses":{"200":{"description":"Skill updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchSkillResponse"}}}},"400":{"description":"Invalid path params or request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden, or attempt to rename a system skill","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Skill not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Skill name already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Skills"],"operationId":"deleteSkill","summary":"Delete a skill","description":"Deletes a custom skill. System skills cannot be deleted.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]$","description":"Skill name. Lowercase letters, digits, and hyphens only.","example":"humanizer"},"required":true,"description":"Skill name. Lowercase letters, digits, and hyphens only.","name":"name","in":"path"}],"responses":{"200":{"description":"Skill deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteSkillResponse"}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden, or attempt to delete a system skill","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Skill not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/me/workspaces":{"get":{"tags":["Discovery"],"operationId":"getWorkspaces","summary":"Get authenticated workspace context","description":"Returns the current workspace and authentication details. OAuth users also receive their accepted memberships and can opt into pending invitations; organization API keys only receive their current workspace. Discovery does not change the workspace bound to the bearer token.","parameters":[{"schema":{"type":"string","enum":["true"]},"required":false,"name":"includePending","in":"query"}],"responses":{"200":{"description":"Workspace context fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWorkspacesResponse"}}}},"400":{"description":"Invalid query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Bearer token is not scoped to an organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Current workspace not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/feedback/{organizationSlug}":{"post":{"tags":["Feedback"],"operationId":"submitOrganizationFeedback","summary":"Submit feedback to an organization's feedback URL","description":"Record feedback from an AI agent or integration by posting to the organization's feedback URL, as shown on the Feedback page in the dashboard. No credentials are required. Limited per source IP and per organization.","security":[],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":63,"pattern":"^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i","description":"Your organization slug, as shown in your feedback URL on the Feedback page.","example":"acme"},"required":true,"description":"Your organization slug, as shown in your feedback URL on the Feedback page.","in":"path","name":"organizationSlug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitFeedbackRequest"}}}},"responses":{"202":{"description":"Feedback accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitFeedbackResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Feedback endpoint not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 30 requests per 10 minutes per IP address, plus 200 requests per hour per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}}}}},"/v1/feedback":{"post":{"tags":["Feedback"],"operationId":"submitFeedback","summary":"Submit feedback with an API key","description":"Record feedback for the organization that owns the credential. Requires an API key with the feedback.write scope. Agents and MCP servers should post to the organization's feedback URL instead.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitFeedbackRequest"}}}},"responses":{"202":{"description":"Feedback accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitFeedbackResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 120 requests per 1 minute per API key.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["Feedback"],"operationId":"listFeedback","summary":"List feedback","parameters":[{"schema":{"type":"string","enum":["new","triaged","resolved","archived"],"description":"Triage status.","example":"new"},"required":false,"description":"Triage status.","name":"status","in":"query"},{"schema":{"type":"string","enum":["bug","feature","praise","question","other"],"description":"What kind of feedback this is.","example":"bug"},"required":false,"description":"What kind of feedback this is.","name":"kind","in":"query"},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$"},"required":false,"name":"projectId","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Items per page","example":25},"required":false,"description":"Items per page","name":"limit","in":"query"},{"schema":{"type":"integer","minimum":1,"default":1,"description":"Page number","example":1},"required":false,"description":"Page number","name":"page","in":"query"}],"responses":{"200":{"description":"Feedback fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListFeedbackResponse"}}}},"400":{"description":"Invalid query params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/feedback/{feedbackId}":{"get":{"tags":["Feedback"],"operationId":"getFeedback","summary":"Get a single feedback entry","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"fb_123"},"required":true,"in":"path","name":"feedbackId"}],"responses":{"200":{"description":"Feedback fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackResponse"}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Feedback not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Feedback"],"operationId":"updateFeedback","summary":"Update feedback status","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"fb_123"},"required":true,"in":"path","name":"feedbackId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFeedbackRequest"}}}},"responses":{"200":{"description":"Feedback updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackResponse"}}}},"400":{"description":"Invalid path params or request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Feedback not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects":{"get":{"tags":["GEO"],"operationId":"listProjects","summary":"List GEO projects","responses":{"200":{"description":"Projects fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListGeoProjectsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["GEO"],"operationId":"createProject","summary":"Create a GEO project","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGeoProjectRequest"}}}},"responses":{"201":{"description":"Project created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoProjectResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}":{"get":{"tags":["GEO"],"operationId":"getProject","summary":"Get a single GEO project","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"Project fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoProjectResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["GEO"],"operationId":"updateProject","summary":"Rename a GEO project or relink its brand identity","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchGeoProjectRequest"}}}},"responses":{"200":{"description":"Project updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoProjectResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["GEO"],"operationId":"deleteProject","summary":"Delete a GEO project and all of its GEO data","description":"Cascades to the project's GEO settings, prompts, sequences, competitors, scans, checks and reports, and cancels any pending scheduled scan. Agent feedback is kept but detached. The organization's last project cannot be deleted.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"Project deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteGeoProjectResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/settings":{"get":{"tags":["GEO"],"operationId":"getGeoSettings","summary":"Get a project's GEO settings","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"Settings fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoSettingsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["GEO"],"operationId":"updateGeoSettings","summary":"Replace a project's GEO settings","description":"Writes the full settings document and re-arms the recurring scan. Engines must be ids from the model catalog this organization can see (the ones `GET /geo/settings` returns) and languages must be supported languages; an unknown value is rejected with a 400 instead of being replaced by a default. Zero data retention is forced off without the ZDR add-on, and engines that are not visible to this caller keep their stored selection. Competitors are managed through the competitors endpoints and are not part of this payload.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchGeoSettingsRequest"}}}},"responses":{"200":{"description":"Settings updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoSettingsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/prompts":{"get":{"tags":["GEO"],"operationId":"listGeoPrompts","summary":"List tracked GEO prompts","description":"Returns custom prompts alongside the prompts derived automatically from the project's brand context.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"Prompts fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListGeoPromptsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["GEO"],"operationId":"createGeoPrompt","summary":"Track a new GEO prompt","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGeoPromptRequest"}}}},"responses":{"201":{"description":"Prompt created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoPromptResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/prompts/{promptId}":{"patch":{"tags":["GEO"],"operationId":"updateGeoPrompt","summary":"Update a tracked GEO prompt","description":"Enable or disable a tracked prompt, or replace tags on a custom prompt.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$"},"required":true,"name":"promptId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchGeoPromptRequest"}}}},"responses":{"200":{"description":"Prompt updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoPromptResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["GEO"],"operationId":"deleteGeoPrompt","summary":"Stop tracking a GEO prompt","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$"},"required":true,"name":"promptId","in":"path"}],"responses":{"200":{"description":"Prompt deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteGeoPromptResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/prompts/import":{"post":{"tags":["GEO"],"operationId":"importGeoPrompts","summary":"Bulk import GEO prompts","description":"Accepts either structured `rows` or raw `csv` text. Prompts that already exist are skipped, not duplicated.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportGeoPromptsRequest"}}}},"responses":{"200":{"description":"Prompts imported successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportGeoPromptsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 10 requests per 10 minutes per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/sequences":{"get":{"tags":["GEO"],"operationId":"listGeoSequences","summary":"List GEO prompt sequences","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"Sequences fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListGeoSequencesResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["GEO"],"operationId":"createGeoSequence","summary":"Create a GEO prompt sequence","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGeoSequenceRequest"}}}},"responses":{"201":{"description":"Sequence created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoSequenceResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/sequences/{sequenceId}":{"patch":{"tags":["GEO"],"operationId":"updateGeoSequence","summary":"Update a GEO prompt sequence","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$"},"required":true,"name":"sequenceId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchGeoSequenceRequest"}}}},"responses":{"200":{"description":"Sequence updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoSequenceResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["GEO"],"operationId":"deleteGeoSequence","summary":"Delete a GEO prompt sequence","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$"},"required":true,"name":"sequenceId","in":"path"}],"responses":{"200":{"description":"Sequence deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteGeoSequenceResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/sequences/{sequenceId}/run":{"post":{"tags":["GEO"],"operationId":"runGeoSequence","summary":"Run a GEO prompt sequence now","description":"Runs the sequence synchronously and answers with its result. The call is not queued: the request stays open for the whole run, which plays every turn against every available answer engine and can take several minutes. Use a client timeout of at least five minutes; after four minutes the API stops waiting and answers 409 while the run finishes on its own. Do not retry; read the result from the project's GEO checks. The work happens inside the Notra dashboard, which owns the model credentials and billing gates; the public API never calls an answer engine itself. Results also land in the project's GEO checks.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$"},"required":true,"name":"sequenceId","in":"path"}],"responses":{"200":{"description":"Sequence run completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunGeoSequenceResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Sequence execution is still running after the internal timeout; do not retry the run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 10 requests per 10 minutes per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/competitors":{"get":{"tags":["GEO"],"operationId":"listGeoCompetitors","summary":"List tracked GEO competitors","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"Competitors fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListGeoCompetitorsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"put":{"tags":["GEO"],"operationId":"upsertGeoCompetitor","summary":"Create or update a tracked GEO competitor","description":"Matches on name, case-insensitively. Send `previousName` to rename an existing competitor. Returns the full competitor list.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutGeoCompetitorRequest"}}}},"responses":{"200":{"description":"Competitor saved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListGeoCompetitorsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/competitors/suggestions":{"get":{"tags":["GEO"],"operationId":"suggestGeoCompetitors","summary":"Suggest GEO competitors for a domain","description":"Discovers likely competitors for a website. Results are cached per organization and domain.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Website domain, for example `example.com`.","example":"example.com"},"required":true,"description":"Website domain, for example `example.com`.","name":"domain","in":"query"}],"responses":{"200":{"description":"Competitor suggestions fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoCompetitorSuggestionsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 10 requests per 10 minutes per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/competitors/{name}":{"delete":{"tags":["GEO"],"operationId":"deleteGeoCompetitor","summary":"Stop tracking a GEO competitor","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Competitor name. Matched case-insensitively."},"required":true,"description":"Competitor name. Matched case-insensitively.","name":"name","in":"path"}],"responses":{"200":{"description":"Competitor deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListGeoCompetitorsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/competitors/import":{"post":{"tags":["GEO"],"operationId":"importGeoCompetitors","summary":"Bulk import GEO competitors","description":"Accepts either structured `rows` or raw `csv` text. Existing competitors are updated in place rather than duplicated.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportGeoCompetitorsRequest"}}}},"responses":{"200":{"description":"Competitors imported successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportGeoCompetitorsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 10 requests per 10 minutes per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/scans":{"post":{"tags":["GEO"],"operationId":"createGeoScan","summary":"Trigger a GEO scan","description":"Queues a scan with the Notra dashboard, which owns the model credentials and billing gates. The public API never calls an answer engine itself. The scan record is created before the hand-off, so `scanId` is immediately readable via `GET /v1/projects/{projectId}/geo/scans/{scanId}`. Poll `statusUrl` (also returned as the `Location` header) until `status` leaves `running`. Returns 409 while a scan for this project is still in flight.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"responses":{"202":{"description":"Scan accepted","headers":{"Location":{"description":"Relative path of the scan created for this trigger.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGeoScanResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 4 requests per 1 hour per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["GEO"],"operationId":"listGeoScans","summary":"List GEO scans","description":"Lists scans with planned, completed, mentioned, and explicitly failed check totals by engine. Failed scans include safe failure metadata when available.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","minimum":1,"default":1},"required":false,"name":"page","in":"query"}],"responses":{"200":{"description":"Scans fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListGeoScansResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/scans/{scanId}":{"get":{"tags":["GEO"],"operationId":"getGeoScan","summary":"Get a single GEO scan","description":"Returns scan status, check progress and mentions by engine, plus safe failure metadata for failed scans. Legacy scans without a saved plan report null planned totals.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$"},"required":true,"name":"scanId","in":"path"}],"responses":{"200":{"description":"Scan fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoScanResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/visibility/overview":{"get":{"tags":["GEO"],"operationId":"getGeoVisibilityOverview","summary":"Get mention rates per engine","description":"Checks, mentions and average position for every answer engine the project tracks. Pass `days` for a rolling window, or `from`/`to` for an explicit one.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":365,"description":"Rolling window size in days. Ignored when from/to are set."},"required":false,"description":"Rolling window size in days. Ignored when from/to are set.","name":"days","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Overview fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoVisibilityOverviewResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/visibility/timeseries":{"get":{"tags":["GEO"],"operationId":"getGeoVisibilityTimeseries","summary":"Get daily mention counts per engine","description":"One point per day and engine. Pass `days` for a rolling window, or `from`/`to` for an explicit one.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":365,"description":"Rolling window size in days. Ignored when from/to are set."},"required":false,"description":"Rolling window size in days. Ignored when from/to are set.","name":"days","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Timeseries fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoVisibilityTimeseriesResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/visibility/prompt-results":{"get":{"tags":["GEO"],"operationId":"getGeoVisibilityPromptResults","summary":"Get the latest answer per prompt and engine","description":"The stored answer text, mention position, sentiment and grounding sources for each tracked prompt. Pass `days` for a rolling window, or `from`/`to` for an explicit one.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":365,"description":"Rolling window size in days. Ignored when from/to are set."},"required":false,"description":"Rolling window size in days. Ignored when from/to are set.","name":"days","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Prompt results fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoVisibilityPromptResultsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/visibility/prompt-results/summaries":{"get":{"tags":["GEO"],"operationId":"listGeoPromptResultSummaries","summary":"List compact prompt result summaries","description":"A filtered, paginated projection of the latest answer per prompt and engine. Full answer text and sources are omitted; use checkId with the detail endpoint.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":365,"description":"Rolling window size in days. Ignored when from/to are set."},"required":false,"description":"Rolling window size in days. Ignored when from/to are set.","name":"days","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"to","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":100000},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":false,"name":"engine","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"mentioned","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":300},"required":false,"name":"query","in":"query"}],"responses":{"200":{"description":"Prompt result summaries fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoVisibilityPromptResultSummariesResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/visibility/prompt-results/{checkId}":{"get":{"tags":["GEO"],"operationId":"getGeoPromptResultDetail","summary":"Get one full prompt result","description":"Loads the answer, grounding sources and token metadata for one checkId returned by the summaries or prompt-history endpoints.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"checkId","in":"path"}],"responses":{"200":{"description":"Prompt result fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoVisibilityPromptResultDetailResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/visibility/competitor-share":{"get":{"tags":["GEO"],"operationId":"getGeoVisibilityCompetitorShare","summary":"Get share of voice across tracked brands","description":"Mention counts per brand with a per-brand trend, plus the daily timeseries behind it. Pass `days` for a rolling window, or `from`/`to` for an explicit one.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":365,"description":"Rolling window size in days. Ignored when from/to are set."},"required":false,"description":"Rolling window size in days. Ignored when from/to are set.","name":"days","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Competitor share fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoVisibilityCompetitorShareResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/visibility/language-share":{"get":{"tags":["GEO"],"operationId":"getGeoVisibilityLanguageShare","summary":"Get mention rates per tracked language","description":"Checks, mentions and average position broken down by language. Pass `days` for a rolling window, or `from`/`to` for an explicit one.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":365,"description":"Rolling window size in days. Ignored when from/to are set."},"required":false,"description":"Rolling window size in days. Ignored when from/to are set.","name":"days","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Language share fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoVisibilityLanguageShareResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/visibility/competitors/{brand}":{"get":{"tags":["GEO"],"operationId":"getGeoVisibilityCompetitorDetail","summary":"Get one competitor's mention history","description":"Daily mentions and the prompts that produced them for a single brand. Without a window this falls back to the competitor-detail default rather than the project default, matching the dashboard.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Competitor brand name as reported by competitor-share."},"required":true,"description":"Competitor brand name as reported by competitor-share.","name":"brand","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":365,"description":"Rolling window size in days. Ignored when from/to are set."},"required":false,"description":"Rolling window size in days. Ignored when from/to are set.","name":"days","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Competitor detail fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoVisibilityCompetitorDetailResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/changes":{"get":{"tags":["GEO"],"operationId":"listGeoChanges","summary":"Compare the two latest GEO scans","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"GEO changes fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoChangesResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/prompts/{promptId}/history":{"get":{"tags":["GEO"],"operationId":"getGeoPromptHistory","summary":"Get the stored check history for one prompt","description":"Returns compact check rows. Use each check id with the prompt-result detail endpoint for the full answer.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"promptId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":false,"name":"scanId","in":"query"}],"responses":{"200":{"description":"Prompt history fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoPromptHistoryResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/sentiment":{"get":{"tags":["GEO"],"operationId":"getGeoSentiment","summary":"Get aggregate GEO sentiment","description":"Returns current and previous-period sentiment metrics without starting billed analysis.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":365,"description":"Rolling window size in days. Ignored when from/to are set."},"required":false,"description":"Rolling window size in days. Ignored when from/to are set.","name":"days","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Sentiment fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoSentimentResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/sentiment/analysis":{"get":{"tags":["GEO"],"operationId":"getGeoSentimentAnalysis","summary":"Get the stored GEO sentiment analysis","description":"Reads the cached thematic analysis state and never starts a billed model run.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":365,"description":"Rolling window size in days. Ignored when from/to are set."},"required":false,"description":"Rolling window size in days. Ignored when from/to are set.","name":"days","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Sentiment analysis state fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoSentimentAnalysisResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/sentiment/evidence":{"get":{"tags":["GEO"],"operationId":"listGeoSentimentEvidence","summary":"List answers used as sentiment evidence","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":365,"description":"Rolling window size in days. Ignored when from/to are set."},"required":false,"description":"Rolling window size in days. Ignored when from/to are set.","name":"days","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"to","in":"query"},{"schema":{"type":"string","maxLength":4096},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Sentiment evidence fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoSentimentEvidenceResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/shelf-sources":{"get":{"tags":["GEO"],"operationId":"listGeoShelfSources","summary":"List stored GEO shelf sources","description":"Returns a bounded page of cited and manually tracked sources, newest updates first.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":100000,"default":0},"required":false,"name":"offset","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Shelf sources fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoShelfListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/gaps":{"get":{"tags":["GEO"],"operationId":"listGeoContentGaps","summary":"List content gaps","description":"Prompts where competitors are mentioned and this brand is not, plus Search Console queries with no tracked prompt. Each row carries the brief already written for it, when there is one.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"Gaps fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoContentGapsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/briefs":{"get":{"tags":["GEO"],"operationId":"listGeoContentBriefs","summary":"List content briefs","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"Briefs fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListGeoContentBriefsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["GEO"],"operationId":"planGeoContentBrief","summary":"Plan a content brief","description":"Researches the topic and writes a brief, then saves it as a draft article. This books AI credits and is billed. Planning happens inside Notra, which owns the model credentials. Set `autoApprove` to start the writer in the same call. When `sourceKind` and `sourceId` point at a gap that already has an open brief, that brief is returned instead of a new one being planned. If planning exceeds four minutes, the API returns 409 while work may still finish in Notra. Do not retry; list the project's GEO briefs to find the result.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanGeoContentBriefRequest"}}}},"responses":{"200":{"description":"Brief planned successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanGeoContentBriefResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Brief planning is still running after the internal timeout; do not retry the plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 10 requests per 10 minutes per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/briefs/{briefId}":{"get":{"tags":["GEO"],"operationId":"getGeoContentBrief","summary":"Get a single content brief","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$"},"required":true,"name":"briefId","in":"path"}],"responses":{"200":{"description":"Brief fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoContentBriefResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/briefs/{briefId}/approve":{"post":{"tags":["GEO"],"operationId":"approveGeoContentBrief","summary":"Approve a brief and start the writer","description":"Claims the brief and queues the writer with the Notra dashboard. Only briefs in `draft` or `failed` can be approved; anything else returns 409.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$"},"required":true,"name":"briefId","in":"path"}],"responses":{"202":{"description":"Writer accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveGeoContentBriefResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 20 requests per 10 minutes per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/agent-readiness":{"get":{"tags":["GEO"],"operationId":"getGeoAgentReadiness","summary":"Get the latest agent readiness report","description":"The most recent completed report for the project's website, any newer run still in flight or failed, and the score history. Returns stored data only; it never starts a scan.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"Report fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoAgentReadinessResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/agent-readiness/scan":{"post":{"tags":["GEO"],"operationId":"startGeoAgentReadinessScan","summary":"Start an agent readiness scan","description":"Queues a readiness scan for the project's website. A scan already running against the same URL is reused rather than duplicated, in which case `alreadyRunning` is true.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"responses":{"202":{"description":"Scan accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoAgentReadinessScanResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 10 requests per 1 hour per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/traffic/overview":{"get":{"tags":["GEO"],"operationId":"getGeoTrafficOverview","summary":"Get AI traffic totals and sources","description":"Crawler and AI-referral visit totals, a per-source breakdown and the daily timeseries behind it.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":365,"description":"Rolling window size in days. Ignored when from/to are set."},"required":false,"description":"Rolling window size in days. Ignored when from/to are set.","name":"days","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Traffic overview fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoTrafficOverviewResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/traffic/log":{"get":{"tags":["GEO"],"operationId":"getGeoTrafficLog","summary":"Get recent AI traffic events","description":"The most recent individual requests from AI crawlers and referrals. This endpoint has no window; use `limit` to bound it. Pass `host` to keep the newest events for that hostname and its subdomains.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Comma-separated. One or more of: crawler, ai_referral."},"required":false,"description":"Comma-separated. One or more of: crawler, ai_referral.","name":"visitorTypes","in":"query"},{"schema":{"type":"string","description":"Comma-separated. One or more of: training-crawler, search-index, assistant-browse."},"required":false,"description":"Comma-separated. One or more of: training-crawler, search-index, assistant-browse.","name":"categories","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Hostname to filter on. Subdomains of this host are included. Omit for every host."},"required":false,"description":"Hostname to filter on. Subdomains of this host are included. Omit for every host.","name":"host","in":"query"}],"responses":{"200":{"description":"Traffic log fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoTrafficLogResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/traffic/journeys":{"get":{"tags":["GEO"],"operationId":"listGeoTrafficJourneys","summary":"List AI traffic journeys","description":"Sessions grouped by journey: how many pages one agent read, over what span, and a sample of the paths.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":365,"description":"Rolling window size in days. Ignored when from/to are set."},"required":false,"description":"Rolling window size in days. Ignored when from/to are set.","name":"days","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"to","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Journeys fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoTrafficJourneysResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/traffic/journeys/{journeyId}":{"get":{"tags":["GEO"],"operationId":"getGeoTrafficJourney","summary":"Get one journey's events","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"journeyId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":365,"description":"Rolling window size in days. Ignored when from/to are set."},"required":false,"description":"Rolling window size in days. Ignored when from/to are set.","name":"days","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Journey fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoJourneyDetailResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/traffic/pages":{"get":{"tags":["GEO"],"operationId":"listGeoTrafficPages","summary":"List the most visited pages","description":"Which paths AI crawlers and referrals read most, with the previous window's count for comparison. Pass `host` to rank pages for that hostname and its subdomains before applying `limit`.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":365,"description":"Rolling window size in days. Ignored when from/to are set."},"required":false,"description":"Rolling window size in days. Ignored when from/to are set.","name":"days","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"to","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":500},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["crawler","ai_referral"]},"required":false,"name":"visitorType","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Hostname to filter on. Subdomains of this host are included. Omit for every host."},"required":false,"description":"Hostname to filter on. Subdomains of this host are included. Omit for every host.","name":"host","in":"query"}],"responses":{"200":{"description":"Pages fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoTrafficPagesResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/geo/ingest/setup":{"get":{"tags":["GEO"],"operationId":"getGeoIngestSetup","summary":"Get the install snippets","description":"The endpoint and framework snippets needed to send AI traffic to Notra. The snippets read the token from an environment variable; the token itself is issued by `POST /geo/ingest/token`, which requires a write scope.","responses":{"200":{"description":"Setup fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoIngestSetupResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/geo/ingest/token":{"post":{"tags":["GEO"],"operationId":"issueGeoIngestToken","summary":"Issue the tracking token","description":"Returns the current tracking token together with the install snippets. Organization-level: pass `projectId` to bind the token to one project. Issuing does not invalidate previously issued tokens; use rotation for that.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","description":"Bind the token to one project. Omit to track the whole organization."},"required":false,"description":"Bind the token to one project. Omit to track the whole organization.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Token issued successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoIngestTokenResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/geo/ingest/rotate-token":{"post":{"tags":["GEO"],"operationId":"rotateGeoIngestToken","summary":"Rotate the tracking token","description":"Invalidates every tracking token previously issued for this organization and returns a fresh one. Deployments still sending the old token stop being accepted immediately.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","description":"Bind the token to one project. Omit to track the whole organization."},"required":false,"description":"Bind the token to one project. Omit to track the whole organization.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Token rotated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoIngestTokenResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v2/eve/v1/session":{"post":{"tags":["Agent"],"operationId":"createAgentSession","summary":"Start a durable agent session","description":"The exact eve session protocol the Notra dashboard uses, proxied through API auth. Point any eve client (eve/client, useEveAgent) at /v2 as its host with your API key as a bearer token. Returns the session id and continuation token; stream events from GET /v2/eve/v1/session/{sessionId}/stream.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentSessionRequest"}}}},"responses":{"200":{"description":"Session created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentSessionResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden, or usage limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 30 requests per 1 minute per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"500":{"description":"Failed to check usage limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Agent session creation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Agent service is not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v2/eve/v1/session/{sessionId}":{"post":{"tags":["Agent"],"operationId":"sendAgentSessionMessage","summary":"Send a follow-up message or answer a pending input request","description":"Sends the next turn of an agent session. The server binds the session's stored continuation token, so the client-provided one is ignored. Answer input.requested events (tool approvals, questions) from the event stream via inputResponses.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"sessionId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendAgentMessageRequest"}}}},"responses":{"200":{"description":"Upstream eve response with the next continuation token for this session.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden, or usage limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"A message is already being processed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 30 requests per 1 minute per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"500":{"description":"Failed to check usage limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Agent service is not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v2/eve/v1/session/{sessionId}/stream":{"get":{"tags":["Agent"],"operationId":"streamAgentSessionEvents","summary":"Stream an agent session's events","description":"Durable, replayable eve session event stream (newline-delimited JSON). Pass startIndex to resume from a known position. Includes input.requested events for tool approvals.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"NDJSON event stream","content":{"application/x-ndjson":{"schema":{"type":"string"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden, or usage limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 30 requests per 1 minute per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"503":{"description":"Agent service is not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v2/agent-chats":{"get":{"tags":["Agent"],"operationId":"listAgentChats","summary":"List agent sessions","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Agent sessions fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAgentChatsResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden, or usage limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 30 requests per 1 minute per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"503":{"description":"Agent service is not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"webhooks":{}} \ No newline at end of file +{"openapi":"3.1.1","info":{"title":"Notra API","version":"1.0.0","description":"OpenAPI schema for Notra content endpoints. Use GET /v1/status for public reachability. Error responses include recovery guidance."},"servers":[{"url":"https://api.usenotra.com","description":"Production"}],"security":[{"BearerAuth":[]}],"tags":[{"name":"Discovery","description":"Public API status and authenticated workspace discovery."},{"name":"Content","description":"Manage posts, brand identities, and GitHub or Linear integrations, and queue content generation. Organization is inferred from the API key (identity.externalId)."},{"name":"Schedules","description":"Manage scheduled content generation. Organization is inferred from the API key (identity.externalId)."},{"name":"Event Triggers","description":"Manage event-based content generation triggered by GitHub webhooks. Organization is inferred from the API key (identity.externalId)."},{"name":"Chats","description":"Manage chat sessions. Organization is inferred from the API key (identity.externalId)."},{"name":"Skills","description":"Manage reusable writing skills. Organization is inferred from the API key (identity.externalId)."},{"name":"Feedback","description":"Collect and triage feedback submitted by AI agents. Agents post to the organization's feedback URL without credentials; reading and triage require an API key with feedback.read or feedback.write."},{"name":"GEO","description":"Manage generative engine optimization: projects, tracking settings, prompts, prompt sequences, competitors, scans, visibility reads, content gaps and briefs, agent readiness and AI traffic. Project-scoped endpoints require the GEO plan entitlement in addition to their scope; organization-level ingest endpoints require only the traffic scope."}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"Send your API key in the Authorization header as Bearer API_KEY."}},"schemas":{"PublicStatusResponse":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"service":{"type":"string","enum":["Notra API"]},"version":{"type":"string"},"public":{"type":"boolean","enum":[true]},"authentication":{"type":"object","properties":{"type":{"type":"string","enum":["bearer"]},"resource_metadata":{"type":"string","format":"uri"},"guide":{"type":"string","format":"uri"}},"required":["type","resource_metadata","guide"]}},"required":["status","service","version","public","authentication"]},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"recovery":{"type":"string"}},"required":["error"]},"RateLimitErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"limit":{"type":"integer","minimum":1},"remaining":{"type":"integer","minimum":0},"reset":{"type":"integer"}},"required":["error","limit","remaining","reset"]},"PatchScheduleRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"Display name shown in the dashboard.","example":"Weekly changelog"},"sourceType":{"type":"string","enum":["cron"],"description":"Always cron for schedules."},"sourceConfig":{"type":"object","properties":{"cron":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly","custom"],"description":"How often the schedule runs.","example":"weekly"},"hour":{"type":"integer","minimum":0,"maximum":23,"description":"Hour of the day to run, in UTC (0-23).","example":9},"minute":{"type":"integer","minimum":0,"maximum":59,"description":"Minute of the hour to run (0-59).","example":0},"dayOfWeek":{"type":"integer","minimum":0,"maximum":6,"description":"Day of the week for weekly schedules, 0 (Sunday) to 6 (Saturday). Required when frequency is weekly.","example":1},"dayOfMonth":{"type":"integer","minimum":1,"maximum":31,"description":"Day of the month for monthly schedules (1-31). Required when frequency is monthly.","example":1},"intervalDays":{"type":"integer","minimum":2,"maximum":90,"description":"Run every N days (2-90). Required when frequency is custom.","example":3},"anchorDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"UTC calendar date (YYYY-MM-DD) a custom interval counts from. Defaults to today.","example":"2026-09-03"}},"required":["frequency","hour","minute"]}},"required":["cron"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"description":"GitHub integration IDs to generate from, as returned by GET /v1/integrations.","example":["51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"]}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"],"description":"Type of content each run generates.","example":"changelog"},"outputConfig":{"type":"object","properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"],"description":"Where auto-published posts are sent."},"brandVoiceId":{"type":"string","minLength":1,"description":"Brand identity ID to write in. Defaults to the organization's default brand identity.","example":"51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"},"instructions":{"type":"string","minLength":1,"maxLength":2000,"description":"Free-text brief for this schedule, passed to the writer on every run on top of the brand's custom instructions. Use it to steer the angle of the content, for example tutorial-style blog posts.","example":"Write a tutorial-style post that walks through one feature shipped in this window, with code samples."}}},"enabled":{"type":"boolean","description":"Whether the schedule runs. Disabled schedules are stored but never fire.","example":true},"autoPublish":{"type":"boolean","default":false,"description":"Publish generated posts automatically instead of saving them as drafts.","example":false},"lookbackWindow":{"type":"string","enum":["current_day","yesterday","last_7_days","last_14_days","last_30_days"],"default":"last_7_days","description":"How far back each run collects source activity.","example":"last_7_days"}},"required":["name","sourceType","sourceConfig","targets","outputType","enabled"]},"PatchEventTriggerRequest":{"type":"object","properties":{"sourceType":{"type":"string","enum":["github_webhook"]},"sourceConfig":{"type":"object","properties":{"eventTypes":{"type":"array","items":{"type":"string","enum":["release","push"]},"minItems":1},"includePreReleases":{"type":"boolean","default":true},"ignoreCommitPatterns":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"maxItems":10,"default":[]}},"required":["eventTypes"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"outputConfig":{"type":"object","properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"]},"brandVoiceId":{"type":"string","minLength":1}}},"enabled":{"type":"boolean"},"autoPublish":{"type":"boolean","default":false}},"required":["sourceType","sourceConfig","targets","outputType","enabled"]},"GetChatsResponse":{"type":"object","properties":{"chats":{"type":"array","items":{"$ref":"#/components/schemas/ChatSessionSummary"}}},"required":["chats"]},"ChatSessionSummary":{"type":"object","properties":{"chatId":{"type":"string"},"title":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"pinnedAt":{"type":["string","null"]},"externalChannelId":{"$ref":"#/components/schemas/ExternalChannelId"}},"required":["chatId","title","createdAt","updatedAt","pinnedAt"]},"ExternalChannelId":{"type":["object","null"],"properties":{"source":{"type":"string","enum":["discord","slack","dashboard","agent"]},"id":{"type":"string","maxLength":200}},"required":["source"]},"GetChatResponse":{"type":"object","properties":{"chat":{"$ref":"#/components/schemas/ChatSessionSummary"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessage"}}},"required":["chat","messages"]},"ChatMessage":{},"SendChatMessageRequest":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":50000,"description":"The user message to send.","example":"Summarize what shipped in the last week."},"model":{"type":"string","enum":["auto","anthropic/claude-opus-5","anthropic/claude-opus-4.8","anthropic/claude-sonnet-5","anthropic/claude-sonnet-4.6","anthropic/claude-haiku-4.5","openai/gpt-5.4","openai/gpt-5.5"],"description":"Model to respond with. Defaults to auto, which lets Notra choose.","example":"auto"},"enableThinking":{"type":"boolean","description":"Allow the model to reason before answering.","example":false},"thinkingLevel":{"type":"string","enum":["off","low","medium","high"],"description":"How much reasoning effort to spend when thinking is enabled.","example":"medium"},"timezone":{"type":"string","minLength":1,"maxLength":100,"description":"IANA time zone used to interpret dates in the conversation.","example":"Europe/Berlin"},"context":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["github-repo"]},"integrationId":{"type":"string"},"owner":{"type":"string"},"repo":{"type":"string"}},"required":["type","integrationId","owner","repo"]},{"type":"object","properties":{"type":{"type":"string","enum":["linear-team"]},"integrationId":{"type":"string"},"teamName":{"type":"string"}},"required":["type","integrationId"]},{"type":"object","properties":{"type":{"type":"string","enum":["mcp-server"]},"integrationId":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":200}},"required":["type","integrationId","name"]}]},"description":"Integrations the assistant may use as tools in this chat: connected GitHub repositories, Linear teams, or MCP servers."},"externalChannelId":{"$ref":"#/components/schemas/PublicExternalChannelId"}},"required":["message"]},"PublicExternalChannelId":{"type":"object","properties":{"source":{"type":"string","enum":["discord","slack","dashboard"]},"id":{"type":"string","maxLength":200}},"required":["source"],"description":"Link the chat to a Discord or Slack channel so it can be found later with GET /v1/chats/by-external."},"ListSkillsResponse":{"type":"object","properties":{"skills":{"type":"array","items":{"$ref":"#/components/schemas/SkillSummary"}}},"required":["skills"]},"SkillSummary":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"isSystem":{"type":"boolean","description":"True for built-in skills provided by Notra. System skills cannot be renamed or deleted."},"updatedAt":{"type":"string"}},"required":["id","name","description","isSystem","updatedAt"]},"SkillResponse":{"type":"object","properties":{"skill":{"$ref":"#/components/schemas/Skill"}},"required":["skill"]},"Skill":{"allOf":[{"$ref":"#/components/schemas/SkillSummary"},{"type":"object","properties":{"content":{"type":"string"},"createdAt":{"type":"string"}},"required":["content","createdAt"]}]},"CreateSkillResponse":{"type":"object","properties":{"skill":{"$ref":"#/components/schemas/Skill"}},"required":["skill"]},"CreateSkillRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","description":"Skill name. Lowercase letters, digits, and hyphens only.","example":"humanizer"},"description":{"type":"string","minLength":1,"maxLength":1000,"description":"Short description of when the skill should be used.","example":"Polish near-final drafts so they sound natural and specific."},"content":{"type":"string","minLength":1,"maxLength":200000,"description":"Full skill instructions, typically Markdown.","example":"# Humanizer\n\nRewrite the draft so it reads like a person wrote it. Remove filler, vary sentence length, and keep concrete details."}},"required":["name","description","content"]},"PatchSkillResponse":{"type":"object","properties":{"skill":{"$ref":"#/components/schemas/Skill"}},"required":["skill"]},"PatchSkillRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","description":"Skill name. Lowercase letters, digits, and hyphens only.","example":"humanizer"},"description":{"type":"string","minLength":1,"maxLength":1000,"description":"Short description of when the skill should be used.","example":"Polish near-final drafts so they sound natural and specific."},"content":{"type":"string","minLength":1,"maxLength":200000,"description":"Full skill instructions, typically Markdown.","example":"# Humanizer\n\nRewrite the draft so it reads like a person wrote it. Remove filler, vary sentence length, and keep concrete details."}}},"DeleteSkillResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"]},"GetWorkspacesResponse":{"type":"object","properties":{"currentWorkspace":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]},"role":{"type":["string","null"]},"status":{"type":"string","enum":["active","pending"]},"isCurrent":{"type":"boolean"}},"required":["id","slug","name","logo","role","status","isCurrent"]}},"authentication":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["apiKey"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["oauth"]},"accountId":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}}},"required":["type","accountId","scopes"]}]}},"required":["currentWorkspace","workspaces","authentication"]},"SubmitFeedbackResponse":{"type":"object","properties":{"feedback":{"$ref":"#/components/schemas/Feedback"},"deduplicated":{"type":"boolean","description":"True when an existing feedback with the same idempotencyKey was returned."}},"required":["feedback","deduplicated"]},"Feedback":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":["string","null"]},"source":{"type":"string","enum":["mcp","api","sdk"],"description":"Channel the feedback arrived through.","example":"mcp"},"kind":{"type":"string","enum":["bug","feature","praise","question","other"],"description":"What kind of feedback this is.","example":"bug"},"sentiment":{"type":["string","null"],"enum":["negative","neutral","positive",null],"description":"Overall sentiment of the feedback.","example":"negative"},"status":{"type":"string","enum":["new","triaged","resolved","archived"],"description":"Triage status.","example":"new"},"title":{"type":["string","null"]},"message":{"type":"string"},"agentClient":{"type":["string","null"]},"agentModel":{"type":["string","null"]},"toolVersion":{"type":["string","null"]},"userAgent":{"type":["string","null"]},"contextUrl":{"type":["string","null"]},"externalId":{"type":["string","null"]},"idempotencyKey":{"type":["string","null"]},"metadata":{"type":["object","null"],"additionalProperties":{}},"resolvedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","projectId","source","kind","sentiment","status","title","message","agentClient","agentModel","toolVersion","userAgent","contextUrl","externalId","idempotencyKey","metadata","resolvedAt","createdAt","updatedAt"]},"SubmitFeedbackRequest":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":4000,"description":"The feedback itself.","example":"The search tool times out when the query has quotes."},"title":{"type":"string","minLength":1,"maxLength":200,"description":"Short summary. When omitted, Notra writes one.","example":"Search times out on quoted queries"},"kind":{"type":"string","enum":["bug","feature","praise","question","other"],"description":"What kind of feedback this is. When omitted, Notra classifies it.","example":"bug"},"sentiment":{"type":"string","enum":["negative","neutral","positive"],"description":"Overall sentiment. When omitted, Notra classifies it from the message.","example":"negative"},"source":{"type":"string","enum":["mcp","api","sdk"],"default":"api","description":"Channel the feedback arrived through.","example":"mcp"},"projectId":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","description":"Project to file the feedback under."},"agentClient":{"type":"string","minLength":1,"maxLength":200,"description":"The agent or client that submitted the feedback.","example":"claude-code"},"agentModel":{"type":"string","minLength":1,"maxLength":200,"example":"claude-opus-5"},"toolVersion":{"type":"string","minLength":1,"maxLength":200,"example":"1.2.0"},"userAgent":{"type":"string","minLength":1,"maxLength":2048},"contextUrl":{"type":"string","maxLength":2048,"format":"uri","description":"Page or resource the feedback is about.","example":"https://docs.example.com/api/search"},"externalId":{"type":"string","minLength":1,"maxLength":200,"description":"Your own identifier for the user or session."},"idempotencyKey":{"type":"string","minLength":1,"maxLength":200,"description":"Submitting the same key twice returns the original feedback instead of creating a duplicate."},"metadata":{"type":"object","additionalProperties":{},"description":"Arbitrary JSON attached to the feedback, up to 8 KB."}},"required":["message"]},"ListFeedbackResponse":{"type":"object","properties":{"feedback":{"type":"array","items":{"$ref":"#/components/schemas/Feedback"}},"pagination":{"type":"object","properties":{"limit":{"type":"integer","minimum":1},"currentPage":{"type":"integer","minimum":1},"nextPage":{"type":["integer","null"],"minimum":1},"previousPage":{"type":["integer","null"],"minimum":1},"totalPages":{"type":"integer","minimum":1},"totalItems":{"type":"integer","minimum":0}},"required":["limit","currentPage","nextPage","previousPage","totalPages","totalItems"]}},"required":["feedback","pagination"]},"FeedbackResponse":{"type":"object","properties":{"feedback":{"$ref":"#/components/schemas/Feedback"}},"required":["feedback"]},"UpdateFeedbackRequest":{"type":"object","properties":{"status":{"type":"string","enum":["new","triaged","resolved","archived"],"description":"Triage status.","example":"new"}},"required":["status"]},"ListGeoProjectsResponse":{"type":"object","properties":{"projects":{"type":"array","items":{"$ref":"#/components/schemas/GeoProject"}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["projects","organization"]},"GeoProject":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"brandSettingsId":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","name","brandSettingsId","createdAt"]},"GeoProjectResponse":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/GeoProject"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["project","organization"]},"CreateGeoProjectRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"brandSettingsId":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","description":"Brand identity to link. Defaults to the organization's default identity."}},"required":["name"]},"PatchGeoProjectRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"brandSettingsId":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$"}}},"DeleteGeoProjectResponse":{"type":"object","properties":{"id":{"type":"string"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["id","organization"]},"GeoSettingsResponse":{"type":"object","properties":{"configured":{"type":"boolean","description":"Whether the analytics backend is configured."},"settings":{"$ref":"#/components/schemas/GeoSettings"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["configured","settings","organization"]},"GeoSettings":{"type":["object","null"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"projectId":{"type":"string"},"companyName":{"type":"string"},"aliases":{"type":"array","items":{"type":"string"}},"conversionPaths":{"type":"array","items":{"type":"string"}},"domains":{"type":"array","items":{"type":"string"}},"competitors":{"type":"array","items":{"type":"string"}},"languages":{"type":"array","items":{"type":"string"}},"engines":{"type":"array","items":{"type":"string"}},"enforceZdr":{"type":"boolean"},"nonZdrApprovedEngines":{"type":"array","items":{"type":"string"}},"trackWithoutSearch":{"type":"boolean"},"pausedAutoPromptIds":{"type":"array","items":{"type":"string"}},"removedAutoPromptIds":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"scanIntervalHours":{"type":"integer"},"scanStartedAt":{"type":["string","null"]},"lastScanAt":{"type":["string","null"]},"isScanning":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","projectId","companyName","aliases","conversionPaths","domains","competitors","languages","engines","enforceZdr","nonZdrApprovedEngines","trackWithoutSearch","pausedAutoPromptIds","removedAutoPromptIds","enabled","scanIntervalHours","scanStartedAt","lastScanAt","isScanning","createdAt","updatedAt"]},"PatchGeoSettingsRequest":{"type":"object","properties":{"companyName":{"type":"string","minLength":1,"maxLength":128},"aliases":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":10},"conversionPaths":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":20,"description":"Paths that count as a conversion when an AI referral reaches them. Prefix match. Omit to keep the stored list."},"domains":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":20,"description":"Additional hostnames that send AI traffic to this project, besides the brand website. Subdomains of a listed domain are included. Omit to keep the stored list."},"languages":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"minItems":1,"maxItems":4},"engines":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"minItems":1,"maxItems":64},"enforceZdr":{"type":"boolean"},"nonZdrApprovedEngines":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":64},"trackWithoutSearch":{"type":"boolean","description":"Also scan search-capable models without web search. Omit to keep the stored value (default false)."},"pausedAutoPromptIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":8,"description":"Ids of auto-generated prompts to skip in scans. Omit to keep the current list."},"removedAutoPromptIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":8,"description":"Ids of auto-generated prompts removed from tracking. Omit to keep the current list."},"enabled":{"type":"boolean"},"scanIntervalHours":{"type":"integer","minimum":24,"maximum":2160,"description":"Hours between automatic scans, 24-2160, in whole days (multiple of 24). Presets: 24, 48, 72, 168, 336, 720."}},"required":["companyName","aliases","languages","engines","enforceZdr","nonZdrApprovedEngines","enabled","scanIntervalHours"]},"ListGeoPromptsResponse":{"type":"object","properties":{"configured":{"type":"boolean"},"prompts":{"type":"array","items":{"$ref":"#/components/schemas/GeoPrompt"}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["configured","prompts","organization"]},"GeoPrompt":{"type":"object","properties":{"id":{"type":"string"},"prompt":{"type":"string"},"enabled":{"type":"boolean"},"source":{"type":"string","enum":["custom","auto"]},"tags":{"type":"array","items":{"type":"string"}},"createdAt":{"type":["string","null"]}},"required":["id","prompt","enabled","source","tags","createdAt"]},"GeoPromptResponse":{"type":"object","properties":{"prompt":{"$ref":"#/components/schemas/GeoPrompt"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["prompt","organization"]},"CreateGeoPromptRequest":{"type":"object","properties":{"prompt":{"type":"string","minLength":8,"maxLength":300},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":40},"maxItems":20,"description":"Free-form labels for grouping custom prompts. Lowercased and deduplicated on save."}},"required":["prompt"]},"PatchGeoPromptRequest":{"type":"object","properties":{"enabled":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":40},"maxItems":20,"description":"Free-form labels for grouping custom prompts. Lowercased and deduplicated on save."}}},"DeleteGeoPromptResponse":{"type":"object","properties":{"id":{"type":"string"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["id","organization"]},"ImportGeoPromptsResponse":{"type":"object","properties":{"imported":{"type":"integer"},"updated":{"type":"integer"},"skipped":{"type":"integer"},"issues":{"type":"array","items":{"type":"object","properties":{"line":{"type":"integer"},"message":{"type":"string"}},"required":["line","message"]},"description":"Rows rejected while parsing CSV. Always empty for `rows`."},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["imported","updated","skipped","issues","organization"]},"ImportGeoPromptsRequest":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"prompt":{"type":"string","minLength":8,"maxLength":300},"enabled":{"type":"boolean"}},"required":["prompt"]},"minItems":1,"maxItems":500},"csv":{"type":"string","minLength":1,"maxLength":1048576,"description":"Raw CSV text with a `prompt` column (optionally `enabled`). Used when `rows` is omitted."}}},"ListGeoSequencesResponse":{"type":"object","properties":{"sequences":{"type":"array","items":{"$ref":"#/components/schemas/GeoSequence"}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["sequences","organization"]},"GeoSequence":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"steps":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","name","steps","enabled","createdAt"]},"GeoSequenceResponse":{"type":"object","properties":{"sequence":{"$ref":"#/components/schemas/GeoSequence"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["sequence","organization"]},"CreateGeoSequenceRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"steps":{"type":"array","items":{"type":"string","minLength":8,"maxLength":300},"minItems":1,"maxItems":5}},"required":["name","steps"]},"PatchGeoSequenceRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"steps":{"type":"array","items":{"type":"string","minLength":8,"maxLength":300},"minItems":1,"maxItems":5},"enabled":{"type":"boolean"}}},"DeleteGeoSequenceResponse":{"type":"object","properties":{"id":{"type":"string"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["id","organization"]},"RunGeoSequenceResponse":{"type":"object","properties":{"checks":{"type":"integer","description":"Recorded answers across every engine that responded."},"mentions":{"type":"integer","description":"How many of those answers mentioned the tracked brand."},"engines":{"type":"array","items":{"type":"string"},"description":"Engines the conversation was played against."},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["checks","mentions","engines","organization"]},"ListGeoCompetitorsResponse":{"type":"object","properties":{"competitors":{"type":"array","items":{"$ref":"#/components/schemas/GeoCompetitor"}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["competitors","organization"]},"GeoCompetitor":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"domain":{"type":["string","null"]},"synonyms":{"type":"array","items":{"type":"string"}},"kind":{"type":"string","enum":["direct","indirect"]},"color":{"type":["string","null"]}},"required":["id","name","domain","synonyms","kind","color"]},"PutGeoCompetitorRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"previousName":{"type":"string","minLength":1,"maxLength":128,"description":"Set to rename an existing competitor."},"domain":{"type":["string","null"],"maxLength":128},"synonyms":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":8},"kind":{"type":"string","enum":["direct","indirect"]},"color":{"type":["string","null"],"maxLength":128}},"required":["name","domain"]},"GeoCompetitorSuggestionsResponse":{"type":"object","properties":{"domain":{"type":"string"},"field":{"type":["string","null"]},"competitors":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"domain":{"type":["string","null"]},"description":{"type":["string","null"]},"confidence":{"type":["string","null"],"enum":["high","medium",null]}},"required":["name","domain","description","confidence"]}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["domain","field","competitors","organization"]},"ImportGeoCompetitorsResponse":{"type":"object","properties":{"imported":{"type":"integer"},"updated":{"type":"integer"},"skipped":{"type":"integer"},"issues":{"type":"array","items":{"type":"object","properties":{"line":{"type":"integer"},"message":{"type":"string"}},"required":["line","message"]}},"competitors":{"type":"array","items":{"$ref":"#/components/schemas/GeoCompetitor"}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["imported","updated","skipped","issues","competitors","organization"]},"ImportGeoCompetitorsRequest":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"domain":{"type":["string","null"],"maxLength":128},"kind":{"type":"string","enum":["direct","indirect"]},"synonyms":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":8}},"required":["name"]},"minItems":1,"maxItems":25},"csv":{"type":"string","minLength":1,"maxLength":1048576,"description":"Raw CSV text with a `name` column (optionally `domain`, `kind`, `synonyms`). Used when `rows` is omitted."}}},"CreateGeoScanResponse":{"type":"object","properties":{"scanId":{"type":"string"},"statusUrl":{"type":"string"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["scanId","statusUrl","organization"]},"ListGeoScansResponse":{"type":"object","properties":{"scans":{"type":"array","items":{"$ref":"#/components/schemas/GeoScan"}},"pagination":{"type":"object","properties":{"limit":{"type":"integer","minimum":1},"currentPage":{"type":"integer","minimum":1},"nextPage":{"type":["integer","null"],"minimum":1},"previousPage":{"type":["integer","null"],"minimum":1},"totalPages":{"type":"integer","minimum":1},"totalItems":{"type":"integer","minimum":0}},"required":["limit","currentPage","nextPage","previousPage","totalPages","totalItems"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["scans","pagination","organization"]},"GeoScan":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"status":{"type":"string","enum":["running","completed","failed"]},"startedAt":{"type":"string"},"finishedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"summary":{"type":"object","properties":{"plannedChecks":{"type":["integer","null"],"minimum":0},"completedChecks":{"type":"integer","minimum":0},"mentionCount":{"type":"integer","minimum":0},"failedChecks":{"type":"integer","minimum":0},"engines":{"type":"array","items":{"type":"object","properties":{"engine":{"type":"string"},"plannedChecks":{"type":["integer","null"],"minimum":0},"completedChecks":{"type":"integer","minimum":0},"mentionCount":{"type":"integer","minimum":0},"failedChecks":{"type":"integer","minimum":0}},"required":["engine","plannedChecks","completedChecks","mentionCount","failedChecks"]}}},"required":["plannedChecks","completedChecks","mentionCount","failedChecks","engines"]},"errorCode":{"type":["string","null"]},"errorMessage":{"type":["string","null"]},"failedStage":{"type":["string","null"],"enum":["handoff","execution","stale",null]},"retryable":{"type":["boolean","null"]}},"required":["id","projectId","status","startedAt","finishedAt","createdAt","summary","errorCode","errorMessage","failedStage","retryable"]},"GeoScanResponse":{"type":"object","properties":{"scan":{"$ref":"#/components/schemas/GeoScan"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["scan","organization"]},"GeoVisibilityOverviewResponse":{"type":"object","properties":{"configured":{"type":"boolean","description":"Whether the analytics backend is configured."},"engines":{"type":"array","items":{"type":"object","properties":{"engine":{"type":"string"},"checks":{"type":"integer"},"mentions":{"type":"integer"},"mentionRate":{"type":"number"},"citations":{"type":"integer"},"visibility":{"type":"integer"},"visibilityRate":{"type":"number"},"avgPosition":{"type":["number","null"]},"lastCheckedAt":{"type":"string"}},"required":["engine","checks","mentions","mentionRate","citations","visibility","visibilityRate","avgPosition","lastCheckedAt"]}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["configured","engines","organization"]},"GeoVisibilityTimeseriesResponse":{"type":"object","properties":{"configured":{"type":"boolean"},"points":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"engine":{"type":"string"},"checks":{"type":"integer"},"mentions":{"type":"integer"},"citations":{"type":"integer"},"visibility":{"type":"integer"},"avgPosition":{"type":["number","null"]}},"required":["day","engine","checks","mentions","citations","visibility"]}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["configured","points","organization"]},"GeoVisibilityPromptResultsResponse":{"type":"object","properties":{"configured":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"promptId":{"type":"string"},"engine":{"type":"string"},"prompt":{"type":"string"},"answer":{"type":"string"},"mentioned":{"type":"boolean"},"ownedSourceCited":{"type":"boolean"},"position":{"type":["integer","null"]},"sentiment":{"type":["string","null"]},"competitors":{"type":"array","items":{"type":"string"}},"excerpt":{"type":"string"},"searchQueries":{"type":"array","items":{"type":"string"}},"sources":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"},"domain":{"type":"string"}},"required":["title","url","domain"]}},"lastCheckedAt":{"type":"string"}},"required":["promptId","engine","prompt","answer","mentioned","ownedSourceCited","position","sentiment","competitors","excerpt","searchQueries","sources","lastCheckedAt"]}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["configured","results","organization"]},"GeoVisibilityPromptResultSummariesResponse":{"type":"object","properties":{"configured":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"promptId":{"type":"string"},"engine":{"type":"string"},"prompt":{"type":"string"},"mentioned":{"type":"boolean"},"ownedSourceCited":{"type":"boolean"},"position":{"type":["integer","null"]},"sentiment":{"type":["string","null"]},"competitors":{"type":"array","items":{"type":"string"}},"lastCheckedAt":{"type":"string"},"checkId":{"type":"string"}},"required":["promptId","engine","prompt","mentioned","ownedSourceCited","position","sentiment","competitors","lastCheckedAt","checkId"]}},"nextCursor":{"type":["string","null"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["configured","results","nextCursor","organization"]},"GeoVisibilityPromptResultDetailResponse":{"type":"object","properties":{"result":{"type":"object","properties":{"promptId":{"type":"string"},"engine":{"type":"string"},"prompt":{"type":"string"},"answer":{"type":"string"},"mentioned":{"type":"boolean"},"ownedSourceCited":{"type":"boolean"},"position":{"type":["integer","null"]},"sentiment":{"type":["string","null"]},"competitors":{"type":"array","items":{"type":"string"}},"excerpt":{"type":"string"},"searchQueries":{"type":"array","items":{"type":"string"}},"sources":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"},"domain":{"type":"string"}},"required":["title","url","domain"]}},"lastCheckedAt":{"type":"string"},"finishReason":{"type":["string","null"]},"promptTokens":{"type":["integer","null"]},"outputTokens":{"type":["integer","null"]},"reasoningTokens":{"type":["integer","null"]},"truncated":{"type":["boolean","null"]}},"required":["promptId","engine","prompt","answer","mentioned","ownedSourceCited","position","sentiment","competitors","excerpt","searchQueries","sources","lastCheckedAt","finishReason","promptTokens","outputTokens","reasoningTokens","truncated"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["result","organization"]},"GeoVisibilityCompetitorShareResponse":{"type":"object","properties":{"configured":{"type":"boolean"},"points":{"type":"array","items":{"type":"object","properties":{"brand":{"type":"string"},"mentions":{"type":"integer"},"trend":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"value":{"type":"number"}},"required":["day","value"]}}},"required":["brand","mentions"]}},"timeseries":{"type":"array","items":{"type":"object","properties":{"brand":{"type":"string"},"day":{"type":"string"},"mentions":{"type":"integer"}},"required":["brand","day","mentions"]}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["configured","points","timeseries","organization"]},"GeoVisibilityLanguageShareResponse":{"type":"object","properties":{"configured":{"type":"boolean"},"points":{"type":"array","items":{"type":"object","properties":{"language":{"type":"string"},"checks":{"type":"integer"},"mentions":{"type":"integer"},"mentionRate":{"type":"number"},"citations":{"type":"integer"},"visibility":{"type":"integer"},"visibilityRate":{"type":"number"},"avgPosition":{"type":["number","null"]},"trend":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"value":{"type":"number"}},"required":["day","value"]}}},"required":["language","checks","mentions","mentionRate","citations","visibility","visibilityRate","avgPosition"]}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["configured","points","organization"]},"GeoVisibilityCompetitorDetailResponse":{"type":"object","properties":{"configured":{"type":"boolean"},"points":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"mentions":{"type":"integer"},"checks":{"type":"integer"}},"required":["day","mentions","checks"]}},"prompts":{"type":"array","items":{"type":"object","properties":{"promptId":{"type":"string"},"prompt":{"type":"string"},"engine":{"type":"string"},"capturedAt":{"type":"string"},"mentioned":{"type":"boolean"},"position":{"type":["integer","null"]}},"required":["promptId","prompt","engine","capturedAt","mentioned","position"]}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["configured","points","prompts","organization"]},"GeoChangesResponse":{"type":"object","properties":{"previousScan":{"type":["object","null"],"properties":{"id":{"type":"string"},"finishedAt":{"type":["string","null"]}},"required":["id","finishedAt"]},"currentScan":{"type":["object","null"],"properties":{"id":{"type":"string"},"finishedAt":{"type":["string","null"]}},"required":["id","finishedAt"]},"summary":{"type":"object","properties":{"gained":{"type":"integer"},"lost":{"type":"integer"},"positionImproved":{"type":"integer"},"positionDropped":{"type":"integer"},"citationsAdded":{"type":"integer"},"citationsRemoved":{"type":"integer"}},"required":["gained","lost","positionImproved","positionDropped","citationsAdded","citationsRemoved"]},"events":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["gained_mention","lost_mention","position_improved","position_dropped","competitor_displaced","citation_added","citation_removed","competitor_cited","new_engine"]},"promptId":{"type":"string"},"prompt":{"type":"string"},"engine":{"type":"string"},"previous":{"type":["object","null"],"properties":{"mentioned":{"type":"boolean"},"position":{"type":["number","null"]}},"required":["mentioned","position"]},"current":{"type":"object","properties":{"mentioned":{"type":"boolean"},"position":{"type":["number","null"]}},"required":["mentioned","position"]},"competitors":{"type":"array","items":{"type":"string"}},"domains":{"type":"array","items":{"type":"string"}}},"required":["kind","promptId","prompt","engine","previous","current","competitors","domains"]}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["previousScan","currentScan","summary","events","organization"]},"GeoPromptHistoryResponse":{"type":"object","properties":{"configured":{"type":"boolean"},"promptId":{"type":"string"},"checks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"scanId":{"type":"string"},"engine":{"type":"string"},"mentioned":{"type":"boolean"},"ownedSourceCited":{"type":"boolean"},"position":{"type":["number","null"]},"sentiment":{"type":["string","null"]},"competitors":{"type":"array","items":{"type":"string"}},"language":{"type":"string"},"capturedAt":{"type":"string"}},"required":["id","scanId","engine","mentioned","position","sentiment","competitors","language","capturedAt"]}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["configured","promptId","checks","organization"]},"GeoSentimentResponse":{"type":"object","properties":{"configured":{"type":"boolean","enum":[true]},"summary":{"type":"object","properties":{"totalChecks":{"type":"integer"},"mentions":{"type":"integer"},"positive":{"type":"integer"},"neutral":{"type":"integer"},"negative":{"type":"integer"},"lastCheckedAt":{"type":["string","null"]},"score":{"type":["number","null"]},"classifiedMentions":{"type":"integer"},"unknownMentions":{"type":"integer"},"notMentioned":{"type":"integer"},"positiveShare":{"type":["number","null"]},"neutralShare":{"type":["number","null"]},"negativeShare":{"type":["number","null"]},"classificationCoverage":{"type":["number","null"]}},"required":["totalChecks","mentions","positive","neutral","negative","lastCheckedAt","score","classifiedMentions","unknownMentions","notMentioned","positiveShare","neutralShare","negativeShare","classificationCoverage"]},"engines":{"type":"array","items":{"type":"object","properties":{"totalChecks":{"type":"integer"},"mentions":{"type":"integer"},"positive":{"type":"integer"},"neutral":{"type":"integer"},"negative":{"type":"integer"},"lastCheckedAt":{"type":["string","null"]},"score":{"type":["number","null"]},"classifiedMentions":{"type":"integer"},"unknownMentions":{"type":"integer"},"notMentioned":{"type":"integer"},"positiveShare":{"type":["number","null"]},"neutralShare":{"type":["number","null"]},"negativeShare":{"type":["number","null"]},"classificationCoverage":{"type":["number","null"]},"engine":{"type":"string"}},"required":["totalChecks","mentions","positive","neutral","negative","lastCheckedAt","score","classifiedMentions","unknownMentions","notMentioned","positiveShare","neutralShare","negativeShare","classificationCoverage","engine"]}},"points":{"type":"array","items":{"type":"object","properties":{"totalChecks":{"type":"integer"},"mentions":{"type":"integer"},"positive":{"type":"integer"},"neutral":{"type":"integer"},"negative":{"type":"integer"},"lastCheckedAt":{"type":["string","null"]},"score":{"type":["number","null"]},"classifiedMentions":{"type":"integer"},"unknownMentions":{"type":"integer"},"notMentioned":{"type":"integer"},"positiveShare":{"type":["number","null"]},"neutralShare":{"type":["number","null"]},"negativeShare":{"type":["number","null"]},"classificationCoverage":{"type":["number","null"]},"day":{"type":"string"}},"required":["totalChecks","mentions","positive","neutral","negative","lastCheckedAt","score","classifiedMentions","unknownMentions","notMentioned","positiveShare","neutralShare","negativeShare","classificationCoverage","day"]}},"comparison":{"type":"object","properties":{"current":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]},"previous":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]},"summary":{"type":"object","properties":{"totalChecks":{"type":"integer"},"mentions":{"type":"integer"},"positive":{"type":"integer"},"neutral":{"type":"integer"},"negative":{"type":"integer"},"lastCheckedAt":{"type":["string","null"]},"score":{"type":["number","null"]},"classifiedMentions":{"type":"integer"},"unknownMentions":{"type":"integer"},"notMentioned":{"type":"integer"},"positiveShare":{"type":["number","null"]},"neutralShare":{"type":["number","null"]},"negativeShare":{"type":["number","null"]},"classificationCoverage":{"type":["number","null"]}},"required":["totalChecks","mentions","positive","neutral","negative","lastCheckedAt","score","classifiedMentions","unknownMentions","notMentioned","positiveShare","neutralShare","negativeShare","classificationCoverage"]},"points":{"type":"array","items":{"type":"object","properties":{"totalChecks":{"type":"integer"},"mentions":{"type":"integer"},"positive":{"type":"integer"},"neutral":{"type":"integer"},"negative":{"type":"integer"},"lastCheckedAt":{"type":["string","null"]},"score":{"type":["number","null"]},"classifiedMentions":{"type":"integer"},"unknownMentions":{"type":"integer"},"notMentioned":{"type":"integer"},"positiveShare":{"type":["number","null"]},"neutralShare":{"type":["number","null"]},"negativeShare":{"type":["number","null"]},"classificationCoverage":{"type":["number","null"]},"day":{"type":"string"}},"required":["totalChecks","mentions","positive","neutral","negative","lastCheckedAt","score","classifiedMentions","unknownMentions","notMentioned","positiveShare","neutralShare","negativeShare","classificationCoverage","day"]}},"delta":{"type":["number","null"]}},"required":["current","previous","summary","points","delta"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["configured","summary","engines","points","organization"]},"GeoSentimentAnalysisResponse":{"type":"object","properties":{"status":{"type":"string","enum":["ready","pending","stale","failed","unavailable"]},"result":{"type":["object","null"],"properties":{"fingerprint":{"type":"string"},"generatedAt":{"type":"string"},"sampled":{"type":"integer"},"eligible":{"type":"integer"},"themes":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"polarity":{"type":"string","enum":["positive","negative"]},"claims":{"type":"array","items":{"type":"object","properties":{"statement":{"type":"string"},"evidence":{"type":"array","items":{"type":"object","properties":{"checkId":{"type":"string"},"quote":{"type":"string"},"prompt":{"type":"string"},"engine":{"type":"string"},"capturedAt":{"type":"string"}},"required":["checkId","quote","prompt","engine","capturedAt"]}}},"required":["statement","evidence"]}},"evidence":{"type":"array","items":{"type":"object","properties":{"checkId":{"type":"string"},"quote":{"type":"string"},"prompt":{"type":"string"},"engine":{"type":"string"},"capturedAt":{"type":"string"}},"required":["checkId","quote","prompt","engine","capturedAt"]}}},"required":["title","polarity","claims","evidence"]}}},"required":["fingerprint","generatedAt","sampled","eligible","themes"]},"message":{"type":["string","null"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["status","result","message","organization"]},"GeoSentimentEvidenceResponse":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"scanId":{"type":"string"},"promptId":{"type":"string"},"prompt":{"type":"string"},"engine":{"type":"string"},"language":{"type":"string"},"capturedAt":{"type":"string"},"answer":{"type":"string"},"excerpt":{"type":"string"}},"required":["id","scanId","promptId","prompt","engine","language","capturedAt","answer","excerpt"]}},"nextCursor":{"type":["string","null"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["items","nextCursor","organization"]},"GeoShelfListResponse":{"type":"object","properties":{"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"url":{"type":"string","maxLength":2048,"format":"uri"},"domain":{"type":"string","minLength":1},"title":{"type":["string","null"],"maxLength":200},"kind":{"type":"string","enum":["listicle","review_site","community","news","docs","video","other"]},"ownership":{"type":"string","enum":["third_party","own","competitor"]},"origin":{"type":"string","enum":["scan","manual"]},"fetchStatus":{"type":"string","enum":["pending","ok","blocked","failed"]},"lastFetchedAt":{"type":["string","null"],"format":"date-time"},"citations":{"type":"object","properties":{"windowCount":{"type":"integer","minimum":0},"totalCount":{"type":"integer","minimum":0},"promptCount":{"type":"integer","minimum":0},"engines":{"type":"array","items":{"type":"string","minLength":1}},"firstCitedAt":{"type":["string","null"],"format":"date-time"},"lastCitedAt":{"type":["string","null"],"format":"date-time"}},"required":["windowCount","totalCount","promptCount","engines","firstCitedAt","lastCitedAt"]},"placements":{"type":"array","items":{"type":"object","properties":{"competitorId":{"type":["string","null"],"minLength":1},"brandName":{"type":"string","minLength":1},"brandDomain":{"type":["string","null"]},"status":{"type":"string","enum":["present","absent","unknown"]},"position":{"type":["integer","null"],"exclusiveMinimum":0},"hasLink":{"type":"boolean"},"evidence":{"type":"string","enum":["fetch","manual"]},"excerpt":{"type":["string","null"]},"checkedAt":{"type":"string","format":"date-time"}},"required":["competitorId","brandName","brandDomain","status","position","hasLink","evidence","excerpt","checkedAt"]}},"opportunity":{"type":["object","null"],"properties":{"status":{"type":"string","enum":["open","in_progress","won","lost","dismissed"]},"priority":{"type":["string","null"],"enum":["low","medium","high",null]},"assigneeMemberId":{"type":["string","null"],"minLength":1},"pocMemberId":{"type":["string","null"],"minLength":1},"notes":{"type":["string","null"],"maxLength":2000},"dueAt":{"type":["string","null"],"format":"date-time"},"id":{"type":"string","minLength":1},"createdByUserId":{"type":["string","null"],"minLength":1},"resolvedAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["status","priority","assigneeMemberId","pocMemberId","notes","dueAt","id","createdByUserId","resolvedAt","createdAt","updatedAt"]},"createdByUserId":{"type":["string","null"],"minLength":1},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","url","domain","title","kind","ownership","origin","fetchStatus","lastFetchedAt","citations","placements","opportunity","createdByUserId","createdAt","updatedAt"]}},"nextOffset":{"type":["integer","null"],"minimum":0},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["sources","nextOffset","organization"]},"GeoContentGapsResponse":{"type":"object","properties":{"promptGaps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"prompt":{"type":"string"},"title":{"type":["string","null"]},"engines":{"type":"array","items":{"type":"string"}},"mentionedEngines":{"type":"array","items":{"type":"string"}},"competitors":{"type":"array","items":{"type":"string"}},"discoveredCompetitors":{"type":"array","items":{"type":"string"}},"ownMentionRate":{"type":"number"},"engineCoverage":{"type":"number"},"opportunity":{"type":"number"},"won":{"type":"boolean"},"brief":{"type":["object","null"],"properties":{"briefId":{"type":"string"},"status":{"type":"string","enum":["draft","approved","writing","completed","failed"]},"postId":{"type":["string","null"]},"workingTitle":{"type":["string","null"]},"publishedAt":{"type":["string","null"]},"baseline":{"type":["object","null"],"properties":{"mentionedEngines":{"type":"number"},"totalEngines":{"type":"number"}},"required":["mentionedEngines","totalEngines"]},"rescanned":{"type":"boolean"}},"required":["briefId","status","postId","workingTitle","publishedAt","baseline","rescanned"]}},"required":["id","prompt","title","engines","mentionedEngines","competitors","discoveredCompetitors","ownMentionRate","engineCoverage","opportunity","won","brief"]}},"searchGaps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"prompt":{"type":"string"},"title":{"type":["string","null"]},"impressions":{"type":["number","null"]},"clicks":{"type":["number","null"]},"position":{"type":["number","null"]},"queries":{"type":"array","items":{"type":"object","properties":{"query":{"type":"string"},"clicks":{"type":"number"},"impressions":{"type":"number"},"position":{"type":"number"}},"required":["query","clicks","impressions","position"]}},"brief":{"type":["object","null"],"properties":{"briefId":{"type":"string"},"status":{"type":"string","enum":["draft","approved","writing","completed","failed"]},"postId":{"type":["string","null"]},"workingTitle":{"type":["string","null"]},"publishedAt":{"type":["string","null"]},"baseline":{"type":["object","null"],"properties":{"mentionedEngines":{"type":"number"},"totalEngines":{"type":"number"}},"required":["mentionedEngines","totalEngines"]},"rescanned":{"type":"boolean"}},"required":["briefId","status","postId","workingTitle","publishedAt","baseline","rescanned"]},"recommendation":{"type":"object","properties":{"action":{"type":"string","enum":["create","update","merge","ignore"],"description":"What to do with this query cluster: create a new page, update the strongest existing page, merge overlapping pages, or ignore thin demand."},"reason":{"type":"string"},"targets":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["page","post"]},"id":{"type":"string"},"url":{"type":["string","null"]},"title":{"type":"string"},"score":{"type":"number"}},"required":["kind","id","url","title","score"]}}},"required":["action","reason","targets"]}},"required":["id","prompt","title","impressions","clicks","position","queries","brief","recommendation"]}},"hasScanData":{"type":"boolean","description":"False until the project has at least one scan result."},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["promptGaps","searchGaps","hasScanData","organization"]},"ListGeoContentBriefsResponse":{"type":"object","properties":{"briefs":{"type":"array","items":{"$ref":"#/components/schemas/GeoContentBriefSummary"}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["briefs","organization"]},"GeoContentBriefSummary":{"type":"object","properties":{"id":{"type":"string"},"topic":{"type":"string"},"workingTitle":{"type":"string"},"status":{"type":"string","enum":["draft","approved","writing","completed","failed"]},"postId":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","topic","workingTitle","status","postId","createdAt"]},"GeoContentBriefResponse":{"type":"object","properties":{"brief":{"$ref":"#/components/schemas/GeoContentBriefDetail"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["brief","organization"]},"GeoContentBriefDetail":{"type":"object","properties":{"id":{"type":"string"},"topic":{"type":"string"},"brief":{"$ref":"#/components/schemas/GeoContentBriefDocument"},"status":{"type":"string","enum":["draft","approved","writing","completed","failed"]},"autoApproved":{"type":"boolean"},"runId":{"type":["string","null"]},"postId":{"type":["string","null"]},"humanized":{"type":"boolean"},"error":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","topic","brief","status","autoApproved","runId","postId","humanized","error","createdAt","updatedAt","completedAt"]},"GeoContentBriefDocument":{"type":"object","properties":{"targetPrompt":{"type":"string"},"intent":{"type":"string"},"contentSubtype":{"type":"string","enum":["guide","comparison","listicle","how-to","faq","alternatives"]},"workingTitle":{"type":"string"},"audience":{"type":"string"},"jobToBeDone":{"type":"string"},"sections":{"type":"array","items":{"type":"object","properties":{"heading":{"type":"string"},"goal":{"type":"string"},"claims":{"type":"array","items":{"type":"string"}}},"required":["heading","goal","claims"]}},"questionsToAnswer":{"type":"array","items":{"type":"string"}},"internalLinks":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"anchor":{"type":"string"},"why":{"type":"string"}},"required":["url","anchor","why"]}},"acceptanceChecklist":{"type":"array","items":{"type":"string"}},"recommendedAngle":{"type":"string"},"competitorsToCounter":{"type":"array","items":{"type":"string"}},"sourcesToReference":{"type":"array","items":{"type":"string"}},"missingCoverage":{"type":"array","items":{"type":"string"}},"baseline":{"type":["object","null"],"properties":{"sourcePromptId":{"type":"string"},"mentionedEngines":{"type":"number"},"totalEngines":{"type":"number"},"engines":{"type":"array","items":{"type":"object","properties":{"engine":{"type":"string"},"mentioned":{"type":"boolean"},"position":{"type":["number","null"]}},"required":["engine","mentioned","position"]}},"competitorMentions":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"engines":{"type":"number"}},"required":["name","engines"]}},"citedDomains":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"engines":{"type":"number"}},"required":["domain","engines"]}},"capturedAt":{"type":["string","null"]}},"required":["sourcePromptId","mentionedEngines","totalEngines","engines","competitorMentions","citedDomains","capturedAt"]}},"required":["targetPrompt","intent","contentSubtype","workingTitle","audience","jobToBeDone","sections","questionsToAnswer","internalLinks","acceptanceChecklist"]},"PlanGeoContentBriefResponse":{"type":"object","properties":{"briefId":{"type":"string"},"brief":{"$ref":"#/components/schemas/GeoContentBriefDocument"},"status":{"type":"string","enum":["draft","approved","writing","completed","failed"]},"runId":{"type":["string","null"]},"postId":{"type":["string","null"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["briefId","brief","status","runId","postId","organization"]},"PlanGeoContentBriefRequest":{"type":"object","properties":{"topic":{"type":"string","minLength":3,"maxLength":200,"description":"What the article should target. Replaced by the source prompt when sourceKind is gap, prompt or search_console."},"autoApprove":{"type":"boolean","default":false,"description":"Start the writer immediately instead of leaving the brief in draft."},"contentSubtype":{"type":"string","enum":["guide","comparison","listicle","how-to","faq","alternatives"]},"brandVoiceIds":{"type":"array","items":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$"},"maxItems":8,"description":"Only the first entry is used; it overrides the project's brand identity."},"competitorIds":{"type":"array","items":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$"},"maxItems":25},"sitemapId":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$"},"sourceKind":{"type":"string","enum":["manual","gap","prompt","search_console"]},"sourceId":{"type":"string","minLength":1,"description":"Gap, prompt or search-console suggestion id. An open brief for the same source is reused instead of planning a new one."},"existingPageUrl":{"type":"string","maxLength":2048,"format":"uri","description":"Existing page the article should refresh instead of creating a competing page."}},"required":["topic"]},"ApproveGeoContentBriefResponse":{"type":"object","properties":{"runId":{"type":"string"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["runId","organization"]},"GeoAgentReadinessResponse":{"type":"object","properties":{"targetUrl":{"type":"string"},"report":{"$ref":"#/components/schemas/GeoAgentReadinessReport"},"scan":{"allOf":[{"$ref":"#/components/schemas/GeoAgentReadinessReport"},{"description":"Latest run newer than the completed report, if any."}]},"history":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"score":{"type":["number","null"]},"failedCount":{"type":"integer"},"partialCount":{"type":"integer"},"scannedAt":{"type":"string"}},"required":["id","score","failedCount","partialCount","scannedAt"]},"description":"Completed scans, oldest first."},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["targetUrl","report","scan","history","organization"]},"GeoAgentReadinessReport":{"type":["object","null"],"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["running","completed","failed"]},"targetUrl":{"type":"string"},"score":{"type":["number","null"]},"scoreLabel":{"type":["string","null"]},"scoreBreakdown":{"type":["object","null"],"properties":{"essential":{"type":"object","properties":{"earned":{"type":"number"},"available":{"type":"number"},"passing":{"type":"number"},"total":{"type":"number"}},"required":["earned","available","passing","total"]},"recommended":{"type":"object","properties":{"earned":{"type":"number"},"available":{"type":"number"},"passing":{"type":"number"},"total":{"type":"number"}},"required":["earned","available","passing","total"]},"bonus":{"type":"object","properties":{"points":{"type":"number"},"positiveSignals":{"type":"number"}},"required":["points","positiveSignals"]}},"required":["essential","recommended","bonus"]},"issues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tier":{"type":"string","enum":["essential","recommended","bonus"]},"result":{"type":"string","enum":["failed","partial"]},"details":{"type":["string","null"]},"recommendation":{"type":["string","null"]}},"required":["id","name","tier","result","details","recommendation"]}},"eligibleChecks":{"type":["integer","null"]},"reportUrl":{"type":["string","null"]},"errorMessage":{"type":["string","null"]},"scannedAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","status","targetUrl","score","scoreLabel","scoreBreakdown","issues","eligibleChecks","reportUrl","errorMessage","scannedAt","createdAt"],"description":"Latest completed report, if any."},"GeoAgentReadinessScanResponse":{"type":"object","properties":{"reportId":{"type":"string"},"alreadyRunning":{"type":"boolean","description":"True when an in-flight scan for the same URL was reused instead of starting a new one."},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["reportId","alreadyRunning","organization"]},"GeoTrafficOverviewResponse":{"type":"object","properties":{"configured":{"type":"boolean","description":"False when the traffic backend is not configured for this deployment; the payload is then empty rather than an error."},"totals":{"type":"object","properties":{"crawler":{"type":"integer"},"cited":{"type":"integer"},"aiReferral":{"type":"integer"},"conversions":{"type":["integer","null"],"description":"AI referral visits that reached a configured conversion path. Null when no conversion paths are set."}},"required":["crawler","cited","aiReferral","conversions"]},"previousConversions":{"type":["integer","null"],"description":"Conversions in the previous window of the same length. Null when no conversion paths are set or no comparison data exists."},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"visitorType":{"type":"string","enum":["crawler","ai_referral","human","unknown"]},"agent":{"type":"string"},"category":{"type":"string"},"confidence":{"type":"string"},"visits":{"type":"integer"},"previousVisits":{"type":"integer"},"markdownVisits":{"type":"integer"},"paths":{"type":"integer"},"lastSeenAt":{"type":"string"}},"required":["source","visitorType","agent","category","confidence","visits","markdownVisits","paths","lastSeenAt"]}},"points":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"visitorType":{"type":"string","enum":["crawler","ai_referral","human","unknown"]},"source":{"type":"string"},"visits":{"type":"integer"}},"required":["day","visitorType","source","visits"]}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["configured","totals","previousConversions","sources","points","organization"]},"GeoTrafficLogResponse":{"type":"object","properties":{"configured":{"type":"boolean","description":"False when the traffic backend is not configured for this deployment; the payload is then empty rather than an error."},"log":{"type":"array","items":{"type":"object","properties":{"capturedAt":{"type":"string"},"visitorType":{"type":"string","enum":["crawler","ai_referral","human","unknown"]},"source":{"type":"string"},"agent":{"type":"string"},"category":{"type":"string"},"confidence":{"type":"string"},"path":{"type":"string"},"host":{"type":"string"},"country":{"type":"string"},"ua":{"type":"string"},"journeyId":{"type":"string"},"wantsMarkdown":{"type":"boolean"}},"required":["capturedAt","visitorType","source","agent","category","confidence","path","host","country","ua","journeyId","wantsMarkdown"]}},"total":{"type":"integer"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["configured","log","total","organization"]},"GeoTrafficJourneysResponse":{"type":"object","properties":{"configured":{"type":"boolean","description":"False when the traffic backend is not configured for this deployment; the payload is then empty rather than an error."},"journeys":{"type":"array","items":{"type":"object","properties":{"journeyId":{"type":"string"},"source":{"type":"string"},"visitorType":{"type":"string","enum":["crawler","ai_referral","human","unknown"]},"pages":{"type":"integer"},"distinctPaths":{"type":"integer"},"firstSeenAt":{"type":"string"},"lastSeenAt":{"type":"string"},"entryPath":{"type":"string"},"samplePaths":{"type":"array","items":{"type":"string"}}},"required":["journeyId","source","visitorType","pages","distinctPaths","firstSeenAt","lastSeenAt","entryPath","samplePaths"]}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["configured","journeys","organization"]},"GeoJourneyDetailResponse":{"type":"object","properties":{"configured":{"type":"boolean","description":"False when the traffic backend is not configured for this deployment; the payload is then empty rather than an error."},"events":{"type":"array","items":{"type":"object","properties":{"capturedAt":{"type":"string"},"path":{"type":"string"},"host":{"type":"string"},"method":{"type":"string"},"referer":{"type":"string"},"country":{"type":"string"},"agent":{"type":"string"},"category":{"type":"string"}},"required":["capturedAt","path","host","method","referer","country","agent","category"]}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["configured","events","organization"]},"GeoTrafficPagesResponse":{"type":"object","properties":{"configured":{"type":"boolean","description":"False when the traffic backend is not configured for this deployment; the payload is then empty rather than an error."},"pages":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"host":{"type":"string"},"source":{"type":"string"},"visitorType":{"type":"string","enum":["crawler","ai_referral","human","unknown"]},"visits":{"type":"integer"},"previousVisits":{"type":"integer"},"lastSeenAt":{"type":"string"}},"required":["path","host","source","visitorType","visits","lastSeenAt"]}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["configured","pages","organization"]},"GeoIngestSetupResponse":{"type":"object","properties":{"ingestUrl":{"type":"string","description":"Endpoint the tracking snippet posts events to."},"snippet":{"type":"string","description":"Install snippet for the default framework (Next.js)."},"snippets":{"type":"object","properties":{"next":{"type":"string"},"nuxt":{"type":"string"},"netlify":{"type":"string"},"tanstack":{"type":"string"},"astro":{"type":"string"},"sveltekit":{"type":"string"}},"required":["next","nuxt","netlify","tanstack","astro","sveltekit"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["ingestUrl","snippet","snippets","organization"]},"GeoIngestTokenResponse":{"type":"object","properties":{"ingestUrl":{"type":"string","description":"Endpoint the tracking snippet posts events to."},"snippet":{"type":"string","description":"Install snippet for the default framework (Next.js)."},"snippets":{"type":"object","properties":{"next":{"type":"string"},"nuxt":{"type":"string"},"netlify":{"type":"string"},"tanstack":{"type":"string"},"astro":{"type":"string"},"sveltekit":{"type":"string"}},"required":["next","nuxt","netlify","tanstack","astro","sveltekit"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"token":{"type":"string","description":"Tracking token. Shown once per request; rotating invalidates every previously issued token."}},"required":["ingestUrl","snippet","snippets","organization","token"]},"CreateAgentSessionResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"sessionId":{"type":"string"}},"required":["ok","sessionId"]},"CreateAgentSessionRequest":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":200000,"description":"The first user message of the session."}},"required":["message"]},"SendAgentMessageRequest":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":200000,"description":"The next user message. Omit when only answering a pending input request."},"inputResponses":{"type":"array","items":{"type":"object","properties":{"requestId":{"type":"string","minLength":1},"optionId":{"type":"string","minLength":1,"description":"The chosen option id from the input.requested event, e.g. \"approve\" or \"deny\"."}},"required":["requestId","optionId"]},"description":"Answers to pending input.requested events (tool approvals, questions) from the event stream."}}},"ListAgentChatsResponse":{"type":"object","properties":{"sessions":{"type":"array","items":{"$ref":"#/components/schemas/AgentSessionSummary"}}},"required":["sessions"]},"AgentSessionSummary":{"type":"object","properties":{"sessionId":{"type":"string"},"chatId":{"type":["string","null"]},"surface":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["sessionId","chatId","surface","status","createdAt","updatedAt"]}},"parameters":{}},"paths":{"/v1/status":{"get":{"tags":["Discovery"],"operationId":"getPublicApiStatus","summary":"Check public API reachability","security":[],"responses":{"200":{"description":"Public reachability and authentication discovery metadata for agents.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicStatusResponse"}}}}}}},"/v1/posts":{"get":{"tags":["Content"],"operationId":"listPosts","summary":"List posts","description":"Returns posts for the organization the API key belongs to, newest first by default. Only published posts are included unless you pass status=draft,published.","parameters":[{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort by creation date","example":"desc"},"required":false,"description":"Sort by creation date","name":"sort","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"Items per page","example":10},"required":false,"description":"Items per page","name":"limit","in":"query"},{"schema":{"type":"integer","minimum":1,"default":1,"description":"Page number","example":1},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"string","description":"Filter by status using a comma-separated list."},"required":false,"description":"Filter by status using a comma-separated list.","name":"status","in":"query"},{"schema":{"type":"string","description":"Filter by content type using a comma-separated list."},"required":false,"description":"Filter by content type using a comma-separated list.","name":"contentType","in":"query"},{"schema":{"type":"string","description":"Filter by brand identity ID using a comma-separated list."},"required":false,"description":"Filter by brand identity ID using a comma-separated list.","name":"brandIdentityId","in":"query"}],"responses":{"200":{"description":"Posts fetched successfully","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"slug":{"type":["string","null"]},"content":{"type":"string","description":"Rendered HTML for text posts. For image posts, this is the public CDN URL of the rendered image."},"htmlUrl":{"type":["string","null"],"description":"Public CDN URL of the generated HTML artifact for image posts. Null for non-image posts."},"markdown":{"type":["string","null"],"description":"Markdown source for text posts. Null for image posts."},"rawHtml":{"type":["string","null"],"description":"Legacy inline generated HTML for image posts. New generated image HTML is stored as htmlUrl. Null for non-image posts."},"recommendations":{"type":["string","null"]},"contentType":{"type":"string","enum":["changelog","linkedin_post","twitter_post","blog_post","investor_update","image"]},"sourceMetadata":{},"status":{"type":"string","enum":["draft","published"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","slug","content","htmlUrl","markdown","rawHtml","recommendations","contentType","status","createdAt","updatedAt"]}},"pagination":{"type":"object","properties":{"limit":{"type":"integer","minimum":1},"currentPage":{"type":"integer","minimum":1},"nextPage":{"type":["integer","null"],"minimum":1},"previousPage":{"type":["integer","null"],"minimum":1},"totalPages":{"type":"integer","minimum":1},"totalItems":{"type":"integer","minimum":0}},"required":["limit","currentPage","nextPage","previousPage","totalPages","totalItems"]}},"required":["organization","posts","pagination"]}}}},"400":{"description":"Invalid path params or query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Content"],"operationId":"createPost","summary":"Create a post","description":"Creates a post directly without generation. Omit markdown to create an empty draft you fill in later through the dashboard or PATCH /v1/posts/{postId}. Slugs are only accepted for blog posts and changelogs.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120},"contentType":{"type":"string","enum":["blog_post","changelog","linkedin_post","twitter_post"]},"slug":{"type":["string","null"],"minLength":1,"maxLength":160},"markdown":{"type":"string","maxLength":100000},"status":{"type":"string","enum":["draft","published"],"default":"draft"}},"required":["title","contentType"],"description":"Slugs are normalized to lowercase letters, numbers, and hyphens and only accepted for blog posts and changelogs. Omit markdown to create an empty post you fill in later.","example":{"title":"Ship notes for week 11","contentType":"blog_post","slug":"ship-notes-week-11","status":"draft"}}}}},"responses":{"201":{"description":"Post created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"post":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"slug":{"type":["string","null"]},"content":{"type":"string","description":"Rendered HTML for text posts. For image posts, this is the public CDN URL of the rendered image."},"htmlUrl":{"type":["string","null"],"description":"Public CDN URL of the generated HTML artifact for image posts. Null for non-image posts."},"markdown":{"type":["string","null"],"description":"Markdown source for text posts. Null for image posts."},"rawHtml":{"type":["string","null"],"description":"Legacy inline generated HTML for image posts. New generated image HTML is stored as htmlUrl. Null for non-image posts."},"recommendations":{"type":["string","null"]},"contentType":{"type":"string","enum":["changelog","linkedin_post","twitter_post","blog_post","investor_update","image"]},"sourceMetadata":{},"status":{"type":"string","enum":["draft","published"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","slug","content","htmlUrl","markdown","rawHtml","recommendations","contentType","status","createdAt","updatedAt"]}},"required":["organization","post"]}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Post slug already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 60 requests per 1 minute per API key.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/posts/{postId}":{"get":{"tags":["Content"],"operationId":"getPost","summary":"Get a single post","description":"Returns the post. When no post with this ID exists in your organization, the response is still 200 with post set to null.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"post_123"},"required":true,"in":"path","name":"postId"}],"responses":{"200":{"description":"Post fetched successfully","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"post":{"type":["object","null"],"properties":{"id":{"type":"string"},"title":{"type":"string"},"slug":{"type":["string","null"]},"content":{"type":"string","description":"Rendered HTML for text posts. For image posts, this is the public CDN URL of the rendered image."},"htmlUrl":{"type":["string","null"],"description":"Public CDN URL of the generated HTML artifact for image posts. Null for non-image posts."},"markdown":{"type":["string","null"],"description":"Markdown source for text posts. Null for image posts."},"rawHtml":{"type":["string","null"],"description":"Legacy inline generated HTML for image posts. New generated image HTML is stored as htmlUrl. Null for non-image posts."},"recommendations":{"type":["string","null"]},"contentType":{"type":"string","enum":["changelog","linkedin_post","twitter_post","blog_post","investor_update","image"]},"sourceMetadata":{},"status":{"type":"string","enum":["draft","published"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","slug","content","htmlUrl","markdown","rawHtml","recommendations","contentType","status","createdAt","updatedAt"]}},"required":["organization","post"]}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Content"],"operationId":"deletePost","summary":"Delete a single post","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"post_123"},"required":true,"in":"path","name":"postId"}],"responses":{"200":{"description":"Post deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["id","organization"]}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Post not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Content"],"operationId":"updatePost","summary":"Update a single post","description":"Updates any combination of title, slug, markdown, and status. Sending markdown re-renders the stored HTML, and when title is omitted it is taken from the first heading in the markdown, keeping the existing title when the markdown has no heading. Slugs are only accepted for blog posts and changelogs.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"post_123"},"required":true,"in":"path","name":"postId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120,"example":"Ship notes for week 11"},"slug":{"type":["string","null"],"minLength":1,"maxLength":160,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","example":"ship-notes-week-11"},"markdown":{"type":"string","minLength":1,"maxLength":100000,"example":"# Ship notes\n\nWe shipped a faster editor."},"status":{"type":"string","enum":["draft","published"],"example":"published"}}}}}},"responses":{"200":{"description":"Post updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"post":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"slug":{"type":["string","null"]},"content":{"type":"string","description":"Rendered HTML for text posts. For image posts, this is the public CDN URL of the rendered image."},"htmlUrl":{"type":["string","null"],"description":"Public CDN URL of the generated HTML artifact for image posts. Null for non-image posts."},"markdown":{"type":["string","null"],"description":"Markdown source for text posts. Null for image posts."},"rawHtml":{"type":["string","null"],"description":"Legacy inline generated HTML for image posts. New generated image HTML is stored as htmlUrl. Null for non-image posts."},"recommendations":{"type":["string","null"]},"contentType":{"type":"string","enum":["changelog","linkedin_post","twitter_post","blog_post","investor_update","image"]},"sourceMetadata":{},"status":{"type":"string","enum":["draft","published"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","slug","content","htmlUrl","markdown","rawHtml","recommendations","contentType","status","createdAt","updatedAt"]}},"required":["organization","post"]}}}},"400":{"description":"Invalid path params or request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Post not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Post slug already exists or concurrent modification","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 60 requests per 1 minute per API key.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/posts/generate":{"post":{"tags":["Content"],"operationId":"createPostGeneration","summary":"Queue async post generation","description":"Queues a generation job for one content type and returns 202 with the job. Select sources with integrations.github, integrations.linear, or github.repositories; when no selector is given at all, every connected GitHub integration is used. Poll GET /v1/posts/generate/{jobId} until job.status is completed, failed, or skipped. Notra does not send webhooks when the job finishes.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contentType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"],"description":"Type of content to generate.","example":"blog_post"},"lookbackWindow":{"type":"string","enum":["current_day","yesterday","last_7_days","last_14_days","last_30_days"],"default":"last_7_days","description":"How far back to collect source activity (commits, pull requests, releases, Linear issues).","example":"last_7_days"},"brandVoiceId":{"type":"string","minLength":1,"description":"Deprecated. Use brandIdentityId instead.","example":"51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"},"brandIdentityId":{"type":["string","null"],"minLength":1,"description":"Brand identity to write in. Defaults to the organization's default brand identity.","example":"51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"},"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"example":["repo_1","repo_2"],"description":"Deprecated. Use integrations.github with GitHub integration IDs instead."},"linearIntegrationIds":{"type":"array","items":{"type":"string","minLength":1},"example":["linear_integration_1"],"description":"Deprecated. Use integrations.linear with Linear integration IDs instead."},"integrations":{"type":"object","properties":{"github":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"description":"GitHub integration IDs to use as sources, as returned by GET /v1/integrations.","example":["integration_1","integration_2"]},"linear":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"description":"Linear integration IDs to use as sources, as returned by GET /v1/integrations.","example":["linear_integration_1"]}},"description":"Source integrations to draw activity from. Omit this and github.repositories to use every connected GitHub integration."},"github":{"type":"object","properties":{"repositories":{"type":"array","items":{"type":"object","properties":{"owner":{"type":"string","minLength":1},"repo":{"type":"string","minLength":1}},"required":["owner","repo"]},"minItems":1}},"required":["repositories"],"description":"Select connected repositories by owner and name instead of integration ID. Cannot be combined with integrations.github.","example":{"repositories":[{"owner":"usenotra","repo":"notra"}]}},"dataPoints":{"type":"object","properties":{"includePullRequests":{"type":"boolean","default":true},"includeCommits":{"type":"boolean","default":true},"includeReleases":{"type":"boolean","default":true},"includeLinearData":{"type":"boolean","default":false}},"default":{"includePullRequests":true,"includeCommits":true,"includeReleases":true,"includeLinearData":false},"description":"Which kinds of activity to collect from the selected sources."},"selectedItems":{"type":"object","properties":{"commitShas":{"type":"array","items":{"type":"string"}},"pullRequestNumbers":{"type":"array","items":{"type":"object","properties":{"repositoryId":{"type":"string"},"number":{"type":"number"}},"required":["repositoryId","number"]}},"releaseTagNames":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"object","properties":{"repositoryId":{"type":"string"},"tagName":{"type":"string"}},"required":["repositoryId","tagName"]}]}},"linearIssueIds":{"type":"array","items":{"type":"object","properties":{"integrationId":{"type":"string"},"issueId":{"type":"string"}},"required":["integrationId","issueId"]}}},"description":"Restrict generation to specific commits, pull requests, releases, or Linear issues instead of everything in the lookback window."},"timezone":{"type":"string","minLength":1,"maxLength":100,"description":"IANA timezone used for relative lookback windows such as current_day and yesterday.","example":"America/New_York"}},"required":["contentType"]}}}},"responses":{"202":{"description":"Post generation queued successfully","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"job":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"status":{"type":"string","enum":["queued","running","completed","failed","skipped"],"description":"Job state. Terminal states are completed, failed, and skipped."},"contentType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"lookbackWindow":{"type":"string","enum":["current_day","yesterday","last_7_days","last_14_days","last_30_days"]},"repositoryIds":{"type":"array","items":{"type":"string"}},"brandVoiceId":{"type":["string","null"]},"workflowRunId":{"type":["string","null"]},"postId":{"type":["string","null"],"description":"ID of the generated post. Set once the job reaches completed."},"error":{"type":["string","null"],"description":"Failure reason when status is failed."},"source":{"type":"string","enum":["api","dashboard"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","organizationId","status","contentType","lookbackWindow","repositoryIds","brandVoiceId","workflowRunId","postId","error","source","createdAt","updatedAt","completedAt"]}},"required":["organization","job"]}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 10 requests per 1 minute per API key.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"503":{"description":"Content generation is unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"jobId":{"type":"string"}},"required":["error"]}}}}}}},"/v1/posts/generate/{jobId}":{"get":{"tags":["Content"],"operationId":"getPostGeneration","summary":"Get async post generation status","description":"Returns the job and its event log. job.status moves from queued to running and ends as completed, failed, or skipped. job.postId is set once the post has been created; fetch it with GET /v1/posts/{postId}.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","description":"Job ID returned by POST /v1/posts/generate.","example":"job_5f0c3b2a9d4e4c1f8a7b6c5d4e3f2a1b"},"required":true,"description":"Job ID returned by POST /v1/posts/generate.","in":"path","name":"jobId"}],"responses":{"200":{"description":"Post generation status fetched successfully","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"status":{"type":"string","enum":["queued","running","completed","failed","skipped"],"description":"Job state. Terminal states are completed, failed, and skipped."},"contentType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"lookbackWindow":{"type":"string","enum":["current_day","yesterday","last_7_days","last_14_days","last_30_days"]},"repositoryIds":{"type":"array","items":{"type":"string"}},"brandVoiceId":{"type":["string","null"]},"workflowRunId":{"type":["string","null"]},"postId":{"type":["string","null"],"description":"ID of the generated post. Set once the job reaches completed."},"error":{"type":["string","null"],"description":"Failure reason when status is failed."},"source":{"type":"string","enum":["api","dashboard"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","organizationId","status","contentType","lookbackWindow","repositoryIds","brandVoiceId","workflowRunId","postId","error","source","createdAt","updatedAt","completedAt"]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"type":{"type":"string","enum":["queued","workflow_triggered","running","fetching_repositories","generating_content","post_created","completed","failed","skipped"]},"message":{"type":"string"},"createdAt":{"type":"string"},"metadata":{"type":["object","null"],"additionalProperties":{}}},"required":["id","jobId","type","message","createdAt","metadata"]}}},"required":["job","events"]}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Generation job not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Content generation is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/brand-identities":{"get":{"tags":["Content"],"operationId":"listBrandIdentities","summary":"List available brand identities","description":"Returns every brand identity in the organization, default identity first.","responses":{"200":{"description":"Brand identities fetched successfully","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"brandIdentities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isDefault":{"type":"boolean"},"websiteUrl":{"type":"string"},"companyName":{"type":["string","null"]},"companyDescription":{"type":["string","null"]},"toneProfile":{"type":["string","null"]},"customTone":{"type":["string","null"]},"customInstructions":{"type":["string","null"]},"audience":{"type":["string","null"]},"language":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","isDefault","websiteUrl","companyName","companyDescription","toneProfile","customTone","customInstructions","audience","language","createdAt","updatedAt"]}}},"required":["organization","brandIdentities"]}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/brand-identities/generate":{"post":{"tags":["Content"],"operationId":"createBrandIdentity","summary":"Queue async brand identity generation","description":"Creates the brand identity immediately, then queues a website analysis that fills in company details, tone, and audience. The first brand identity in an organization becomes the default. Poll GET /v1/brand-identities/generate/{jobId} until job.status is completed or failed.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"Display name. Must be unique within the organization. Defaults to \"Untitled Brand Voice\".","example":"Notra"},"websiteUrl":{"type":"string","minLength":1,"description":"Public website to analyze for company details, tone, and audience. The scheme is optional; https is assumed.","example":"https://usenotra.com"}},"required":["websiteUrl"]}}}},"responses":{"202":{"description":"Brand identity generation queued successfully","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"job":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"brandIdentityId":{"type":"string","description":"ID of the brand identity being analyzed. The identity is created immediately and its details are filled in as the job completes."},"status":{"type":"string","enum":["queued","running","completed","failed"],"description":"Job state. Stop polling once it is completed or failed."},"step":{"type":["string","null"],"enum":["scraping","extracting","saving",null],"description":"Current analysis step while the job is running."},"currentStep":{"type":"integer","minimum":0},"totalSteps":{"type":"integer","minimum":1},"workflowRunId":{"type":["string","null"]},"error":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","organizationId","brandIdentityId","status","step","currentStep","totalSteps","workflowRunId","error","createdAt","updatedAt","completedAt"]}},"required":["organization","job"]}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Brand identity name already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 5 requests per 1 minute per API key.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"503":{"description":"Authentication service or brand analysis unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/brand-identities/generate/{jobId}":{"get":{"tags":["Content"],"operationId":"getBrandIdentityGeneration","summary":"Get async brand identity generation status","description":"Returns the analysis job. job.status moves from queued to running and ends as completed or failed; job.step shows the current stage while running. Fetch the finished identity with GET /v1/brand-identities/{brandIdentityId}.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","description":"Job ID returned by POST /v1/brand-identities/generate.","example":"brand_job_5f0c3b2a9d4e4c1f8a7b6c5d4e3f2a1b"},"required":true,"description":"Job ID returned by POST /v1/brand-identities/generate.","in":"path","name":"jobId"}],"responses":{"200":{"description":"Brand identity generation status fetched successfully","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"job":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"brandIdentityId":{"type":"string","description":"ID of the brand identity being analyzed. The identity is created immediately and its details are filled in as the job completes."},"status":{"type":"string","enum":["queued","running","completed","failed"],"description":"Job state. Stop polling once it is completed or failed."},"step":{"type":["string","null"],"enum":["scraping","extracting","saving",null],"description":"Current analysis step while the job is running."},"currentStep":{"type":"integer","minimum":0},"totalSteps":{"type":"integer","minimum":1},"workflowRunId":{"type":["string","null"]},"error":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","organizationId","brandIdentityId","status","step","currentStep","totalSteps","workflowRunId","error","createdAt","updatedAt","completedAt"]}},"required":["organization","job"]}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Brand identity analysis job not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Brand analysis is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/brand-identities/{brandIdentityId}":{"get":{"tags":["Content"],"operationId":"getBrandIdentity","summary":"Get a single brand identity","description":"Returns the brand identity. When no brand identity with this ID exists in your organization, the response is still 200 with brandIdentity set to null.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"},"required":true,"in":"path","name":"brandIdentityId"}],"responses":{"200":{"description":"Brand identity fetched successfully","content":{"application/json":{"schema":{"type":"object","properties":{"brandIdentity":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"isDefault":{"type":"boolean"},"websiteUrl":{"type":"string"},"companyName":{"type":["string","null"]},"companyDescription":{"type":["string","null"]},"toneProfile":{"type":["string","null"]},"customTone":{"type":["string","null"]},"customInstructions":{"type":["string","null"]},"audience":{"type":["string","null"]},"language":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","isDefault","websiteUrl","companyName","companyDescription","toneProfile","customTone","customInstructions","audience","language","createdAt","updatedAt"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["brandIdentity","organization"]}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Content"],"operationId":"updateBrandIdentity","summary":"Update a single brand identity","description":"Updates brand identity fields. Pass isDefault: true to make the target brand identity the organization's default.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"},"required":true,"in":"path","name":"brandIdentityId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"example":"Notra"},"websiteUrl":{"type":"string","minLength":1,"example":"https://usenotra.com"},"companyName":{"type":["string","null"],"minLength":1,"maxLength":200,"example":"Notra"},"companyDescription":{"type":["string","null"],"minLength":10,"maxLength":4000,"example":"AI-native content workflows for software teams."},"toneProfile":{"type":["string","null"],"enum":["Conversational","Professional","Casual","Formal",null],"example":"Professional","description":"Set a preset tone profile. When provided without customTone, any saved custom tone is cleared."},"customTone":{"type":["string","null"],"maxLength":1000,"example":"Clear, direct, and technically confident","description":"Provide a custom tone override. Send an empty string or null to clear it."},"customInstructions":{"type":["string","null"],"maxLength":4000,"example":"Avoid hype. Prioritize concrete examples."},"audience":{"type":["string","null"],"minLength":10,"maxLength":1000,"example":"Engineering leaders and developer tooling teams."},"language":{"type":["string","null"],"enum":["English","Spanish","French","German","Portuguese","Dutch","Italian","Japanese","Korean","Chinese","Arabic","Hindi","Russian","Turkish","Polish","Swedish","Danish","Norwegian","Finnish","Czech","Romanian","Hungarian","Greek","Thai","Vietnamese","Indonesian","Ukrainian","Hebrew",null],"example":"English"},"isDefault":{"type":"boolean","enum":[true],"example":true,"description":"Set this brand identity as the organization's default. Only true is accepted."}}},"examples":{"setDefault":{"summary":"Set as default","value":{"isDefault":true}},"updateAndSetDefault":{"summary":"Rename and set as default","value":{"name":"Notra Marketing","isDefault":true}},"switchToPresetTone":{"summary":"Switch custom tone to preset","value":{"toneProfile":"Professional"}},"setCustomTone":{"summary":"Set custom tone","value":{"customTone":"Warm, sharp, and opinionated"}}}}}},"responses":{"200":{"description":"Brand identity updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"brandIdentity":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isDefault":{"type":"boolean"},"websiteUrl":{"type":"string"},"companyName":{"type":["string","null"]},"companyDescription":{"type":["string","null"]},"toneProfile":{"type":["string","null"]},"customTone":{"type":["string","null"]},"customInstructions":{"type":["string","null"]},"audience":{"type":["string","null"]},"language":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","isDefault","websiteUrl","companyName","companyDescription","toneProfile","customTone","customInstructions","audience","language","createdAt","updatedAt"]}},"required":["organization","brandIdentity"]}}}},"400":{"description":"Invalid path params or request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Brand identity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Brand identity name already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Content"],"operationId":"deleteBrandIdentity","summary":"Delete a single brand identity","description":"Deletes a non-default brand identity and disables any automation triggers that reference it.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"},"required":true,"in":"path","name":"brandIdentityId"}],"responses":{"200":{"description":"Brand identity deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"disabledSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"disabledEvents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}}},"required":["id","organization","disabledSchedules","disabledEvents"]}}}},"400":{"description":"Cannot delete the default brand identity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Brand identity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Brand identity is in use by a project or content brief","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/integrations":{"get":{"tags":["Content"],"operationId":"listIntegrations","summary":"List available integrations","description":"Returns the enabled GitHub and Linear integrations for the organization. The slack array is always empty.","responses":{"200":{"description":"Integrations fetched successfully","content":{"application/json":{"schema":{"type":"object","properties":{"github":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":"string"},"owner":{"type":["string","null"]},"repo":{"type":["string","null"]},"defaultBranch":{"type":["string","null"]}},"required":["id","displayName","owner","repo","defaultBranch"]},"description":"Enabled GitHub integrations. One entry per connected repository."},"slack":{"type":"array","items":{},"description":"Always empty. Slack is connected from the dashboard and is not exposed through the API."},"linear":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":"string"},"linearOrganizationId":{"type":"string"},"linearOrganizationName":{"type":["string","null"]},"linearTeamId":{"type":["string","null"]},"linearTeamName":{"type":["string","null"]}},"required":["id","displayName","linearOrganizationId","linearOrganizationName","linearTeamId","linearTeamName"]},"description":"Enabled Linear integrations."},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["github","slack","linear","organization"]}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/integrations/github":{"post":{"tags":["Content"],"operationId":"createGitHubIntegration","summary":"Create a GitHub integration","description":"Checks that the repository can be read (a personal access token is required for private repositories), connects it, and enables changelog generation for it; blog post and X post outputs start disabled. A webhook secret is generated on creation. Copy the payload URL and secret from the dashboard to receive push and release events.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"owner":{"type":"string","minLength":1,"description":"GitHub user or organization that owns the repository.","example":"usenotra"},"repo":{"type":"string","minLength":1,"description":"Repository name without the owner.","example":"notra"},"branch":{"type":["string","null"],"minLength":1,"description":"Branch to read activity from. Defaults to the repository's default branch.","example":"main"},"token":{"type":["string","null"],"minLength":1,"description":"GitHub personal access token with read access to the repository. Required for private repositories; public repositories work without one.","example":"github_pat_11ABCDEFG..."}},"required":["owner","repo"]}}}},"responses":{"201":{"description":"GitHub integration created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"github":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":"string"},"owner":{"type":["string","null"]},"repo":{"type":["string","null"]},"defaultBranch":{"type":["string","null"]}},"required":["id","displayName","owner","repo","defaultBranch"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["github","organization"]}}}},"400":{"description":"Invalid request body or GitHub repository access error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Repository already connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 20 requests per 1 minute per API key.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"503":{"description":"Authentication or integration service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/integrations/{integrationId}":{"delete":{"tags":["Content"],"operationId":"deleteIntegration","summary":"Delete a single integration","description":"Deletes a GitHub or Linear integration. Schedules and event triggers that target the integration are disabled and listed in the response.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"},"required":true,"in":"path","name":"integrationId"}],"responses":{"200":{"description":"Integration deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"disabledSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"disabledEvents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}}},"required":["id","organization","disabledSchedules","disabledEvents"]}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Integration not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/schedules":{"get":{"tags":["Schedules"],"operationId":"listSchedules","summary":"List schedules","description":"Returns the organization's cron schedules, newest first. repositoryMap maps each targeted GitHub integration ID to an owner/repo label.","parameters":[{"schema":{"type":"string","description":"Filter by GitHub integration IDs using a comma-separated list. Only schedules targeting at least one of them are returned.","example":"51c2f3aa-efdd-4e28-8e69-23fa2dfd3561,7f9a2b3c-1d4e-4f5a-9b6c-8d7e6f5a4b3c"},"required":false,"description":"Filter by GitHub integration IDs using a comma-separated list. Only schedules targeting at least one of them are returned.","name":"repositoryIds","in":"query"}],"responses":{"200":{"description":"Schedules fetched successfully","content":{"application/json":{"schema":{"type":"object","properties":{"schedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"sourceType":{"type":"string","enum":["cron"]},"sourceConfig":{"type":"object","properties":{"cron":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly","custom"],"description":"How often the schedule runs.","example":"weekly"},"hour":{"type":"integer","minimum":0,"maximum":23,"description":"Hour of the day to run, in UTC (0-23).","example":9},"minute":{"type":"integer","minimum":0,"maximum":59,"description":"Minute of the hour to run (0-59).","example":0},"dayOfWeek":{"type":"integer","minimum":0,"maximum":6,"description":"Day of the week for weekly schedules, 0 (Sunday) to 6 (Saturday). Required when frequency is weekly.","example":1},"dayOfMonth":{"type":"integer","minimum":1,"maximum":31,"description":"Day of the month for monthly schedules (1-31). Required when frequency is monthly.","example":1},"intervalDays":{"type":"integer","minimum":2,"maximum":90,"description":"Run every N days (2-90). Required when frequency is custom.","example":3},"anchorDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"UTC calendar date (YYYY-MM-DD) a custom interval counts from. Defaults to today.","example":"2026-09-03"}},"required":["frequency","hour","minute"]}},"required":["cron"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"description":"GitHub integration IDs to generate from, as returned by GET /v1/integrations.","example":["51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"]}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"outputConfig":{"type":["object","null"],"properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"],"description":"Where auto-published posts are sent."},"brandVoiceId":{"type":"string","minLength":1,"description":"Brand identity ID to write in. Defaults to the organization's default brand identity.","example":"51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"},"instructions":{"type":"string","minLength":1,"maxLength":2000,"description":"Free-text brief for this schedule, passed to the writer on every run on top of the brand's custom instructions. Use it to steer the angle of the content, for example tutorial-style blog posts.","example":"Write a tutorial-style post that walks through one feature shipped in this window, with code samples."}}},"enabled":{"type":"boolean"},"autoPublish":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lookbackWindow":{"type":"string","enum":["current_day","yesterday","last_7_days","last_14_days","last_30_days"]}},"required":["id","organizationId","name","sourceType","sourceConfig","targets","outputType","enabled","autoPublish","createdAt","updatedAt","lookbackWindow"]}},"repositoryMap":{"type":"object","additionalProperties":{"type":"string"}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["schedules","repositoryMap","organization"]}}}},"400":{"description":"Invalid query params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to list schedules","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Schedules"],"operationId":"createSchedule","summary":"Create a schedule","description":"Creates a recurring schedule that generates one content type from the selected GitHub integrations. Times are in UTC. A schedule with the same source, targets, output, and lookback settings as an existing one is rejected with 409.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"Display name shown in the dashboard.","example":"Weekly changelog"},"sourceType":{"type":"string","enum":["cron"],"description":"Always cron for schedules."},"sourceConfig":{"type":"object","properties":{"cron":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly","custom"],"description":"How often the schedule runs.","example":"weekly"},"hour":{"type":"integer","minimum":0,"maximum":23,"description":"Hour of the day to run, in UTC (0-23).","example":9},"minute":{"type":"integer","minimum":0,"maximum":59,"description":"Minute of the hour to run (0-59).","example":0},"dayOfWeek":{"type":"integer","minimum":0,"maximum":6,"description":"Day of the week for weekly schedules, 0 (Sunday) to 6 (Saturday). Required when frequency is weekly.","example":1},"dayOfMonth":{"type":"integer","minimum":1,"maximum":31,"description":"Day of the month for monthly schedules (1-31). Required when frequency is monthly.","example":1},"intervalDays":{"type":"integer","minimum":2,"maximum":90,"description":"Run every N days (2-90). Required when frequency is custom.","example":3},"anchorDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"UTC calendar date (YYYY-MM-DD) a custom interval counts from. Defaults to today.","example":"2026-09-03"}},"required":["frequency","hour","minute"]}},"required":["cron"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"description":"GitHub integration IDs to generate from, as returned by GET /v1/integrations.","example":["51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"]}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"],"description":"Type of content each run generates.","example":"changelog"},"outputConfig":{"type":"object","properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"],"description":"Where auto-published posts are sent."},"brandVoiceId":{"type":"string","minLength":1,"description":"Brand identity ID to write in. Defaults to the organization's default brand identity.","example":"51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"},"instructions":{"type":"string","minLength":1,"maxLength":2000,"description":"Free-text brief for this schedule, passed to the writer on every run on top of the brand's custom instructions. Use it to steer the angle of the content, for example tutorial-style blog posts.","example":"Write a tutorial-style post that walks through one feature shipped in this window, with code samples."}}},"enabled":{"type":"boolean","description":"Whether the schedule runs. Disabled schedules are stored but never fire.","example":true},"autoPublish":{"type":"boolean","default":false,"description":"Publish generated posts automatically instead of saving them as drafts.","example":false},"lookbackWindow":{"type":"string","enum":["current_day","yesterday","last_7_days","last_14_days","last_30_days"],"default":"last_7_days","description":"How far back each run collects source activity.","example":"last_7_days"}},"required":["name","sourceType","sourceConfig","targets","outputType","enabled"]}}}},"responses":{"201":{"description":"Schedule created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"schedule":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"sourceType":{"type":"string","enum":["cron"]},"sourceConfig":{"type":"object","properties":{"cron":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly","custom"],"description":"How often the schedule runs.","example":"weekly"},"hour":{"type":"integer","minimum":0,"maximum":23,"description":"Hour of the day to run, in UTC (0-23).","example":9},"minute":{"type":"integer","minimum":0,"maximum":59,"description":"Minute of the hour to run (0-59).","example":0},"dayOfWeek":{"type":"integer","minimum":0,"maximum":6,"description":"Day of the week for weekly schedules, 0 (Sunday) to 6 (Saturday). Required when frequency is weekly.","example":1},"dayOfMonth":{"type":"integer","minimum":1,"maximum":31,"description":"Day of the month for monthly schedules (1-31). Required when frequency is monthly.","example":1},"intervalDays":{"type":"integer","minimum":2,"maximum":90,"description":"Run every N days (2-90). Required when frequency is custom.","example":3},"anchorDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"UTC calendar date (YYYY-MM-DD) a custom interval counts from. Defaults to today.","example":"2026-09-03"}},"required":["frequency","hour","minute"]}},"required":["cron"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"description":"GitHub integration IDs to generate from, as returned by GET /v1/integrations.","example":["51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"]}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"outputConfig":{"type":["object","null"],"properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"],"description":"Where auto-published posts are sent."},"brandVoiceId":{"type":"string","minLength":1,"description":"Brand identity ID to write in. Defaults to the organization's default brand identity.","example":"51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"},"instructions":{"type":"string","minLength":1,"maxLength":2000,"description":"Free-text brief for this schedule, passed to the writer on every run on top of the brand's custom instructions. Use it to steer the angle of the content, for example tutorial-style blog posts.","example":"Write a tutorial-style post that walks through one feature shipped in this window, with code samples."}}},"enabled":{"type":"boolean"},"autoPublish":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lookbackWindow":{"type":"string","enum":["current_day","yesterday","last_7_days","last_14_days","last_30_days"]}},"required":["id","organizationId","name","sourceType","sourceConfig","targets","outputType","enabled","autoPublish","createdAt","updatedAt","lookbackWindow"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["schedule","organization"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Duplicate schedule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to create schedule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/schedules/{scheduleId}":{"patch":{"tags":["Schedules"],"operationId":"updateSchedule","summary":"Update a schedule","description":"Replaces the schedule. Send the full schedule body; fields that are omitted are not preserved from the existing schedule.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"sched_123"},"required":true,"in":"path","name":"scheduleId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchScheduleRequest"}}}},"responses":{"200":{"description":"Schedule updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"schedule":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"sourceType":{"type":"string","enum":["cron"]},"sourceConfig":{"type":"object","properties":{"cron":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly","custom"],"description":"How often the schedule runs.","example":"weekly"},"hour":{"type":"integer","minimum":0,"maximum":23,"description":"Hour of the day to run, in UTC (0-23).","example":9},"minute":{"type":"integer","minimum":0,"maximum":59,"description":"Minute of the hour to run (0-59).","example":0},"dayOfWeek":{"type":"integer","minimum":0,"maximum":6,"description":"Day of the week for weekly schedules, 0 (Sunday) to 6 (Saturday). Required when frequency is weekly.","example":1},"dayOfMonth":{"type":"integer","minimum":1,"maximum":31,"description":"Day of the month for monthly schedules (1-31). Required when frequency is monthly.","example":1},"intervalDays":{"type":"integer","minimum":2,"maximum":90,"description":"Run every N days (2-90). Required when frequency is custom.","example":3},"anchorDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"UTC calendar date (YYYY-MM-DD) a custom interval counts from. Defaults to today.","example":"2026-09-03"}},"required":["frequency","hour","minute"]}},"required":["cron"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"description":"GitHub integration IDs to generate from, as returned by GET /v1/integrations.","example":["51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"]}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"outputConfig":{"type":["object","null"],"properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"],"description":"Where auto-published posts are sent."},"brandVoiceId":{"type":"string","minLength":1,"description":"Brand identity ID to write in. Defaults to the organization's default brand identity.","example":"51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"},"instructions":{"type":"string","minLength":1,"maxLength":2000,"description":"Free-text brief for this schedule, passed to the writer on every run on top of the brand's custom instructions. Use it to steer the angle of the content, for example tutorial-style blog posts.","example":"Write a tutorial-style post that walks through one feature shipped in this window, with code samples."}}},"enabled":{"type":"boolean"},"autoPublish":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lookbackWindow":{"type":"string","enum":["current_day","yesterday","last_7_days","last_14_days","last_30_days"]}},"required":["id","organizationId","name","sourceType","sourceConfig","targets","outputType","enabled","autoPublish","createdAt","updatedAt","lookbackWindow"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["schedule","organization"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Schedule or organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Duplicate schedule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to update schedule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Schedules"],"operationId":"deleteSchedule","summary":"Delete a schedule","description":"Deletes the schedule and stops future runs. Posts generated by earlier runs are kept.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"sched_123"},"required":true,"in":"path","name":"scheduleId"}],"responses":{"200":{"description":"Schedule deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["id","organization"]}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Schedule or organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to delete schedule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/event-triggers":{"get":{"tags":["Event Triggers"],"operationId":"listEventTriggers","summary":"List event triggers","parameters":[{"schema":{"type":"string","description":"Filter by repository IDs using a comma-separated list","example":"repo_123,repo_456"},"required":false,"description":"Filter by repository IDs using a comma-separated list","name":"repositoryIds","in":"query"}],"responses":{"200":{"description":"Event triggers fetched successfully","content":{"application/json":{"schema":{"type":"object","properties":{"eventTriggers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"sourceType":{"type":"string","enum":["github_webhook"]},"sourceConfig":{"type":"object","properties":{"eventTypes":{"type":"array","items":{"type":"string","enum":["release","push"]},"minItems":1},"includePreReleases":{"type":"boolean","default":true},"ignoreCommitPatterns":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"maxItems":10,"default":[]}},"required":["eventTypes"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"outputConfig":{"type":["object","null"],"properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"]},"brandVoiceId":{"type":"string","minLength":1}}},"enabled":{"type":"boolean"},"autoPublish":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","name","sourceType","sourceConfig","targets","outputType","enabled","autoPublish","createdAt","updatedAt"]}},"repositoryMap":{"type":"object","additionalProperties":{"type":"string"}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["eventTriggers","repositoryMap","organization"]}}}},"400":{"description":"Invalid query params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to list event triggers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Event Triggers"],"operationId":"createEventTrigger","summary":"Create an event trigger","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sourceType":{"type":"string","enum":["github_webhook"]},"sourceConfig":{"type":"object","properties":{"eventTypes":{"type":"array","items":{"type":"string","enum":["release","push"]},"minItems":1},"includePreReleases":{"type":"boolean","default":true},"ignoreCommitPatterns":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"maxItems":10,"default":[]}},"required":["eventTypes"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"outputConfig":{"type":"object","properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"]},"brandVoiceId":{"type":"string","minLength":1}}},"enabled":{"type":"boolean"},"autoPublish":{"type":"boolean","default":false}},"required":["sourceType","sourceConfig","targets","outputType","enabled"]}}}},"responses":{"201":{"description":"Event trigger created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"eventTrigger":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"sourceType":{"type":"string","enum":["github_webhook"]},"sourceConfig":{"type":"object","properties":{"eventTypes":{"type":"array","items":{"type":"string","enum":["release","push"]},"minItems":1},"includePreReleases":{"type":"boolean","default":true},"ignoreCommitPatterns":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"maxItems":10,"default":[]}},"required":["eventTypes"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"outputConfig":{"type":["object","null"],"properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"]},"brandVoiceId":{"type":"string","minLength":1}}},"enabled":{"type":"boolean"},"autoPublish":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","name","sourceType","sourceConfig","targets","outputType","enabled","autoPublish","createdAt","updatedAt"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["eventTrigger","organization"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Duplicate event trigger","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to create event trigger","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/event-triggers/{triggerId}":{"get":{"tags":["Event Triggers"],"operationId":"getEventTrigger","summary":"Get an event trigger","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"trig_123"},"required":true,"in":"path","name":"triggerId"}],"responses":{"200":{"description":"Event trigger fetched successfully","content":{"application/json":{"schema":{"type":"object","properties":{"eventTrigger":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"sourceType":{"type":"string","enum":["github_webhook"]},"sourceConfig":{"type":"object","properties":{"eventTypes":{"type":"array","items":{"type":"string","enum":["release","push"]},"minItems":1},"includePreReleases":{"type":"boolean","default":true},"ignoreCommitPatterns":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"maxItems":10,"default":[]}},"required":["eventTypes"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"outputConfig":{"type":["object","null"],"properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"]},"brandVoiceId":{"type":"string","minLength":1}}},"enabled":{"type":"boolean"},"autoPublish":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","name","sourceType","sourceConfig","targets","outputType","enabled","autoPublish","createdAt","updatedAt"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["eventTrigger","organization"]}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Event trigger or organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to fetch event trigger","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Event Triggers"],"operationId":"updateEventTrigger","summary":"Update an event trigger","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"trig_123"},"required":true,"in":"path","name":"triggerId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchEventTriggerRequest"}}}},"responses":{"200":{"description":"Event trigger updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"eventTrigger":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"sourceType":{"type":"string","enum":["github_webhook"]},"sourceConfig":{"type":"object","properties":{"eventTypes":{"type":"array","items":{"type":"string","enum":["release","push"]},"minItems":1},"includePreReleases":{"type":"boolean","default":true},"ignoreCommitPatterns":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"maxItems":10,"default":[]}},"required":["eventTypes"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"outputConfig":{"type":["object","null"],"properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"]},"brandVoiceId":{"type":"string","minLength":1}}},"enabled":{"type":"boolean"},"autoPublish":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","name","sourceType","sourceConfig","targets","outputType","enabled","autoPublish","createdAt","updatedAt"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["eventTrigger","organization"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Event trigger or organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Duplicate event trigger","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to update event trigger","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Event Triggers"],"operationId":"deleteEventTrigger","summary":"Delete an event trigger","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"trig_123"},"required":true,"in":"path","name":"triggerId"}],"responses":{"200":{"description":"Event trigger deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["id","organization"]}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Event trigger or organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to delete event trigger","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/chats":{"get":{"tags":["Chats"],"operationId":"listChats","summary":"List chats","description":"Returns the organization's chat sessions without their messages. Use GET /v1/chats/{chatId} to load a conversation.","responses":{"200":{"description":"Chats fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetChatsResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Chats"],"operationId":"createChat","summary":"Start a new chat and stream the reply","description":"Creates a chat session, sends the first message, and streams the assistant reply. Read the X-Chat-Id response header to continue the conversation with POST /v1/chats/{chatId}.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendChatMessageRequest"}}}},"responses":{"200":{"description":"Streaming UI message stream (newline-delimited JSON chunks). Read the `X-Chat-Id` response header for the chat id, or take it from the `start` chunk's `messageMetadata.chatId`.","content":{"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden, or usage limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Chat not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 30 requests per 1 minute per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"500":{"description":"Failed to process chat request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/chats/by-external":{"get":{"tags":["Chats"],"operationId":"getChatByExternalChannel","summary":"Get a chat by external channel id","description":"Looks up the chat session linked to a Discord or Slack channel. Link a chat by passing externalChannelId when you create it.","parameters":[{"schema":{"type":"string","enum":["discord","slack"],"description":"Messaging platform the channel belongs to.","example":"discord"},"required":true,"description":"Messaging platform the channel belongs to.","name":"source","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Channel ID on that platform.","example":"channel_123"},"required":true,"description":"Channel ID on that platform.","name":"id","in":"query"}],"responses":{"200":{"description":"Chat fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSessionSummary"}}}},"400":{"description":"Invalid query params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Chat not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/chats/{chatId}":{"get":{"tags":["Chats"],"operationId":"getChat","summary":"Get a single chat with messages","description":"Returns the chat session and its full message history in UI message format.","parameters":[{"schema":{"type":"string","minLength":1,"example":"chat_abc123"},"required":true,"name":"chatId","in":"path"}],"responses":{"200":{"description":"Chat fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetChatResponse"}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Chat not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Chats"],"operationId":"postChatMessage","summary":"Post a message to an existing chat and stream the reply","description":"Appends a user message to the chat and streams the assistant reply. Earlier messages in the chat are included as context automatically.","parameters":[{"schema":{"type":"string","minLength":1,"example":"chat_abc123"},"required":true,"name":"chatId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendChatMessageRequest"}}}},"responses":{"200":{"description":"Streaming UI message stream (newline-delimited JSON chunks). Read the `X-Chat-Id` response header for the chat id, or take it from the `start` chunk's `messageMetadata.chatId`.","content":{"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden, or usage limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Chat not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 30 requests per 1 minute per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"500":{"description":"Failed to process chat request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/skills":{"get":{"tags":["Skills"],"operationId":"listSkills","summary":"List skills","description":"Returns the organization's skills sorted by name, including built-in system skills (isSystem: true). Skill content is omitted; use GET /v1/skills/{name} to read it.","responses":{"200":{"description":"Skills fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSkillsResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Skills"],"operationId":"createSkill","summary":"Create a skill","description":"Creates a custom skill. Names must be unique within the organization.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSkillRequest"}}}},"responses":{"201":{"description":"Skill created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSkillResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Skill name already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/skills/{name}":{"get":{"tags":["Skills"],"operationId":"getSkill","summary":"Get a single skill","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","description":"Skill name. Lowercase letters, digits, and hyphens only.","example":"humanizer"},"required":true,"description":"Skill name. Lowercase letters, digits, and hyphens only.","name":"name","in":"path"}],"responses":{"200":{"description":"Skill fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillResponse"}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Skill not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Skills"],"operationId":"patchSkill","summary":"Update a skill","description":"Updates the name, description, or content of a skill. System skills can be edited but not renamed.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","description":"Skill name. Lowercase letters, digits, and hyphens only.","example":"humanizer"},"required":true,"description":"Skill name. Lowercase letters, digits, and hyphens only.","name":"name","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchSkillRequest"}}}},"responses":{"200":{"description":"Skill updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchSkillResponse"}}}},"400":{"description":"Invalid path params or request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden, or attempt to rename a system skill","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Skill not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Skill name already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Skills"],"operationId":"deleteSkill","summary":"Delete a skill","description":"Deletes a custom skill. System skills cannot be deleted.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","description":"Skill name. Lowercase letters, digits, and hyphens only.","example":"humanizer"},"required":true,"description":"Skill name. Lowercase letters, digits, and hyphens only.","name":"name","in":"path"}],"responses":{"200":{"description":"Skill deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteSkillResponse"}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden, or attempt to delete a system skill","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Skill not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/me/workspaces":{"get":{"tags":["Discovery"],"operationId":"getWorkspaces","summary":"Get authenticated workspace context","description":"Returns the current workspace and authentication details. OAuth users also receive their accepted memberships and can opt into pending invitations; organization API keys only receive their current workspace. Discovery does not change the workspace bound to the bearer token.","parameters":[{"schema":{"type":"string","enum":["true"]},"required":false,"name":"includePending","in":"query"}],"responses":{"200":{"description":"Workspace context fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWorkspacesResponse"}}}},"400":{"description":"Invalid query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Bearer token is not scoped to an organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Current workspace not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/feedback/{organizationSlug}":{"post":{"tags":["Feedback"],"operationId":"submitOrganizationFeedback","summary":"Submit feedback to an organization's feedback URL","description":"Record feedback from an AI agent or integration by posting to the organization's feedback URL, as shown on the Feedback page in the dashboard. No credentials are required. Limited per source IP and per organization.","security":[],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":63,"pattern":"^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i","description":"Your organization slug, as shown in your feedback URL on the Feedback page.","example":"acme"},"required":true,"description":"Your organization slug, as shown in your feedback URL on the Feedback page.","in":"path","name":"organizationSlug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitFeedbackRequest"}}}},"responses":{"202":{"description":"Feedback accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitFeedbackResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Feedback endpoint not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 30 requests per 10 minutes per IP address, plus 200 requests per hour per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}}}}},"/v1/feedback":{"post":{"tags":["Feedback"],"operationId":"submitFeedback","summary":"Submit feedback with an API key","description":"Record feedback for the organization that owns the credential. Requires an API key with the feedback.write scope. Agents and MCP servers should post to the organization's feedback URL instead.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitFeedbackRequest"}}}},"responses":{"202":{"description":"Feedback accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitFeedbackResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 120 requests per 1 minute per API key.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["Feedback"],"operationId":"listFeedback","summary":"List feedback","parameters":[{"schema":{"type":"string","enum":["new","triaged","resolved","archived"],"description":"Triage status.","example":"new"},"required":false,"description":"Triage status.","name":"status","in":"query"},{"schema":{"type":"string","enum":["bug","feature","praise","question","other"],"description":"What kind of feedback this is.","example":"bug"},"required":false,"description":"What kind of feedback this is.","name":"kind","in":"query"},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$"},"required":false,"name":"projectId","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Items per page","example":25},"required":false,"description":"Items per page","name":"limit","in":"query"},{"schema":{"type":"integer","minimum":1,"default":1,"description":"Page number","example":1},"required":false,"description":"Page number","name":"page","in":"query"}],"responses":{"200":{"description":"Feedback fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListFeedbackResponse"}}}},"400":{"description":"Invalid query params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/feedback/{feedbackId}":{"get":{"tags":["Feedback"],"operationId":"getFeedback","summary":"Get a single feedback entry","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"fb_123"},"required":true,"in":"path","name":"feedbackId"}],"responses":{"200":{"description":"Feedback fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackResponse"}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Feedback not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Feedback"],"operationId":"updateFeedback","summary":"Update feedback status","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"fb_123"},"required":true,"in":"path","name":"feedbackId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFeedbackRequest"}}}},"responses":{"200":{"description":"Feedback updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackResponse"}}}},"400":{"description":"Invalid path params or request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Feedback not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects":{"get":{"tags":["GEO"],"operationId":"listProjects","summary":"List GEO projects","responses":{"200":{"description":"Projects fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListGeoProjectsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["GEO"],"operationId":"createProject","summary":"Create a GEO project","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGeoProjectRequest"}}}},"responses":{"201":{"description":"Project created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoProjectResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}":{"get":{"tags":["GEO"],"operationId":"getProject","summary":"Get a single GEO project","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"Project fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoProjectResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["GEO"],"operationId":"updateProject","summary":"Rename a GEO project or relink its brand identity","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchGeoProjectRequest"}}}},"responses":{"200":{"description":"Project updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoProjectResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["GEO"],"operationId":"deleteProject","summary":"Delete a GEO project and all of its GEO data","description":"Cascades to the project's GEO settings, prompts, sequences, competitors, scans, checks and reports, and cancels any pending scheduled scan. Agent feedback is kept but detached. The organization's last project cannot be deleted.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"Project deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteGeoProjectResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/settings":{"get":{"tags":["GEO"],"operationId":"getGeoSettings","summary":"Get a project's GEO settings","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"Settings fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoSettingsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["GEO"],"operationId":"updateGeoSettings","summary":"Replace a project's GEO settings","description":"Writes the full settings document and re-arms the recurring scan. Engines must be ids from the model catalog this organization can see (the ones `GET /geo/settings` returns) and languages must be supported languages; an unknown value is rejected with a 400 instead of being replaced by a default. Zero data retention is forced off without the ZDR add-on, and engines that are not visible to this caller keep their stored selection. Competitors are managed through the competitors endpoints and are not part of this payload.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchGeoSettingsRequest"}}}},"responses":{"200":{"description":"Settings updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoSettingsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/prompts":{"get":{"tags":["GEO"],"operationId":"listGeoPrompts","summary":"List tracked GEO prompts","description":"Returns custom prompts alongside the prompts derived automatically from the project's brand context.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"Prompts fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListGeoPromptsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["GEO"],"operationId":"createGeoPrompt","summary":"Track a new GEO prompt","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGeoPromptRequest"}}}},"responses":{"201":{"description":"Prompt created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoPromptResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/prompts/{promptId}":{"patch":{"tags":["GEO"],"operationId":"updateGeoPrompt","summary":"Update a tracked GEO prompt","description":"Enable or disable a tracked prompt, or replace tags on a custom prompt.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$"},"required":true,"name":"promptId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchGeoPromptRequest"}}}},"responses":{"200":{"description":"Prompt updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoPromptResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["GEO"],"operationId":"deleteGeoPrompt","summary":"Stop tracking a GEO prompt","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$"},"required":true,"name":"promptId","in":"path"}],"responses":{"200":{"description":"Prompt deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteGeoPromptResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/prompts/import":{"post":{"tags":["GEO"],"operationId":"importGeoPrompts","summary":"Bulk import GEO prompts","description":"Accepts either structured `rows` or raw `csv` text. Prompts that already exist are skipped, not duplicated.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportGeoPromptsRequest"}}}},"responses":{"200":{"description":"Prompts imported successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportGeoPromptsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 10 requests per 10 minutes per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/sequences":{"get":{"tags":["GEO"],"operationId":"listGeoSequences","summary":"List GEO prompt sequences","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"Sequences fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListGeoSequencesResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["GEO"],"operationId":"createGeoSequence","summary":"Create a GEO prompt sequence","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGeoSequenceRequest"}}}},"responses":{"201":{"description":"Sequence created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoSequenceResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/sequences/{sequenceId}":{"patch":{"tags":["GEO"],"operationId":"updateGeoSequence","summary":"Update a GEO prompt sequence","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$"},"required":true,"name":"sequenceId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchGeoSequenceRequest"}}}},"responses":{"200":{"description":"Sequence updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoSequenceResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["GEO"],"operationId":"deleteGeoSequence","summary":"Delete a GEO prompt sequence","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$"},"required":true,"name":"sequenceId","in":"path"}],"responses":{"200":{"description":"Sequence deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteGeoSequenceResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/sequences/{sequenceId}/run":{"post":{"tags":["GEO"],"operationId":"runGeoSequence","summary":"Run a GEO prompt sequence now","description":"Runs the sequence synchronously and answers with its result. The call is not queued: the request stays open for the whole run, which plays every turn against every available answer engine and can take several minutes. Use a client timeout of at least five minutes; after four minutes the API stops waiting and answers 409 while the run finishes on its own. Do not retry; read the result from the project's GEO checks. The work happens inside the Notra dashboard, which owns the model credentials and billing gates; the public API never calls an answer engine itself. Results also land in the project's GEO checks.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$"},"required":true,"name":"sequenceId","in":"path"}],"responses":{"200":{"description":"Sequence run completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunGeoSequenceResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Sequence execution is still running after the internal timeout; do not retry the run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 10 requests per 10 minutes per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/competitors":{"get":{"tags":["GEO"],"operationId":"listGeoCompetitors","summary":"List tracked GEO competitors","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"Competitors fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListGeoCompetitorsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"put":{"tags":["GEO"],"operationId":"upsertGeoCompetitor","summary":"Create or update a tracked GEO competitor","description":"Matches on name, case-insensitively. Send `previousName` to rename an existing competitor. Returns the full competitor list.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutGeoCompetitorRequest"}}}},"responses":{"200":{"description":"Competitor saved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListGeoCompetitorsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/competitors/suggestions":{"get":{"tags":["GEO"],"operationId":"suggestGeoCompetitors","summary":"Suggest GEO competitors for a domain","description":"Discovers likely competitors for a website. Results are cached per organization and domain.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Website domain, for example `example.com`.","example":"example.com"},"required":true,"description":"Website domain, for example `example.com`.","name":"domain","in":"query"}],"responses":{"200":{"description":"Competitor suggestions fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoCompetitorSuggestionsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 10 requests per 10 minutes per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/competitors/{name}":{"delete":{"tags":["GEO"],"operationId":"deleteGeoCompetitor","summary":"Stop tracking a GEO competitor","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Competitor name. Matched case-insensitively."},"required":true,"description":"Competitor name. Matched case-insensitively.","name":"name","in":"path"}],"responses":{"200":{"description":"Competitor deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListGeoCompetitorsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/competitors/import":{"post":{"tags":["GEO"],"operationId":"importGeoCompetitors","summary":"Bulk import GEO competitors","description":"Accepts either structured `rows` or raw `csv` text. Existing competitors are updated in place rather than duplicated.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportGeoCompetitorsRequest"}}}},"responses":{"200":{"description":"Competitors imported successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportGeoCompetitorsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 10 requests per 10 minutes per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/scans":{"post":{"tags":["GEO"],"operationId":"createGeoScan","summary":"Trigger a GEO scan","description":"Queues a scan with the Notra dashboard, which owns the model credentials and billing gates. The public API never calls an answer engine itself. The scan record is created before the hand-off, so `scanId` is immediately readable via `GET /v1/projects/{projectId}/geo/scans/{scanId}`. Poll `statusUrl` (also returned as the `Location` header) until `status` leaves `running`. Returns 409 while a scan for this project is still in flight.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"responses":{"202":{"description":"Scan accepted","headers":{"Location":{"description":"Relative path of the scan created for this trigger.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGeoScanResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 4 requests per 1 hour per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["GEO"],"operationId":"listGeoScans","summary":"List GEO scans","description":"Lists scans with planned, completed, mentioned, and explicitly failed check totals by engine. Failed scans include safe failure metadata when available.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","minimum":1,"default":1},"required":false,"name":"page","in":"query"}],"responses":{"200":{"description":"Scans fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListGeoScansResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/scans/{scanId}":{"get":{"tags":["GEO"],"operationId":"getGeoScan","summary":"Get a single GEO scan","description":"Returns scan status, check progress and mentions by engine, plus safe failure metadata for failed scans. Legacy scans without a saved plan report null planned totals.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$"},"required":true,"name":"scanId","in":"path"}],"responses":{"200":{"description":"Scan fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoScanResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/visibility/overview":{"get":{"tags":["GEO"],"operationId":"getGeoVisibilityOverview","summary":"Get mention rates per engine","description":"Checks, mentions and average position for every answer engine the project tracks. Pass `days` for a rolling window, or `from`/`to` for an explicit one.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":365,"description":"Rolling window size in days. Ignored when from/to are set."},"required":false,"description":"Rolling window size in days. Ignored when from/to are set.","name":"days","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Overview fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoVisibilityOverviewResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/visibility/timeseries":{"get":{"tags":["GEO"],"operationId":"getGeoVisibilityTimeseries","summary":"Get daily mention counts per engine","description":"One point per day and engine. Pass `days` for a rolling window, or `from`/`to` for an explicit one.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":365,"description":"Rolling window size in days. Ignored when from/to are set."},"required":false,"description":"Rolling window size in days. Ignored when from/to are set.","name":"days","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Timeseries fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoVisibilityTimeseriesResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/visibility/prompt-results":{"get":{"tags":["GEO"],"operationId":"getGeoVisibilityPromptResults","summary":"Get the latest answer per prompt and engine","description":"The stored answer text, mention position, sentiment and grounding sources for each tracked prompt. Pass `days` for a rolling window, or `from`/`to` for an explicit one.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":365,"description":"Rolling window size in days. Ignored when from/to are set."},"required":false,"description":"Rolling window size in days. Ignored when from/to are set.","name":"days","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Prompt results fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoVisibilityPromptResultsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/visibility/prompt-results/summaries":{"get":{"tags":["GEO"],"operationId":"listGeoPromptResultSummaries","summary":"List compact prompt result summaries","description":"A filtered, paginated projection of the latest answer per prompt and engine. Full answer text and sources are omitted; use checkId with the detail endpoint.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":365,"description":"Rolling window size in days. Ignored when from/to are set."},"required":false,"description":"Rolling window size in days. Ignored when from/to are set.","name":"days","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"to","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":100000},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":false,"name":"engine","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"mentioned","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":300},"required":false,"name":"query","in":"query"}],"responses":{"200":{"description":"Prompt result summaries fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoVisibilityPromptResultSummariesResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/visibility/prompt-results/{checkId}":{"get":{"tags":["GEO"],"operationId":"getGeoPromptResultDetail","summary":"Get one full prompt result","description":"Loads the answer, grounding sources and token metadata for one checkId returned by the summaries or prompt-history endpoints.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"checkId","in":"path"}],"responses":{"200":{"description":"Prompt result fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoVisibilityPromptResultDetailResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/visibility/competitor-share":{"get":{"tags":["GEO"],"operationId":"getGeoVisibilityCompetitorShare","summary":"Get share of voice across tracked brands","description":"Mention counts per brand with a per-brand trend, plus the daily timeseries behind it. Pass `days` for a rolling window, or `from`/`to` for an explicit one.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":365,"description":"Rolling window size in days. Ignored when from/to are set."},"required":false,"description":"Rolling window size in days. Ignored when from/to are set.","name":"days","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Competitor share fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoVisibilityCompetitorShareResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/visibility/language-share":{"get":{"tags":["GEO"],"operationId":"getGeoVisibilityLanguageShare","summary":"Get mention rates per tracked language","description":"Checks, mentions and average position broken down by language. Pass `days` for a rolling window, or `from`/`to` for an explicit one.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":365,"description":"Rolling window size in days. Ignored when from/to are set."},"required":false,"description":"Rolling window size in days. Ignored when from/to are set.","name":"days","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Language share fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoVisibilityLanguageShareResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/visibility/competitors/{brand}":{"get":{"tags":["GEO"],"operationId":"getGeoVisibilityCompetitorDetail","summary":"Get one competitor's mention history","description":"Daily mentions and the prompts that produced them for a single brand. Without a window this falls back to the competitor-detail default rather than the project default, matching the dashboard.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Competitor brand name as reported by competitor-share."},"required":true,"description":"Competitor brand name as reported by competitor-share.","name":"brand","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":365,"description":"Rolling window size in days. Ignored when from/to are set."},"required":false,"description":"Rolling window size in days. Ignored when from/to are set.","name":"days","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Competitor detail fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoVisibilityCompetitorDetailResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/changes":{"get":{"tags":["GEO"],"operationId":"listGeoChanges","summary":"Compare the two latest GEO scans","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"GEO changes fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoChangesResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/prompts/{promptId}/history":{"get":{"tags":["GEO"],"operationId":"getGeoPromptHistory","summary":"Get the stored check history for one prompt","description":"Returns compact check rows. Use each check id with the prompt-result detail endpoint for the full answer.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"promptId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":false,"name":"scanId","in":"query"}],"responses":{"200":{"description":"Prompt history fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoPromptHistoryResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/sentiment":{"get":{"tags":["GEO"],"operationId":"getGeoSentiment","summary":"Get aggregate GEO sentiment","description":"Returns current and previous-period sentiment metrics without starting billed analysis.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":365,"description":"Rolling window size in days. Ignored when from/to are set."},"required":false,"description":"Rolling window size in days. Ignored when from/to are set.","name":"days","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Sentiment fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoSentimentResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/sentiment/analysis":{"get":{"tags":["GEO"],"operationId":"getGeoSentimentAnalysis","summary":"Get the stored GEO sentiment analysis","description":"Reads the cached thematic analysis state and never starts a billed model run.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":365,"description":"Rolling window size in days. Ignored when from/to are set."},"required":false,"description":"Rolling window size in days. Ignored when from/to are set.","name":"days","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Sentiment analysis state fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoSentimentAnalysisResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/sentiment/evidence":{"get":{"tags":["GEO"],"operationId":"listGeoSentimentEvidence","summary":"List answers used as sentiment evidence","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":365,"description":"Rolling window size in days. Ignored when from/to are set."},"required":false,"description":"Rolling window size in days. Ignored when from/to are set.","name":"days","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"to","in":"query"},{"schema":{"type":"string","maxLength":4096},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Sentiment evidence fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoSentimentEvidenceResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/shelf-sources":{"get":{"tags":["GEO"],"operationId":"listGeoShelfSources","summary":"List stored GEO shelf sources","description":"Returns a bounded page of cited and manually tracked sources, newest updates first.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":100000,"default":0},"required":false,"name":"offset","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Shelf sources fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoShelfListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/gaps":{"get":{"tags":["GEO"],"operationId":"listGeoContentGaps","summary":"List content gaps","description":"Prompts where competitors are mentioned and this brand is not, plus Search Console queries with no tracked prompt. Each row carries the brief already written for it, when there is one.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"Gaps fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoContentGapsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/briefs":{"get":{"tags":["GEO"],"operationId":"listGeoContentBriefs","summary":"List content briefs","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"Briefs fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListGeoContentBriefsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["GEO"],"operationId":"planGeoContentBrief","summary":"Plan a content brief","description":"Researches the topic and writes a brief, then saves it as a draft article. This books AI credits and is billed. Planning happens inside Notra, which owns the model credentials. Set `autoApprove` to start the writer in the same call. When `sourceKind` and `sourceId` point at a gap that already has an open brief, that brief is returned instead of a new one being planned. If planning exceeds four minutes, the API returns 409 while work may still finish in Notra. Do not retry; list the project's GEO briefs to find the result.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanGeoContentBriefRequest"}}}},"responses":{"200":{"description":"Brief planned successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanGeoContentBriefResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Brief planning is still running after the internal timeout; do not retry the plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 10 requests per 10 minutes per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/briefs/{briefId}":{"get":{"tags":["GEO"],"operationId":"getGeoContentBrief","summary":"Get a single content brief","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$"},"required":true,"name":"briefId","in":"path"}],"responses":{"200":{"description":"Brief fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoContentBriefResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/briefs/{briefId}/approve":{"post":{"tags":["GEO"],"operationId":"approveGeoContentBrief","summary":"Approve a brief and start the writer","description":"Claims the brief and queues the writer with the Notra dashboard. Only briefs in `draft` or `failed` can be approved; anything else returns 409.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$"},"required":true,"name":"briefId","in":"path"}],"responses":{"202":{"description":"Writer accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveGeoContentBriefResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 20 requests per 10 minutes per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/agent-readiness":{"get":{"tags":["GEO"],"operationId":"getGeoAgentReadiness","summary":"Get the latest agent readiness report","description":"The most recent completed report for the project's website, any newer run still in flight or failed, and the score history. Returns stored data only; it never starts a scan.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"Report fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoAgentReadinessResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/agent-readiness/scan":{"post":{"tags":["GEO"],"operationId":"startGeoAgentReadinessScan","summary":"Start an agent readiness scan","description":"Queues a readiness scan for the project's website. A scan already running against the same URL is reused rather than duplicated, in which case `alreadyRunning` is true.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"}],"responses":{"202":{"description":"Scan accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoAgentReadinessScanResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 10 requests per 1 hour per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/traffic/overview":{"get":{"tags":["GEO"],"operationId":"getGeoTrafficOverview","summary":"Get AI traffic totals and sources","description":"Crawler and AI-referral visit totals, a per-source breakdown and the daily timeseries behind it.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":365,"description":"Rolling window size in days. Ignored when from/to are set."},"required":false,"description":"Rolling window size in days. Ignored when from/to are set.","name":"days","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Traffic overview fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoTrafficOverviewResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/traffic/log":{"get":{"tags":["GEO"],"operationId":"getGeoTrafficLog","summary":"Get recent AI traffic events","description":"The most recent individual requests from AI crawlers and referrals. This endpoint has no window; use `limit` to bound it. Pass `host` to keep the newest events for that hostname and its subdomains.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Comma-separated. One or more of: crawler, ai_referral."},"required":false,"description":"Comma-separated. One or more of: crawler, ai_referral.","name":"visitorTypes","in":"query"},{"schema":{"type":"string","description":"Comma-separated. One or more of: training-crawler, search-index, assistant-browse."},"required":false,"description":"Comma-separated. One or more of: training-crawler, search-index, assistant-browse.","name":"categories","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Hostname to filter on. Subdomains of this host are included. Omit for every host."},"required":false,"description":"Hostname to filter on. Subdomains of this host are included. Omit for every host.","name":"host","in":"query"}],"responses":{"200":{"description":"Traffic log fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoTrafficLogResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/traffic/journeys":{"get":{"tags":["GEO"],"operationId":"listGeoTrafficJourneys","summary":"List AI traffic journeys","description":"Sessions grouped by journey: how many pages one agent read, over what span, and a sample of the paths.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":365,"description":"Rolling window size in days. Ignored when from/to are set."},"required":false,"description":"Rolling window size in days. Ignored when from/to are set.","name":"days","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"to","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Journeys fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoTrafficJourneysResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/traffic/journeys/{journeyId}":{"get":{"tags":["GEO"],"operationId":"getGeoTrafficJourney","summary":"Get one journey's events","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"journeyId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":365,"description":"Rolling window size in days. Ignored when from/to are set."},"required":false,"description":"Rolling window size in days. Ignored when from/to are set.","name":"days","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Journey fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoJourneyDetailResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/projects/{projectId}/geo/traffic/pages":{"get":{"tags":["GEO"],"operationId":"listGeoTrafficPages","summary":"List the most visited pages","description":"Which paths AI crawlers and referrals read most, with the previous window's count for comparison. Pass `host` to rank pages for that hostname and its subdomains before applying `limit`.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"b1f2c3d4-0000-4000-8000-000000000000"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":365,"description":"Rolling window size in days. Ignored when from/to are set."},"required":false,"description":"Rolling window size in days. Ignored when from/to are set.","name":"days","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-31"},"required":false,"name":"to","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":500},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["crawler","ai_referral"]},"required":false,"name":"visitorType","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Hostname to filter on. Subdomains of this host are included. Omit for every host."},"required":false,"description":"Hostname to filter on. Subdomains of this host are included. Omit for every host.","name":"host","in":"query"}],"responses":{"200":{"description":"Pages fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoTrafficPagesResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/geo/ingest/setup":{"get":{"tags":["GEO"],"operationId":"getGeoIngestSetup","summary":"Get the install snippets","description":"The endpoint and framework snippets needed to send AI traffic to Notra. The snippets read the token from an environment variable; the token itself is issued by `POST /geo/ingest/token`, which requires a write scope.","responses":{"200":{"description":"Setup fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoIngestSetupResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/geo/ingest/token":{"post":{"tags":["GEO"],"operationId":"issueGeoIngestToken","summary":"Issue the tracking token","description":"Returns the current tracking token together with the install snippets. Organization-level: pass `projectId` to bind the token to one project. Issuing does not invalidate previously issued tokens; use rotation for that.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","description":"Bind the token to one project. Omit to track the whole organization."},"required":false,"description":"Bind the token to one project. Omit to track the whole organization.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Token issued successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoIngestTokenResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/geo/ingest/rotate-token":{"post":{"tags":["GEO"],"operationId":"rotateGeoIngestToken","summary":"Rotate the tracking token","description":"Invalidates every tracking token previously issued for this organization and returns a fresh one. Deployments still sending the old token stop being accepted immediately.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","description":"Bind the token to one project. Omit to track the whole organization."},"required":false,"description":"Bind the token to one project. Omit to track the whole organization.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Token rotated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoIngestTokenResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"GEO plan or available AI credits required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization, project or resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication or billing service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v2/eve/v1/session":{"post":{"tags":["Agent"],"operationId":"createAgentSession","summary":"Start a durable agent session","description":"The exact eve session protocol the Notra dashboard uses, proxied through API auth. Point any eve client (eve/client, useEveAgent) at /v2 as its host with your API key as a bearer token. Returns the session id and continuation token; stream events from GET /v2/eve/v1/session/{sessionId}/stream.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentSessionRequest"}}}},"responses":{"200":{"description":"Session created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentSessionResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden, or usage limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 30 requests per 1 minute per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"500":{"description":"Failed to check usage limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Agent session creation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Agent service is not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v2/eve/v1/session/{sessionId}":{"post":{"tags":["Agent"],"operationId":"sendAgentSessionMessage","summary":"Send a follow-up message or answer a pending input request","description":"Sends the next turn of an agent session. The server binds the session's stored continuation token, so the client-provided one is ignored. Answer input.requested events (tool approvals, questions) from the event stream via inputResponses.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"sessionId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendAgentMessageRequest"}}}},"responses":{"200":{"description":"Upstream eve response with the next continuation token for this session.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden, or usage limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"A message is already being processed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 30 requests per 1 minute per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"500":{"description":"Failed to check usage limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Agent service is not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v2/eve/v1/session/{sessionId}/stream":{"get":{"tags":["Agent"],"operationId":"streamAgentSessionEvents","summary":"Stream an agent session's events","description":"Durable, replayable eve session event stream (newline-delimited JSON). Pass startIndex to resume from a known position. Includes input.requested events for tool approvals.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"NDJSON event stream","content":{"application/x-ndjson":{"schema":{"type":"string"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden, or usage limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 30 requests per 1 minute per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"503":{"description":"Agent service is not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v2/agent-chats":{"get":{"tags":["Agent"],"operationId":"listAgentChats","summary":"List agent sessions","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Agent sessions fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAgentChatsResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden, or usage limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 30 requests per 1 minute per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"503":{"description":"Agent service is not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"webhooks":{}} \ No newline at end of file diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 48bf4b2..6537639 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.797.0 +speakeasyVersion: 1.798.0 sources: Notra API: sourceNamespace: notra-api - sourceRevisionDigest: sha256:2f8420808875e219de52352bf5e974230535999f47147618fc9e839d7549a126 - sourceBlobDigest: sha256:92b5bfd15febda24231f0579e4ef9fb2f26c961392d13a0931b95e14814226b1 + sourceRevisionDigest: sha256:78dbfaf6649e082b85d5440c2ddf97679676cf9ad0226aff1373ab746f63e274 + sourceBlobDigest: sha256:381d100116f1691812d836bbc30515a48a6fb9b6aafa74f9399f187c46c4d6f3 tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: notra: source: Notra API sourceNamespace: notra-api - sourceRevisionDigest: sha256:2f8420808875e219de52352bf5e974230535999f47147618fc9e839d7549a126 - sourceBlobDigest: sha256:92b5bfd15febda24231f0579e4ef9fb2f26c961392d13a0931b95e14814226b1 + sourceRevisionDigest: sha256:78dbfaf6649e082b85d5440c2ddf97679676cf9ad0226aff1373ab746f63e274 + sourceBlobDigest: sha256:381d100116f1691812d836bbc30515a48a6fb9b6aafa74f9399f187c46c4d6f3 codeSamplesNamespace: notra-api-typescript-code-samples - codeSamplesRevisionDigest: sha256:446a05429973052eb22153d9dffe1a9f60ab1bf99c37aa05aefccc1cf90413f0 + codeSamplesRevisionDigest: sha256:ff0d4d3a77e9010a9d70b95912ca7f2fdf12f72a1f3ab2c0deec839ace021fc6 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/RELEASES.md b/RELEASES.md index 7557029..3d6f52d 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -298,4 +298,14 @@ Based on: ### Generated - [typescript v1.3.6] . ### Releases -- [NPM v1.3.6] https://www.npmjs.com/package/@usenotra/sdk/v/1.3.6 - . \ No newline at end of file +- [NPM v1.3.6] https://www.npmjs.com/package/@usenotra/sdk/v/1.3.6 - . + +## 2026-09-24 00:11:27 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.798.0 (2.938.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v1.3.7] . +### Releases +- [NPM v1.3.7] https://www.npmjs.com/package/@usenotra/sdk/v/1.3.7 - . \ No newline at end of file diff --git a/docs/models/create-agent-session-response.md b/docs/models/create-agent-session-response.md index f413066..38c1217 100644 --- a/docs/models/create-agent-session-response.md +++ b/docs/models/create-agent-session-response.md @@ -8,14 +8,12 @@ import { CreateAgentSessionResponse } from "@usenotra/sdk/models"; let value: CreateAgentSessionResponse = { ok: true, sessionId: "", - continuationToken: "", }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------- | ------------------- | ------------------- | ------------------- | -| `ok` | *true* | :heavy_check_mark: | N/A | -| `sessionId` | *string* | :heavy_check_mark: | N/A | -| `continuationToken` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `ok` | *true* | :heavy_check_mark: | N/A | +| `sessionId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/geo-changes-response-kind.md b/docs/models/geo-changes-response-kind.md index 8d2c5e6..79d34ef 100644 --- a/docs/models/geo-changes-response-kind.md +++ b/docs/models/geo-changes-response-kind.md @@ -13,5 +13,5 @@ let value: GeoChangesResponseKind = "position_dropped"; ## Values ```typescript -"gained_mention" | "lost_mention" | "position_improved" | "position_dropped" | "competitor_displaced" | "citation_added" | "citation_removed" | "new_engine" | Unrecognized +"gained_mention" | "lost_mention" | "position_improved" | "position_dropped" | "competitor_displaced" | "citation_added" | "citation_removed" | "competitor_cited" | "new_engine" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/geo-ingest-setup-response-snippets.md b/docs/models/geo-ingest-setup-response-snippets.md index c9c90b1..598c73e 100644 --- a/docs/models/geo-ingest-setup-response-snippets.md +++ b/docs/models/geo-ingest-setup-response-snippets.md @@ -9,6 +9,9 @@ let value: GeoIngestSetupResponseSnippets = { next: "", nuxt: "", netlify: "", + tanstack: "", + astro: "", + sveltekit: "", }; ``` @@ -18,4 +21,7 @@ let value: GeoIngestSetupResponseSnippets = { | ------------------ | ------------------ | ------------------ | ------------------ | | `next` | *string* | :heavy_check_mark: | N/A | | `nuxt` | *string* | :heavy_check_mark: | N/A | -| `netlify` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| `netlify` | *string* | :heavy_check_mark: | N/A | +| `tanstack` | *string* | :heavy_check_mark: | N/A | +| `astro` | *string* | :heavy_check_mark: | N/A | +| `sveltekit` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/geo-ingest-setup-response.md b/docs/models/geo-ingest-setup-response.md index 55cd364..2e04750 100644 --- a/docs/models/geo-ingest-setup-response.md +++ b/docs/models/geo-ingest-setup-response.md @@ -12,6 +12,9 @@ let value: GeoIngestSetupResponse = { next: "", nuxt: "", netlify: "", + tanstack: "", + astro: "", + sveltekit: "", }, organization: { id: "", diff --git a/docs/models/geo-ingest-token-response-snippets.md b/docs/models/geo-ingest-token-response-snippets.md index 9f2ff66..009a52a 100644 --- a/docs/models/geo-ingest-token-response-snippets.md +++ b/docs/models/geo-ingest-token-response-snippets.md @@ -9,6 +9,9 @@ let value: GeoIngestTokenResponseSnippets = { next: "", nuxt: "", netlify: "", + tanstack: "", + astro: "", + sveltekit: "", }; ``` @@ -18,4 +21,7 @@ let value: GeoIngestTokenResponseSnippets = { | ------------------ | ------------------ | ------------------ | ------------------ | | `next` | *string* | :heavy_check_mark: | N/A | | `nuxt` | *string* | :heavy_check_mark: | N/A | -| `netlify` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| `netlify` | *string* | :heavy_check_mark: | N/A | +| `tanstack` | *string* | :heavy_check_mark: | N/A | +| `astro` | *string* | :heavy_check_mark: | N/A | +| `sveltekit` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/geo-ingest-token-response.md b/docs/models/geo-ingest-token-response.md index 468a703..3911b39 100644 --- a/docs/models/geo-ingest-token-response.md +++ b/docs/models/geo-ingest-token-response.md @@ -12,6 +12,9 @@ let value: GeoIngestTokenResponse = { next: "", nuxt: "", netlify: "", + tanstack: "", + astro: "", + sveltekit: "", }, organization: { id: "", diff --git a/docs/models/geo-settings-response.md b/docs/models/geo-settings-response.md index 98b6871..68e5c96 100644 --- a/docs/models/geo-settings-response.md +++ b/docs/models/geo-settings-response.md @@ -40,15 +40,20 @@ let value: GeoSettingsResponse = { "", "", ], + trackWithoutSearch: true, pausedAutoPromptIds: [], - removedAutoPromptIds: [], + removedAutoPromptIds: [ + "", + "", + "", + ], enabled: false, - scanIntervalHours: 968887, + scanIntervalHours: 376504, scanStartedAt: "", lastScanAt: "", - isScanning: false, - createdAt: "1719387550386", - updatedAt: "1735640988436", + isScanning: true, + createdAt: "1717946538278", + updatedAt: "1735661707720", }, organization: { id: "", diff --git a/docs/models/geo-settings.md b/docs/models/geo-settings.md index 2c86551..c8610f7 100644 --- a/docs/models/geo-settings.md +++ b/docs/models/geo-settings.md @@ -30,20 +30,22 @@ let value: GeoSettings = { "", "", ], + trackWithoutSearch: false, pausedAutoPromptIds: [ "", - "", ], removedAutoPromptIds: [ "", + "", + "", ], - enabled: false, - scanIntervalHours: 393314, + enabled: true, + scanIntervalHours: 540983, scanStartedAt: "", lastScanAt: "", - isScanning: true, - createdAt: "1720923784626", - updatedAt: "1735641875475", + isScanning: false, + createdAt: "1718270311419", + updatedAt: "1735669009447", }; ``` @@ -63,6 +65,7 @@ let value: GeoSettings = { | `engines` | *string*[] | :heavy_check_mark: | N/A | | `enforceZdr` | *boolean* | :heavy_check_mark: | N/A | | `nonZdrApprovedEngines` | *string*[] | :heavy_check_mark: | N/A | +| `trackWithoutSearch` | *boolean* | :heavy_check_mark: | N/A | | `pausedAutoPromptIds` | *string*[] | :heavy_check_mark: | N/A | | `removedAutoPromptIds` | *string*[] | :heavy_check_mark: | N/A | | `enabled` | *boolean* | :heavy_check_mark: | N/A | diff --git a/docs/models/journey.md b/docs/models/journey.md index 9b0da8f..cdfc5a6 100644 --- a/docs/models/journey.md +++ b/docs/models/journey.md @@ -13,6 +13,7 @@ let value: Journey = { distinctPaths: 542101, firstSeenAt: "", lastSeenAt: "", + entryPath: "", samplePaths: [ "", "", @@ -31,4 +32,5 @@ let value: Journey = { | `distinctPaths` | *number* | :heavy_check_mark: | N/A | | `firstSeenAt` | *string* | :heavy_check_mark: | N/A | | `lastSeenAt` | *string* | :heavy_check_mark: | N/A | +| `entryPath` | *string* | :heavy_check_mark: | N/A | | `samplePaths` | *string*[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/create-agent-session-response.md b/docs/models/operations/create-agent-session-response.md index 5b97949..5ed1427 100644 --- a/docs/models/operations/create-agent-session-response.md +++ b/docs/models/operations/create-agent-session-response.md @@ -10,7 +10,6 @@ let value: CreateAgentSessionResponse = { result: { ok: true, sessionId: "", - continuationToken: "", }, }; ``` diff --git a/docs/models/operations/send-agent-session-message-request.md b/docs/models/operations/send-agent-session-message-request.md index 4ccf84c..9199ad6 100644 --- a/docs/models/operations/send-agent-session-message-request.md +++ b/docs/models/operations/send-agent-session-message-request.md @@ -7,9 +7,7 @@ import { SendAgentSessionMessageRequest } from "@usenotra/sdk/models/operations" let value: SendAgentSessionMessageRequest = { sessionId: "", - body: { - continuationToken: "", - }, + body: {}, }; ``` diff --git a/docs/models/patch-geo-settings-request.md b/docs/models/patch-geo-settings-request.md index fad3b80..3d098ac 100644 --- a/docs/models/patch-geo-settings-request.md +++ b/docs/models/patch-geo-settings-request.md @@ -43,6 +43,7 @@ let value: PatchGeoSettingsRequest = { | `engines` | *string*[] | :heavy_check_mark: | N/A | | `enforceZdr` | *boolean* | :heavy_check_mark: | N/A | | `nonZdrApprovedEngines` | *string*[] | :heavy_check_mark: | N/A | +| `trackWithoutSearch` | *boolean* | :heavy_minus_sign: | Also scan search-capable models without web search. Omit to keep the stored value (default false). | | `pausedAutoPromptIds` | *string*[] | :heavy_minus_sign: | Ids of auto-generated prompts to skip in scans. Omit to keep the current list. | | `removedAutoPromptIds` | *string*[] | :heavy_minus_sign: | Ids of auto-generated prompts removed from tracking. Omit to keep the current list. | | `enabled` | *boolean* | :heavy_check_mark: | N/A | diff --git a/docs/models/send-agent-message-request.md b/docs/models/send-agent-message-request.md index d5f1faf..b2212bd 100644 --- a/docs/models/send-agent-message-request.md +++ b/docs/models/send-agent-message-request.md @@ -5,9 +5,7 @@ ```typescript import { SendAgentMessageRequest } from "@usenotra/sdk/models"; -let value: SendAgentMessageRequest = { - continuationToken: "", -}; +let value: SendAgentMessageRequest = {}; ``` ## Fields @@ -15,5 +13,4 @@ let value: SendAgentMessageRequest = { | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | | `message` | *string* | :heavy_minus_sign: | The next user message. Omit when only answering a pending input request. | -| `inputResponses` | [models.InputResponse](../models/input-response.md)[] | :heavy_minus_sign: | Answers to pending input.requested events (tool approvals, questions) from the event stream. | -| `continuationToken` | *string* | :heavy_check_mark: | The continuation token returned by the previous request for this session. | \ No newline at end of file +| `inputResponses` | [models.InputResponse](../models/input-response.md)[] | :heavy_minus_sign: | Answers to pending input.requested events (tool approvals, questions) from the event stream. | \ No newline at end of file diff --git a/docs/sdks/agent/README.md b/docs/sdks/agent/README.md index ce779d0..c2b2567 100644 --- a/docs/sdks/agent/README.md +++ b/docs/sdks/agent/README.md @@ -102,9 +102,7 @@ const notra = new Notra({ async function run() { const result = await notra.agent.sendAgentSessionMessage({ sessionId: "", - body: { - continuationToken: "", - }, + body: {}, }); console.log(result); @@ -130,9 +128,7 @@ const notra = new NotraCore({ async function run() { const res = await agentSendAgentSessionMessage(notra, { sessionId: "", - body: { - continuationToken: "", - }, + body: {}, }); if (res.ok) { const { value: result } = res; diff --git a/examples/package-lock.json b/examples/package-lock.json index 29f6de0..b57db4a 100644 --- a/examples/package-lock.json +++ b/examples/package-lock.json @@ -18,7 +18,7 @@ }, "..": { "name": "@usenotra/sdk", - "version": "1.3.6", + "version": "1.3.7", "license": "MIT", "dependencies": { "zod": "^3.25.65 || ^4.0.0" diff --git a/jsr.json b/jsr.json index 2e10404..150c3c9 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@usenotra/sdk", - "version": "1.3.6", + "version": "1.3.7", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index 1192881..5caf534 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@usenotra/sdk", - "version": "1.3.6", + "version": "1.3.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@usenotra/sdk", - "version": "1.3.6", + "version": "1.3.7", "license": "MIT", "dependencies": { "zod": "^3.25.65 || ^4.0.0" diff --git a/package.json b/package.json index 85373dc..9d7f44d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@usenotra/sdk", - "version": "1.3.6", + "version": "1.3.7", "author": "Speakeasy", "type": "module", "files": [ diff --git a/src/lib/config.ts b/src/lib/config.ts index ac55614..1ca1cfa 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -62,7 +62,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "1.0.0", - sdkVersion: "1.3.6", - genVersion: "2.937.18", - userAgent: "speakeasy-sdk/typescript 1.3.6 2.937.18 1.0.0 @usenotra/sdk", + sdkVersion: "1.3.7", + genVersion: "2.938.0", + userAgent: "speakeasy-sdk/typescript 1.3.7 2.938.0 1.0.0 @usenotra/sdk", } as const; diff --git a/src/models/create-agent-session-response.ts b/src/models/create-agent-session-response.ts index edc2140..07cda4b 100644 --- a/src/models/create-agent-session-response.ts +++ b/src/models/create-agent-session-response.ts @@ -12,7 +12,6 @@ import { SDKValidationError } from "./errors/sdk-validation-error.js"; export type CreateAgentSessionResponse = { ok: true; sessionId: string; - continuationToken: string; }; /** @internal */ @@ -22,7 +21,6 @@ export const CreateAgentSessionResponse$inboundSchema: z.ZodMiniType< > = z.object({ ok: types.literal(true), sessionId: types.string(), - continuationToken: types.string(), }); export function createAgentSessionResponseFromJSON( diff --git a/src/models/geo-changes-response.ts b/src/models/geo-changes-response.ts index 49689ca..e2bd9f3 100644 --- a/src/models/geo-changes-response.ts +++ b/src/models/geo-changes-response.ts @@ -38,6 +38,7 @@ export const GeoChangesResponseKind = { CompetitorDisplaced: "competitor_displaced", CitationAdded: "citation_added", CitationRemoved: "citation_removed", + CompetitorCited: "competitor_cited", NewEngine: "new_engine", } as const; export type GeoChangesResponseKind = OpenEnum; diff --git a/src/models/geo-ingest-setup-response.ts b/src/models/geo-ingest-setup-response.ts index 746d12e..949b3dc 100644 --- a/src/models/geo-ingest-setup-response.ts +++ b/src/models/geo-ingest-setup-response.ts @@ -13,6 +13,9 @@ export type GeoIngestSetupResponseSnippets = { next: string; nuxt: string; netlify: string; + tanstack: string; + astro: string; + sveltekit: string; }; export type GeoIngestSetupResponseOrganization = { @@ -43,6 +46,9 @@ export const GeoIngestSetupResponseSnippets$inboundSchema: z.ZodMiniType< next: types.string(), nuxt: types.string(), netlify: types.string(), + tanstack: types.string(), + astro: types.string(), + sveltekit: types.string(), }); export function geoIngestSetupResponseSnippetsFromJSON( diff --git a/src/models/geo-ingest-token-response.ts b/src/models/geo-ingest-token-response.ts index 660cd77..fb1420a 100644 --- a/src/models/geo-ingest-token-response.ts +++ b/src/models/geo-ingest-token-response.ts @@ -13,6 +13,9 @@ export type GeoIngestTokenResponseSnippets = { next: string; nuxt: string; netlify: string; + tanstack: string; + astro: string; + sveltekit: string; }; export type GeoIngestTokenResponseOrganization = { @@ -47,6 +50,9 @@ export const GeoIngestTokenResponseSnippets$inboundSchema: z.ZodMiniType< next: types.string(), nuxt: types.string(), netlify: types.string(), + tanstack: types.string(), + astro: types.string(), + sveltekit: types.string(), }); export function geoIngestTokenResponseSnippetsFromJSON( diff --git a/src/models/geo-settings.ts b/src/models/geo-settings.ts index 6b729f2..f6490e7 100644 --- a/src/models/geo-settings.ts +++ b/src/models/geo-settings.ts @@ -22,6 +22,7 @@ export type GeoSettings = { engines: Array; enforceZdr: boolean; nonZdrApprovedEngines: Array; + trackWithoutSearch: boolean; pausedAutoPromptIds: Array; removedAutoPromptIds: Array; enabled: boolean; @@ -48,6 +49,7 @@ export const GeoSettings$inboundSchema: z.ZodMiniType = z engines: z.array(types.string()), enforceZdr: types.boolean(), nonZdrApprovedEngines: z.array(types.string()), + trackWithoutSearch: types.boolean(), pausedAutoPromptIds: z.array(types.string()), removedAutoPromptIds: z.array(types.string()), enabled: types.boolean(), diff --git a/src/models/geo-traffic-journeys-response.ts b/src/models/geo-traffic-journeys-response.ts index 424514b..8e678ae 100644 --- a/src/models/geo-traffic-journeys-response.ts +++ b/src/models/geo-traffic-journeys-response.ts @@ -29,6 +29,7 @@ export type Journey = { distinctPaths: number; firstSeenAt: string; lastSeenAt: string; + entryPath: string; samplePaths: Array; }; @@ -63,6 +64,7 @@ export const Journey$inboundSchema: z.ZodMiniType = z.object({ distinctPaths: types.number(), firstSeenAt: types.string(), lastSeenAt: types.string(), + entryPath: types.string(), samplePaths: z.array(types.string()), }); diff --git a/src/models/patch-geo-settings-request.ts b/src/models/patch-geo-settings-request.ts index eb4878e..036a35d 100644 --- a/src/models/patch-geo-settings-request.ts +++ b/src/models/patch-geo-settings-request.ts @@ -20,6 +20,10 @@ export type PatchGeoSettingsRequest = { engines: Array; enforceZdr: boolean; nonZdrApprovedEngines: Array; + /** + * Also scan search-capable models without web search. Omit to keep the stored value (default false). + */ + trackWithoutSearch?: boolean | undefined; /** * Ids of auto-generated prompts to skip in scans. Omit to keep the current list. */ @@ -45,6 +49,7 @@ export type PatchGeoSettingsRequest$Outbound = { engines: Array; enforceZdr: boolean; nonZdrApprovedEngines: Array; + trackWithoutSearch?: boolean | undefined; pausedAutoPromptIds?: Array | undefined; removedAutoPromptIds?: Array | undefined; enabled: boolean; @@ -64,6 +69,7 @@ export const PatchGeoSettingsRequest$outboundSchema: z.ZodMiniType< engines: z.array(z.string()), enforceZdr: z.boolean(), nonZdrApprovedEngines: z.array(z.string()), + trackWithoutSearch: z.optional(z.boolean()), pausedAutoPromptIds: z.optional(z.array(z.string())), removedAutoPromptIds: z.optional(z.array(z.string())), enabled: z.boolean(), diff --git a/src/models/send-agent-message-request.ts b/src/models/send-agent-message-request.ts index c135f41..8bc5dfc 100644 --- a/src/models/send-agent-message-request.ts +++ b/src/models/send-agent-message-request.ts @@ -22,10 +22,6 @@ export type SendAgentMessageRequest = { * Answers to pending input.requested events (tool approvals, questions) from the event stream. */ inputResponses?: Array | undefined; - /** - * The continuation token returned by the previous request for this session. - */ - continuationToken: string; }; /** @internal */ @@ -51,7 +47,6 @@ export function inputResponseToJSON(inputResponse: InputResponse): string { export type SendAgentMessageRequest$Outbound = { message?: string | undefined; inputResponses?: Array | undefined; - continuationToken: string; }; /** @internal */ @@ -63,7 +58,6 @@ export const SendAgentMessageRequest$outboundSchema: z.ZodMiniType< inputResponses: z.optional( z.array(z.lazy(() => InputResponse$outboundSchema)), ), - continuationToken: z.string(), }); export function sendAgentMessageRequestToJSON( From 79aac9521b87df3728bf793ab4c34ef5f3882f8e Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Thu, 24 Sep 2026 00:13:00 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow