{
  "openapi": "3.1.0",
  "info": {
    "title": "Genome Computer API",
    "version": "2.0.0",
    "description": "Create user-owned genome connections, follow their progress, and read configured insight panels."
  },
  "servers": [
    {
      "url": "https://staging.api.genome.computer",
      "description": "Staging, available only after organization provisioning"
    },
    {
      "url": "https://api.genome.computer",
      "description": "Production, available only after separate approval and setup"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/v2/genome_connections": {
      "get": {
        "tags": [
          "Genome connections"
        ],
        "summary": "List genome connections",
        "description": "Returns this organization's connections for the API key environment, newest first. Expired and revoked historical connections remain available, while customer identity and Genome Computer's canonical genome identifier are never returned.",
        "x-required-scopes": "genome_connections:read",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of connections to return.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor returned in next_cursor by the previous page.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          {
            "name": "client_user_reference",
            "in": "query",
            "required": false,
            "description": "Exact opaque client user reference to match.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Connections for this organization and environment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListGenomeConnectionsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "Genome connections"
        ],
        "summary": "Create a hosted genome connection",
        "description": "Creates a short-lived user URL from the client's authenticated backend. The user verifies by email, accepts the connection terms, and either shares an existing genome or orders a new one directly from Genome Computer.",
        "x-required-scopes": "genome_connections:write",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "A unique key for this create attempt. Reuse it only when retrying the same request.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "client_user_reference",
                  "return_url"
                ],
                "properties": {
                  "client_user_reference": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "Your opaque reference for the signed-in user. Do not send an email address, name, or other direct identifier."
                  },
                  "return_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "Where Genome Computer sends the user after the hosted flow. Its exact HTTPS origin must be approved for the environment in Developer Console."
                  }
                }
              },
              "examples": {
                "default": {
                  "value": {
                    "client_user_reference": "user_8f3c2a",
                    "return_url": "https://app.acmehealth.example/settings/genome"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Connection created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateGenomeConnectionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/v2/genome_connections/{genome_connection_id}": {
      "get": {
        "tags": [
          "Genome connections"
        ],
        "summary": "Get a genome connection",
        "description": "Returns the durable client-scoped connection and its current access state. User identity is never returned.",
        "x-required-scopes": "genome_connections:read",
        "parameters": [
          {
            "$ref": "#/components/parameters/GenomeConnectionId"
          }
        ],
        "responses": {
          "200": {
            "description": "Current connection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenomeConnection"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/v2/genome_connections/{genome_connection_id}/permission_requests": {
      "post": {
        "tags": [
          "Genome connections"
        ],
        "summary": "Request customer permission again",
        "description": "Creates a fresh short-lived customer URL for the same durable connection after the previous permission request was declined or expired. It does not create a second connection or grant access by itself.",
        "x-required-scopes": "genome_connections:write",
        "parameters": [
          {
            "$ref": "#/components/parameters/GenomeConnectionId"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "A unique key for this permission request. Reuse it only when retrying the same request.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 255
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Customer permission URL created for the existing connection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateGenomeConnectionResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/v2/genome_connections/{genome_connection_id}/progress": {
      "get": {
        "tags": [
          "Progress"
        ],
        "summary": "Get normalized genome progress",
        "description": "Returns the latest coarse progress stage for either a shared existing genome or a new Genome Computer order.",
        "x-required-scopes": "genome_connections:read",
        "parameters": [
          {
            "$ref": "#/components/parameters/GenomeConnectionId"
          }
        ],
        "responses": {
          "200": {
            "description": "Current progress",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenomeConnectionProgress"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/v2/genome_connections/{genome_connection_id}/bundle": {
      "get": {
        "tags": [
          "Genome connections"
        ],
        "summary": "Create a signed .genome bundle download link",
        "description": "Returns a 15-minute signed link only when bundle downloads are enabled for the organization and environment and the connection still has an active genome grant.",
        "x-required-scopes": "genome_connections:read",
        "parameters": [
          {
            "$ref": "#/components/parameters/GenomeConnectionId"
          }
        ],
        "responses": {
          "200": {
            "description": "Short-lived bundle download link",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenomeConnectionBundle"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/GenomeAccessForbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/v2/webhooks": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Register a webhook endpoint",
        "description": "Registers an HTTPS endpoint for genome connection events. The signing secret is returned only once.",
        "x-required-scopes": "webhooks:write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "description": "HTTPS endpoint that receives signed webhook requests."
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "event_types": {
                    "type": "array",
                    "minItems": 1,
                    "description": "Events to receive. Omit to subscribe to all supported connection and insight panel events.",
                    "items": {
                      "type": "string",
                      "enum": [
                        "genome_connection.connected",
                        "genome_connection.progress.updated",
                        "genome_connection.ready",
                        "genome_connection.access.revoked",
                        "insight_panel.status.updated"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Webhook endpoint created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointCreated"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List webhook endpoints",
        "description": "Lists webhook endpoints registered for this organization and API environment.",
        "x-required-scopes": "webhooks:read",
        "responses": {
          "200": {
            "description": "Registered webhook endpoints",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WebhookEndpoint"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/v2/webhooks/{webhookId}": {
      "delete": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Disable a webhook endpoint",
        "description": "Stops future deliveries to the selected endpoint.",
        "x-required-scopes": "webhooks:write",
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookId"
          }
        ],
        "responses": {
          "200": {
            "description": "Webhook endpoint disabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/v2/genome_connections/{genome_connection_id}/insight_panels": {
      "get": {
        "tags": [
          "Insight panels"
        ],
        "summary": "List insight panels for a connection",
        "description": "Returns the panels enabled for the organization and their current status. Findings are generated automatically when the genome is ready, access is active, and the user has an active Genome Computer subscription.",
        "x-required-scopes": "insight_panels:read",
        "parameters": [
          {
            "$ref": "#/components/parameters/GenomeConnectionId"
          }
        ],
        "responses": {
          "200": {
            "description": "Configured insight panels and their current status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsightPanelCollection"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/GenomeAccessForbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/v2/genome_connections/{genome_connection_id}/insight_panels/{insight_panel_id}": {
      "get": {
        "tags": [
          "Insight panels"
        ],
        "summary": "Get an insight panel",
        "description": "Returns the current panel state and, when ready, its derived findings, evidence, citations, limitations, and clinical boundary. Raw genome files and user identity are not returned.",
        "x-required-scopes": "insight_panels:read",
        "parameters": [
          {
            "$ref": "#/components/parameters/GenomeConnectionId"
          },
          {
            "$ref": "#/components/parameters/InsightPanelId"
          }
        ],
        "responses": {
          "200": {
            "description": "Current insight panel state and result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsightPanelResult"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/GenomeAccessForbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Environment-scoped server credential. Never expose it in a browser or mobile client."
      }
    },
    "parameters": {
      "GenomeConnectionId": {
        "name": "genome_connection_id",
        "in": "path",
        "required": true,
        "description": "The durable connection identifier returned at creation.",
        "schema": {
          "type": "string",
          "pattern": "^gconn_[A-Za-z0-9]+$"
        }
      },
      "InsightPanelId": {
        "name": "insight_panel_id",
        "in": "path",
        "required": true,
        "description": "The stable panel identifier configured for the organization.",
        "schema": {
          "type": "string",
          "pattern": "^[a-z0-9_]+$"
        }
      },
      "WebhookId": {
        "name": "webhookId",
        "in": "path",
        "required": true,
        "description": "The webhook endpoint identifier returned at creation.",
        "schema": {
          "type": "string",
          "pattern": "^wh_[A-Za-z0-9]+$"
        }
      }
    },
    "schemas": {
      "CreateGenomeConnectionResponse": {
        "type": "object",
        "required": [
          "genome_connection",
          "customer_url",
          "customer_url_expires_at"
        ],
        "properties": {
          "genome_connection": {
            "$ref": "#/components/schemas/GenomeConnection"
          },
          "customer_url": {
            "type": "string",
            "format": "uri",
            "description": "Short-lived Genome Computer URL to open for the intended signed-in user. It is returned only by the create response."
          },
          "customer_url_expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "Deadline for starting the hosted flow. A started flow may continue after this time."
          }
        }
      },
      "ListGenomeConnectionsResponse": {
        "type": "object",
        "required": [
          "data",
          "next_cursor"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GenomeConnection"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Opaque cursor for the next page, or null when there are no more results."
          }
        }
      },
      "GenomeConnection": {
        "type": "object",
        "required": [
          "genome_connection_id",
          "client_user_reference",
          "status",
          "access_status",
          "journey",
          "client_genome_id",
          "created_at",
          "connected_at",
          "permissions"
        ],
        "properties": {
          "genome_connection_id": {
            "type": "string",
            "description": "Durable identifier for this connection."
          },
          "client_user_reference": {
            "type": "string",
            "description": "The opaque reference supplied by your backend."
          },
          "status": {
            "type": "string",
            "enum": [
              "awaiting_customer",
              "connected",
              "expired"
            ],
            "description": "State of the hosted connection flow."
          },
          "access_status": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "pending_genome",
              "active",
              "revoked",
              null
            ],
            "description": "Whether this client currently has access to the selected genome. Null until the user completes the hosted choice. After revocation, the connection record and client_genome_id remain queryable, but genome data endpoints deny access."
          },
          "journey": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "existing_genome",
              "new_order",
              null
            ],
            "description": "How the user supplied the genome. Null until the user completes the hosted choice."
          },
          "client_genome_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "A stable, organization-scoped genome handle. It does not expose Genome Computer's canonical genome identifier."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "connected_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "permissions": {
            "type": "array",
            "description": "The typed permissions in the latest customer decision. Missing permissions are not granted.",
            "items": {
              "type": "object",
              "required": [
                "permission",
                "status"
              ],
              "properties": {
                "permission": {
                  "type": "string",
                  "enum": [
                    "genome_bundle_downloads",
                    "genome_connection",
                    "insight_panels"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "granted",
                    "declined",
                    "expired",
                    "revoked"
                  ]
                }
              }
            }
          }
        }
      },
      "GenomeConnectionProgress": {
        "type": "object",
        "required": [
          "genome_connection_id",
          "client_genome_id",
          "stage",
          "updated_at"
        ],
        "properties": {
          "genome_connection_id": {
            "type": "string"
          },
          "client_genome_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "stage": {
            "type": "string",
            "enum": [
              "awaiting_customer",
              "order_confirmed",
              "outbound_to_customer",
              "with_customer",
              "inbound_to_lab",
              "at_lab",
              "processing",
              "ready"
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "GenomeConnectionBundle": {
        "type": "object",
        "required": [
          "genome_connection_id",
          "client_genome_id",
          "bundle_version",
          "download_url",
          "expires_in_seconds"
        ],
        "properties": {
          "genome_connection_id": {
            "type": "string"
          },
          "client_genome_id": {
            "type": "string"
          },
          "bundle_version": {
            "type": [
              "string",
              "null"
            ]
          },
          "download_url": {
            "type": "string",
            "format": "uri"
          },
          "expires_in_seconds": {
            "type": "integer",
            "enum": [
              900
            ]
          }
        }
      },
      "WebhookEndpoint": {
        "type": "object",
        "required": [
          "webhook_id",
          "url",
          "description",
          "event_types",
          "signing_secret_preview",
          "status",
          "created_at"
        ],
        "properties": {
          "webhook_id": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "event_types": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "signing_secret_preview": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "disabled"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "WebhookEndpointCreated": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEndpoint"
          },
          {
            "type": "object",
            "required": [
              "signing_secret"
            ],
            "properties": {
              "signing_secret": {
                "type": "string",
                "description": "Secret used to verify signatures. Returned only once."
              }
            }
          }
        ]
      },
      "InsightPanelCollection": {
        "type": "object",
        "required": [
          "genome_connection_id",
          "client_genome_id",
          "data"
        ],
        "properties": {
          "genome_connection_id": {
            "type": "string"
          },
          "client_genome_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InsightPanelSummary"
            }
          }
        }
      },
      "InsightPanelSummary": {
        "type": "object",
        "required": [
          "insight_panel_id",
          "title",
          "status",
          "interpretation_version",
          "generated_at"
        ],
        "properties": {
          "insight_panel_id": {
            "type": "string",
            "description": "Stable identifier for a panel enabled for the organization."
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "waiting_for_genome",
              "subscription_required",
              "processing",
              "ready"
            ]
          },
          "interpretation_version": {
            "type": [
              "string",
              "null"
            ]
          },
          "generated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "InsightPanelResult": {
        "type": "object",
        "required": [
          "genome_connection_id",
          "client_genome_id",
          "insight_panel_id",
          "title",
          "status",
          "interpretation_version",
          "generated_at",
          "summary",
          "sections",
          "citations",
          "limitations",
          "clinical_boundary"
        ],
        "properties": {
          "genome_connection_id": {
            "type": "string"
          },
          "client_genome_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "insight_panel_id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "waiting_for_genome",
              "subscription_required",
              "processing",
              "ready"
            ]
          },
          "interpretation_version": {
            "type": [
              "string",
              "null"
            ]
          },
          "generated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "summary": {
            "type": [
              "string",
              "null"
            ]
          },
          "sections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InsightPanelSection"
            }
          },
          "citations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InsightPanelCitation"
            }
          },
          "limitations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "clinical_boundary": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "InsightPanelSection": {
        "type": "object",
        "required": [
          "section_id",
          "title",
          "evidence_level",
          "findings"
        ],
        "properties": {
          "section_id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "evidence_level": {
            "type": "string",
            "enum": [
              "high",
              "moderate",
              "emerging"
            ]
          },
          "findings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InsightPanelFinding"
            }
          }
        }
      },
      "InsightPanelFinding": {
        "type": "object",
        "required": [
          "finding_id",
          "title",
          "gene",
          "result_label",
          "meaning",
          "evidence_level",
          "evidence"
        ],
        "properties": {
          "finding_id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "gene": {
            "type": [
              "string",
              "null"
            ]
          },
          "result_label": {
            "type": "string"
          },
          "meaning": {
            "type": "string"
          },
          "evidence_level": {
            "type": "string",
            "enum": [
              "high",
              "moderate",
              "emerging"
            ]
          },
          "evidence": {
            "type": "object",
            "required": [
              "basis",
              "clinical_review"
            ],
            "properties": {
              "basis": {
                "type": "string"
              },
              "clinical_review": {
                "type": "string"
              }
            }
          }
        }
      },
      "InsightPanelCitation": {
        "type": "object",
        "required": [
          "source",
          "url"
        ],
        "properties": {
          "source": {
            "type": "string"
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message",
              "request_id"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Invalid request or return URL",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Missing or invalid API key",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Organization or requested environment is not active",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "GenomeAccessForbidden": {
        "description": "Organization capability, environment, or access to the genome is not active",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "Requested resource not found for this organization and environment",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Conflict": {
        "description": "An active connection already exists for the client user reference",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "RateLimited": {
        "description": "Rate limit exceeded",
        "headers": {
          "Retry-After": {
            "schema": {
              "type": "integer"
            },
            "description": "Seconds to wait before retrying"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  }
}