openapi: 3.1.0 info: version: "2026-04-01" title: Glean Platform API x-source-commit-sha: c7223f0e466c632820e8ef482ecdbb03a025224a x-open-api-commit-sha: 3c1ac65b05f5133def947499c01ef4e2ca3a6abd servers: - url: https://{instance}-be.glean.com variables: instance: default: instance-name description: The instance name (typically the email domain without the TLD) that determines the deployment backend. security: - APIToken: [] paths: /api/agents/search: post: tags: - Agents summary: Search agents description: | Search agents available to the authenticated user by agent name. operationId: platform-agents-search x-visibility: Public x-codegen-request-body-name: payload requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/PlatformAgentsSearchRequest" responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/PlatformAgentsSearchResponse" "400": $ref: "#/components/responses/PlatformBadRequest" "401": $ref: "#/components/responses/PlatformUnauthorized" "403": $ref: "#/components/responses/PlatformForbidden" "404": $ref: "#/components/responses/PlatformNotFound" "408": $ref: "#/components/responses/PlatformRequestTimeout" "413": $ref: "#/components/responses/PlatformRequestTooLarge" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: agents x-speakeasy-name-override: search /api/agents/{agent_id}: get: tags: - Agents summary: Get agent description: | Retrieve details for an agent available to the authenticated user. operationId: platform-agents-get x-visibility: Public parameters: - in: path name: agent_id description: ID of the agent to retrieve. required: true example: "{agent_id}" schema: type: string minLength: 1 responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/PlatformAgentGetResponse" "400": $ref: "#/components/responses/PlatformBadRequest" "401": $ref: "#/components/responses/PlatformUnauthorized" "403": $ref: "#/components/responses/PlatformForbidden" "404": $ref: "#/components/responses/PlatformNotFound" "408": $ref: "#/components/responses/PlatformRequestTimeout" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: agents x-speakeasy-name-override: get /api/agents/{agent_id}/schemas: get: tags: - Agents summary: Get agent schemas description: | Retrieve an agent's input and output JSON schemas. operationId: platform-agents-get-schemas x-visibility: Public parameters: - in: path name: agent_id description: ID of the agent whose schemas should be retrieved. required: true example: "{agent_id}" schema: type: string minLength: 1 - in: query name: include_tools description: Whether to include tool metadata in the response. required: false schema: type: boolean default: false responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/PlatformAgentSchemasResponse" "400": $ref: "#/components/responses/PlatformBadRequest" "401": $ref: "#/components/responses/PlatformUnauthorized" "403": $ref: "#/components/responses/PlatformForbidden" "404": $ref: "#/components/responses/PlatformNotFound" "408": $ref: "#/components/responses/PlatformRequestTimeout" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: agents x-speakeasy-name-override: getSchemas /api/agents/{agent_id}/runs: post: tags: - Agents summary: Create agent run description: | Execute an agent run. Set `stream` to true to receive server-sent events; otherwise the response contains the final agent messages. operationId: platform-agents-create-run x-visibility: Public x-codegen-request-body-name: payload parameters: - in: path name: agent_id description: ID of the agent to run. required: true example: "{agent_id}" schema: type: string minLength: 1 requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/PlatformAgentRunCreateRequest" responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/PlatformAgentRunWaitResponse" text/event-stream: schema: type: string description: | Server-sent events emitted by the running agent. Successful runs emit `message` events. A terminal failure after the stream has started emits exactly one `run.failed` event whose `data` is an `AgentRunFailedEventData` payload, then closes. example: | id: 1 event: message data: {"messages":[{"role":"GLEAN_AI","content":[{"text":"Hello","type":"text"}]}]} id: 2 event: message data: {"messages":[{"role":"GLEAN_AI","content":[{"text":", I can help with HR policy questions.","type":"text"}]}]} id: 3 event: run.failed data: {"error":{"type":"https://developers.glean.com/errors/spend-limit-exceeded","title":"Spend Limit Exceeded","status":403,"detail":"You've reached the monthly limit set by your admin.","code":"spend_limit_exceeded","request_id":"req_123","documentation_url":"https://developers.glean.com/errors/spend-limit-exceeded"}} "400": $ref: "#/components/responses/PlatformBadRequest" "401": $ref: "#/components/responses/PlatformUnauthorized" "403": $ref: "#/components/responses/PlatformForbidden" "404": $ref: "#/components/responses/PlatformNotFound" "408": $ref: "#/components/responses/PlatformRequestTimeout" "409": $ref: "#/components/responses/PlatformConflict" "413": $ref: "#/components/responses/PlatformRequestTooLarge" "422": description: Returned when the agent has tools the caller must authorize before the run can start. `authentication_suggestions` names each such tool; POST its `server_id` to the Client API's `/tool-servers/{serverId}/auth` with `returnUrl` in the request body to obtain an `authorizationUrl` to redirect the end user to, then retry the run once OAuth completes. content: application/problem+json: schema: $ref: "#/components/schemas/PlatformUnauthorizedAgentToolsProblem" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: agents x-speakeasy-name-override: createRun /api/chat: post: tags: - Chat summary: Create a chat response description: | Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`. operationId: platform-chat-create x-visibility: Public x-glean-experimental: id: e65a0a77-97a2-4c91-be60-eae7f6238015 introduced: "2026-07-14" x-codegen-request-body-name: payload requestBody: required: true content: application/json: schema: allOf: - $ref: "#/components/schemas/PlatformChatCreateRequest" - type: object required: - stream properties: stream: type: boolean const: false default: false responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/PlatformChatCompletedResponse" "400": $ref: "#/components/responses/PlatformBadRequest" "401": $ref: "#/components/responses/PlatformUnauthorized" "403": $ref: "#/components/responses/PlatformForbidden" "404": $ref: "#/components/responses/PlatformNotFound" "408": $ref: "#/components/responses/PlatformRequestTimeout" "413": $ref: "#/components/responses/PlatformRequestTooLarge" "422": $ref: "#/components/responses/PlatformUnprocessableEntity" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: chat x-speakeasy-name-override: create /api/skills: post: tags: - Skills summary: Create skill description: | Create a skill from an uploaded SKILL.md, .zip, or .skill bundle. If the authenticated user already has a skill with the same name, the existing skill is superseded with a new version. operationId: platform-skills-create x-visibility: Public x-glean-experimental: id: 3cd55572-0d5c-4898-9ecf-1b86c520d1c7 introduced: "2026-06-24" requestBody: required: true content: multipart/form-data: schema: $ref: "#/components/schemas/PlatformSkillCreateRequest" x-codegen-request-body-name: request responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/PlatformSkillCreateResponse" "400": $ref: "#/components/responses/PlatformBadRequest" "401": $ref: "#/components/responses/PlatformUnauthorized" "403": $ref: "#/components/responses/PlatformForbidden" "404": $ref: "#/components/responses/PlatformNotFound" "408": $ref: "#/components/responses/PlatformRequestTimeout" "413": $ref: "#/components/responses/PlatformRequestTooLarge" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: skills x-speakeasy-name-override: create get: tags: - Skills summary: List skills description: | List skills available to the authenticated user. operationId: platform-skills-list x-visibility: Public x-glean-experimental: id: 3eb65937-03a3-472b-9a00-be713f302b5f introduced: "2026-06-23" parameters: - in: query name: page_size description: Maximum number of skills to return. required: false schema: type: integer minimum: 1 maximum: 100 - in: query name: cursor description: Opaque pagination cursor from a previous response. required: false schema: type: string minLength: 1 responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/PlatformSkillsListResponse" "400": $ref: "#/components/responses/PlatformBadRequest" "401": $ref: "#/components/responses/PlatformUnauthorized" "403": $ref: "#/components/responses/PlatformForbidden" "404": $ref: "#/components/responses/PlatformNotFound" "408": $ref: "#/components/responses/PlatformRequestTimeout" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: skills x-speakeasy-name-override: list /api/skills/import: post: tags: - Skills summary: Import skills from GitHub description: | Import one or more skills selected from a GitHub source preview. Each source URL is fetched and persisted as an independent skill with source provenance. This operation does not create a durable source resource. The import is atomic: if any source cannot be fetched, validated, or persisted, no skills are created. operationId: platform-skills-import x-visibility: Public x-glean-experimental: id: 9162d790-e101-437d-a9a0-25e4687d150b introduced: "2026-07-28" x-codegen-request-body-name: request requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/PlatformSkillImportRequest" responses: "200": description: Skills imported successfully. content: application/json: schema: $ref: "#/components/schemas/PlatformSkillImportResponse" "400": $ref: "#/components/responses/PlatformBadRequest" "401": $ref: "#/components/responses/PlatformUnauthorized" "403": $ref: "#/components/responses/PlatformForbidden" "408": $ref: "#/components/responses/PlatformRequestTimeout" "409": $ref: "#/components/responses/PlatformConflict" "413": $ref: "#/components/responses/PlatformRequestTooLarge" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: skills x-speakeasy-name-override: import /api/skills/validation: post: tags: - Skills summary: Validate skill bundle description: | Validate a skill bundle without persisting it. Accepts a SKILL.md, .zip, or .skill upload and returns parsed metadata plus the normalized file layout. operationId: platform-skills-validate x-visibility: Public x-glean-experimental: id: 0b086fa6-30f8-4279-8d11-10ab0059c14a introduced: "2026-06-24" requestBody: required: true content: multipart/form-data: schema: $ref: "#/components/schemas/PlatformSkillValidationRequest" x-codegen-request-body-name: request responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/PlatformSkillValidationResponse" "400": $ref: "#/components/responses/PlatformBadRequest" "401": $ref: "#/components/responses/PlatformUnauthorized" "403": $ref: "#/components/responses/PlatformForbidden" "404": $ref: "#/components/responses/PlatformNotFound" "408": $ref: "#/components/responses/PlatformRequestTimeout" "413": $ref: "#/components/responses/PlatformRequestTooLarge" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: skills x-speakeasy-name-override: validate /api/skills/sources/preview: post: tags: - Skills summary: Preview a GitHub skill source description: | Inspect a GitHub URL without persisting a source or any discovered skills. Set stream to true to receive repository scan progress as server-sent events; otherwise the response contains the completed preview. operationId: platform-skills-preview-source x-visibility: Public x-glean-experimental: id: 1629009b-244a-400a-bf55-c441dfbc586c introduced: "2026-07-23" x-codegen-request-body-name: request requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/PlatformSkillSourcePreviewRequest" responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/PlatformSkillSourcePreviewResponse" text/event-stream: schema: type: string description: | Server-sent scan, progress, skill, and result events. A failed stream emits `data: {"type":"error","code":"service_unavailable","message":"GitHub is temporarily unavailable."}` followed by `data: [DONE]` instead of a result event. example: | data: {"type":"scan","total":1,"skill_paths":["https://github.com/acme/skills/tree/main/skills/example"]} data: {"type":"progress","completed":1,"total":1,"current_skill":"skills/example/SKILL.md"} data: {"type":"skill","skill":{"display_name":"Example","description":"Example skill","source_url":"https://github.com/acme/skills/tree/main/skills/example","commit_sha":"abc123","main_content":"---\nname: Example\n---","files":[],"file_tree":["SKILL.md"]}} data: {"type":"result","response":{"skills":[{"display_name":"Example","description":"Example skill","source_url":"https://github.com/acme/skills/tree/main/skills/example","commit_sha":"abc123","main_content":"---\nname: Example\n---","files":[],"file_tree":["SKILL.md"]}],"failures":[],"request_id":"req-123"}} data: [DONE] "400": $ref: "#/components/responses/PlatformBadRequest" "401": $ref: "#/components/responses/PlatformUnauthorized" "403": $ref: "#/components/responses/PlatformForbidden" "408": $ref: "#/components/responses/PlatformRequestTimeout" "413": $ref: "#/components/responses/PlatformRequestTooLarge" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: skills x-speakeasy-name-override: previewSource /api/skills/{skill_id}: patch: tags: - Skills summary: Update skill description: | Update mutable metadata for a skill. V1 supports enabling or disabling a skill without changing its content. operationId: platform-skills-update x-visibility: Public x-glean-experimental: id: 262e1f6b-6c2d-4d6d-943b-fc251d2fb38b introduced: "2026-07-20" parameters: - name: skill_id in: path required: true description: Glean skill ID. example: "{skill_id}" schema: type: string minLength: 1 requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/PlatformSkillUpdateRequest" x-codegen-request-body-name: request responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/PlatformSkillUpdateResponse" "400": $ref: "#/components/responses/PlatformBadRequest" "401": $ref: "#/components/responses/PlatformUnauthorized" "403": $ref: "#/components/responses/PlatformForbidden" "404": $ref: "#/components/responses/PlatformNotFound" "408": $ref: "#/components/responses/PlatformRequestTimeout" "409": $ref: "#/components/responses/PlatformConflict" "413": $ref: "#/components/responses/PlatformRequestTooLarge" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: skills x-speakeasy-name-override: update delete: tags: - Skills summary: Delete skill description: | Delete a skill the authenticated caller is allowed to manage. This operation permanently removes all versions of the skill. operationId: platform-skills-delete x-visibility: Public x-glean-experimental: id: c4351fd0-4d28-4ad4-ab93-587ca4778173 introduced: "2026-07-31" parameters: - name: skill_id in: path required: true description: Glean skill ID. example: "{skill_id}" schema: type: string minLength: 1 responses: "204": description: Skill deleted. No content. "400": $ref: "#/components/responses/PlatformBadRequest" "401": $ref: "#/components/responses/PlatformUnauthorized" "403": $ref: "#/components/responses/PlatformForbidden" "404": $ref: "#/components/responses/PlatformNotFound" "408": $ref: "#/components/responses/PlatformRequestTimeout" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: skills x-speakeasy-name-override: delete get: tags: - Skills summary: Retrieve skill description: | Retrieve metadata for a skill available to the authenticated user. operationId: platform-skills-get x-visibility: Public x-glean-experimental: id: 8f8d1c92-a484-4769-9903-200613dc8a72 introduced: "2026-06-23" parameters: - name: skill_id in: path required: true description: Glean skill ID. example: "{skill_id}" schema: type: string minLength: 1 responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/PlatformSkillGetResponse" "400": $ref: "#/components/responses/PlatformBadRequest" "401": $ref: "#/components/responses/PlatformUnauthorized" "403": $ref: "#/components/responses/PlatformForbidden" "404": $ref: "#/components/responses/PlatformNotFound" "408": $ref: "#/components/responses/PlatformRequestTimeout" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: skills x-speakeasy-name-override: retrieve /api/skills/{skill_id}/content: get: tags: - Skills summary: Download skill content description: | Download the latest installable bundle for a skill available to the authenticated user. operationId: platform-skills-get-content x-visibility: Public x-glean-experimental: id: fd6908d8-f230-4cd5-bf45-f71e69266b1d introduced: "2026-06-24" parameters: - name: skill_id in: path required: true description: Glean skill ID. example: "{skill_id}" schema: type: string minLength: 1 responses: "200": description: Successful response. headers: Content-Disposition: description: Attachment filename for the skill bundle. schema: type: string content: application/octet-stream: schema: type: string format: binary "400": $ref: "#/components/responses/PlatformBadRequest" "401": $ref: "#/components/responses/PlatformUnauthorized" "403": $ref: "#/components/responses/PlatformForbidden" "404": $ref: "#/components/responses/PlatformNotFound" "408": $ref: "#/components/responses/PlatformRequestTimeout" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: skills x-speakeasy-name-override: retrieveContent /api/skills/{skill_id}/sync: post: tags: - Skills summary: Sync a GitHub-imported skill description: | Refresh one GitHub-imported skill from its stored source URL. If the skill content has changed, this operation creates a new skill version. If the skill is no longer present upstream, the stored skill is left unchanged and must be deleted explicitly. operationId: platform-skills-sync x-visibility: Public x-glean-experimental: id: 568aa3f8-2af8-449c-9e4f-818ed4b877ef introduced: "2026-08-03" parameters: - name: skill_id in: path required: true description: ID of the GitHub-imported skill to sync. example: "{skill_id}" schema: type: string minLength: 1 responses: "200": description: Skill sync completed successfully. content: application/json: schema: $ref: "#/components/schemas/PlatformSkillSyncResponse" "400": $ref: "#/components/responses/PlatformBadRequest" "401": $ref: "#/components/responses/PlatformUnauthorized" "403": $ref: "#/components/responses/PlatformForbidden" "404": $ref: "#/components/responses/PlatformNotFound" "408": $ref: "#/components/responses/PlatformRequestTimeout" "409": $ref: "#/components/responses/PlatformConflict" "413": $ref: "#/components/responses/PlatformRequestTooLarge" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: skills x-speakeasy-name-override: sync /api/skills/{skill_id}/versions: post: tags: - Skills summary: Create skill version description: | Create a new immutable version for an existing caller-managed skill from an uploaded SKILL.md, .zip, or .skill bundle. operationId: platform-skills-create-version x-visibility: Public x-glean-experimental: id: 0d5e48e2-7a41-4d54-b3aa-5026f0dd65df introduced: "2026-06-24" parameters: - name: skill_id in: path required: true description: Glean skill ID. example: "{skill_id}" schema: type: string minLength: 1 requestBody: required: true content: multipart/form-data: schema: $ref: "#/components/schemas/PlatformSkillVersionCreateRequest" x-codegen-request-body-name: request responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/PlatformSkillVersionCreateResponse" "400": $ref: "#/components/responses/PlatformBadRequest" "401": $ref: "#/components/responses/PlatformUnauthorized" "403": $ref: "#/components/responses/PlatformForbidden" "404": $ref: "#/components/responses/PlatformNotFound" "408": $ref: "#/components/responses/PlatformRequestTimeout" "409": $ref: "#/components/responses/PlatformConflict" "413": $ref: "#/components/responses/PlatformRequestTooLarge" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: skills x-speakeasy-name-override: createVersion get: tags: - Skills summary: List skill versions description: | List versions for a skill available to the authenticated user. operationId: platform-skills-list-versions x-visibility: Public x-glean-experimental: id: 9efbb8a3-d546-4304-a653-09bb427e3681 introduced: "2026-06-24" parameters: - name: skill_id in: path required: true description: Glean skill ID. example: "{skill_id}" schema: type: string minLength: 1 - in: query name: page_size description: Maximum number of versions to return. required: false schema: type: integer minimum: 1 maximum: 100 - in: query name: cursor description: Opaque pagination cursor from a previous response. required: false schema: type: string minLength: 1 responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/PlatformSkillVersionsListResponse" "400": $ref: "#/components/responses/PlatformBadRequest" "401": $ref: "#/components/responses/PlatformUnauthorized" "403": $ref: "#/components/responses/PlatformForbidden" "404": $ref: "#/components/responses/PlatformNotFound" "408": $ref: "#/components/responses/PlatformRequestTimeout" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: skills x-speakeasy-name-override: listVersions /api/skills/{skill_id}/versions/{version}: get: tags: - Skills summary: Retrieve skill version description: | Retrieve metadata for a skill version available to the authenticated user. operationId: platform-skills-get-version x-visibility: Public x-glean-experimental: id: d70986b1-ad80-48dd-8e52-f294e7251dda introduced: "2026-06-24" parameters: - name: skill_id in: path required: true description: Glean skill ID. example: "{skill_id}" schema: type: string minLength: 1 - name: version in: path required: true description: Major version number. example: 1 schema: type: integer minimum: 1 responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/PlatformSkillVersionGetResponse" "400": $ref: "#/components/responses/PlatformBadRequest" "401": $ref: "#/components/responses/PlatformUnauthorized" "403": $ref: "#/components/responses/PlatformForbidden" "404": $ref: "#/components/responses/PlatformNotFound" "408": $ref: "#/components/responses/PlatformRequestTimeout" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: skills x-speakeasy-name-override: retrieveVersion /api/skills/{skill_id}/versions/{version}/content: get: tags: - Skills summary: Download skill version content description: | Download the installable bundle for a skill version available to the authenticated user. operationId: platform-skills-get-version-content x-visibility: Public x-glean-experimental: id: 70c85692-7042-403a-a3a5-5b315576432a introduced: "2026-06-24" parameters: - name: skill_id in: path required: true description: Glean skill ID. example: "{skill_id}" schema: type: string minLength: 1 - name: version in: path required: true description: Major version number. example: 1 schema: type: integer minimum: 1 responses: "200": description: Successful response. headers: Content-Disposition: description: Attachment filename for the skill bundle. schema: type: string content: application/octet-stream: schema: type: string format: binary "400": $ref: "#/components/responses/PlatformBadRequest" "401": $ref: "#/components/responses/PlatformUnauthorized" "403": $ref: "#/components/responses/PlatformForbidden" "404": $ref: "#/components/responses/PlatformNotFound" "408": $ref: "#/components/responses/PlatformRequestTimeout" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: skills x-speakeasy-name-override: retrieveVersionContent /api/search: post: tags: - Search summary: Search description: | Search your organization's connected content and return ranked document results with cursor pagination. Use `GET /api/search/filters` to discover datasource identifiers and common filter fields. Built-in filter names are validated; other field names are accepted as custom filters and behavior depends on your Glean configuration and connected sources. Errors: HTTP 422 `unprocessable_query` returns no `results` or `next_cursor`. See `warnings` on the response for non-blocking issues such as partially available results. Not every query issue produces a warning or error. operationId: platform-search x-visibility: Public x-glean-experimental: id: 5ab612fc-ed50-4419-bec3-e5fe83934653 introduced: "2026-04-08" x-codegen-request-body-name: payload requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/PlatformSearchRequest" responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/PlatformSearchResponse" "400": $ref: "#/components/responses/PlatformBadRequest" "401": $ref: "#/components/responses/PlatformUnauthorized" "403": $ref: "#/components/responses/PlatformForbidden" "404": $ref: "#/components/responses/PlatformNotFound" "408": $ref: "#/components/responses/PlatformRequestTimeout" "413": $ref: "#/components/responses/PlatformRequestTooLarge" "422": $ref: "#/components/responses/PlatformUnprocessableEntity" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: search x-speakeasy-name-override: query /api/search/filters: get: tags: - Search summary: List search filters description: | List datasources and common built-in filter fields visible to the authenticated user. This is a best-effort catalog, not an exhaustive list of every filter search accepts. Without `query`, returns field metadata only and does not run a search. With a nonblank `query`, provide exactly one `datasources` value to request suggested filter values for that query; no documents are returned and this endpoint does not include warning objects. See `FilterFieldInfo.values` for limitations on suggested values. Rate-limited requests return HTTP 429 with `Retry-After`; temporary backend unavailability returns HTTP 503. operationId: platform-search-filters x-visibility: Public x-glean-experimental: id: 0b585621-13fb-4544-bf20-5e1c99452735 introduced: "2026-05-12" parameters: - in: query name: datasources description: | Restrict metadata to one or more datasource identifiers as returned by this endpoint (for example, `jira`). With a nonblank `query`, exactly one datasource is required. Unknown or inaccessible identifiers return `invalid_datasource`. required: false schema: type: array minItems: 1 items: type: string minLength: 1 - in: query name: query description: | Optional search query that requests suggested filter values for the selected datasource. Must be nonblank when present. Triggers a search for facet values only; does not return documents. required: false schema: type: string minLength: 1 responses: "200": description: Successful response. headers: Cache-Control: description: | Present as `no-store` for query-backed discovery responses. Catalog-only responses omit this endpoint-specific override. schema: type: string example: no-store content: application/json: schema: $ref: "#/components/schemas/PlatformSearchFiltersResponse" "400": $ref: "#/components/responses/PlatformBadRequest" "401": $ref: "#/components/responses/PlatformUnauthorized" "403": $ref: "#/components/responses/PlatformForbidden" "404": $ref: "#/components/responses/PlatformNotFound" "408": $ref: "#/components/responses/PlatformRequestTimeout" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: search x-speakeasy-name-override: listFilters /api/triggers: post: tags: - Triggers summary: Create trigger description: | Create a trigger from a preset and return it with its signing secret. operationId: platform-triggers-create x-visibility: Public x-glean-experimental: id: eb175f18-74e6-4c9c-ba02-23bcc9018fc9 introduced: "2026-07-06" x-codegen-request-body-name: payload requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/PlatformTriggerCreateRequest" callbacks: triggerEvent: "{$request.body#/delivery/webhook_url}": post: tags: - Triggers summary: Receive a trigger event description: Delivery uses at-least-once semantics, so the same event can be sent more than once. Return any 2xx status after accepting the event. Network failures, 408, 429, and 5xx responses are retried; other non-2xx responses, including redirects, are terminal. The `webhook-id` remains stable across attempts and can be used for deduplication, while `webhook-timestamp` and `webhook-signature` are generated for each attempt. operationId: trigger-webhook-event security: - {} - TriggerWebhookBearerAuth: [] parameters: - $ref: "#/components/parameters/TriggerWebhookId" - $ref: "#/components/parameters/TriggerWebhookTimestamp" - $ref: "#/components/parameters/TriggerWebhookSignature" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/PlatformTriggerWebhookEvent" responses: "408": description: Request timeout. Glean retries the delivery. "429": description: Rate limited. Glean retries the delivery. 2XX: description: Event accepted. Glean does not retry the delivery. 3XX: description: Redirects are not followed and the delivery is not retried. 4XX: description: Client error other than 408 or 429. Glean does not retry. 5XX: description: Server error. Glean retries the delivery. responses: "201": description: Trigger created. content: application/json: schema: $ref: "#/components/schemas/PlatformTriggerCreateResponse" "400": $ref: "#/components/responses/PlatformBadRequest" "401": $ref: "#/components/responses/PlatformUnauthorized" "403": $ref: "#/components/responses/PlatformForbidden" "404": $ref: "#/components/responses/PlatformNotFound" "408": $ref: "#/components/responses/PlatformRequestTimeout" "409": $ref: "#/components/responses/PlatformConflict" "413": $ref: "#/components/responses/PlatformRequestTooLarge" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: triggers x-speakeasy-name-override: create get: tags: - Triggers summary: List triggers description: | List triggers owned by the authenticated caller. operationId: platform-triggers-list x-visibility: Public x-glean-experimental: id: e3554987-e043-4561-889a-a1117b1bce06 introduced: "2026-07-06" parameters: - in: query name: page_size description: Maximum number of triggers to return. required: false schema: type: integer minimum: 1 maximum: 100 default: 50 - in: query name: cursor description: Opaque pagination cursor from a previous response. required: false schema: type: string minLength: 1 responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/PlatformTriggerListResponse" "400": $ref: "#/components/responses/PlatformBadRequest" "401": $ref: "#/components/responses/PlatformUnauthorized" "403": $ref: "#/components/responses/PlatformForbidden" "408": $ref: "#/components/responses/PlatformRequestTimeout" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: triggers x-speakeasy-name-override: list /api/triggers/{trigger_id}: get: tags: - Triggers summary: Get trigger description: | Retrieve a trigger owned by the authenticated caller. operationId: platform-triggers-get x-visibility: Public x-glean-experimental: id: 46de62cb-ba31-4f71-9646-649c1d604816 introduced: "2026-07-06" parameters: - in: path name: trigger_id description: ID of the trigger to retrieve. required: true example: "{trigger_id}" schema: type: string minLength: 1 responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/PlatformTriggerGetResponse" "400": $ref: "#/components/responses/PlatformBadRequest" "401": $ref: "#/components/responses/PlatformUnauthorized" "403": $ref: "#/components/responses/PlatformForbidden" "404": $ref: "#/components/responses/PlatformNotFound" "408": $ref: "#/components/responses/PlatformRequestTimeout" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: triggers x-speakeasy-name-override: get patch: tags: - Triggers summary: Update trigger description: | Update a trigger. operationId: platform-triggers-update x-visibility: Public x-glean-experimental: id: 3eb4c709-bd5c-4019-b913-0db36c766350 introduced: "2026-07-06" x-codegen-request-body-name: payload parameters: - in: path name: trigger_id description: ID of the trigger to update. required: true example: "{trigger_id}" schema: type: string minLength: 1 requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/PlatformTriggerUpdateRequest" responses: "200": description: Trigger updated. content: application/json: schema: $ref: "#/components/schemas/PlatformTriggerGetResponse" "400": $ref: "#/components/responses/PlatformBadRequest" "401": $ref: "#/components/responses/PlatformUnauthorized" "403": $ref: "#/components/responses/PlatformForbidden" "404": $ref: "#/components/responses/PlatformNotFound" "408": $ref: "#/components/responses/PlatformRequestTimeout" "413": $ref: "#/components/responses/PlatformRequestTooLarge" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: triggers x-speakeasy-name-override: update delete: tags: - Triggers summary: Delete trigger description: | Delete a trigger. operationId: platform-triggers-delete x-visibility: Public x-glean-experimental: id: e6564ed7-8b4b-4708-918b-eed97110859f introduced: "2026-07-06" parameters: - in: path name: trigger_id description: ID of the trigger to delete. required: true example: "{trigger_id}" schema: type: string minLength: 1 responses: "204": description: Trigger deleted. No content. "400": $ref: "#/components/responses/PlatformBadRequest" "401": $ref: "#/components/responses/PlatformUnauthorized" "403": $ref: "#/components/responses/PlatformForbidden" "404": $ref: "#/components/responses/PlatformNotFound" "408": $ref: "#/components/responses/PlatformRequestTimeout" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: triggers x-speakeasy-name-override: delete /api/triggers/{trigger_id}/events/search: post: tags: - Triggers summary: Search events for a trigger description: | Search recent content events an existing trigger matches. Read-only — no webhook delivery is made. Covers the last seven days. operationId: platform-triggers-events-search x-visibility: Public x-glean-experimental: id: c734a377-3dec-4ee2-9ec5-3848a8384f03 introduced: "2026-08-07" parameters: - in: path name: trigger_id description: ID of the trigger whose events to search. required: true example: "{trigger_id}" schema: type: string minLength: 1 requestBody: required: false content: application/json: schema: $ref: "#/components/schemas/PlatformTriggerEventSearchRequest" responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/PlatformTriggerEventSearchResponse" "400": $ref: "#/components/responses/PlatformBadRequest" "401": $ref: "#/components/responses/PlatformUnauthorized" "403": $ref: "#/components/responses/PlatformForbidden" "404": $ref: "#/components/responses/PlatformNotFound" "408": $ref: "#/components/responses/PlatformRequestTimeout" "413": $ref: "#/components/responses/PlatformRequestTooLarge" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: triggers x-speakeasy-name-override: searchEvents /api/trigger-presets: get: tags: - Triggers summary: List trigger presets description: | List the trigger presets available to the caller. A preset is a curated content-trigger template (e.g. a new Jira ticket) which is passed when creating a trigger. operationId: platform-trigger-presets-list x-visibility: Public x-glean-experimental: id: f5b16196-0d4c-42f0-89bf-40313398728e introduced: "2026-07-22" parameters: - in: query name: datasource description: Restrict results to presets for a single datasource (e.g. github). required: false schema: type: string minLength: 1 - in: query name: page_size description: Maximum number of presets to return. required: false schema: type: integer minimum: 1 maximum: 100 default: 50 - in: query name: cursor description: Opaque pagination cursor from a previous response. required: false schema: type: string minLength: 1 responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/PlatformTriggerPresetListResponse" "400": $ref: "#/components/responses/PlatformBadRequest" "401": $ref: "#/components/responses/PlatformUnauthorized" "403": $ref: "#/components/responses/PlatformForbidden" "408": $ref: "#/components/responses/PlatformRequestTimeout" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: triggers x-speakeasy-name-override: listPresets /api/trigger-presets/{preset_id}: get: tags: - Triggers summary: Get trigger preset description: | Retrieve a single trigger preset by id. operationId: platform-trigger-presets-get x-visibility: Public x-glean-experimental: id: 5277167d-909b-4eee-95d1-8958b07016bb introduced: "2026-07-22" parameters: - in: path name: preset_id description: ID of the preset to retrieve. required: true example: "{preset_id}" schema: type: string minLength: 1 responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/PlatformTriggerPresetGetResponse" "400": $ref: "#/components/responses/PlatformBadRequest" "401": $ref: "#/components/responses/PlatformUnauthorized" "403": $ref: "#/components/responses/PlatformForbidden" "404": $ref: "#/components/responses/PlatformNotFound" "408": $ref: "#/components/responses/PlatformRequestTimeout" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: triggers x-speakeasy-name-override: getPreset /api/trigger-presets/{preset_id}/input-values: get: tags: - Triggers summary: Search trigger preset input values description: | Return up to 300 selectable values for a single picklist input on a preset. Results are intended for typeahead selection and are not cursor-paginated. When `is_truncated` is true, refine `query` to narrow the result set. operationId: platform-trigger-presets-input-values-list x-visibility: Public x-glean-experimental: id: 24c5675d-a57a-48cb-9d71-3dece296f28c introduced: "2026-08-06" parameters: - in: path name: preset_id description: ID of the preset the input belongs to. required: true example: "{preset_id}" schema: type: string minLength: 1 - in: query name: field description: Field identifier of the input whose values to list. required: true example: "{field}" schema: type: string minLength: 1 - in: query name: query description: | Prefix filter over the input's option values, for typeahead. Matching is on the option value, not its display name. required: false schema: type: string responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/PlatformTriggerPresetInputValueListResponse" "400": $ref: "#/components/responses/PlatformBadRequest" "401": $ref: "#/components/responses/PlatformUnauthorized" "403": $ref: "#/components/responses/PlatformForbidden" "404": $ref: "#/components/responses/PlatformNotFound" "408": $ref: "#/components/responses/PlatformRequestTimeout" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: triggers x-speakeasy-name-override: listPresetInputValues /api/trigger-presets/{preset_id}/events/search: post: tags: - Triggers summary: Search events for a trigger preset description: | Search recent content events an unsaved trigger built from this preset would match, to preview it before creating the trigger. Read-only — no trigger is created and no webhook delivery is made. Covers the last seven days. operationId: platform-trigger-presets-events-search x-visibility: Public x-glean-experimental: id: a48efd80-78d6-46de-9f23-5b8c63ecd157 introduced: "2026-08-12" parameters: - in: path name: preset_id description: ID of the preset to preview. required: true example: "{preset_id}" schema: type: string minLength: 1 requestBody: required: false content: application/json: schema: $ref: "#/components/schemas/PlatformTriggerPresetEventSearchRequest" responses: "200": description: Successful response. content: application/json: schema: $ref: "#/components/schemas/PlatformTriggerEventSearchResponse" "400": $ref: "#/components/responses/PlatformBadRequest" "401": $ref: "#/components/responses/PlatformUnauthorized" "403": $ref: "#/components/responses/PlatformForbidden" "404": $ref: "#/components/responses/PlatformNotFound" "408": $ref: "#/components/responses/PlatformRequestTimeout" "413": $ref: "#/components/responses/PlatformRequestTooLarge" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: triggers x-speakeasy-name-override: searchPresetEvents /api/chat#stream: post: tags: - Chat summary: Create a streaming chat response description: | SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn as server-sent events. HTTP clients request this mode by setting `stream` to true in the JSON body. operationId: platform-chat-create-stream x-visibility: Public x-glean-experimental: id: e65a0a77-97a2-4c91-be60-eae7f6238015 introduced: "2026-07-14" x-codegen-request-body-name: payload requestBody: required: true content: application/json: schema: allOf: - $ref: "#/components/schemas/PlatformChatCreateRequest" - type: object required: - stream properties: stream: type: boolean const: true default: true responses: "200": description: Successful response. content: text/event-stream: schema: $ref: "#/components/schemas/PlatformChatStreamEventServerSentEvent" "400": $ref: "#/components/responses/PlatformBadRequest" "401": $ref: "#/components/responses/PlatformUnauthorized" "403": $ref: "#/components/responses/PlatformForbidden" "404": $ref: "#/components/responses/PlatformNotFound" "408": $ref: "#/components/responses/PlatformRequestTimeout" "413": $ref: "#/components/responses/PlatformRequestTooLarge" "422": $ref: "#/components/responses/PlatformUnprocessableEntity" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: chat x-speakeasy-name-override: createStream components: securitySchemes: APIToken: type: http scheme: bearer description: | Glean API token. Obtain via Admin Console -> Platform -> API Tokens, or via OAuth 2.0 client credentials flow. schemas: PlatformWarning: type: object additionalProperties: false required: - code - message description: Non-blocking warning attached to a successful Platform response. properties: code: type: string minLength: 1 description: | Open snake_case warning code. Clients must tolerate unknown values; the set of codes is not a closed enum. example: results_incomplete message: type: string minLength: 1 description: Human-readable warning message. PlatformAgentsSearchRequest: type: object additionalProperties: false example: name: HR Policy Agent properties: name: type: string description: Case-insensitive substring to match against agent names. If omitted or empty, no name filter is applied. example: HR Policy Agent PlatformAgentCapabilities: type: object additionalProperties: true properties: ap.io.messages: type: boolean description: Whether the agent supports messages as input. ap.io.streaming: type: boolean description: Whether the agent supports streaming output. PlatformAgent: type: object required: - agent_id - name - capabilities properties: agent_id: type: string description: ID of the agent. example: mho4lwzylcozgoc2 name: type: string description: Name of the agent. example: HR Policy Agent description: type: string description: Description of the agent. metadata: type: object description: Agent metadata. additionalProperties: true capabilities: $ref: "#/components/schemas/PlatformAgentCapabilities" PlatformAgentsSearchResponse: type: object required: - agents - request_id properties: agents: type: array description: Agents matching the search request. items: $ref: "#/components/schemas/PlatformAgent" request_id: type: string description: Platform-generated request ID for support correlation. PlatformProblemDetailCode: type: string description: Stable machine-readable error code. enum: - invalid_request - missing_required_field - invalid_parameter - invalid_cursor - expired_cursor - invalid_filter - invalid_datasource - authentication_required - token_expired - insufficient_permissions - spend_limit_exceeded - resource_not_found - method_not_allowed - request_timeout - request_too_large - token_limit_exceeded - conflict - gone - unprocessable_query - tools_unauthorized - rate_limit_exceeded - internal_error - service_unavailable x-glean-problem-detail-codes: invalid_request: status: 400 title: Invalid Request missing_required_field: status: 400 title: Missing Required Field invalid_parameter: status: 400 title: Invalid Parameter invalid_cursor: status: 400 title: Invalid Pagination Cursor expired_cursor: status: 400 title: Expired Pagination Cursor invalid_filter: status: 400 title: Invalid Filter invalid_datasource: status: 400 title: Invalid Datasource authentication_required: status: 401 title: Authentication Required token_expired: status: 401 title: Token Expired insufficient_permissions: status: 403 title: Insufficient Permissions spend_limit_exceeded: status: 403 title: Spend Limit Exceeded resource_not_found: status: 404 title: Resource Not Found method_not_allowed: status: 405 title: Method Not Allowed request_timeout: status: 408 title: Request Timeout request_too_large: status: 413 title: Request Too Large token_limit_exceeded: status: 413 title: Token Limit Exceeded conflict: status: 409 title: Conflict gone: status: 410 title: Gone unprocessable_query: status: 422 title: Unprocessable Query tools_unauthorized: status: 422 title: Tools Unauthorized rate_limit_exceeded: status: 429 title: Rate Limit Exceeded internal_error: status: 500 title: Internal Error service_unavailable: status: 503 title: Service Unavailable example: invalid_cursor PlatformProblemDetailError: type: object required: - pointer - detail description: Field-level validation problem for a single offending field. properties: pointer: type: string description: RFC 6901 JSON Pointer to the offending field. example: /messages/0/role detail: type: string description: Human-readable explanation for this field. example: "Must be one of: USER, GLEAN_AI." code: $ref: "#/components/schemas/PlatformProblemDetailCode" PlatformProblemDetail: type: object required: - type - title - status - detail - code - request_id description: | Error response following RFC 9457, extended with `code` and `documentation_url` for machine-readable classification and self-service remediation. properties: type: type: string format: uri description: URI identifying the error type. example: https://developers.glean.com/errors/invalid-cursor title: type: string description: Short, human-readable summary of the error. example: Invalid Pagination Cursor status: type: integer description: HTTP status code mirrored from the response. example: 400 detail: type: string description: Human-readable explanation specific to this occurrence. example: | The provided cursor has expired. Start a new search to get a fresh cursor. code: $ref: "#/components/schemas/PlatformProblemDetailCode" documentation_url: type: string format: uri description: Direct URL to documentation for this error code. example: https://developers.glean.com/errors/invalid-cursor request_id: type: string description: Platform-generated request ID for support correlation. example: req_7f8a9b0c1d2e errors: type: array description: Field-level validation problems, one entry per offending field. items: $ref: "#/components/schemas/PlatformProblemDetailError" PlatformAgentGetResponse: type: object required: - agent - request_id properties: agent: $ref: "#/components/schemas/PlatformAgent" request_id: type: string description: Platform-generated request ID for support correlation. PlatformActionSummary: type: object required: - tool_id - display_name properties: tool_id: type: string description: Unique identifier of the action. display_name: type: string description: Display name of the action. type: type: string description: Tool type. auth_type: type: string description: Authentication type required by the action. write_action_type: type: string description: Write-action execution type. is_setup_finished: type: boolean description: Whether this action has been fully configured. data_source: type: string description: Kind of knowledge the action accesses or modifies. PlatformAgentSchemasResponse: type: object required: - agent_id - input_schema - output_schema - request_id properties: agent_id: type: string description: ID of the agent. name: type: string description: Name of the agent. input_schema: type: object description: Agent input schema in JSON Schema format. additionalProperties: true output_schema: type: object description: Agent output schema in JSON Schema format. additionalProperties: true tools: type: array description: Tools that the agent can invoke, when requested. items: $ref: "#/components/schemas/PlatformActionSummary" request_id: type: string description: Platform-generated request ID for support correlation. PlatformMessageRole: type: string description: Role of the message author. example: USER enum: - USER - GLEAN_AI PlatformContentType: type: string enum: - text PlatformMessageTextBlock: type: object required: - text - type properties: text: type: string description: Text content. type: $ref: "#/components/schemas/PlatformContentType" PlatformMessage: type: object required: - role - content properties: role: $ref: "#/components/schemas/PlatformMessageRole" content: type: array minItems: 1 description: Content blocks in the message. items: $ref: "#/components/schemas/PlatformMessageTextBlock" PlatformAgentRunCreateRequest: type: object additionalProperties: false description: | Request to run an agent. A request MUST supply either `messages` (a non-empty conversation) or `input` (for input-form triggered agents). example: messages: - role: USER content: - text: What is our parental leave policy? type: text properties: input: type: object description: Input fields for an input-form triggered agent. additionalProperties: true messages: type: array minItems: 1 description: | Messages to pass to the agent. When provided, the array MUST contain at least one message and each message MUST specify a valid `role` and non-empty `content`. items: $ref: "#/components/schemas/PlatformMessage" metadata: type: object description: Metadata to pass to the agent. additionalProperties: true stream: type: boolean description: Whether to stream the run response as server-sent events. default: false PlatformAgentRunCreate: type: object required: - agent_id properties: agent_id: type: string description: ID of the agent being run. input: type: object description: Input fields for an input-form triggered agent. additionalProperties: true messages: type: array description: Messages passed to the agent. items: $ref: "#/components/schemas/PlatformMessage" metadata: type: object description: Metadata passed to the agent. additionalProperties: true PlatformAgentExecutionStatus: type: string description: Status of the agent run. enum: - error - success PlatformAgentRun: allOf: - $ref: "#/components/schemas/PlatformAgentRunCreate" - type: object required: - status properties: status: $ref: "#/components/schemas/PlatformAgentExecutionStatus" PlatformAgentRunWaitResponse: type: object required: - request_id properties: run: $ref: "#/components/schemas/PlatformAgentRun" messages: type: array description: Messages returned by the completed run. items: $ref: "#/components/schemas/PlatformMessage" request_id: type: string description: Platform-generated request ID for support correlation. PlatformAuthenticationSuggestion: type: object description: One tool the caller must authorize before the agent can run. required: - server_id properties: tool_name: type: string description: Human-readable tool name. server_id: type: string description: Identifier to POST to `/tool-servers/{serverId}/auth` (Client API) with `returnUrl` in the request body to obtain an `authorizationUrl` to redirect the end user to. PlatformUnauthorizedAgentToolsProblem: description: Problem detail extended with `authentication_suggestions` naming each tool the caller must authorize. allOf: - $ref: "#/components/schemas/PlatformProblemDetail" - type: object required: - authentication_suggestions properties: authentication_suggestions: type: array description: One entry per tool the caller must authorize. items: $ref: "#/components/schemas/PlatformAuthenticationSuggestion" PlatformChatInputMessage: type: object additionalProperties: false required: - role - content properties: role: type: string enum: - USER - ASSISTANT content: type: string minLength: 1 PlatformChatCreateRequest: type: object additionalProperties: false required: - input example: input: What is our parental leave policy? properties: input: description: | Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`. oneOf: - type: string minLength: 1 - type: array minItems: 1 items: $ref: "#/components/schemas/PlatformChatInputMessage" stream: type: boolean description: | When true, the HTTP response is `text/event-stream`. When false or omitted, the HTTP response is `application/json`. default: false store: type: boolean description: | When true (default), persist the interaction and return a `conversation_id`. When false, run ephemerally with no persistence. default: true conversation_id: type: string minLength: 1 description: | Continue an existing stored conversation. Incompatible with message-array `input` and with `store: false`. PlatformChatStreamResponseId: type: string minLength: 1 pattern: ^resp_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: | Platform-owned, non-persisted response envelope identifier in `resp_` form. The same identifier is used for every event in one streamed response. PlatformChatDocumentSource: type: object additionalProperties: false required: - type properties: type: type: string enum: - DOCUMENT document_id: type: string minLength: 1 url: type: string minLength: 1 title: type: string datasource: type: string anyOf: - required: - document_id - required: - url PlatformChatPersonSource: type: object additionalProperties: false required: - type - person_id properties: type: type: string enum: - PERSON person_id: type: string minLength: 1 name: type: string url: type: string PlatformChatFileSource: type: object additionalProperties: false required: - type - file_id properties: type: type: string enum: - FILE file_id: type: string minLength: 1 title: type: string url: type: string datasource: type: string PlatformChatCustomEntitySource: type: object additionalProperties: false required: - type - entity_id properties: type: type: string enum: - CUSTOM_ENTITY entity_id: type: string minLength: 1 name: type: string title: type: string url: type: string datasource: type: string PlatformChatCitationSource: description: Four-variant citation source union. oneOf: - $ref: "#/components/schemas/PlatformChatDocumentSource" - $ref: "#/components/schemas/PlatformChatPersonSource" - $ref: "#/components/schemas/PlatformChatFileSource" - $ref: "#/components/schemas/PlatformChatCustomEntitySource" discriminator: propertyName: type mapping: DOCUMENT: "#/components/schemas/PlatformChatDocumentSource" PERSON: "#/components/schemas/PlatformChatPersonSource" FILE: "#/components/schemas/PlatformChatFileSource" CUSTOM_ENTITY: "#/components/schemas/PlatformChatCustomEntitySource" PlatformChatCitationSnippet: type: object additionalProperties: false required: - text properties: text: type: string minLength: 1 page_number: type: - integer - "null" PlatformChatCitationAnnotation: type: object additionalProperties: false required: - type - sources properties: type: type: string enum: - CITATION sources: type: array minItems: 1 items: $ref: "#/components/schemas/PlatformChatCitationSource" start_index: type: - integer - "null" minimum: 0 end_index: type: - integer - "null" minimum: 0 snippets: type: - array - "null" items: $ref: "#/components/schemas/PlatformChatCitationSnippet" PlatformChatOutputTextContent: type: object additionalProperties: false required: - type - text properties: type: type: string enum: - OUTPUT_TEXT text: type: string annotations: type: array items: $ref: "#/components/schemas/PlatformChatCitationAnnotation" PlatformChatOutputMessage: type: object additionalProperties: false required: - type - role - content properties: type: type: string enum: - MESSAGE role: type: string enum: - ASSISTANT content: type: array minItems: 1 maxItems: 1 items: $ref: "#/components/schemas/PlatformChatOutputTextContent" PlatformChatCompletedResponse: type: object additionalProperties: false required: - id - object - created_at - status - output - store - request_id properties: id: $ref: "#/components/schemas/PlatformChatStreamResponseId" object: type: string enum: - RESPONSE created_at: type: string format: date-time description: RFC 3339 UTC timestamp when the response was created. status: type: string enum: - COMPLETED output: type: array minItems: 1 maxItems: 1 items: $ref: "#/components/schemas/PlatformChatOutputMessage" store: type: boolean conversation_id: type: - string - "null" minLength: 1 description: Present when the interaction was persisted. request_id: type: string minLength: 1 PlatformChatStreamResponseCreated: type: object additionalProperties: false required: - type - response_id properties: type: type: string enum: - RESPONSE_CREATED response_id: $ref: "#/components/schemas/PlatformChatStreamResponseId" PlatformChatStreamProgress: type: object additionalProperties: false required: - type - response_id - text properties: type: type: string enum: - RESPONSE_PROGRESS response_id: $ref: "#/components/schemas/PlatformChatStreamResponseId" text: type: string minLength: 1 description: | Verbatim concatenated fragment text from an assistant UPDATE wire message. Display-oriented passthrough only; not part of the final answer and not present on terminal response snapshots. PlatformChatStreamOutputTextDelta: type: object additionalProperties: false required: - type - response_id - delta properties: type: type: string enum: - RESPONSE_OUTPUT_TEXT_DELTA response_id: $ref: "#/components/schemas/PlatformChatStreamResponseId" delta: type: string PlatformChatStreamOutputTextDone: type: object additionalProperties: false required: - type - response_id - text properties: type: type: string enum: - RESPONSE_OUTPUT_TEXT_DONE response_id: $ref: "#/components/schemas/PlatformChatStreamResponseId" text: type: string PlatformChatStreamResponseCompleted: type: object additionalProperties: false required: - type - response_id - response properties: type: type: string enum: - RESPONSE_COMPLETED response_id: $ref: "#/components/schemas/PlatformChatStreamResponseId" response: $ref: "#/components/schemas/PlatformChatCompletedResponse" PlatformChatResponseError: type: object additionalProperties: false required: - message properties: code: type: - string - "null" description: | Open snake_case error code aligned with ProblemDetail codes when present. Clients must tolerate unknown values; the set of codes is not a closed enum. Limit failures use `spend_limit_exceeded` (billing spend limit) and `token_limit_exceeded` (model context/token limit). example: spend_limit_exceeded message: type: string minLength: 1 PlatformChatFailedResponse: type: object additionalProperties: false required: - id - object - created_at - status - output - store - request_id - error properties: id: $ref: "#/components/schemas/PlatformChatStreamResponseId" object: type: string enum: - RESPONSE created_at: type: string format: date-time description: RFC 3339 UTC timestamp when the response was created. status: type: string enum: - FAILED output: type: array maxItems: 1 items: $ref: "#/components/schemas/PlatformChatOutputMessage" store: type: boolean conversation_id: type: - string - "null" minLength: 1 description: Present when the interaction was persisted. request_id: type: string minLength: 1 error: $ref: "#/components/schemas/PlatformChatResponseError" PlatformChatStreamResponseFailed: type: object additionalProperties: false required: - type - response_id - response properties: type: type: string enum: - RESPONSE_FAILED response_id: $ref: "#/components/schemas/PlatformChatStreamResponseId" response: $ref: "#/components/schemas/PlatformChatFailedResponse" PlatformChatStreamEvent: description: | JSON object written to the SSE `data` field. This schema is the payload for SDK transform, not the raw HTTP body. Do not run JSON response conformance on stream bodies. A typical wire frame is: id: 1 event: RESPONSE_CREATED data: {"type":"RESPONSE_CREATED","response_id":"resp_e65a0a77-97a2-4c91-be60-eae7f6238015"} example: type: RESPONSE_CREATED response_id: resp_e65a0a77-97a2-4c91-be60-eae7f6238015 oneOf: - $ref: "#/components/schemas/PlatformChatStreamResponseCreated" - $ref: "#/components/schemas/PlatformChatStreamProgress" - $ref: "#/components/schemas/PlatformChatStreamOutputTextDelta" - $ref: "#/components/schemas/PlatformChatStreamOutputTextDone" - $ref: "#/components/schemas/PlatformChatStreamResponseCompleted" - $ref: "#/components/schemas/PlatformChatStreamResponseFailed" discriminator: propertyName: type mapping: RESPONSE_CREATED: "#/components/schemas/PlatformChatStreamResponseCreated" RESPONSE_PROGRESS: "#/components/schemas/PlatformChatStreamProgress" RESPONSE_OUTPUT_TEXT_DELTA: "#/components/schemas/PlatformChatStreamOutputTextDelta" RESPONSE_OUTPUT_TEXT_DONE: "#/components/schemas/PlatformChatStreamOutputTextDone" RESPONSE_COMPLETED: "#/components/schemas/PlatformChatStreamResponseCompleted" RESPONSE_FAILED: "#/components/schemas/PlatformChatStreamResponseFailed" PlatformSkillStatus: type: string enum: - DRAFT - ENABLED - DISABLED description: Current skill status. PlatformSkillOrigin: type: string enum: - CUSTOM description: Source category for the skill. PlatformSkillSyncStatus: type: string enum: - UP_TO_DATE - UPDATE_AVAILABLE - SYNC_FAILED description: Current external-source sync status. PlatformSkillSourceProvenance: type: object properties: source_url: type: string description: URL of the external source the skill was imported from. commit_sha: type: string description: Source commit SHA for the imported skill. imported_at: type: string format: date-time description: Time the skill was imported. last_synced_at: type: string format: date-time description: Time the skill was last synced from its source. sync_status: $ref: "#/components/schemas/PlatformSkillSyncStatus" sync_error: type: string description: Human-readable sync failure reason, present only when sync_status is SYNC_FAILED. PlatformPersonReference: type: object description: A lightweight reference to a person, used where a payload merely points at someone. required: - name properties: id: type: string description: Opaque Glean person ID. name: type: string description: Display name. PlatformSkill: type: object required: - id - display_name - description - latest_version - latest_minor_version - status - origin - owner - created_at - updated_at properties: id: type: string description: Glean skill ID. display_name: type: string description: Human-readable skill name. description: type: string description: Human-readable skill description. latest_version: type: integer description: Latest major version number for the skill. latest_minor_version: type: integer description: Latest minor version number for the skill. status: $ref: "#/components/schemas/PlatformSkillStatus" origin: $ref: "#/components/schemas/PlatformSkillOrigin" source_provenance: $ref: "#/components/schemas/PlatformSkillSourceProvenance" owner: $ref: "#/components/schemas/PlatformPersonReference" created_at: type: string format: date-time description: Time the skill was created. updated_at: type: string format: date-time description: Time the skill was last updated. PlatformSkillsListResponse: type: object required: - skills - has_more - next_cursor - request_id properties: skills: type: array description: Skills available to the user. items: $ref: "#/components/schemas/PlatformSkill" has_more: type: boolean description: Whether additional results are available. next_cursor: type: - string - "null" description: Cursor for the next page, or null when no more results are available. request_id: type: string description: Platform-generated request ID for support correlation. PlatformSkillCreateRequest: type: object additionalProperties: false required: - file properties: file: type: string format: binary description: SKILL.md, .zip, or .skill bundle to create. PlatformSkillCreateResponse: type: object required: - skill - request_id properties: skill: $ref: "#/components/schemas/PlatformSkill" request_id: type: string description: Platform-generated request ID for support correlation. PlatformSkillImportRequest: type: object additionalProperties: false required: - source_urls example: source_urls: - https://github.com/anthropics/skills/tree/main/skills/skill-creator properties: source_urls: type: array minItems: 1 maxItems: 100 uniqueItems: true description: Resolved GitHub skill URLs selected from a source preview. items: type: string minLength: 1 maxLength: 2048 PlatformSkillImportResponse: type: object required: - skills - request_id properties: skills: type: array minItems: 1 description: Independently persisted skills in request order. items: $ref: "#/components/schemas/PlatformSkill" request_id: type: string description: Platform-generated request ID for support correlation. PlatformSkillValidationRequest: type: object additionalProperties: false required: - file properties: file: type: string format: binary description: SKILL.md, .zip, or .skill bundle to validate. PlatformSkillValidationMetadata: type: object required: - display_name - description properties: display_name: type: string description: Skill name parsed from SKILL.md frontmatter. description: type: string description: Skill description parsed from SKILL.md frontmatter. PlatformSkillValidationFile: type: object required: - path - size_bytes - is_manifest properties: path: type: string description: Normalized relative path in the skill bundle. size_bytes: type: integer description: File size in bytes. is_manifest: type: boolean description: Whether this file is the skill manifest. PlatformSkillValidationResponse: type: object required: - metadata - files - warnings - request_id properties: metadata: $ref: "#/components/schemas/PlatformSkillValidationMetadata" files: type: array description: Normalized files in the bundle after stripping an optional single root folder. items: $ref: "#/components/schemas/PlatformSkillValidationFile" warnings: type: array description: Non-blocking validation warnings. items: $ref: "#/components/schemas/PlatformWarning" request_id: type: string description: Platform-generated request ID for support correlation. PlatformSkillSourcePreviewRequest: type: object additionalProperties: false required: - source_url example: source_url: https://github.com/anthropics/skills properties: source_url: type: string minLength: 1 maxLength: 2048 description: GitHub URL for a skill directory, SKILL.md file, or repository to inspect. stream: type: boolean default: false description: Whether to stream repository scan progress using server-sent events. PlatformSkillSourcePreviewFile: type: object required: - path - content properties: path: type: string description: Relative path within the skill bundle. content: type: string description: UTF-8 file content. PlatformSkillSourcePreview: type: object required: - display_name - description - source_url - commit_sha - main_content - files - file_tree properties: display_name: type: string description: Skill name parsed from SKILL.md frontmatter. description: type: string description: Skill description parsed from SKILL.md frontmatter. source_url: type: string description: Resolved URL for this skill within the source. commit_sha: type: string description: Commit SHA used to produce the preview. main_content: type: string description: SKILL.md content fetched as part of the preview. files: type: array description: Supporting files fetched with the skill. items: $ref: "#/components/schemas/PlatformSkillSourcePreviewFile" file_tree: type: array description: Relative paths discovered for the skill. items: type: string PlatformSkillSourcePreviewFailureCode: type: string enum: - INVALID_SKILL - SKILL_FETCH_FAILED description: Stable machine-readable reason a discovered entry was excluded. PlatformSkillSourcePreviewFailure: type: object required: - source_url - code - detail properties: source_url: type: string description: Resolved URL for the entry that could not be previewed. code: $ref: "#/components/schemas/PlatformSkillSourcePreviewFailureCode" detail: type: string description: Safe explanation of why the entry was excluded. PlatformSkillSourcePreviewResponse: type: object required: - skills - failures - request_id properties: skills: type: array minItems: 1 description: Valid skills discovered at the source URL. items: $ref: "#/components/schemas/PlatformSkillSourcePreview" failures: type: array description: Discovered entries that could not be included in the preview. items: $ref: "#/components/schemas/PlatformSkillSourcePreviewFailure" request_id: type: string description: Platform-generated request ID for support correlation. PlatformSkillGetResponse: type: object required: - skill - request_id properties: skill: $ref: "#/components/schemas/PlatformSkill" request_id: type: string description: Platform-generated request ID for support correlation. PlatformSkillUpdateStatus: type: string enum: - ENABLED - DISABLED description: New status for the skill. PlatformSkillUpdateRequest: type: object additionalProperties: false required: - status example: status: ENABLED properties: status: $ref: "#/components/schemas/PlatformSkillUpdateStatus" PlatformSkillUpdateResponse: type: object required: - skill - request_id properties: skill: $ref: "#/components/schemas/PlatformSkill" request_id: type: string description: Platform-generated request ID for support correlation. PlatformSkillSyncResultStatus: type: string enum: - UP_TO_DATE description: Synchronization status after a successful refresh. PlatformSkillSyncResponse: type: object required: - sync_status - commit_sha - updated - request_id properties: sync_status: $ref: "#/components/schemas/PlatformSkillSyncResultStatus" commit_sha: type: string minLength: 1 description: Git commit SHA now associated with the skill. updated: type: boolean description: Whether this request created a new skill version. request_id: type: string description: Platform-generated request ID for support correlation. PlatformSkillVersion: type: object required: - skill_id - version - minor_version - is_latest - created_by - created_at - updated_at properties: skill_id: type: string description: Glean skill ID. version: type: integer description: Major version number. minor_version: type: integer description: Minor version number. is_latest: type: boolean description: Whether this is the latest version of the skill. created_by: $ref: "#/components/schemas/PlatformPersonReference" created_at: type: string format: date-time description: Time this version was created. updated_at: type: string format: date-time description: Time this version was last updated. source_provenance: $ref: "#/components/schemas/PlatformSkillSourceProvenance" PlatformSkillVersionsListResponse: type: object required: - versions - has_more - next_cursor - request_id properties: versions: type: array description: Versions available for the skill. items: $ref: "#/components/schemas/PlatformSkillVersion" has_more: type: boolean description: Whether additional results are available. next_cursor: type: - string - "null" description: Cursor for the next page, or null when no more results are available. request_id: type: string description: Platform-generated request ID for support correlation. PlatformSkillVersionCreateRequest: type: object additionalProperties: false required: - file properties: file: type: string format: binary description: SKILL.md, .zip, or .skill bundle to store as a new version. PlatformSkillVersionCreateResponse: type: object required: - version - request_id properties: version: $ref: "#/components/schemas/PlatformSkillVersion" request_id: type: string description: Platform-generated request ID for support correlation. PlatformSkillVersionGetResponse: type: object required: - version - request_id properties: version: $ref: "#/components/schemas/PlatformSkillVersion" request_id: type: string description: Platform-generated request ID for support correlation. PlatformFilterOperator: type: string description: Supported filter operator. enum: - EQUALS - NOT_EQUALS - GT - GTE - LT - LTE PlatformFilter: type: object additionalProperties: false required: - field - values description: | A single filter criterion. For `EQUALS`, multiple values within a filter are OR'd; for `NOT_EQUALS`, listed values are excluded. Separate filters are AND'd with each other and with inline operators in `query`. Repeated same-field `EQUALS` filters are rejected. properties: field: type: string minLength: 1 description: | Filter field name. Built-in names (case-sensitive, lowercase only): `type`, `owner`, `from`, `author`, `channel`, `status`, `assignee`, `reporter`, `component`, `mentions`, and `collection`. Built-ins accept only `EQUALS` and `NOT_EQUALS`. Any other nonblank name is accepted as a custom filter without spelling, existence, or type checks; behavior depends on your connected sources. example: type values: type: array minItems: 1 items: type: string minLength: 1 description: | One or more values to match. Prefer values returned by filter discovery unchanged. For people (`USER`) fields, values may be email addresses or display names. example: - spreadsheet - presentation operator: allOf: - $ref: "#/components/schemas/PlatformFilterOperator" description: | Comparison operator. Defaults to `EQUALS`. Built-in fields support only `EQUALS` and `NOT_EQUALS`. Range operators (`GT`, `GTE`, `LT`, `LTE`) require exactly one value; express ranges with multiple filters on the same field. Custom fields may support different operators depending on the data source. PlatformTimeRange: type: object additionalProperties: false description: Filter results to those last updated within this range. properties: start: type: string format: date-time description: Inclusive lower bound in ISO 8601 format. end: type: string format: date-time description: Exclusive upper bound in ISO 8601 format. PlatformSearchRequest: type: object additionalProperties: false required: - query example: query: quarterly planning 2026 properties: query: type: string minLength: 1 description: | The search query string. Supports inline operators such as `from:jane type:document app:confluence`. Inline operators are AND'd with structured `filters`. page_size: type: integer minimum: 1 maximum: 100 default: 10 description: Number of results to return per page. cursor: type: - string - "null" description: | Opaque pagination token from a previous response's `next_cursor` field. Omit on the first request. datasources: type: array minItems: 1 items: type: string minLength: 1 description: | Restrict results to specific datasource identifiers returned by `GET /api/search/filters`. Scopes by datasource type and may include results from multiple instances of that type. filters: type: array minItems: 1 items: $ref: "#/components/schemas/PlatformFilter" description: | Structured filters applied to search results. Multiple values within a filter with `EQUALS` are OR'd; separate filters are AND'd. Conflicting constraints on the same field (for example, `type:document` in `query` and `type:spreadsheet` in a filter) return an empty result set. See `Filter.field` for built-in field names and operators. Other nonblank field names are accepted as custom filters without validation; behavior depends on your connected sources. time_range: $ref: "#/components/schemas/PlatformTimeRange" PlatformResult: type: object additionalProperties: false required: - url - title - datasource properties: url: type: string format: uri minLength: 1 description: Canonical URL of the result. example: https://company.atlassian.net/wiki/spaces/ENG/pages/12345 title: type: string minLength: 1 description: Result title. example: Q2 2026 Platform Roadmap snippets: type: array items: type: string minLength: 1 description: Query-relevant plain-text excerpts from the result body. example: - The platform team will focus on API stability and... datasource: type: string minLength: 1 description: The datasource this result originates from. example: confluence document_type: type: - string - "null" minLength: 1 description: The document type within the datasource. example: page creator: $ref: "#/components/schemas/PlatformPersonReference" owner: $ref: "#/components/schemas/PlatformPersonReference" updated_at: type: - string - "null" format: date-time description: When the result was last modified. created_at: type: - string - "null" format: date-time description: When the result was created. PlatformSearchResponse: type: object additionalProperties: false required: - results - has_more - next_cursor - request_id - warnings properties: results: type: array items: $ref: "#/components/schemas/PlatformResult" description: | Ordered list of ranked document results. People cards, Q&A blocks, and other UI-only result types are not included. has_more: type: boolean description: Indicates whether additional pages of results are available. next_cursor: type: - string - "null" description: Opaque token to pass as `cursor` in the next request. request_id: type: string minLength: 1 description: Platform-generated request ID for support correlation. warnings: type: array description: | Non-blocking warnings for this response. Required; use `[]` when there are none. Clients must tolerate unknown warning codes. `results_incomplete` means some results may be unavailable for the requested datasource scope while `results`, `has_more`, and `next_cursor` remain present. Warning messages are generic and do not include query text or internal identifiers. items: $ref: "#/components/schemas/PlatformWarning" PlatformFilterFieldInfo: type: object additionalProperties: false required: - field - type - operators properties: field: type: string minLength: 1 description: Field name usable in the `filters` array for `POST /api/search`. example: status type: type: string minLength: 1 description: | Open field-type string. Current values are `STRING` for text and keyword fields and `USER` for people fields (`owner`, `from`, `author`, `assignee`, `reporter`, `mentions`). Clients must tolerate unknown values. example: STRING operators: type: array minItems: 1 description: | Comparison operators supported for this field. Built-in fields expose `EQUALS` and `NOT_EQUALS`. items: $ref: "#/components/schemas/PlatformFilterOperator" values: type: array description: | Suggested filter values observed for the supplied `query`. Omitted in catalog-only responses. Present as an array, including `[]`, when `query` is provided. Values are a bounded, non-exhaustive sample in search-provider order and may include duplicates; blank values are omitted. No additional endpoint-specific truncation is applied. Grouping in the search UI is not preserved; each value applies to the field broadly. An empty array does not mean no valid value exists. Availability varies by data source; federated and MCP integrations may return page-derived values or none at all. Reusing a suggested value in `POST /api/search` does not guarantee matching results or identical filter behavior. For `USER` fields, values may be email addresses or display names. items: type: string minLength: 1 PlatformDatasourceFilterInfo: type: object additionalProperties: false required: - datasource - filters properties: datasource: type: string minLength: 1 description: | Datasource identifier usable in `POST /api/search` `datasources`. example: jira filters: type: array description: | Common built-in filter fields for this datasource. May be empty. A built-in omitted here can still be valid in `POST /api/search`; see `Filter.field` for the full built-in name list. items: $ref: "#/components/schemas/PlatformFilterFieldInfo" PlatformSearchFiltersResponse: type: object additionalProperties: false required: - datasources - request_id properties: datasources: type: array description: | Datasources visible to the authenticated user. Each `datasource` is an identifier you can pass to `POST /api/search` `datasources`. An empty array means no visible datasources. items: $ref: "#/components/schemas/PlatformDatasourceFilterInfo" request_id: type: string minLength: 1 description: Platform-generated request ID for support correlation. PlatformTriggerStatus: type: string description: Current trigger lifecycle state. example: ENABLED enum: - ENABLED - DISABLED PlatformTriggerAuth: type: object additionalProperties: false required: - type - secret description: Optional caller credential sent as an HTTP auth header on each delivery, in addition to the HMAC signature. Lets the receiving endpoint authenticate the request. On update, omit `auth` to preserve the existing credential; there is no in-place removal — recreate the trigger to remove auth. properties: type: type: string description: Credential scheme. enum: - BEARER secret: type: string writeOnly: true description: Secret credential value. Write-only; never returned on reads. example: secret_test_123 PlatformTriggerDelivery: type: object additionalProperties: false required: - webhook_url properties: webhook_url: type: string format: uri pattern: ^https:// description: HTTPS URL that signed events are delivered to. example: https://customer.app/webhook auth: $ref: "#/components/schemas/PlatformTriggerAuth" PlatformTrigger: type: object required: - trigger_id - preset_id - status - delivery - created_at - updated_at properties: trigger_id: type: string description: ID of the trigger. example: trigger_test_123 preset_id: type: string description: ID of the preset this trigger was created from. example: GITHUB_1 description: type: string description: Optional caller-supplied note describing this trigger. example: Reviews I am tagged on, sent to my team's review channel status: $ref: "#/components/schemas/PlatformTriggerStatus" inputs: type: object additionalProperties: true description: Values supplied for the preset's inputs. example: repository: acme/payments-api delivery: $ref: "#/components/schemas/PlatformTriggerDelivery" created_at: type: string format: date-time description: Time the trigger was created. updated_at: type: string format: date-time description: Time the trigger was last updated. PlatformTriggerListResponse: type: object required: - results - has_more - next_cursor - request_id properties: results: type: array description: Triggers owned by the caller. items: $ref: "#/components/schemas/PlatformTrigger" has_more: type: boolean description: Whether additional results are available. next_cursor: type: - string - "null" description: Cursor for the next page, or null when no more results are available. request_id: type: string description: Platform-generated request ID for support correlation. PlatformTriggerCreateRequest: type: object additionalProperties: false required: - preset_id - delivery example: preset_id: GITHUB_1 inputs: repository: "{repository}" delivery: webhook_url: https://example.com/webhook properties: preset_id: type: string description: ID of the preset to instantiate. example: GITHUB_1 description: type: string description: Optional note describing this trigger. example: Reviews I am tagged on, sent to my team's review channel inputs: type: object additionalProperties: true description: Values for the preset's inputs. example: repository: acme/payments-api delivery: $ref: "#/components/schemas/PlatformTriggerDelivery" PlatformTriggerWithSecret: allOf: - $ref: "#/components/schemas/PlatformTrigger" - type: object required: - signing_secret properties: signing_secret: type: string pattern: ^whsec_[A-Za-z0-9+/=]+$ example: whsec_xxx description: Secret for verifying webhook signatures, serialized as `whsec_` following Standard Webhooks. Returned only when the trigger is created and cannot be retrieved later. Store it securely. PlatformTriggerCreateResponse: type: object required: - trigger - request_id properties: trigger: $ref: "#/components/schemas/PlatformTriggerWithSecret" request_id: type: string description: Platform-generated request ID for support correlation. PlatformTriggerWebhookEventBase: type: object required: - version - trigger_id - event_type - datasource - reason - doc_type - doc_id - view_url - title properties: version: type: string description: Webhook payload schema version. pattern: ^1$ trigger_id: type: string description: ID of the Platform trigger that produced the event. example: trigger_test_123 event_type: type: string description: Kind of trigger event. datasource: type: string description: Datasource the event originated from. example: GITHUB reason: type: string description: Why the event fired. example: REVIEW_REQUESTED doc_type: type: string description: Datasource-specific object type. example: pull doc_id: type: string description: Identifier of the document the event is about. example: GITHUB_pull_123 view_url: type: string description: Link to the document in its source system. example: https://github.com/acme/payments-api/pull/123 title: type: string description: Title of the document, or the subject for email. example: "Bug: login fails on Safari" event_time: type: string format: date-time description: Relevant event time. Document changes use the source-observed time when available and otherwise the document ingestion time; content schedules use the scheduled time. Omitted when no timestamp is available. PlatformDocumentChangeWebhookEvent: allOf: - $ref: "#/components/schemas/PlatformTriggerWebhookEventBase" - type: object required: - event_type properties: event_type: type: string pattern: ^DOCUMENT_CHANGE$ content: type: string description: Email body content when the event is for an email document. content_truncated: type: boolean description: Present and true when source content exceeded the delivery size limit. example: version: "1" trigger_id: trigger_test_123 event_type: DOCUMENT_CHANGE datasource: GITHUB reason: REVIEW_REQUESTED doc_type: pull doc_id: GITHUB_pull_123 view_url: https://github.com/acme/payments-api/pull/123 title: Add retry backoff to the crawler event_time: "2025-04-23T11:00:00Z" PlatformContentScheduleWebhookEvent: allOf: - $ref: "#/components/schemas/PlatformTriggerWebhookEventBase" - type: object required: - event_type - time_offset_seconds properties: event_type: type: string pattern: ^CONTENT_SCHEDULE$ time_offset_seconds: type: integer format: int32 description: Offset in seconds from the scheduled time at which the trigger fired. example: version: "1" trigger_id: trigger_test_123 event_type: CONTENT_SCHEDULE datasource: GOOGLECALENDAR reason: CONTENT_SCHEDULE doc_type: event doc_id: GCAL_event_123 view_url: https://calendar.google.com/event?eid=abc title: Weekly Sync event_time: "2025-04-23T12:00:00Z" time_offset_seconds: 1800 PlatformTriggerWebhookEvent: description: Every delivered webhook is one of these two variants. A trigger with a cron schedule carries no document and so cannot be delivered over a webhook. oneOf: - $ref: "#/components/schemas/PlatformDocumentChangeWebhookEvent" - $ref: "#/components/schemas/PlatformContentScheduleWebhookEvent" discriminator: propertyName: event_type mapping: DOCUMENT_CHANGE: "#/components/schemas/PlatformDocumentChangeWebhookEvent" CONTENT_SCHEDULE: "#/components/schemas/PlatformContentScheduleWebhookEvent" PlatformTriggerGetResponse: type: object required: - trigger - request_id properties: trigger: $ref: "#/components/schemas/PlatformTrigger" request_id: type: string description: Platform-generated request ID for support correlation. PlatformTriggerUpdateRequest: type: object additionalProperties: false description: Partial update. Only the supplied fields are changed. example: inputs: repository: "{repository}" delivery: webhook_url: https://example.com/webhook properties: status: $ref: "#/components/schemas/PlatformTriggerStatus" description: type: string description: Optional note describing this trigger. example: Reviews I am tagged on, sent to my team's review channel inputs: type: object additionalProperties: true description: Values for the preset's inputs. example: repository: acme/payments-api delivery: $ref: "#/components/schemas/PlatformTriggerDelivery" PlatformTriggerEventSearchRequest: type: object additionalProperties: false example: page_size: 10 properties: page_size: type: integer description: Maximum number of events to return. minimum: 1 maximum: 100 default: 10 PlatformTriggerEventType: type: string description: The kind of event. example: DOCUMENT_CHANGE enum: - DOCUMENT_CHANGE x-enumDescriptions: DOCUMENT_CHANGE: A document was created, updated, or deleted. x-speakeasy-enum-descriptions: DOCUMENT_CHANGE: A document was created, updated, or deleted. PlatformTriggerEventReason: type: string description: Why the event fired. example: REVIEW_REQUESTED enum: - CREATED - UPDATED - DELETED - MEETS_CONDITION - ASSIGNED - UNASSIGNED - LABELED - UNLABELED - REVIEW_REQUESTED - REVIEW_REQUEST_REMOVED - READY_FOR_REVIEW - CONVERTED_TO_DRAFT - WEBHOOK_UPDATED x-enumDescriptions: CREATED: The document was created. UPDATED: The document was updated. DELETED: The document was deleted. MEETS_CONDITION: The document started matching the trigger's conditions. ASSIGNED: The item was assigned to someone. UNASSIGNED: The item was unassigned. LABELED: A label was added. UNLABELED: A label was removed. REVIEW_REQUESTED: A review was requested. REVIEW_REQUEST_REMOVED: A review request was withdrawn. READY_FOR_REVIEW: A draft was marked ready for review. CONVERTED_TO_DRAFT: The item was converted back to a draft. WEBHOOK_UPDATED: The source system sent a webhook update. x-speakeasy-enum-descriptions: CREATED: The document was created. UPDATED: The document was updated. DELETED: The document was deleted. MEETS_CONDITION: The document started matching the trigger's conditions. ASSIGNED: The item was assigned to someone. UNASSIGNED: The item was unassigned. LABELED: A label was added. UNLABELED: A label was removed. REVIEW_REQUESTED: A review was requested. REVIEW_REQUEST_REMOVED: A review request was withdrawn. READY_FOR_REVIEW: A draft was marked ready for review. CONVERTED_TO_DRAFT: The item was converted back to a draft. WEBHOOK_UPDATED: The source system sent a webhook update. PlatformTriggerEvent: type: object required: - event_type - doc_id - datasource - doc_type - view_url - title - reason - event_time description: A content event a trigger can fire on. properties: event_type: $ref: "#/components/schemas/PlatformTriggerEventType" datasource: type: string description: Datasource the event originated from. example: GITHUB reason: $ref: "#/components/schemas/PlatformTriggerEventReason" doc_type: type: string description: Datasource-specific object type. example: pull doc_id: type: string description: Identifier of the document the event is about. view_url: type: string description: Link to the document in its source system. title: type: string description: Title of the document, or the subject for email. event_time: type: string format: date-time description: "When the event happened at the source: the document's own change timestamp for a document change, and the scheduled time for a content schedule. Omitted when the source did not supply one." PlatformTriggerEventSearchResponse: type: object required: - results - has_more - request_id properties: results: type: array description: Matching events, most recent first. items: $ref: "#/components/schemas/PlatformTriggerEvent" has_more: type: boolean description: | Whether more events matched than were returned. Raise `page_size` to see more; cursor-based paging is not offered yet. request_id: type: string description: Unique identifier for this request, for support and debugging. PlatformTriggerPresetSummary: type: object required: - preset_id - datasource - display_name properties: preset_id: type: string description: ID of the preset. Pass this when creating a trigger. example: GITHUB_1 datasource: type: string description: Datasource the preset fires on. example: github display_name: type: string description: Human-readable preset name. example: Review requested from me description: type: string description: Human-readable description of when the preset fires. example: A review is requested from the trigger creator on a pull request PlatformTriggerPresetListResponse: type: object required: - results - has_more - next_cursor - request_id properties: results: type: array description: Trigger presets available to the caller. items: $ref: "#/components/schemas/PlatformTriggerPresetSummary" has_more: type: boolean description: Whether additional results are available. next_cursor: type: - string - "null" description: Cursor for the next page, or null when no more results are available. request_id: type: string description: Platform-generated request ID for support correlation. PlatformTriggerPresetInputType: type: string description: Type of a preset input. example: PICKLIST enum: - PICKLIST - TEXT - USER PlatformTriggerPresetInputValue: type: object required: - value - display_name properties: value: type: string description: | The exact value to send in the trigger's `inputs` for this choice (e.g. a channel name, a user's email, etc). example: acme/payments-api display_name: type: string description: Human-readable name for this value. example: acme/payments-api PlatformTriggerPresetInput: type: object required: - field - type - display_name - is_required properties: field: type: string description: Identifier of the input, supplied as a key in the trigger's `inputs`. example: repository type: $ref: "#/components/schemas/PlatformTriggerPresetInputType" display_name: type: string description: Human-readable name for the input. example: Repository is_required: type: boolean description: Whether the caller must supply a value for this input. values: type: array description: | Bounded initial set of selectable values for a picklist input. Omitted entirely for free-text inputs. items: $ref: "#/components/schemas/PlatformTriggerPresetInputValue" is_truncated: type: boolean description: | Whether additional selectable values were omitted from `values`. When true, use GET /trigger-presets/{preset_id}/input-values with a query to narrow the result set. PlatformTriggerPreset: allOf: - $ref: "#/components/schemas/PlatformTriggerPresetSummary" - type: object required: - inputs properties: inputs: type: array description: Inputs the caller may supply when creating a trigger from this preset. items: $ref: "#/components/schemas/PlatformTriggerPresetInput" PlatformTriggerPresetGetResponse: type: object required: - trigger_preset - request_id properties: trigger_preset: $ref: "#/components/schemas/PlatformTriggerPreset" request_id: type: string description: Platform-generated request ID for support correlation. PlatformTriggerPresetInputValueListResponse: type: object required: - results - is_truncated - request_id properties: results: type: array description: The bounded set of selectable values matching the query. items: $ref: "#/components/schemas/PlatformTriggerPresetInputValue" is_truncated: type: boolean description: | Whether additional matches were omitted. When true, refine `query` to narrow the result set. request_id: type: string description: Platform-generated request ID for support correlation. PlatformTriggerPresetEventSearchRequest: type: object additionalProperties: false example: inputs: repository: "{repository}" page_size: 10 properties: inputs: type: object description: | Values for the preset's input fields, keyed by field name. additionalProperties: type: string example: repository: acme/payments-api page_size: type: integer description: Maximum number of events to return. minimum: 1 maximum: 100 default: 10 PlatformChatStreamResponseCreatedServerSentEvent: type: object required: - event - data properties: id: type: string event: type: string const: RESPONSE_CREATED data: $ref: "#/components/schemas/PlatformChatStreamResponseCreated" PlatformChatStreamProgressServerSentEvent: type: object required: - event - data properties: id: type: string event: type: string const: RESPONSE_PROGRESS data: $ref: "#/components/schemas/PlatformChatStreamProgress" PlatformChatStreamOutputTextDeltaServerSentEvent: type: object required: - event - data properties: id: type: string event: type: string const: RESPONSE_OUTPUT_TEXT_DELTA data: $ref: "#/components/schemas/PlatformChatStreamOutputTextDelta" PlatformChatStreamOutputTextDoneServerSentEvent: type: object required: - event - data properties: id: type: string event: type: string const: RESPONSE_OUTPUT_TEXT_DONE data: $ref: "#/components/schemas/PlatformChatStreamOutputTextDone" PlatformChatStreamResponseCompletedServerSentEvent: type: object required: - event - data properties: id: type: string event: type: string const: RESPONSE_COMPLETED data: $ref: "#/components/schemas/PlatformChatStreamResponseCompleted" PlatformChatStreamResponseFailedServerSentEvent: type: object required: - event - data properties: id: type: string event: type: string const: RESPONSE_FAILED data: $ref: "#/components/schemas/PlatformChatStreamResponseFailed" PlatformChatStreamEventServerSentEvent: description: A typed server-sent event. oneOf: - $ref: "#/components/schemas/PlatformChatStreamResponseCreatedServerSentEvent" - $ref: "#/components/schemas/PlatformChatStreamProgressServerSentEvent" - $ref: "#/components/schemas/PlatformChatStreamOutputTextDeltaServerSentEvent" - $ref: "#/components/schemas/PlatformChatStreamOutputTextDoneServerSentEvent" - $ref: "#/components/schemas/PlatformChatStreamResponseCompletedServerSentEvent" - $ref: "#/components/schemas/PlatformChatStreamResponseFailedServerSentEvent" discriminator: propertyName: event mapping: RESPONSE_CREATED: "#/components/schemas/PlatformChatStreamResponseCreatedServerSentEvent" RESPONSE_PROGRESS: "#/components/schemas/PlatformChatStreamProgressServerSentEvent" RESPONSE_OUTPUT_TEXT_DELTA: "#/components/schemas/PlatformChatStreamOutputTextDeltaServerSentEvent" RESPONSE_OUTPUT_TEXT_DONE: "#/components/schemas/PlatformChatStreamOutputTextDoneServerSentEvent" RESPONSE_COMPLETED: "#/components/schemas/PlatformChatStreamResponseCompletedServerSentEvent" RESPONSE_FAILED: "#/components/schemas/PlatformChatStreamResponseFailedServerSentEvent" responses: PlatformBadRequest: description: Invalid request (malformed JSON, invalid parameter values, unknown fields). content: application/problem+json: schema: $ref: "#/components/schemas/PlatformProblemDetail" PlatformUnauthorized: description: Missing or invalid authentication token. content: application/problem+json: schema: $ref: "#/components/schemas/PlatformProblemDetail" PlatformForbidden: description: Token valid but lacks permission for the requested operation. content: application/problem+json: schema: $ref: "#/components/schemas/PlatformProblemDetail" PlatformNotFound: description: Resource not found. content: application/problem+json: schema: $ref: "#/components/schemas/PlatformProblemDetail" PlatformRequestTimeout: description: Backend did not respond within the timeout window. content: application/problem+json: schema: $ref: "#/components/schemas/PlatformProblemDetail" PlatformRequestTooLarge: description: Request body exceeds the maximum allowed size. content: application/problem+json: schema: $ref: "#/components/schemas/PlatformProblemDetail" PlatformTooManyRequests: description: Rate limit exceeded. Includes Retry-After header. content: application/problem+json: schema: $ref: "#/components/schemas/PlatformProblemDetail" PlatformInternalServerError: description: Unexpected server-side failure. content: application/problem+json: schema: $ref: "#/components/schemas/PlatformProblemDetail" PlatformServiceUnavailable: description: Backend temporarily unavailable. content: application/problem+json: schema: $ref: "#/components/schemas/PlatformProblemDetail" PlatformConflict: description: Request conflicts with current state of the resource. content: application/problem+json: schema: $ref: "#/components/schemas/PlatformProblemDetail" PlatformUnprocessableEntity: description: Syntactically valid but semantically incorrect request. content: application/problem+json: schema: $ref: "#/components/schemas/PlatformProblemDetail" parameters: TriggerWebhookId: name: webhook-id in: header required: true description: Opaque delivery ID. It remains stable across retries of the same event and can be used as an idempotency key. schema: type: string minLength: 1 example: msg_test_123 TriggerWebhookTimestamp: name: webhook-timestamp in: header required: true description: Unix time in seconds when this delivery attempt was signed. schema: type: integer format: int64 example: 1700000000 TriggerWebhookSignature: name: webhook-signature in: header required: true description: | `v1,` followed by the standard Base64-encoded HMAC-SHA256 digest. To verify it, remove the `whsec_` prefix from `signing_secret`, standard-Base64-decode the remainder, and use those bytes as the HMAC key. Sign the UTF-8 bytes of `webhook-id + "." + webhook-timestamp + "." + raw request body`. Verify the signature against the unmodified request body before parsing JSON, and use a constant-time comparison. Fixed test vector (the raw body is one line with no trailing newline): - decoded signing key bytes (UTF-8; test only): `test_webhook_signing_secret_1234` - `webhook-id`: `81e6dc877ac553ef96ecbc939c1e46431159491991ba55cd131fbd0e3746c6bc` - `webhook-timestamp`: `1700000000` - `raw request body`: `{"version":"1","trigger_id":"trigger_test_123","datasource":"GITHUB","reason":"REVIEW_REQUESTED","doc_type":"pull","event_type":"DOCUMENT_CHANGE","doc_id":"GITHUB_pull_123","view_url":"https://github.com/acme/payments-api/pull/123","title":"Add retry backoff to the crawler","event_time":"2025-04-23T11:00:00Z"}` - `webhook-signature`: `v1,JqvHW0dwAOSLndiwQdXLUS/P+2RvOO8x4sOWgA/w0Gs=` schema: type: string pattern: ^v1,[A-Za-z0-9+/=]+$ example: v1,xxx