{
  "openapi": "3.1.0",
  "info": {
    "title": "Cowliss API",
    "version": "1.0.0",
    "description": "The /v1 API: ingestion (org API key), the dashboard API (Clerk session), and public platform webhooks. Conventions: envelopes everywhere, cursor pagination, prefixed IDs, fixed error-code enum."
  },
  "tags": [
    {
      "name": "health"
    },
    {
      "name": "openapi"
    },
    {
      "name": "ingestion"
    },
    {
      "name": "users"
    },
    {
      "name": "events"
    },
    {
      "name": "apps"
    },
    {
      "name": "sources"
    },
    {
      "name": "catalog"
    },
    {
      "name": "violations"
    },
    {
      "name": "review"
    },
    {
      "name": "segments"
    },
    {
      "name": "project"
    },
    {
      "name": "artifacts"
    },
    {
      "name": "releases"
    },
    {
      "name": "deployments"
    },
    {
      "name": "executions"
    },
    {
      "name": "journeys"
    },
    {
      "name": "destinations"
    },
    {
      "name": "domains"
    },
    {
      "name": "deliveries"
    },
    {
      "name": "emails"
    },
    {
      "name": "suppressions"
    },
    {
      "name": "settings"
    },
    {
      "name": "billing"
    }
  ],
  "components": {
    "securitySchemes": {
      "orgApiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Org-scoped Clerk API key (ingestion endpoints only)."
      },
      "clerkSession": {
        "type": "http",
        "scheme": "bearer",
        "description": "Clerk session token for the active org (dashboard API)."
      },
      "orgDeployKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Org deploy key, an org-scoped Clerk API key with the `deploy` scope (release lifecycle only). Acts as org:admin on those routes and is rejected everywhere else."
      }
    },
    "schemas": {},
    "parameters": {}
  },
  "paths": {
    "/health/live": {
      "get": {
        "operationId": "health.live",
        "tags": [
          "health"
        ],
        "summary": "Liveness",
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "ok"
                          ]
                        }
                      },
                      "required": [
                        "status"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/health/ready": {
      "get": {
        "operationId": "health.ready",
        "tags": [
          "health"
        ],
        "summary": "Readiness, with per-dependency checks",
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "ok"
                          ]
                        },
                        "checks": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "boolean"
                          }
                        }
                      },
                      "required": [
                        "status",
                        "checks"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Error envelope; code: dependency_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "operationId": "openapi.get",
        "tags": [
          "openapi"
        ],
        "summary": "The OpenAPI 3.1 document, built from this contract",
        "security": [],
        "responses": {
          "200": {
            "description": "OpenAPI 3.1 document",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {}
                }
              }
            }
          }
        }
      }
    },
    "/v1/identify": {
      "post": {
        "operationId": "ingestion.identify",
        "tags": [
          "ingestion"
        ],
        "summary": "Create or merge a profile",
        "security": [
          {
            "orgApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "sourceId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "identifiers": {
                        "type": "object",
                        "properties": {
                          "anonymousId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "userId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "clerkId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "email": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          }
                        }
                      },
                      "traits": {
                        "type": "object",
                        "additionalProperties": true
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "messageId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "sourceId",
                      "identifiers"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The upserted profile",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "environment": {
                          "type": "string",
                          "enum": [
                            "development",
                            "production"
                          ]
                        },
                        "appId": {
                          "type": "string"
                        },
                        "sourceId": {
                          "type": "string"
                        },
                        "traits": {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "consent": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "boolean"
                          }
                        },
                        "mergedInto": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "identifiers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "anonymousId",
                                  "userId",
                                  "clerkId",
                                  "email"
                                ]
                              },
                              "value": {
                                "type": "string"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "kind",
                              "value",
                              "createdAt"
                            ]
                          }
                        },
                        "anonymous": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "environment",
                        "appId",
                        "sourceId",
                        "traits",
                        "consent",
                        "mergedInto",
                        "createdAt",
                        "updatedAt",
                        "identifiers",
                        "anonymous"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Error envelope; code: payload_too_large",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: trait_validation_failed | trait_denied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Error envelope; code: over_quota | rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/track": {
      "post": {
        "operationId": "ingestion.track",
        "tags": [
          "ingestion"
        ],
        "summary": "Record one event",
        "security": [
          {
            "orgApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "sourceId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "identifiers": {
                        "type": "object",
                        "properties": {
                          "anonymousId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "userId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "clerkId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "email": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          }
                        }
                      },
                      "event": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "properties": {
                        "type": "object",
                        "additionalProperties": true
                      },
                      "timestamp": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "messageId": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "sourceId",
                      "identifiers",
                      "event",
                      "messageId"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A deduped replay (the original event) or a strict-mode hold",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "orgId": {
                              "type": "string"
                            },
                            "environment": {
                              "type": "string",
                              "enum": [
                                "development",
                                "production"
                              ]
                            },
                            "appId": {
                              "type": "string"
                            },
                            "sourceId": {
                              "type": "string"
                            },
                            "profileId": {
                              "type": "string"
                            },
                            "event": {
                              "type": "string"
                            },
                            "properties": {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            "timestamp": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "receivedAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "messageId": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "orgId",
                            "environment",
                            "appId",
                            "sourceId",
                            "profileId",
                            "event",
                            "properties",
                            "timestamp",
                            "receivedAt",
                            "messageId"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "string",
                              "enum": [
                                "quarantined"
                              ]
                            }
                          },
                          "required": [
                            "status"
                          ]
                        }
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "201": {
            "description": "The written event",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "environment": {
                          "type": "string",
                          "enum": [
                            "development",
                            "production"
                          ]
                        },
                        "appId": {
                          "type": "string"
                        },
                        "sourceId": {
                          "type": "string"
                        },
                        "profileId": {
                          "type": "string"
                        },
                        "event": {
                          "type": "string"
                        },
                        "properties": {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "timestamp": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "receivedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "messageId": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "environment",
                        "appId",
                        "sourceId",
                        "profileId",
                        "event",
                        "properties",
                        "timestamp",
                        "receivedAt",
                        "messageId"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Error envelope; code: conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Error envelope; code: payload_too_large",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: event_denied | trait_denied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Error envelope; code: over_quota | rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/batch": {
      "post": {
        "operationId": "ingestion.batch",
        "tags": [
          "ingestion"
        ],
        "summary": "Import one source's calls in one request",
        "security": [
          {
            "orgApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "sourceId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "items": {
                        "type": "array",
                        "items": {},
                        "minItems": 1,
                        "maxItems": 500
                      }
                    },
                    "required": [
                      "sourceId",
                      "items"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Per-item outcomes, positionally aligned",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "results": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "ok": {
                                    "type": "boolean",
                                    "enum": [
                                      true
                                    ]
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "identify"
                                    ]
                                  },
                                  "id": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "ok",
                                  "type",
                                  "id"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "ok": {
                                    "type": "boolean",
                                    "enum": [
                                      true
                                    ]
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "track"
                                    ]
                                  },
                                  "id": {
                                    "type": "string"
                                  },
                                  "deduped": {
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "ok",
                                  "type",
                                  "id",
                                  "deduped"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "ok": {
                                    "type": "boolean",
                                    "enum": [
                                      false
                                    ]
                                  },
                                  "error": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "enum": [
                                          "malformed_request",
                                          "invalid_key",
                                          "forbidden",
                                          "not_found",
                                          "conflict",
                                          "payload_too_large",
                                          "validation_failed",
                                          "trait_validation_failed",
                                          "event_denied",
                                          "trait_denied",
                                          "over_quota",
                                          "rate_limited",
                                          "dependency_unavailable",
                                          "internal",
                                          "journey_fuel_exceeded",
                                          "journey_timeout",
                                          "journey_memory_exceeded",
                                          "journey_error",
                                          "journey_output_invalid",
                                          "journey_nondeterministic",
                                          "release_invalid",
                                          "release_not_ready",
                                          "project_exists",
                                          "project_missing",
                                          "artifact_too_large",
                                          "deploy_key_scope"
                                        ]
                                      },
                                      "message": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message"
                                    ]
                                  }
                                },
                                "required": [
                                  "ok",
                                  "error"
                                ]
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "results"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Error envelope; code: payload_too_large",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Error envelope; code: over_quota | rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/users": {
      "get": {
        "operationId": "users.list",
        "tags": [
          "users"
        ],
        "summary": "List and search profiles",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "asc"
            },
            "required": false,
            "name": "direction",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "required": false,
            "name": "q",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "required": false,
            "name": "trait",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            },
            "required": false,
            "name": "traitValue",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "required": false,
            "name": "segmentId",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of results; meta carries nextCursor and hasMore",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "orgId": {
                            "type": "string"
                          },
                          "environment": {
                            "type": "string",
                            "enum": [
                              "development",
                              "production"
                            ]
                          },
                          "appId": {
                            "type": "string"
                          },
                          "sourceId": {
                            "type": "string"
                          },
                          "traits": {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          "consent": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "boolean"
                            }
                          },
                          "mergedInto": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "identifiers": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "anonymousId",
                                    "userId",
                                    "clerkId",
                                    "email"
                                  ]
                                },
                                "value": {
                                  "type": "string"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time"
                                }
                              },
                              "required": [
                                "kind",
                                "value",
                                "createdAt"
                              ]
                            }
                          },
                          "anonymous": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "orgId",
                          "environment",
                          "appId",
                          "sourceId",
                          "traits",
                          "consent",
                          "mergedInto",
                          "createdAt",
                          "updatedAt",
                          "identifiers",
                          "anonymous"
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/find": {
      "get": {
        "operationId": "users.find",
        "tags": [
          "users"
        ],
        "summary": "Find a profile by one identifier (<kind>:<value>)",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 220
            },
            "required": true,
            "name": "identifier",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "environment": {
                          "type": "string",
                          "enum": [
                            "development",
                            "production"
                          ]
                        },
                        "appId": {
                          "type": "string"
                        },
                        "sourceId": {
                          "type": "string"
                        },
                        "traits": {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "consent": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "boolean"
                          }
                        },
                        "mergedInto": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "identifiers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "anonymousId",
                                  "userId",
                                  "clerkId",
                                  "email"
                                ]
                              },
                              "value": {
                                "type": "string"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "kind",
                              "value",
                              "createdAt"
                            ]
                          }
                        },
                        "anonymous": {
                          "type": "boolean"
                        },
                        "mergedIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "environment",
                        "appId",
                        "sourceId",
                        "traits",
                        "consent",
                        "mergedInto",
                        "createdAt",
                        "updatedAt",
                        "identifiers",
                        "anonymous",
                        "mergedIds"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/{profileId}": {
      "get": {
        "operationId": "users.get",
        "tags": [
          "users"
        ],
        "summary": "Fetch one profile with its identifiers",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "profileId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "environment": {
                          "type": "string",
                          "enum": [
                            "development",
                            "production"
                          ]
                        },
                        "appId": {
                          "type": "string"
                        },
                        "sourceId": {
                          "type": "string"
                        },
                        "traits": {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "consent": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "boolean"
                          }
                        },
                        "mergedInto": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "identifiers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "anonymousId",
                                  "userId",
                                  "clerkId",
                                  "email"
                                ]
                              },
                              "value": {
                                "type": "string"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "kind",
                              "value",
                              "createdAt"
                            ]
                          }
                        },
                        "anonymous": {
                          "type": "boolean"
                        },
                        "mergedIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "environment",
                        "appId",
                        "sourceId",
                        "traits",
                        "consent",
                        "mergedInto",
                        "createdAt",
                        "updatedAt",
                        "identifiers",
                        "anonymous",
                        "mergedIds"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "307": {
            "description": "The profile was merged into another; Location carries the survivor's URL",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string",
                  "description": "The survivor's URL"
                },
                "required": true,
                "description": "The survivor's URL"
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "users.erase",
        "tags": [
          "users"
        ],
        "summary": "Erase a user (GDPR)",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "profileId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "profileId": {
                          "type": "string"
                        },
                        "terminatedInstances": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "profileId",
                        "terminatedInstances"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "307": {
            "description": "The profile was merged into another; Location carries the survivor's URL",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string",
                  "description": "The survivor's URL"
                },
                "required": true,
                "description": "The survivor's URL"
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/{profileId}/export": {
      "get": {
        "operationId": "users.export",
        "tags": [
          "users"
        ],
        "summary": "Export everything held on a user (GDPR)",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "profileId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "exportedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "user": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "orgId": {
                              "type": "string"
                            },
                            "environment": {
                              "type": "string",
                              "enum": [
                                "development",
                                "production"
                              ]
                            },
                            "appId": {
                              "type": "string"
                            },
                            "sourceId": {
                              "type": "string"
                            },
                            "traits": {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            "consent": {
                              "type": "object",
                              "additionalProperties": {
                                "type": "boolean"
                              }
                            },
                            "mergedInto": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "identifiers": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "anonymousId",
                                      "userId",
                                      "clerkId",
                                      "email"
                                    ]
                                  },
                                  "value": {
                                    "type": "string"
                                  },
                                  "createdAt": {
                                    "type": "string",
                                    "format": "date-time"
                                  }
                                },
                                "required": [
                                  "kind",
                                  "value",
                                  "createdAt"
                                ]
                              }
                            },
                            "anonymous": {
                              "type": "boolean"
                            },
                            "mergedIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "id",
                            "orgId",
                            "environment",
                            "appId",
                            "sourceId",
                            "traits",
                            "consent",
                            "mergedInto",
                            "createdAt",
                            "updatedAt",
                            "identifiers",
                            "anonymous",
                            "mergedIds"
                          ]
                        },
                        "events": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "orgId": {
                                "type": "string"
                              },
                              "environment": {
                                "type": "string",
                                "enum": [
                                  "development",
                                  "production"
                                ]
                              },
                              "appId": {
                                "type": "string"
                              },
                              "sourceId": {
                                "type": "string"
                              },
                              "profileId": {
                                "type": "string"
                              },
                              "event": {
                                "type": "string"
                              },
                              "properties": {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              "timestamp": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "receivedAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "messageId": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "orgId",
                              "environment",
                              "appId",
                              "sourceId",
                              "profileId",
                              "event",
                              "properties",
                              "timestamp",
                              "receivedAt",
                              "messageId"
                            ]
                          }
                        },
                        "journeys": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "orgId": {
                                "type": "string"
                              },
                              "environment": {
                                "type": "string",
                                "enum": [
                                  "development",
                                  "production"
                                ]
                              },
                              "journey": {
                                "type": "string"
                              },
                              "profileId": {
                                "type": "string"
                              },
                              "workflowId": {
                                "type": "string"
                              },
                              "runId": {
                                "type": "string"
                              },
                              "completedAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "orgId",
                              "environment",
                              "journey",
                              "profileId",
                              "workflowId",
                              "runId",
                              "completedAt",
                              "createdAt"
                            ]
                          }
                        },
                        "deliveries": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "orgId": {
                                "type": "string"
                              },
                              "environment": {
                                "type": "string",
                                "enum": [
                                  "development",
                                  "production"
                                ]
                              },
                              "profileId": {
                                "type": "string"
                              },
                              "journey": {
                                "type": "string"
                              },
                              "step": {
                                "type": "string"
                              },
                              "channel": {
                                "type": "string",
                                "enum": [
                                  "email",
                                  "webhook"
                                ]
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "sent",
                                  "delivered",
                                  "bounced",
                                  "complained",
                                  "failed",
                                  "skipped_disabled",
                                  "skipped_paused",
                                  "skipped_suppressed",
                                  "skipped_quota",
                                  "skipped_frequency_cap",
                                  "skipped_consent",
                                  "skipped_domain",
                                  "skipped_ssrf",
                                  "would_send",
                                  "would_skip_disabled",
                                  "would_skip_paused",
                                  "would_skip_suppressed",
                                  "would_skip_quota",
                                  "would_skip_frequency_cap",
                                  "would_skip_consent",
                                  "would_skip_domain",
                                  "would_skip_ssrf"
                                ]
                              },
                              "dryRun": {
                                "type": "boolean"
                              },
                              "recipient": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "providerId": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "error": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "sentAt": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date-time"
                              },
                              "settledAt": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "orgId",
                              "environment",
                              "profileId",
                              "journey",
                              "step",
                              "channel",
                              "status",
                              "dryRun",
                              "recipient",
                              "providerId",
                              "error",
                              "createdAt",
                              "updatedAt",
                              "sentAt",
                              "settledAt"
                            ]
                          }
                        },
                        "suppressedAddresses": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "orgId": {
                                "type": "string"
                              },
                              "address": {
                                "type": "string"
                              },
                              "type": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "enum": [
                                  "bounce",
                                  "complaint",
                                  "manual",
                                  null
                                ]
                              },
                              "reason": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "source": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "suppressedAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "orgId",
                              "address",
                              "type",
                              "reason",
                              "source",
                              "suppressedAt",
                              "createdAt",
                              "updatedAt"
                            ]
                          }
                        },
                        "emailAddresses": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "orgId": {
                                "type": "string"
                              },
                              "environment": {
                                "type": "string",
                                "enum": [
                                  "development",
                                  "production"
                                ]
                              },
                              "address": {
                                "type": "string"
                              },
                              "verifiedAt": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date-time"
                              },
                              "verificationMethod": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "enum": [
                                  "link",
                                  "imported",
                                  "provider",
                                  null
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "orgId",
                              "environment",
                              "address",
                              "verifiedAt",
                              "verificationMethod",
                              "createdAt",
                              "updatedAt"
                            ]
                          }
                        },
                        "quarantineEntries": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "orgId": {
                                "type": "string"
                              },
                              "environment": {
                                "type": "string",
                                "enum": [
                                  "development",
                                  "production"
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "event",
                                  "trait"
                                ]
                              },
                              "name": {
                                "type": "string"
                              },
                              "appId": {
                                "type": "string"
                              },
                              "sourceId": {
                                "type": "string"
                              },
                              "profileId": {
                                "type": "string"
                              },
                              "payload": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "properties": {
                                        "type": "object",
                                        "additionalProperties": {}
                                      },
                                      "messageId": {
                                        "type": "string"
                                      },
                                      "idempotencyKey": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "properties",
                                      "messageId",
                                      "idempotencyKey"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "value": {}
                                    }
                                  }
                                ]
                              },
                              "occurredAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "orgId",
                              "environment",
                              "kind",
                              "name",
                              "appId",
                              "sourceId",
                              "profileId",
                              "payload",
                              "occurredAt",
                              "createdAt",
                              "updatedAt"
                            ]
                          }
                        }
                      },
                      "required": [
                        "exportedAt",
                        "user",
                        "events",
                        "journeys",
                        "deliveries",
                        "suppressedAddresses",
                        "emailAddresses",
                        "quarantineEntries"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "307": {
            "description": "The profile was merged into another; Location carries the survivor's URL",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string",
                  "description": "The survivor's URL"
                },
                "required": true,
                "description": "The survivor's URL"
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/{profileId}/consent": {
      "patch": {
        "operationId": "users.updateConsent",
        "tags": [
          "users"
        ],
        "summary": "Update consent purposes",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "profileId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "emailMarketing": {
                        "type": "boolean"
                      },
                      "dataProcessing": {
                        "type": "boolean"
                      }
                    }
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "environment": {
                          "type": "string",
                          "enum": [
                            "development",
                            "production"
                          ]
                        },
                        "appId": {
                          "type": "string"
                        },
                        "sourceId": {
                          "type": "string"
                        },
                        "traits": {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "consent": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "boolean"
                          }
                        },
                        "mergedInto": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "identifiers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "anonymousId",
                                  "userId",
                                  "clerkId",
                                  "email"
                                ]
                              },
                              "value": {
                                "type": "string"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "kind",
                              "value",
                              "createdAt"
                            ]
                          }
                        },
                        "anonymous": {
                          "type": "boolean"
                        },
                        "mergedIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "environment",
                        "appId",
                        "sourceId",
                        "traits",
                        "consent",
                        "mergedInto",
                        "createdAt",
                        "updatedAt",
                        "identifiers",
                        "anonymous",
                        "mergedIds"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "307": {
            "description": "The profile was merged into another; Location carries the survivor's URL",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string",
                  "description": "The survivor's URL"
                },
                "required": true,
                "description": "The survivor's URL"
              }
            }
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/{profileId}/segments": {
      "get": {
        "operationId": "users.listSegments",
        "tags": [
          "users"
        ],
        "summary": "The segments a profile belongs to",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "profileId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of results; meta carries nextCursor and hasMore",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "segmentId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "since": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "segmentId",
                          "name",
                          "since"
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "307": {
            "description": "The profile was merged into another; Location carries the survivor's URL",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string",
                  "description": "The survivor's URL"
                },
                "required": true,
                "description": "The survivor's URL"
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/{profileId}/journeys": {
      "get": {
        "operationId": "users.listJourneys",
        "tags": [
          "users"
        ],
        "summary": "A profile's journey timeline",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "profileId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of results; meta carries nextCursor and hasMore",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "journey": {
                            "type": "object",
                            "properties": {
                              "orgId": {
                                "type": "string"
                              },
                              "environment": {
                                "type": "string",
                                "enum": [
                                  "development",
                                  "production"
                                ]
                              },
                              "key": {
                                "type": "string"
                              },
                              "releaseId": {
                                "type": "string"
                              },
                              "tags": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "trigger": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "event": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 200
                                          },
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 200
                                            },
                                            "minItems": 1,
                                            "maxItems": 20
                                          }
                                        ]
                                      },
                                      "appId": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 200
                                          },
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 200
                                            },
                                            "minItems": 1,
                                            "maxItems": 20
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "event"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "segment": {
                                        "type": "string",
                                        "minLength": 1
                                      }
                                    },
                                    "required": [
                                      "segment"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "purpose": {
                                "type": "string",
                                "enum": [
                                  "emailMarketing",
                                  "dataProcessing"
                                ]
                              },
                              "active": {
                                "type": "boolean"
                              },
                              "spine": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "enum": [
                                        "sleep",
                                        "waitForEvent",
                                        "email.send",
                                        "webhook.send",
                                        "traits.set",
                                        "traits.unset",
                                        "profile.get",
                                        "profiles.get",
                                        "events.track",
                                        "restart"
                                      ]
                                    },
                                    "detail": {
                                      "type": "string",
                                      "maxLength": 200
                                    }
                                  },
                                  "required": [
                                    "name"
                                  ]
                                }
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "enabled": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "orgId",
                              "environment",
                              "key",
                              "releaseId",
                              "tags",
                              "trigger",
                              "purpose",
                              "active",
                              "spine",
                              "createdAt",
                              "updatedAt",
                              "enabled"
                            ]
                          },
                          "execution": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "orgId": {
                                "type": "string"
                              },
                              "environment": {
                                "type": "string",
                                "enum": [
                                  "development",
                                  "production"
                                ]
                              },
                              "journeyKey": {
                                "type": "string"
                              },
                              "profileId": {
                                "type": "string"
                              },
                              "workflowId": {
                                "type": "string"
                              },
                              "runId": {
                                "type": "string"
                              },
                              "releaseId": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "running",
                                  "waiting",
                                  "completed",
                                  "failed",
                                  "cancelled"
                                ]
                              },
                              "step": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "timerDeadline": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date-time"
                              },
                              "journalEntries": {
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "error": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "startedAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "endedAt": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "orgId",
                              "environment",
                              "journeyKey",
                              "profileId",
                              "workflowId",
                              "runId",
                              "releaseId",
                              "status",
                              "step",
                              "timerDeadline",
                              "journalEntries",
                              "error",
                              "startedAt",
                              "updatedAt",
                              "endedAt"
                            ]
                          },
                          "deliveries": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "journey": {
                                  "type": "string"
                                },
                                "step": {
                                  "type": "string"
                                },
                                "channel": {
                                  "type": "string",
                                  "enum": [
                                    "email",
                                    "webhook"
                                  ]
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "sent",
                                    "delivered",
                                    "bounced",
                                    "complained",
                                    "failed",
                                    "skipped_disabled",
                                    "skipped_paused",
                                    "skipped_suppressed",
                                    "skipped_quota",
                                    "skipped_frequency_cap",
                                    "skipped_consent",
                                    "skipped_domain",
                                    "skipped_ssrf",
                                    "would_send",
                                    "would_skip_disabled",
                                    "would_skip_paused",
                                    "would_skip_suppressed",
                                    "would_skip_quota",
                                    "would_skip_frequency_cap",
                                    "would_skip_consent",
                                    "would_skip_domain",
                                    "would_skip_ssrf"
                                  ]
                                },
                                "dryRun": {
                                  "type": "boolean"
                                },
                                "error": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time"
                                }
                              },
                              "required": [
                                "id",
                                "journey",
                                "step",
                                "channel",
                                "status",
                                "dryRun",
                                "error",
                                "createdAt"
                              ]
                            }
                          }
                        },
                        "required": [
                          "journey",
                          "execution",
                          "deliveries"
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "307": {
            "description": "The profile was merged into another; Location carries the survivor's URL",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string",
                  "description": "The survivor's URL"
                },
                "required": true,
                "description": "The survivor's URL"
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/events": {
      "get": {
        "operationId": "events.list",
        "tags": [
          "events"
        ],
        "summary": "List events, newest first",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "desc"
            },
            "required": false,
            "name": "direction",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "required": false,
            "name": "appId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "required": false,
            "name": "sourceId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "required": false,
            "name": "event",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "required": false,
            "name": "profileId",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of results; meta carries nextCursor and hasMore",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "orgId": {
                            "type": "string"
                          },
                          "environment": {
                            "type": "string",
                            "enum": [
                              "development",
                              "production"
                            ]
                          },
                          "appId": {
                            "type": "string"
                          },
                          "sourceId": {
                            "type": "string"
                          },
                          "profileId": {
                            "type": "string"
                          },
                          "event": {
                            "type": "string"
                          },
                          "properties": {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          "timestamp": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "receivedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "messageId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "orgId",
                          "environment",
                          "appId",
                          "sourceId",
                          "profileId",
                          "event",
                          "properties",
                          "timestamp",
                          "receivedAt",
                          "messageId"
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/events/stats": {
      "get": {
        "operationId": "events.stats",
        "tags": [
          "events"
        ],
        "summary": "Event volume and per-app breakdown",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 90,
              "default": 30
            },
            "required": false,
            "name": "days",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "days": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 90
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "volume": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "day": {
                                "type": "string"
                              },
                              "count": {
                                "type": "integer",
                                "minimum": 0
                              }
                            },
                            "required": [
                              "day",
                              "count"
                            ]
                          }
                        },
                        "byApp": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "appId": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "count": {
                                "type": "integer",
                                "minimum": 0
                              }
                            },
                            "required": [
                              "appId",
                              "name",
                              "count"
                            ]
                          }
                        }
                      },
                      "required": [
                        "days",
                        "total",
                        "volume",
                        "byApp"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/events/stats/names": {
      "get": {
        "operationId": "events.statsByName",
        "tags": [
          "events"
        ],
        "summary": "Per-event-name volume and last-seen",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 90,
              "default": 30
            },
            "required": false,
            "name": "days",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "days": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 90
                        },
                        "names": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "event": {
                                "type": "string"
                              },
                              "count": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "lastSeenAt": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "event",
                              "count",
                              "lastSeenAt"
                            ]
                          }
                        }
                      },
                      "required": [
                        "days",
                        "names"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/events/{id}": {
      "get": {
        "operationId": "events.get",
        "tags": [
          "events"
        ],
        "summary": "Fetch one event",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "environment": {
                          "type": "string",
                          "enum": [
                            "development",
                            "production"
                          ]
                        },
                        "appId": {
                          "type": "string"
                        },
                        "sourceId": {
                          "type": "string"
                        },
                        "profileId": {
                          "type": "string"
                        },
                        "event": {
                          "type": "string"
                        },
                        "properties": {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "timestamp": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "receivedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "messageId": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "environment",
                        "appId",
                        "sourceId",
                        "profileId",
                        "event",
                        "properties",
                        "timestamp",
                        "receivedAt",
                        "messageId"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/apps": {
      "post": {
        "operationId": "apps.create",
        "tags": [
          "apps"
        ],
        "summary": "Create an app",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "environment": {
                        "type": "string",
                        "enum": [
                          "development",
                          "production"
                        ],
                        "default": "production"
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created app",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "environment": {
                          "type": "string",
                          "enum": [
                            "development",
                            "production"
                          ]
                        },
                        "name": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "archivedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "sourceCount": {
                          "type": "integer"
                        },
                        "lastReceivedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "environment",
                        "name",
                        "status",
                        "createdAt",
                        "updatedAt",
                        "archivedAt",
                        "sourceCount",
                        "lastReceivedAt"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Error envelope; code: conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "apps.list",
        "tags": [
          "apps"
        ],
        "summary": "List apps",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "required": false,
            "name": "q",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "archived",
                "all"
              ],
              "default": "all"
            },
            "required": false,
            "name": "status",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of results; meta carries nextCursor and hasMore",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "orgId": {
                            "type": "string"
                          },
                          "environment": {
                            "type": "string",
                            "enum": [
                              "development",
                              "production"
                            ]
                          },
                          "name": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "archived"
                            ]
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "archivedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "sourceCount": {
                            "type": "integer"
                          },
                          "lastReceivedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "orgId",
                          "environment",
                          "name",
                          "status",
                          "createdAt",
                          "updatedAt",
                          "archivedAt",
                          "sourceCount",
                          "lastReceivedAt"
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/apps/{id}": {
      "get": {
        "operationId": "apps.get",
        "tags": [
          "apps"
        ],
        "summary": "Fetch one app",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "environment": {
                          "type": "string",
                          "enum": [
                            "development",
                            "production"
                          ]
                        },
                        "name": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "archivedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "sourceCount": {
                          "type": "integer"
                        },
                        "lastReceivedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "environment",
                        "name",
                        "status",
                        "createdAt",
                        "updatedAt",
                        "archivedAt",
                        "sourceCount",
                        "lastReceivedAt"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "apps.update",
        "tags": [
          "apps"
        ],
        "summary": "Rename or archive an app",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "archived"
                        ]
                      }
                    }
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "environment": {
                          "type": "string",
                          "enum": [
                            "development",
                            "production"
                          ]
                        },
                        "name": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "archivedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "sourceCount": {
                          "type": "integer"
                        },
                        "lastReceivedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "environment",
                        "name",
                        "status",
                        "createdAt",
                        "updatedAt",
                        "archivedAt",
                        "sourceCount",
                        "lastReceivedAt"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/apps/{appId}/sources": {
      "post": {
        "operationId": "apps.sources.add",
        "tags": [
          "apps"
        ],
        "summary": "Add a source to an app",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "appId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "api"
                            ]
                          },
                          "config": {
                            "type": "object",
                            "properties": {},
                            "default": {},
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "kind"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "clerk"
                            ]
                          },
                          "config": {
                            "type": "object",
                            "properties": {
                              "signingSecret": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "default": {}
                          }
                        },
                        "required": [
                          "kind"
                        ]
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created source",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "appId": {
                          "type": "string"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "api",
                            "clerk"
                          ]
                        },
                        "config": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        },
                        "lastReceivedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "archivedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "configured": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "appId",
                        "kind",
                        "config",
                        "lastReceivedAt",
                        "createdAt",
                        "updatedAt",
                        "archivedAt",
                        "configured"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Error envelope; code: conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "apps.sources.list",
        "tags": [
          "apps"
        ],
        "summary": "List an app's sources",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "appId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of results; meta carries nextCursor and hasMore",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "orgId": {
                            "type": "string"
                          },
                          "appId": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "api",
                              "clerk"
                            ]
                          },
                          "config": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          },
                          "lastReceivedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "archivedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "configured": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "orgId",
                          "appId",
                          "kind",
                          "config",
                          "lastReceivedAt",
                          "createdAt",
                          "updatedAt",
                          "archivedAt",
                          "configured"
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/sources/{id}": {
      "get": {
        "operationId": "sources.get",
        "tags": [
          "sources"
        ],
        "summary": "Fetch one source",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "appId": {
                          "type": "string"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "api",
                            "clerk"
                          ]
                        },
                        "config": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        },
                        "lastReceivedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "archivedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "configured": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "appId",
                        "kind",
                        "config",
                        "lastReceivedAt",
                        "createdAt",
                        "updatedAt",
                        "archivedAt",
                        "configured"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "sources.update",
        "tags": [
          "sources"
        ],
        "summary": "Set or rotate a source's config",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "config": {}
                    }
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "appId": {
                          "type": "string"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "api",
                            "clerk"
                          ]
                        },
                        "config": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        },
                        "lastReceivedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "archivedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "configured": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "appId",
                        "kind",
                        "config",
                        "lastReceivedAt",
                        "createdAt",
                        "updatedAt",
                        "archivedAt",
                        "configured"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "sources.archive",
        "tags": [
          "sources"
        ],
        "summary": "Archive a source",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The archived source",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "appId": {
                          "type": "string"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "api",
                            "clerk"
                          ]
                        },
                        "config": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        },
                        "lastReceivedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "archivedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "configured": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "appId",
                        "kind",
                        "config",
                        "lastReceivedAt",
                        "createdAt",
                        "updatedAt",
                        "archivedAt",
                        "configured"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/sources/{sourceId}/webhook": {
      "post": {
        "operationId": "sources.webhook",
        "tags": [
          "sources"
        ],
        "summary": "Source webhook receiver (public)",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "sourceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "text/plain": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Accepted, per the provider's plain-text convention",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Rejected: signature or payload problem"
          },
          "404": {
            "description": "Unknown or archived source"
          },
          "429": {
            "description": "Rate limited"
          }
        }
      }
    },
    "/v1/catalog/events": {
      "post": {
        "operationId": "catalog.events.create",
        "tags": [
          "catalog"
        ],
        "summary": "Register an event name",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "properties": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "string",
                          "enum": [
                            "string",
                            "number",
                            "boolean",
                            "object",
                            "array<any>",
                            "array<string>",
                            "array<number>",
                            "array<boolean>",
                            "array<object>"
                          ]
                        },
                        "default": {}
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The registered event",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "properties": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string",
                            "enum": [
                              "string",
                              "number",
                              "boolean",
                              "object",
                              "array<any>",
                              "array<string>",
                              "array<number>",
                              "array<boolean>",
                              "array<object>"
                            ]
                          }
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "allowed",
                            "denied"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "orgId",
                        "name",
                        "properties",
                        "state",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Error envelope; code: conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "catalog.events.list",
        "tags": [
          "catalog"
        ],
        "summary": "List catalog events",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "required": false,
            "name": "q",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "allowed",
                "denied"
              ]
            },
            "required": false,
            "name": "state",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of results; meta carries nextCursor and hasMore",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "orgId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "properties": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "string",
                              "enum": [
                                "string",
                                "number",
                                "boolean",
                                "object",
                                "array<any>",
                                "array<string>",
                                "array<number>",
                                "array<boolean>",
                                "array<object>"
                              ]
                            }
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "allowed",
                              "denied"
                            ]
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "orgId",
                          "name",
                          "properties",
                          "state",
                          "createdAt",
                          "updatedAt"
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/catalog/events/{name}": {
      "get": {
        "operationId": "catalog.events.get",
        "tags": [
          "catalog"
        ],
        "summary": "Fetch one catalog event",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "name",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "properties": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string",
                            "enum": [
                              "string",
                              "number",
                              "boolean",
                              "object",
                              "array<any>",
                              "array<string>",
                              "array<number>",
                              "array<boolean>",
                              "array<object>"
                            ]
                          }
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "allowed",
                            "denied"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "orgId",
                        "name",
                        "properties",
                        "state",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "catalog.events.update",
        "tags": [
          "catalog"
        ],
        "summary": "Update a catalog event",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "name",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "properties": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "string",
                          "enum": [
                            "string",
                            "number",
                            "boolean",
                            "object",
                            "array<any>",
                            "array<string>",
                            "array<number>",
                            "array<boolean>",
                            "array<object>"
                          ]
                        }
                      }
                    },
                    "required": [
                      "properties"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "properties": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string",
                            "enum": [
                              "string",
                              "number",
                              "boolean",
                              "object",
                              "array<any>",
                              "array<string>",
                              "array<number>",
                              "array<boolean>",
                              "array<object>"
                            ]
                          }
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "allowed",
                            "denied"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "orgId",
                        "name",
                        "properties",
                        "state",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/catalog/events/{name}/state": {
      "post": {
        "operationId": "catalog.events.setState",
        "tags": [
          "catalog"
        ],
        "summary": "Allow or deny an event name",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "name",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "allowed",
                          "denied"
                        ]
                      }
                    },
                    "required": [
                      "state"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "properties": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string",
                            "enum": [
                              "string",
                              "number",
                              "boolean",
                              "object",
                              "array<any>",
                              "array<string>",
                              "array<number>",
                              "array<boolean>",
                              "array<object>"
                            ]
                          }
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "allowed",
                            "denied"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "orgId",
                        "name",
                        "properties",
                        "state",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/catalog/traits": {
      "post": {
        "operationId": "catalog.traits.create",
        "tags": [
          "catalog"
        ],
        "summary": "Register a trait",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "string",
                          "number",
                          "boolean",
                          "object",
                          "array<any>",
                          "array<string>",
                          "array<number>",
                          "array<boolean>",
                          "array<object>"
                        ]
                      }
                    },
                    "required": [
                      "name",
                      "type"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The registered trait",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "string",
                            "number",
                            "boolean",
                            "object",
                            "array<any>",
                            "array<string>",
                            "array<number>",
                            "array<boolean>",
                            "array<object>"
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "allowed",
                            "denied"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "orgId",
                        "name",
                        "type",
                        "state",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Error envelope; code: conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "catalog.traits.list",
        "tags": [
          "catalog"
        ],
        "summary": "List catalog traits",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "required": false,
            "name": "q",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "allowed",
                "denied"
              ]
            },
            "required": false,
            "name": "state",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of results; meta carries nextCursor and hasMore",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "orgId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "string",
                              "number",
                              "boolean",
                              "object",
                              "array<any>",
                              "array<string>",
                              "array<number>",
                              "array<boolean>",
                              "array<object>"
                            ]
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "allowed",
                              "denied"
                            ]
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "orgId",
                          "name",
                          "type",
                          "state",
                          "createdAt",
                          "updatedAt"
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/catalog/traits/{name}": {
      "get": {
        "operationId": "catalog.traits.get",
        "tags": [
          "catalog"
        ],
        "summary": "Fetch one catalog trait",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "name",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "string",
                            "number",
                            "boolean",
                            "object",
                            "array<any>",
                            "array<string>",
                            "array<number>",
                            "array<boolean>",
                            "array<object>"
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "allowed",
                            "denied"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "orgId",
                        "name",
                        "type",
                        "state",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "catalog.traits.update",
        "tags": [
          "catalog"
        ],
        "summary": "Update a catalog trait",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "name",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "string",
                          "number",
                          "boolean",
                          "object",
                          "array<any>",
                          "array<string>",
                          "array<number>",
                          "array<boolean>",
                          "array<object>"
                        ]
                      }
                    },
                    "required": [
                      "type"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "string",
                            "number",
                            "boolean",
                            "object",
                            "array<any>",
                            "array<string>",
                            "array<number>",
                            "array<boolean>",
                            "array<object>"
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "allowed",
                            "denied"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "orgId",
                        "name",
                        "type",
                        "state",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/catalog/traits/{name}/state": {
      "post": {
        "operationId": "catalog.traits.setState",
        "tags": [
          "catalog"
        ],
        "summary": "Allow or deny a trait name",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "name",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "allowed",
                          "denied"
                        ]
                      }
                    },
                    "required": [
                      "state"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "string",
                            "number",
                            "boolean",
                            "object",
                            "array<any>",
                            "array<string>",
                            "array<number>",
                            "array<boolean>",
                            "array<object>"
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "allowed",
                            "denied"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "orgId",
                        "name",
                        "type",
                        "state",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/catalog/quarantine/promote": {
      "post": {
        "operationId": "catalog.quarantine.promote",
        "tags": [
          "catalog"
        ],
        "summary": "Promote a quarantined name into the catalog",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "event",
                          "trait"
                        ]
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "kind",
                      "name"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The number of entries promoted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "promoted": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "promoted"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/catalog/quarantine/deny": {
      "post": {
        "operationId": "catalog.quarantine.deny",
        "tags": [
          "catalog"
        ],
        "summary": "Deny a quarantined name",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "event",
                          "trait"
                        ]
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "kind",
                      "name"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The number of entries dropped",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "dropped": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "dropped"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/violations/{id}": {
      "get": {
        "operationId": "violations.get",
        "tags": [
          "violations"
        ],
        "summary": "Fetch one violation",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "environment": {
                          "type": "string",
                          "enum": [
                            "development",
                            "production"
                          ]
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "event",
                            "trait"
                          ]
                        },
                        "name": {
                          "type": "string"
                        },
                        "payload": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "properties": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "string",
                                    "enum": [
                                      "string",
                                      "number",
                                      "boolean",
                                      "object",
                                      "array<any>",
                                      "array<string>",
                                      "array<number>",
                                      "array<boolean>",
                                      "array<object>"
                                    ]
                                  }
                                }
                              },
                              "required": [
                                "properties"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "enum": [
                                    "string",
                                    "number",
                                    "boolean",
                                    "object",
                                    "array<any>",
                                    "array<string>",
                                    "array<number>",
                                    "array<boolean>",
                                    "array<object>",
                                    null
                                  ]
                                }
                              },
                              "required": [
                                "type"
                              ]
                            }
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "open",
                            "resolved",
                            "dismissed"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "lastSeenAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "resolvedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "dismissedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "environment",
                        "kind",
                        "name",
                        "payload",
                        "status",
                        "createdAt",
                        "lastSeenAt",
                        "resolvedAt",
                        "dismissedAt"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/violations/{id}/resolve": {
      "post": {
        "operationId": "violations.resolve",
        "tags": [
          "violations"
        ],
        "summary": "Resolve a violation into the catalog",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "properties": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "string",
                          "enum": [
                            "string",
                            "number",
                            "boolean",
                            "object",
                            "array<any>",
                            "array<string>",
                            "array<number>",
                            "array<boolean>",
                            "array<object>"
                          ]
                        }
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "string",
                          "number",
                          "boolean",
                          "object",
                          "array<any>",
                          "array<string>",
                          "array<number>",
                          "array<boolean>",
                          "array<object>"
                        ]
                      }
                    }
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "environment": {
                          "type": "string",
                          "enum": [
                            "development",
                            "production"
                          ]
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "event",
                            "trait"
                          ]
                        },
                        "name": {
                          "type": "string"
                        },
                        "payload": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "properties": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "string",
                                    "enum": [
                                      "string",
                                      "number",
                                      "boolean",
                                      "object",
                                      "array<any>",
                                      "array<string>",
                                      "array<number>",
                                      "array<boolean>",
                                      "array<object>"
                                    ]
                                  }
                                }
                              },
                              "required": [
                                "properties"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "enum": [
                                    "string",
                                    "number",
                                    "boolean",
                                    "object",
                                    "array<any>",
                                    "array<string>",
                                    "array<number>",
                                    "array<boolean>",
                                    "array<object>",
                                    null
                                  ]
                                }
                              },
                              "required": [
                                "type"
                              ]
                            }
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "open",
                            "resolved",
                            "dismissed"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "lastSeenAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "resolvedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "dismissedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "environment",
                        "kind",
                        "name",
                        "payload",
                        "status",
                        "createdAt",
                        "lastSeenAt",
                        "resolvedAt",
                        "dismissedAt"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Error envelope; code: conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/violations/{id}/dismiss": {
      "post": {
        "operationId": "violations.dismiss",
        "tags": [
          "violations"
        ],
        "summary": "Dismiss a violation",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "environment": {
                          "type": "string",
                          "enum": [
                            "development",
                            "production"
                          ]
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "event",
                            "trait"
                          ]
                        },
                        "name": {
                          "type": "string"
                        },
                        "payload": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "properties": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "string",
                                    "enum": [
                                      "string",
                                      "number",
                                      "boolean",
                                      "object",
                                      "array<any>",
                                      "array<string>",
                                      "array<number>",
                                      "array<boolean>",
                                      "array<object>"
                                    ]
                                  }
                                }
                              },
                              "required": [
                                "properties"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "enum": [
                                    "string",
                                    "number",
                                    "boolean",
                                    "object",
                                    "array<any>",
                                    "array<string>",
                                    "array<number>",
                                    "array<boolean>",
                                    "array<object>",
                                    null
                                  ]
                                }
                              },
                              "required": [
                                "type"
                              ]
                            }
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "open",
                            "resolved",
                            "dismissed"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "lastSeenAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "resolvedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "dismissedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "environment",
                        "kind",
                        "name",
                        "payload",
                        "status",
                        "createdAt",
                        "lastSeenAt",
                        "resolvedAt",
                        "dismissedAt"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/review": {
      "get": {
        "operationId": "review.list",
        "tags": [
          "review"
        ],
        "summary": "List the review queue",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "asc"
            },
            "required": false,
            "name": "direction",
            "in": "query"
          },
          {
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "held",
                    "violation"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "all"
                  ]
                }
              ],
              "default": "all"
            },
            "required": false,
            "name": "type",
            "in": "query"
          },
          {
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "event",
                    "trait"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "all"
                  ]
                }
              ],
              "default": "all"
            },
            "required": false,
            "name": "kind",
            "in": "query"
          },
          {
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "held",
                    "open",
                    "resolved",
                    "dismissed"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "all"
                  ]
                }
              ],
              "default": "all"
            },
            "required": false,
            "name": "status",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of results; meta carries nextCursor and hasMore",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "event",
                                  "trait"
                                ]
                              },
                              "name": {
                                "type": "string"
                              },
                              "firstSeenAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "lastSeenAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "held"
                                ]
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "held"
                                ]
                              },
                              "payload": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "properties": {
                                        "type": "object",
                                        "additionalProperties": {}
                                      },
                                      "messageId": {
                                        "type": "string"
                                      },
                                      "idempotencyKey": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "properties",
                                      "messageId",
                                      "idempotencyKey"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "value": {}
                                    }
                                  }
                                ]
                              },
                              "heldCount": {
                                "type": "integer",
                                "minimum": 1
                              }
                            },
                            "required": [
                              "id",
                              "kind",
                              "name",
                              "firstSeenAt",
                              "lastSeenAt",
                              "type",
                              "status",
                              "payload",
                              "heldCount"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "event",
                                  "trait"
                                ]
                              },
                              "name": {
                                "type": "string"
                              },
                              "firstSeenAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "lastSeenAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "violation"
                                ]
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "open",
                                  "resolved",
                                  "dismissed"
                                ]
                              },
                              "payload": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "properties": {
                                        "type": "object",
                                        "additionalProperties": {
                                          "type": "string",
                                          "enum": [
                                            "string",
                                            "number",
                                            "boolean",
                                            "object",
                                            "array<any>",
                                            "array<string>",
                                            "array<number>",
                                            "array<boolean>",
                                            "array<object>"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "properties"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": [
                                          "string",
                                          "null"
                                        ],
                                        "enum": [
                                          "string",
                                          "number",
                                          "boolean",
                                          "object",
                                          "array<any>",
                                          "array<string>",
                                          "array<number>",
                                          "array<boolean>",
                                          "array<object>",
                                          null
                                        ]
                                      }
                                    },
                                    "required": [
                                      "type"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "kind",
                              "name",
                              "firstSeenAt",
                              "lastSeenAt",
                              "type",
                              "status",
                              "payload"
                            ]
                          }
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/segments": {
      "post": {
        "operationId": "segments.create",
        "tags": [
          "segments"
        ],
        "summary": "Create a segment",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "description": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 500
                      },
                      "definition": {
                        "type": "object",
                        "properties": {
                          "match": {
                            "type": "string",
                            "enum": [
                              "all",
                              "any"
                            ],
                            "default": "all"
                          },
                          "appId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "minItems": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "predicates": {
                            "type": "array",
                            "items": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "trait"
                                      ]
                                    },
                                    "name": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 200
                                    },
                                    "op": {
                                      "type": "string",
                                      "enum": [
                                        "eq",
                                        "neq",
                                        "gt",
                                        "gte",
                                        "lt",
                                        "lte",
                                        "exists",
                                        "notExists",
                                        "contains"
                                      ]
                                    },
                                    "value": {}
                                  },
                                  "required": [
                                    "kind",
                                    "name",
                                    "op"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "event"
                                      ]
                                    },
                                    "name": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 200
                                    },
                                    "op": {
                                      "type": "string",
                                      "enum": [
                                        "performed",
                                        "notPerformed"
                                      ]
                                    },
                                    "atLeast": {
                                      "type": "integer",
                                      "minimum": 1,
                                      "default": 1
                                    },
                                    "withinDays": {
                                      "type": "integer",
                                      "minimum": 1
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "name",
                                    "op"
                                  ]
                                }
                              ]
                            },
                            "minItems": 1
                          }
                        },
                        "required": [
                          "predicates"
                        ],
                        "additionalProperties": false
                      },
                      "environments": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "development",
                            "production"
                          ]
                        },
                        "minItems": 1,
                        "default": [
                          "development",
                          "production"
                        ]
                      }
                    },
                    "required": [
                      "name",
                      "definition"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created segment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "definition": {
                          "type": "object",
                          "properties": {
                            "match": {
                              "type": "string",
                              "enum": [
                                "all",
                                "any"
                              ],
                              "default": "all"
                            },
                            "appId": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "minItems": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "predicates": {
                              "type": "array",
                              "items": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "trait"
                                        ]
                                      },
                                      "name": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      },
                                      "op": {
                                        "type": "string",
                                        "enum": [
                                          "eq",
                                          "neq",
                                          "gt",
                                          "gte",
                                          "lt",
                                          "lte",
                                          "exists",
                                          "notExists",
                                          "contains"
                                        ]
                                      },
                                      "value": {}
                                    },
                                    "required": [
                                      "kind",
                                      "name",
                                      "op"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "event"
                                        ]
                                      },
                                      "name": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      },
                                      "op": {
                                        "type": "string",
                                        "enum": [
                                          "performed",
                                          "notPerformed"
                                        ]
                                      },
                                      "atLeast": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "default": 1
                                      },
                                      "withinDays": {
                                        "type": "integer",
                                        "minimum": 1
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "name",
                                      "op"
                                    ]
                                  }
                                ]
                              },
                              "minItems": 1
                            }
                          },
                          "required": [
                            "predicates"
                          ],
                          "additionalProperties": false
                        },
                        "environments": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "development",
                              "production"
                            ]
                          },
                          "minItems": 1
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "memberCount": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "name",
                        "description",
                        "definition",
                        "environments",
                        "createdAt",
                        "updatedAt",
                        "memberCount"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "segments.list",
        "tags": [
          "segments"
        ],
        "summary": "List segments",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "required": false,
            "name": "q",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of results; meta carries nextCursor and hasMore",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "orgId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "definition": {
                            "type": "object",
                            "properties": {
                              "match": {
                                "type": "string",
                                "enum": [
                                  "all",
                                  "any"
                                ],
                                "default": "all"
                              },
                              "appId": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "minItems": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "predicates": {
                                "type": "array",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "kind": {
                                          "type": "string",
                                          "enum": [
                                            "trait"
                                          ]
                                        },
                                        "name": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 200
                                        },
                                        "op": {
                                          "type": "string",
                                          "enum": [
                                            "eq",
                                            "neq",
                                            "gt",
                                            "gte",
                                            "lt",
                                            "lte",
                                            "exists",
                                            "notExists",
                                            "contains"
                                          ]
                                        },
                                        "value": {}
                                      },
                                      "required": [
                                        "kind",
                                        "name",
                                        "op"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "kind": {
                                          "type": "string",
                                          "enum": [
                                            "event"
                                          ]
                                        },
                                        "name": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 200
                                        },
                                        "op": {
                                          "type": "string",
                                          "enum": [
                                            "performed",
                                            "notPerformed"
                                          ]
                                        },
                                        "atLeast": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "default": 1
                                        },
                                        "withinDays": {
                                          "type": "integer",
                                          "minimum": 1
                                        }
                                      },
                                      "required": [
                                        "kind",
                                        "name",
                                        "op"
                                      ]
                                    }
                                  ]
                                },
                                "minItems": 1
                              }
                            },
                            "required": [
                              "predicates"
                            ],
                            "additionalProperties": false
                          },
                          "environments": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "development",
                                "production"
                              ]
                            },
                            "minItems": 1
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "orgId",
                          "name",
                          "description",
                          "definition",
                          "environments",
                          "createdAt",
                          "updatedAt"
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/segments/preview": {
      "post": {
        "operationId": "segments.preview",
        "tags": [
          "segments"
        ],
        "summary": "Preview a draft definition",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "match": {
                        "type": "string",
                        "enum": [
                          "all",
                          "any"
                        ],
                        "default": "all"
                      },
                      "appId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            },
                            "minItems": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "predicates": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "trait"
                                  ]
                                },
                                "name": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "op": {
                                  "type": "string",
                                  "enum": [
                                    "eq",
                                    "neq",
                                    "gt",
                                    "gte",
                                    "lt",
                                    "lte",
                                    "exists",
                                    "notExists",
                                    "contains"
                                  ]
                                },
                                "value": {}
                              },
                              "required": [
                                "kind",
                                "name",
                                "op"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "event"
                                  ]
                                },
                                "name": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "op": {
                                  "type": "string",
                                  "enum": [
                                    "performed",
                                    "notPerformed"
                                  ]
                                },
                                "atLeast": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "default": 1
                                },
                                "withinDays": {
                                  "type": "integer",
                                  "minimum": 1
                                }
                              },
                              "required": [
                                "kind",
                                "name",
                                "op"
                              ]
                            }
                          ]
                        },
                        "minItems": 1
                      }
                    },
                    "required": [
                      "predicates"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "memberCount": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "members": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "scanned": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "truncated": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "memberCount",
                        "members",
                        "scanned",
                        "truncated"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Error envelope; code: rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/segments/{id}": {
      "get": {
        "operationId": "segments.get",
        "tags": [
          "segments"
        ],
        "summary": "Fetch one segment with its member count",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "definition": {
                          "type": "object",
                          "properties": {
                            "match": {
                              "type": "string",
                              "enum": [
                                "all",
                                "any"
                              ],
                              "default": "all"
                            },
                            "appId": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "minItems": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "predicates": {
                              "type": "array",
                              "items": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "trait"
                                        ]
                                      },
                                      "name": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      },
                                      "op": {
                                        "type": "string",
                                        "enum": [
                                          "eq",
                                          "neq",
                                          "gt",
                                          "gte",
                                          "lt",
                                          "lte",
                                          "exists",
                                          "notExists",
                                          "contains"
                                        ]
                                      },
                                      "value": {}
                                    },
                                    "required": [
                                      "kind",
                                      "name",
                                      "op"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "event"
                                        ]
                                      },
                                      "name": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      },
                                      "op": {
                                        "type": "string",
                                        "enum": [
                                          "performed",
                                          "notPerformed"
                                        ]
                                      },
                                      "atLeast": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "default": 1
                                      },
                                      "withinDays": {
                                        "type": "integer",
                                        "minimum": 1
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "name",
                                      "op"
                                    ]
                                  }
                                ]
                              },
                              "minItems": 1
                            }
                          },
                          "required": [
                            "predicates"
                          ],
                          "additionalProperties": false
                        },
                        "environments": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "development",
                              "production"
                            ]
                          },
                          "minItems": 1
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "memberCount": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "name",
                        "description",
                        "definition",
                        "environments",
                        "createdAt",
                        "updatedAt",
                        "memberCount"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "segments.update",
        "tags": [
          "segments"
        ],
        "summary": "Update a segment",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "description": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 500
                      },
                      "definition": {
                        "type": "object",
                        "properties": {
                          "match": {
                            "type": "string",
                            "enum": [
                              "all",
                              "any"
                            ],
                            "default": "all"
                          },
                          "appId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "minItems": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "predicates": {
                            "type": "array",
                            "items": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "trait"
                                      ]
                                    },
                                    "name": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 200
                                    },
                                    "op": {
                                      "type": "string",
                                      "enum": [
                                        "eq",
                                        "neq",
                                        "gt",
                                        "gte",
                                        "lt",
                                        "lte",
                                        "exists",
                                        "notExists",
                                        "contains"
                                      ]
                                    },
                                    "value": {}
                                  },
                                  "required": [
                                    "kind",
                                    "name",
                                    "op"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "event"
                                      ]
                                    },
                                    "name": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 200
                                    },
                                    "op": {
                                      "type": "string",
                                      "enum": [
                                        "performed",
                                        "notPerformed"
                                      ]
                                    },
                                    "atLeast": {
                                      "type": "integer",
                                      "minimum": 1,
                                      "default": 1
                                    },
                                    "withinDays": {
                                      "type": "integer",
                                      "minimum": 1
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "name",
                                    "op"
                                  ]
                                }
                              ]
                            },
                            "minItems": 1
                          }
                        },
                        "required": [
                          "predicates"
                        ],
                        "additionalProperties": false
                      },
                      "environments": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "development",
                            "production"
                          ]
                        },
                        "minItems": 1
                      }
                    }
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "definition": {
                          "type": "object",
                          "properties": {
                            "match": {
                              "type": "string",
                              "enum": [
                                "all",
                                "any"
                              ],
                              "default": "all"
                            },
                            "appId": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "minItems": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "predicates": {
                              "type": "array",
                              "items": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "trait"
                                        ]
                                      },
                                      "name": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      },
                                      "op": {
                                        "type": "string",
                                        "enum": [
                                          "eq",
                                          "neq",
                                          "gt",
                                          "gte",
                                          "lt",
                                          "lte",
                                          "exists",
                                          "notExists",
                                          "contains"
                                        ]
                                      },
                                      "value": {}
                                    },
                                    "required": [
                                      "kind",
                                      "name",
                                      "op"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "event"
                                        ]
                                      },
                                      "name": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      },
                                      "op": {
                                        "type": "string",
                                        "enum": [
                                          "performed",
                                          "notPerformed"
                                        ]
                                      },
                                      "atLeast": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "default": 1
                                      },
                                      "withinDays": {
                                        "type": "integer",
                                        "minimum": 1
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "name",
                                      "op"
                                    ]
                                  }
                                ]
                              },
                              "minItems": 1
                            }
                          },
                          "required": [
                            "predicates"
                          ],
                          "additionalProperties": false
                        },
                        "environments": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "development",
                              "production"
                            ]
                          },
                          "minItems": 1
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "memberCount": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "name",
                        "description",
                        "definition",
                        "environments",
                        "createdAt",
                        "updatedAt",
                        "memberCount"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "segments.delete",
        "tags": [
          "segments"
        ],
        "summary": "Delete a segment",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "deleted": {
                          "type": "boolean",
                          "enum": [
                            true
                          ]
                        }
                      },
                      "required": [
                        "deleted"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/segments/{id}/members": {
      "get": {
        "operationId": "segments.listMembers",
        "tags": [
          "segments"
        ],
        "summary": "List a segment's members",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of results; meta carries nextCursor and hasMore",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "segmentId": {
                            "type": "string"
                          },
                          "orgId": {
                            "type": "string"
                          },
                          "profileId": {
                            "type": "string"
                          },
                          "enteredAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "segmentId",
                          "orgId",
                          "profileId",
                          "enteredAt"
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/project": {
      "get": {
        "operationId": "project.get",
        "tags": [
          "project"
        ],
        "summary": "Get the organization's project",
        "security": [
          {
            "clerkSession": []
          },
          {
            "orgDeployKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "name",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: project_missing",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "project.create",
        "tags": [
          "project"
        ],
        "summary": "Create the organization's project",
        "security": [
          {
            "clerkSession": []
          },
          {
            "orgDeployKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created project",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "name",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Error envelope; code: project_exists",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/artifacts/{digest}": {
      "head": {
        "operationId": "artifacts.head",
        "tags": [
          "artifacts"
        ],
        "summary": "Does this organization already have this artifact?",
        "security": [
          {
            "clerkSession": []
          },
          {
            "orgDeployKey": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^sha256:[0-9a-f]{64}$"
            },
            "required": true,
            "name": "digest",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The artifact exists for this organization"
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not stored for this organization; PUT it"
          }
        }
      },
      "put": {
        "operationId": "artifacts.put",
        "tags": [
          "artifacts"
        ],
        "summary": "Upload an artifact by its digest",
        "security": [
          {
            "clerkSession": []
          },
          {
            "orgDeployKey": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^sha256:[0-9a-f]{64}$"
            },
            "required": true,
            "name": "digest",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "bundle",
                "source"
              ]
            },
            "required": true,
            "name": "kind",
            "in": "query"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Stored, or already present"
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Error envelope; code: artifact_too_large",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/releases": {
      "post": {
        "operationId": "releases.create",
        "tags": [
          "releases"
        ],
        "summary": "Create a release from a built manifest",
        "security": [
          {
            "clerkSession": []
          },
          {
            "orgDeployKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "manifest": {
                        "type": "object",
                        "properties": {
                          "protocol": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "sdk": {
                            "type": "string",
                            "minLength": 1
                          },
                          "journeys": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "key": {
                                  "type": "string",
                                  "maxLength": 64,
                                  "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
                                },
                                "tags": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 50
                                  },
                                  "maxItems": 20,
                                  "default": []
                                },
                                "trigger": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "event": {
                                          "anyOf": [
                                            {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 200
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 200
                                              },
                                              "minItems": 1,
                                              "maxItems": 20
                                            }
                                          ]
                                        },
                                        "appId": {
                                          "anyOf": [
                                            {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 200
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 200
                                              },
                                              "minItems": 1,
                                              "maxItems": 20
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "event"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "segment": {
                                          "type": "string",
                                          "minLength": 1
                                        }
                                      },
                                      "required": [
                                        "segment"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "purpose": {
                                  "type": "string",
                                  "enum": [
                                    "emailMarketing",
                                    "dataProcessing"
                                  ]
                                },
                                "environments": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "enum": [
                                      "development",
                                      "production"
                                    ]
                                  },
                                  "minItems": 1
                                },
                                "spine": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "enum": [
                                          "sleep",
                                          "waitForEvent",
                                          "email.send",
                                          "webhook.send",
                                          "traits.set",
                                          "traits.unset",
                                          "profile.get",
                                          "profiles.get",
                                          "events.track",
                                          "restart"
                                        ]
                                      },
                                      "detail": {
                                        "type": "string",
                                        "maxLength": 200
                                      }
                                    },
                                    "required": [
                                      "name"
                                    ]
                                  }
                                },
                                "bundle": {
                                  "type": "string",
                                  "pattern": "^sha256:[0-9a-f]{64}$"
                                }
                              },
                              "required": [
                                "key",
                                "trigger",
                                "purpose",
                                "environments",
                                "spine",
                                "bundle"
                              ]
                            },
                            "maxItems": 100
                          },
                          "templates": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "key": {
                                  "type": "string",
                                  "maxLength": 64,
                                  "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
                                },
                                "tags": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 50
                                  },
                                  "maxItems": 20,
                                  "default": []
                                },
                                "sendClass": {
                                  "type": "string",
                                  "enum": [
                                    "marketing",
                                    "transactional"
                                  ]
                                },
                                "verifyLink": {
                                  "type": "boolean"
                                },
                                "propsSchema": {
                                  "type": "object",
                                  "additionalProperties": {}
                                },
                                "bundle": {
                                  "type": "string",
                                  "pattern": "^sha256:[0-9a-f]{64}$"
                                }
                              },
                              "required": [
                                "key",
                                "sendClass",
                                "verifyLink",
                                "propsSchema",
                                "bundle"
                              ]
                            },
                            "maxItems": 200
                          },
                          "source": {
                            "type": "string",
                            "pattern": "^sha256:[0-9a-f]{64}$"
                          }
                        },
                        "required": [
                          "protocol",
                          "sdk",
                          "journeys",
                          "templates",
                          "source"
                        ]
                      }
                    },
                    "required": [
                      "manifest"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The pending release; compilation follows",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "projectId": {
                          "type": "string"
                        },
                        "seq": {
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "ready",
                            "failed"
                          ]
                        },
                        "manifest": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "protocol": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "sdk": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "journeys": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "key": {
                                        "type": "string",
                                        "maxLength": 64,
                                        "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
                                      },
                                      "tags": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 50
                                        },
                                        "maxItems": 20,
                                        "default": []
                                      },
                                      "trigger": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "event": {
                                                "anyOf": [
                                                  {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 200
                                                  },
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 200
                                                    },
                                                    "minItems": 1,
                                                    "maxItems": 20
                                                  }
                                                ]
                                              },
                                              "appId": {
                                                "anyOf": [
                                                  {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 200
                                                  },
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 200
                                                    },
                                                    "minItems": 1,
                                                    "maxItems": 20
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "event"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "segment": {
                                                "type": "string",
                                                "minLength": 1
                                              }
                                            },
                                            "required": [
                                              "segment"
                                            ],
                                            "additionalProperties": false
                                          }
                                        ]
                                      },
                                      "purpose": {
                                        "type": "string",
                                        "enum": [
                                          "emailMarketing",
                                          "dataProcessing"
                                        ]
                                      },
                                      "environments": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "enum": [
                                            "development",
                                            "production"
                                          ]
                                        },
                                        "minItems": 1
                                      },
                                      "spine": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "enum": [
                                                "sleep",
                                                "waitForEvent",
                                                "email.send",
                                                "webhook.send",
                                                "traits.set",
                                                "traits.unset",
                                                "profile.get",
                                                "profiles.get",
                                                "events.track",
                                                "restart"
                                              ]
                                            },
                                            "detail": {
                                              "type": "string",
                                              "maxLength": 200
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ]
                                        }
                                      },
                                      "bundle": {
                                        "type": "string",
                                        "pattern": "^sha256:[0-9a-f]{64}$"
                                      }
                                    },
                                    "required": [
                                      "key",
                                      "trigger",
                                      "purpose",
                                      "environments",
                                      "spine",
                                      "bundle"
                                    ]
                                  },
                                  "maxItems": 100
                                },
                                "templates": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "key": {
                                        "type": "string",
                                        "maxLength": 64,
                                        "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
                                      },
                                      "tags": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 50
                                        },
                                        "maxItems": 20,
                                        "default": []
                                      },
                                      "sendClass": {
                                        "type": "string",
                                        "enum": [
                                          "marketing",
                                          "transactional"
                                        ]
                                      },
                                      "verifyLink": {
                                        "type": "boolean"
                                      },
                                      "propsSchema": {
                                        "type": "object",
                                        "additionalProperties": {}
                                      },
                                      "bundle": {
                                        "type": "string",
                                        "pattern": "^sha256:[0-9a-f]{64}$"
                                      }
                                    },
                                    "required": [
                                      "key",
                                      "sendClass",
                                      "verifyLink",
                                      "propsSchema",
                                      "bundle"
                                    ]
                                  },
                                  "maxItems": 200
                                },
                                "source": {
                                  "type": "string",
                                  "pattern": "^sha256:[0-9a-f]{64}$"
                                },
                                "modules": {
                                  "type": "object",
                                  "properties": {
                                    "journeys": {
                                      "type": "object",
                                      "additionalProperties": {
                                        "type": "string",
                                        "pattern": "^sha256:[0-9a-f]{64}$"
                                      }
                                    },
                                    "templates": {
                                      "type": "object",
                                      "additionalProperties": {
                                        "type": "string",
                                        "pattern": "^sha256:[0-9a-f]{64}$"
                                      }
                                    }
                                  },
                                  "required": [
                                    "journeys",
                                    "templates"
                                  ]
                                },
                                "plugin": {
                                  "type": "string",
                                  "pattern": "^sha256:[0-9a-f]{64}$"
                                }
                              },
                              "required": [
                                "protocol",
                                "sdk",
                                "journeys",
                                "templates",
                                "source",
                                "modules",
                                "plugin"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "protocol": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "sdk": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "journeys": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "key": {
                                        "type": "string",
                                        "maxLength": 64,
                                        "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
                                      },
                                      "tags": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 50
                                        },
                                        "maxItems": 20,
                                        "default": []
                                      },
                                      "trigger": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "event": {
                                                "anyOf": [
                                                  {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 200
                                                  },
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 200
                                                    },
                                                    "minItems": 1,
                                                    "maxItems": 20
                                                  }
                                                ]
                                              },
                                              "appId": {
                                                "anyOf": [
                                                  {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 200
                                                  },
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 200
                                                    },
                                                    "minItems": 1,
                                                    "maxItems": 20
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "event"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "segment": {
                                                "type": "string",
                                                "minLength": 1
                                              }
                                            },
                                            "required": [
                                              "segment"
                                            ],
                                            "additionalProperties": false
                                          }
                                        ]
                                      },
                                      "purpose": {
                                        "type": "string",
                                        "enum": [
                                          "emailMarketing",
                                          "dataProcessing"
                                        ]
                                      },
                                      "environments": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "enum": [
                                            "development",
                                            "production"
                                          ]
                                        },
                                        "minItems": 1
                                      },
                                      "spine": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "enum": [
                                                "sleep",
                                                "waitForEvent",
                                                "email.send",
                                                "webhook.send",
                                                "traits.set",
                                                "traits.unset",
                                                "profile.get",
                                                "profiles.get",
                                                "events.track",
                                                "restart"
                                              ]
                                            },
                                            "detail": {
                                              "type": "string",
                                              "maxLength": 200
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ]
                                        }
                                      },
                                      "bundle": {
                                        "type": "string",
                                        "pattern": "^sha256:[0-9a-f]{64}$"
                                      }
                                    },
                                    "required": [
                                      "key",
                                      "trigger",
                                      "purpose",
                                      "environments",
                                      "spine",
                                      "bundle"
                                    ]
                                  },
                                  "maxItems": 100
                                },
                                "templates": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "key": {
                                        "type": "string",
                                        "maxLength": 64,
                                        "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
                                      },
                                      "tags": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 50
                                        },
                                        "maxItems": 20,
                                        "default": []
                                      },
                                      "sendClass": {
                                        "type": "string",
                                        "enum": [
                                          "marketing",
                                          "transactional"
                                        ]
                                      },
                                      "verifyLink": {
                                        "type": "boolean"
                                      },
                                      "propsSchema": {
                                        "type": "object",
                                        "additionalProperties": {}
                                      },
                                      "bundle": {
                                        "type": "string",
                                        "pattern": "^sha256:[0-9a-f]{64}$"
                                      }
                                    },
                                    "required": [
                                      "key",
                                      "sendClass",
                                      "verifyLink",
                                      "propsSchema",
                                      "bundle"
                                    ]
                                  },
                                  "maxItems": 200
                                },
                                "source": {
                                  "type": "string",
                                  "pattern": "^sha256:[0-9a-f]{64}$"
                                }
                              },
                              "required": [
                                "protocol",
                                "sdk",
                                "journeys",
                                "templates",
                                "source"
                              ]
                            }
                          ]
                        },
                        "manifestDigest": {
                          "type": "string"
                        },
                        "createdBy": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "compiledAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "error": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "deployedIn": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "development",
                              "production"
                            ]
                          }
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "projectId",
                        "seq",
                        "status",
                        "manifest",
                        "manifestDigest",
                        "createdBy",
                        "createdAt",
                        "compiledAt",
                        "error",
                        "deployedIn"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: project_missing",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: release_invalid | validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Error envelope; code: dependency_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "releases.list",
        "tags": [
          "releases"
        ],
        "summary": "List releases, newest first",
        "security": [
          {
            "clerkSession": []
          },
          {
            "orgDeployKey": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of results; meta carries nextCursor and hasMore",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "orgId": {
                            "type": "string"
                          },
                          "projectId": {
                            "type": "string"
                          },
                          "seq": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "ready",
                              "failed"
                            ]
                          },
                          "manifest": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "protocol": {
                                    "type": "number",
                                    "enum": [
                                      1
                                    ]
                                  },
                                  "sdk": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "journeys": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "key": {
                                          "type": "string",
                                          "maxLength": 64,
                                          "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
                                        },
                                        "tags": {
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 50
                                          },
                                          "maxItems": 20,
                                          "default": []
                                        },
                                        "trigger": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "event": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 200
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 200
                                                      },
                                                      "minItems": 1,
                                                      "maxItems": 20
                                                    }
                                                  ]
                                                },
                                                "appId": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 200
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 200
                                                      },
                                                      "minItems": 1,
                                                      "maxItems": 20
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "event"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "segment": {
                                                  "type": "string",
                                                  "minLength": 1
                                                }
                                              },
                                              "required": [
                                                "segment"
                                              ],
                                              "additionalProperties": false
                                            }
                                          ]
                                        },
                                        "purpose": {
                                          "type": "string",
                                          "enum": [
                                            "emailMarketing",
                                            "dataProcessing"
                                          ]
                                        },
                                        "environments": {
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "enum": [
                                              "development",
                                              "production"
                                            ]
                                          },
                                          "minItems": 1
                                        },
                                        "spine": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "name": {
                                                "type": "string",
                                                "enum": [
                                                  "sleep",
                                                  "waitForEvent",
                                                  "email.send",
                                                  "webhook.send",
                                                  "traits.set",
                                                  "traits.unset",
                                                  "profile.get",
                                                  "profiles.get",
                                                  "events.track",
                                                  "restart"
                                                ]
                                              },
                                              "detail": {
                                                "type": "string",
                                                "maxLength": 200
                                              }
                                            },
                                            "required": [
                                              "name"
                                            ]
                                          }
                                        },
                                        "bundle": {
                                          "type": "string",
                                          "pattern": "^sha256:[0-9a-f]{64}$"
                                        }
                                      },
                                      "required": [
                                        "key",
                                        "trigger",
                                        "purpose",
                                        "environments",
                                        "spine",
                                        "bundle"
                                      ]
                                    },
                                    "maxItems": 100
                                  },
                                  "templates": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "key": {
                                          "type": "string",
                                          "maxLength": 64,
                                          "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
                                        },
                                        "tags": {
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 50
                                          },
                                          "maxItems": 20,
                                          "default": []
                                        },
                                        "sendClass": {
                                          "type": "string",
                                          "enum": [
                                            "marketing",
                                            "transactional"
                                          ]
                                        },
                                        "verifyLink": {
                                          "type": "boolean"
                                        },
                                        "propsSchema": {
                                          "type": "object",
                                          "additionalProperties": {}
                                        },
                                        "bundle": {
                                          "type": "string",
                                          "pattern": "^sha256:[0-9a-f]{64}$"
                                        }
                                      },
                                      "required": [
                                        "key",
                                        "sendClass",
                                        "verifyLink",
                                        "propsSchema",
                                        "bundle"
                                      ]
                                    },
                                    "maxItems": 200
                                  },
                                  "source": {
                                    "type": "string",
                                    "pattern": "^sha256:[0-9a-f]{64}$"
                                  },
                                  "modules": {
                                    "type": "object",
                                    "properties": {
                                      "journeys": {
                                        "type": "object",
                                        "additionalProperties": {
                                          "type": "string",
                                          "pattern": "^sha256:[0-9a-f]{64}$"
                                        }
                                      },
                                      "templates": {
                                        "type": "object",
                                        "additionalProperties": {
                                          "type": "string",
                                          "pattern": "^sha256:[0-9a-f]{64}$"
                                        }
                                      }
                                    },
                                    "required": [
                                      "journeys",
                                      "templates"
                                    ]
                                  },
                                  "plugin": {
                                    "type": "string",
                                    "pattern": "^sha256:[0-9a-f]{64}$"
                                  }
                                },
                                "required": [
                                  "protocol",
                                  "sdk",
                                  "journeys",
                                  "templates",
                                  "source",
                                  "modules",
                                  "plugin"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "protocol": {
                                    "type": "number",
                                    "enum": [
                                      1
                                    ]
                                  },
                                  "sdk": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "journeys": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "key": {
                                          "type": "string",
                                          "maxLength": 64,
                                          "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
                                        },
                                        "tags": {
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 50
                                          },
                                          "maxItems": 20,
                                          "default": []
                                        },
                                        "trigger": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "event": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 200
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 200
                                                      },
                                                      "minItems": 1,
                                                      "maxItems": 20
                                                    }
                                                  ]
                                                },
                                                "appId": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 200
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 200
                                                      },
                                                      "minItems": 1,
                                                      "maxItems": 20
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "event"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "segment": {
                                                  "type": "string",
                                                  "minLength": 1
                                                }
                                              },
                                              "required": [
                                                "segment"
                                              ],
                                              "additionalProperties": false
                                            }
                                          ]
                                        },
                                        "purpose": {
                                          "type": "string",
                                          "enum": [
                                            "emailMarketing",
                                            "dataProcessing"
                                          ]
                                        },
                                        "environments": {
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "enum": [
                                              "development",
                                              "production"
                                            ]
                                          },
                                          "minItems": 1
                                        },
                                        "spine": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "name": {
                                                "type": "string",
                                                "enum": [
                                                  "sleep",
                                                  "waitForEvent",
                                                  "email.send",
                                                  "webhook.send",
                                                  "traits.set",
                                                  "traits.unset",
                                                  "profile.get",
                                                  "profiles.get",
                                                  "events.track",
                                                  "restart"
                                                ]
                                              },
                                              "detail": {
                                                "type": "string",
                                                "maxLength": 200
                                              }
                                            },
                                            "required": [
                                              "name"
                                            ]
                                          }
                                        },
                                        "bundle": {
                                          "type": "string",
                                          "pattern": "^sha256:[0-9a-f]{64}$"
                                        }
                                      },
                                      "required": [
                                        "key",
                                        "trigger",
                                        "purpose",
                                        "environments",
                                        "spine",
                                        "bundle"
                                      ]
                                    },
                                    "maxItems": 100
                                  },
                                  "templates": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "key": {
                                          "type": "string",
                                          "maxLength": 64,
                                          "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
                                        },
                                        "tags": {
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 50
                                          },
                                          "maxItems": 20,
                                          "default": []
                                        },
                                        "sendClass": {
                                          "type": "string",
                                          "enum": [
                                            "marketing",
                                            "transactional"
                                          ]
                                        },
                                        "verifyLink": {
                                          "type": "boolean"
                                        },
                                        "propsSchema": {
                                          "type": "object",
                                          "additionalProperties": {}
                                        },
                                        "bundle": {
                                          "type": "string",
                                          "pattern": "^sha256:[0-9a-f]{64}$"
                                        }
                                      },
                                      "required": [
                                        "key",
                                        "sendClass",
                                        "verifyLink",
                                        "propsSchema",
                                        "bundle"
                                      ]
                                    },
                                    "maxItems": 200
                                  },
                                  "source": {
                                    "type": "string",
                                    "pattern": "^sha256:[0-9a-f]{64}$"
                                  }
                                },
                                "required": [
                                  "protocol",
                                  "sdk",
                                  "journeys",
                                  "templates",
                                  "source"
                                ]
                              }
                            ]
                          },
                          "manifestDigest": {
                            "type": "string"
                          },
                          "createdBy": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "compiledAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "error": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "deployedIn": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "development",
                                "production"
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "orgId",
                          "projectId",
                          "seq",
                          "status",
                          "manifest",
                          "manifestDigest",
                          "createdBy",
                          "createdAt",
                          "compiledAt",
                          "error",
                          "deployedIn"
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/releases/{id}": {
      "get": {
        "operationId": "releases.get",
        "tags": [
          "releases"
        ],
        "summary": "Inspect one release",
        "security": [
          {
            "clerkSession": []
          },
          {
            "orgDeployKey": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "projectId": {
                          "type": "string"
                        },
                        "seq": {
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "ready",
                            "failed"
                          ]
                        },
                        "manifest": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "protocol": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "sdk": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "journeys": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "key": {
                                        "type": "string",
                                        "maxLength": 64,
                                        "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
                                      },
                                      "tags": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 50
                                        },
                                        "maxItems": 20,
                                        "default": []
                                      },
                                      "trigger": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "event": {
                                                "anyOf": [
                                                  {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 200
                                                  },
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 200
                                                    },
                                                    "minItems": 1,
                                                    "maxItems": 20
                                                  }
                                                ]
                                              },
                                              "appId": {
                                                "anyOf": [
                                                  {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 200
                                                  },
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 200
                                                    },
                                                    "minItems": 1,
                                                    "maxItems": 20
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "event"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "segment": {
                                                "type": "string",
                                                "minLength": 1
                                              }
                                            },
                                            "required": [
                                              "segment"
                                            ],
                                            "additionalProperties": false
                                          }
                                        ]
                                      },
                                      "purpose": {
                                        "type": "string",
                                        "enum": [
                                          "emailMarketing",
                                          "dataProcessing"
                                        ]
                                      },
                                      "environments": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "enum": [
                                            "development",
                                            "production"
                                          ]
                                        },
                                        "minItems": 1
                                      },
                                      "spine": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "enum": [
                                                "sleep",
                                                "waitForEvent",
                                                "email.send",
                                                "webhook.send",
                                                "traits.set",
                                                "traits.unset",
                                                "profile.get",
                                                "profiles.get",
                                                "events.track",
                                                "restart"
                                              ]
                                            },
                                            "detail": {
                                              "type": "string",
                                              "maxLength": 200
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ]
                                        }
                                      },
                                      "bundle": {
                                        "type": "string",
                                        "pattern": "^sha256:[0-9a-f]{64}$"
                                      }
                                    },
                                    "required": [
                                      "key",
                                      "trigger",
                                      "purpose",
                                      "environments",
                                      "spine",
                                      "bundle"
                                    ]
                                  },
                                  "maxItems": 100
                                },
                                "templates": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "key": {
                                        "type": "string",
                                        "maxLength": 64,
                                        "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
                                      },
                                      "tags": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 50
                                        },
                                        "maxItems": 20,
                                        "default": []
                                      },
                                      "sendClass": {
                                        "type": "string",
                                        "enum": [
                                          "marketing",
                                          "transactional"
                                        ]
                                      },
                                      "verifyLink": {
                                        "type": "boolean"
                                      },
                                      "propsSchema": {
                                        "type": "object",
                                        "additionalProperties": {}
                                      },
                                      "bundle": {
                                        "type": "string",
                                        "pattern": "^sha256:[0-9a-f]{64}$"
                                      }
                                    },
                                    "required": [
                                      "key",
                                      "sendClass",
                                      "verifyLink",
                                      "propsSchema",
                                      "bundle"
                                    ]
                                  },
                                  "maxItems": 200
                                },
                                "source": {
                                  "type": "string",
                                  "pattern": "^sha256:[0-9a-f]{64}$"
                                },
                                "modules": {
                                  "type": "object",
                                  "properties": {
                                    "journeys": {
                                      "type": "object",
                                      "additionalProperties": {
                                        "type": "string",
                                        "pattern": "^sha256:[0-9a-f]{64}$"
                                      }
                                    },
                                    "templates": {
                                      "type": "object",
                                      "additionalProperties": {
                                        "type": "string",
                                        "pattern": "^sha256:[0-9a-f]{64}$"
                                      }
                                    }
                                  },
                                  "required": [
                                    "journeys",
                                    "templates"
                                  ]
                                },
                                "plugin": {
                                  "type": "string",
                                  "pattern": "^sha256:[0-9a-f]{64}$"
                                }
                              },
                              "required": [
                                "protocol",
                                "sdk",
                                "journeys",
                                "templates",
                                "source",
                                "modules",
                                "plugin"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "protocol": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "sdk": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "journeys": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "key": {
                                        "type": "string",
                                        "maxLength": 64,
                                        "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
                                      },
                                      "tags": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 50
                                        },
                                        "maxItems": 20,
                                        "default": []
                                      },
                                      "trigger": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "event": {
                                                "anyOf": [
                                                  {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 200
                                                  },
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 200
                                                    },
                                                    "minItems": 1,
                                                    "maxItems": 20
                                                  }
                                                ]
                                              },
                                              "appId": {
                                                "anyOf": [
                                                  {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 200
                                                  },
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 200
                                                    },
                                                    "minItems": 1,
                                                    "maxItems": 20
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "event"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "segment": {
                                                "type": "string",
                                                "minLength": 1
                                              }
                                            },
                                            "required": [
                                              "segment"
                                            ],
                                            "additionalProperties": false
                                          }
                                        ]
                                      },
                                      "purpose": {
                                        "type": "string",
                                        "enum": [
                                          "emailMarketing",
                                          "dataProcessing"
                                        ]
                                      },
                                      "environments": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "enum": [
                                            "development",
                                            "production"
                                          ]
                                        },
                                        "minItems": 1
                                      },
                                      "spine": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "enum": [
                                                "sleep",
                                                "waitForEvent",
                                                "email.send",
                                                "webhook.send",
                                                "traits.set",
                                                "traits.unset",
                                                "profile.get",
                                                "profiles.get",
                                                "events.track",
                                                "restart"
                                              ]
                                            },
                                            "detail": {
                                              "type": "string",
                                              "maxLength": 200
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ]
                                        }
                                      },
                                      "bundle": {
                                        "type": "string",
                                        "pattern": "^sha256:[0-9a-f]{64}$"
                                      }
                                    },
                                    "required": [
                                      "key",
                                      "trigger",
                                      "purpose",
                                      "environments",
                                      "spine",
                                      "bundle"
                                    ]
                                  },
                                  "maxItems": 100
                                },
                                "templates": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "key": {
                                        "type": "string",
                                        "maxLength": 64,
                                        "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
                                      },
                                      "tags": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 50
                                        },
                                        "maxItems": 20,
                                        "default": []
                                      },
                                      "sendClass": {
                                        "type": "string",
                                        "enum": [
                                          "marketing",
                                          "transactional"
                                        ]
                                      },
                                      "verifyLink": {
                                        "type": "boolean"
                                      },
                                      "propsSchema": {
                                        "type": "object",
                                        "additionalProperties": {}
                                      },
                                      "bundle": {
                                        "type": "string",
                                        "pattern": "^sha256:[0-9a-f]{64}$"
                                      }
                                    },
                                    "required": [
                                      "key",
                                      "sendClass",
                                      "verifyLink",
                                      "propsSchema",
                                      "bundle"
                                    ]
                                  },
                                  "maxItems": 200
                                },
                                "source": {
                                  "type": "string",
                                  "pattern": "^sha256:[0-9a-f]{64}$"
                                }
                              },
                              "required": [
                                "protocol",
                                "sdk",
                                "journeys",
                                "templates",
                                "source"
                              ]
                            }
                          ]
                        },
                        "manifestDigest": {
                          "type": "string"
                        },
                        "createdBy": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "compiledAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "error": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "deployedIn": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "development",
                              "production"
                            ]
                          }
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "projectId",
                        "seq",
                        "status",
                        "manifest",
                        "manifestDigest",
                        "createdBy",
                        "createdAt",
                        "compiledAt",
                        "error",
                        "deployedIn"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/releases/{id}/source": {
      "get": {
        "operationId": "releases.source",
        "tags": [
          "releases"
        ],
        "summary": "Download the release's source tarball",
        "security": [
          {
            "clerkSession": []
          },
          {
            "orgDeployKey": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The gzipped source tarball the release was built from",
            "content": {
              "application/gzip": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/releases/{id}/cancel-executions": {
      "post": {
        "operationId": "releases.cancelExecutions",
        "tags": [
          "releases"
        ],
        "summary": "Cancel every live execution pinned to this release",
        "security": [
          {
            "clerkSession": []
          },
          {
            "orgDeployKey": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "The cancel sweep was started",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "releaseId": {
                          "type": "string"
                        },
                        "environment": {
                          "type": "string",
                          "enum": [
                            "development",
                            "production"
                          ]
                        },
                        "requested": {
                          "type": "integer"
                        },
                        "workflowId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "releaseId",
                        "environment",
                        "requested",
                        "workflowId"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Error envelope; code: dependency_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/deployments": {
      "get": {
        "operationId": "deployments.list",
        "tags": [
          "deployments"
        ],
        "summary": "List deployments, newest first",
        "security": [
          {
            "clerkSession": []
          },
          {
            "orgDeployKey": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "development",
                "production"
              ]
            },
            "required": false,
            "name": "environment",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "required": false,
            "name": "release",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of results; meta carries nextCursor and hasMore",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "orgId": {
                            "type": "string"
                          },
                          "environment": {
                            "type": "string",
                            "enum": [
                              "development",
                              "production"
                            ]
                          },
                          "releaseId": {
                            "type": "string"
                          },
                          "deployedBy": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "warnings": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "releaseSeq": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "id",
                          "orgId",
                          "environment",
                          "releaseId",
                          "deployedBy",
                          "createdAt",
                          "warnings",
                          "releaseSeq"
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "deployments.create",
        "tags": [
          "deployments"
        ],
        "summary": "Deploy a release to the selected environment",
        "security": [
          {
            "clerkSession": []
          },
          {
            "orgDeployKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "releaseId": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "releaseId"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The deployment, with any warnings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "environment": {
                          "type": "string",
                          "enum": [
                            "development",
                            "production"
                          ]
                        },
                        "releaseId": {
                          "type": "string"
                        },
                        "deployedBy": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "warnings": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "releaseSeq": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "environment",
                        "releaseId",
                        "deployedBy",
                        "createdAt",
                        "warnings",
                        "releaseSeq"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Error envelope; code: release_not_ready",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/executions": {
      "get": {
        "operationId": "executions.list",
        "tags": [
          "executions"
        ],
        "summary": "List executions, newest first",
        "security": [
          {
            "clerkSession": []
          },
          {
            "orgDeployKey": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "required": false,
            "name": "journey",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "required": false,
            "name": "release",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "running",
                "waiting",
                "completed",
                "failed",
                "cancelled"
              ]
            },
            "required": false,
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "required": false,
            "name": "profileId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "since",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of results; meta carries nextCursor and hasMore",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "orgId": {
                            "type": "string"
                          },
                          "environment": {
                            "type": "string",
                            "enum": [
                              "development",
                              "production"
                            ]
                          },
                          "journeyKey": {
                            "type": "string"
                          },
                          "profileId": {
                            "type": "string"
                          },
                          "workflowId": {
                            "type": "string"
                          },
                          "runId": {
                            "type": "string"
                          },
                          "releaseId": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "running",
                              "waiting",
                              "completed",
                              "failed",
                              "cancelled"
                            ]
                          },
                          "step": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "timerDeadline": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "journalEntries": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "error": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "startedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "endedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "orgId",
                          "environment",
                          "journeyKey",
                          "profileId",
                          "workflowId",
                          "runId",
                          "releaseId",
                          "status",
                          "step",
                          "timerDeadline",
                          "journalEntries",
                          "error",
                          "startedAt",
                          "updatedAt",
                          "endedAt"
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/executions/{id}": {
      "get": {
        "operationId": "executions.get",
        "tags": [
          "executions"
        ],
        "summary": "Inspect one execution, with its logs",
        "security": [
          {
            "clerkSession": []
          },
          {
            "orgDeployKey": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "environment": {
                          "type": "string",
                          "enum": [
                            "development",
                            "production"
                          ]
                        },
                        "journeyKey": {
                          "type": "string"
                        },
                        "profileId": {
                          "type": "string"
                        },
                        "workflowId": {
                          "type": "string"
                        },
                        "runId": {
                          "type": "string"
                        },
                        "releaseId": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "running",
                            "waiting",
                            "completed",
                            "failed",
                            "cancelled"
                          ]
                        },
                        "step": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "timerDeadline": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "journalEntries": {
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "error": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "startedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "endedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "journal": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "call": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "enum": [
                                          "sleep"
                                        ]
                                      },
                                      "args": {
                                        "type": "object",
                                        "properties": {
                                          "duration": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              {
                                                "type": "integer",
                                                "minimum": 0
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "duration"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "args"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "enum": [
                                          "waitForEvent"
                                        ]
                                      },
                                      "args": {
                                        "type": "object",
                                        "properties": {
                                          "event": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 200
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 200
                                                },
                                                "minItems": 1,
                                                "maxItems": 20
                                              }
                                            ]
                                          },
                                          "timeout": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              {
                                                "type": "integer",
                                                "minimum": 0
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "event",
                                          "timeout"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "args"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "enum": [
                                          "email.send"
                                        ]
                                      },
                                      "args": {
                                        "type": "object",
                                        "properties": {
                                          "template": {
                                            "type": "string",
                                            "maxLength": 64,
                                            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
                                          },
                                          "props": {
                                            "type": "object",
                                            "additionalProperties": {}
                                          }
                                        },
                                        "required": [
                                          "template",
                                          "props"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "args"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "enum": [
                                          "webhook.send"
                                        ]
                                      },
                                      "args": {
                                        "type": "object",
                                        "properties": {
                                          "destination": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "payload": {
                                            "type": "object",
                                            "additionalProperties": {}
                                          }
                                        },
                                        "required": [
                                          "destination",
                                          "payload"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "args"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "enum": [
                                          "traits.set"
                                        ]
                                      },
                                      "args": {
                                        "type": "object",
                                        "properties": {
                                          "key": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "value": {}
                                        },
                                        "required": [
                                          "key"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "args"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "enum": [
                                          "traits.unset"
                                        ]
                                      },
                                      "args": {
                                        "type": "object",
                                        "properties": {
                                          "key": {
                                            "type": "string",
                                            "minLength": 1
                                          }
                                        },
                                        "required": [
                                          "key"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "args"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "enum": [
                                          "profile.get"
                                        ]
                                      },
                                      "args": {
                                        "type": "object",
                                        "properties": {},
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "args"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "enum": [
                                          "profiles.get"
                                        ]
                                      },
                                      "args": {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string",
                                            "minLength": 1
                                          }
                                        },
                                        "required": [
                                          "id"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "args"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "enum": [
                                          "events.track"
                                        ]
                                      },
                                      "args": {
                                        "type": "object",
                                        "properties": {
                                          "event": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "properties": {
                                            "type": "object",
                                            "additionalProperties": {}
                                          }
                                        },
                                        "required": [
                                          "event",
                                          "properties"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "args"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "enum": [
                                          "restart"
                                        ]
                                      },
                                      "args": {
                                        "type": "object",
                                        "properties": {
                                          "event": {
                                            "type": "object",
                                            "properties": {
                                              "name": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "properties": {
                                                "type": "object",
                                                "additionalProperties": {}
                                              },
                                              "timestamp": {
                                                "type": "integer",
                                                "minimum": 0
                                              }
                                            },
                                            "required": [
                                              "name",
                                              "properties",
                                              "timestamp"
                                            ]
                                          }
                                        },
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "args"
                                    ]
                                  }
                                ]
                              },
                              "result": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "ok": {
                                        "type": "boolean",
                                        "enum": [
                                          true
                                        ]
                                      },
                                      "value": {}
                                    },
                                    "required": [
                                      "ok"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "ok": {
                                        "type": "boolean",
                                        "enum": [
                                          false
                                        ]
                                      },
                                      "error": {
                                        "type": "object",
                                        "properties": {
                                          "code": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "message": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "code",
                                          "message"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "ok",
                                      "error"
                                    ]
                                  }
                                ]
                              },
                              "at": {
                                "type": "integer",
                                "minimum": 0
                              }
                            },
                            "required": [
                              "call",
                              "result",
                              "at"
                            ]
                          }
                        },
                        "logs": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "seq": {
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "level": {
                                "type": "string",
                                "enum": [
                                  "debug",
                                  "info",
                                  "warn",
                                  "error"
                                ]
                              },
                              "message": {
                                "type": "string"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "seq",
                              "level",
                              "message",
                              "createdAt"
                            ]
                          }
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "environment",
                        "journeyKey",
                        "profileId",
                        "workflowId",
                        "runId",
                        "releaseId",
                        "status",
                        "step",
                        "timerDeadline",
                        "journalEntries",
                        "error",
                        "startedAt",
                        "updatedAt",
                        "endedAt",
                        "journal",
                        "logs"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/journeys": {
      "get": {
        "operationId": "journeys.list",
        "tags": [
          "journeys"
        ],
        "summary": "List the journeys deployed in the selected environment",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "required": false,
            "name": "enabled",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "required": false,
            "name": "q",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 50
            },
            "required": false,
            "name": "tag",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of results; meta carries nextCursor and hasMore",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "orgId": {
                            "type": "string"
                          },
                          "environment": {
                            "type": "string",
                            "enum": [
                              "development",
                              "production"
                            ]
                          },
                          "key": {
                            "type": "string"
                          },
                          "releaseId": {
                            "type": "string"
                          },
                          "tags": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "trigger": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "event": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      },
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 200
                                        },
                                        "minItems": 1,
                                        "maxItems": 20
                                      }
                                    ]
                                  },
                                  "appId": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      },
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 200
                                        },
                                        "minItems": 1,
                                        "maxItems": 20
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "event"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "segment": {
                                    "type": "string",
                                    "minLength": 1
                                  }
                                },
                                "required": [
                                  "segment"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "purpose": {
                            "type": "string",
                            "enum": [
                              "emailMarketing",
                              "dataProcessing"
                            ]
                          },
                          "active": {
                            "type": "boolean"
                          },
                          "spine": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "enum": [
                                    "sleep",
                                    "waitForEvent",
                                    "email.send",
                                    "webhook.send",
                                    "traits.set",
                                    "traits.unset",
                                    "profile.get",
                                    "profiles.get",
                                    "events.track",
                                    "restart"
                                  ]
                                },
                                "detail": {
                                  "type": "string",
                                  "maxLength": 200
                                }
                              },
                              "required": [
                                "name"
                              ]
                            }
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "enabled": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "orgId",
                          "environment",
                          "key",
                          "releaseId",
                          "tags",
                          "trigger",
                          "purpose",
                          "active",
                          "spine",
                          "createdAt",
                          "updatedAt",
                          "enabled"
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/journeys/{key}": {
      "get": {
        "operationId": "journeys.get",
        "tags": [
          "journeys"
        ],
        "summary": "Inspect one journey",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "key",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string"
                        },
                        "environment": {
                          "type": "string",
                          "enum": [
                            "development",
                            "production"
                          ]
                        },
                        "key": {
                          "type": "string"
                        },
                        "releaseId": {
                          "type": "string"
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "trigger": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "event": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 200
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      },
                                      "minItems": 1,
                                      "maxItems": 20
                                    }
                                  ]
                                },
                                "appId": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 200
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      },
                                      "minItems": 1,
                                      "maxItems": 20
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "event"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "segment": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              },
                              "required": [
                                "segment"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "purpose": {
                          "type": "string",
                          "enum": [
                            "emailMarketing",
                            "dataProcessing"
                          ]
                        },
                        "active": {
                          "type": "boolean"
                        },
                        "spine": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "enum": [
                                  "sleep",
                                  "waitForEvent",
                                  "email.send",
                                  "webhook.send",
                                  "traits.set",
                                  "traits.unset",
                                  "profile.get",
                                  "profiles.get",
                                  "events.track",
                                  "restart"
                                ]
                              },
                              "detail": {
                                "type": "string",
                                "maxLength": 200
                              }
                            },
                            "required": [
                              "name"
                            ]
                          }
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "enabled": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "orgId",
                        "environment",
                        "key",
                        "releaseId",
                        "tags",
                        "trigger",
                        "purpose",
                        "active",
                        "spine",
                        "createdAt",
                        "updatedAt",
                        "enabled"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "journeys.update",
        "tags": [
          "journeys"
        ],
        "summary": "Enable or disable a journey in the selected environment",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "key",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "enabled": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "enabled"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string"
                        },
                        "environment": {
                          "type": "string",
                          "enum": [
                            "development",
                            "production"
                          ]
                        },
                        "key": {
                          "type": "string"
                        },
                        "releaseId": {
                          "type": "string"
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "trigger": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "event": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 200
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      },
                                      "minItems": 1,
                                      "maxItems": 20
                                    }
                                  ]
                                },
                                "appId": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 200
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      },
                                      "minItems": 1,
                                      "maxItems": 20
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "event"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "segment": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              },
                              "required": [
                                "segment"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "purpose": {
                          "type": "string",
                          "enum": [
                            "emailMarketing",
                            "dataProcessing"
                          ]
                        },
                        "active": {
                          "type": "boolean"
                        },
                        "spine": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "enum": [
                                  "sleep",
                                  "waitForEvent",
                                  "email.send",
                                  "webhook.send",
                                  "traits.set",
                                  "traits.unset",
                                  "profile.get",
                                  "profiles.get",
                                  "events.track",
                                  "restart"
                                ]
                              },
                              "detail": {
                                "type": "string",
                                "maxLength": 200
                              }
                            },
                            "required": [
                              "name"
                            ]
                          }
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "enabled": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "orgId",
                        "environment",
                        "key",
                        "releaseId",
                        "tags",
                        "trigger",
                        "purpose",
                        "active",
                        "spine",
                        "createdAt",
                        "updatedAt",
                        "enabled"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/journeys/{key}/stats": {
      "get": {
        "operationId": "journeys.stats",
        "tags": [
          "journeys"
        ],
        "summary": "Journey operational stats",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "key",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "executions": {
                          "type": "object",
                          "properties": {
                            "entered": {
                              "type": "integer"
                            },
                            "active": {
                              "type": "integer"
                            },
                            "completed": {
                              "type": "integer"
                            },
                            "failed": {
                              "type": "integer"
                            }
                          },
                          "required": [
                            "entered",
                            "active",
                            "completed",
                            "failed"
                          ]
                        },
                        "deliveries": {
                          "type": "object",
                          "properties": {
                            "byStatus": {
                              "type": "object",
                              "properties": {
                                "sent": {
                                  "type": "integer"
                                },
                                "delivered": {
                                  "type": "integer"
                                },
                                "bounced": {
                                  "type": "integer"
                                },
                                "complained": {
                                  "type": "integer"
                                },
                                "failed": {
                                  "type": "integer"
                                },
                                "skipped_disabled": {
                                  "type": "integer"
                                },
                                "skipped_paused": {
                                  "type": "integer"
                                },
                                "skipped_suppressed": {
                                  "type": "integer"
                                },
                                "skipped_quota": {
                                  "type": "integer"
                                },
                                "skipped_frequency_cap": {
                                  "type": "integer"
                                },
                                "skipped_consent": {
                                  "type": "integer"
                                },
                                "skipped_domain": {
                                  "type": "integer"
                                },
                                "skipped_ssrf": {
                                  "type": "integer"
                                },
                                "would_send": {
                                  "type": "integer"
                                },
                                "would_skip_disabled": {
                                  "type": "integer"
                                },
                                "would_skip_paused": {
                                  "type": "integer"
                                },
                                "would_skip_suppressed": {
                                  "type": "integer"
                                },
                                "would_skip_quota": {
                                  "type": "integer"
                                },
                                "would_skip_frequency_cap": {
                                  "type": "integer"
                                },
                                "would_skip_consent": {
                                  "type": "integer"
                                },
                                "would_skip_domain": {
                                  "type": "integer"
                                },
                                "would_skip_ssrf": {
                                  "type": "integer"
                                }
                              }
                            }
                          },
                          "required": [
                            "byStatus"
                          ]
                        }
                      },
                      "required": [
                        "executions",
                        "deliveries"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/journeys/{key}/dry-run": {
      "post": {
        "operationId": "journeys.dryRun",
        "tags": [
          "journeys"
        ],
        "summary": "Dry-run a journey against a real user",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "key",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "profileId": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "profileId"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The started dry-run execution",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "environment": {
                          "type": "string",
                          "enum": [
                            "development",
                            "production"
                          ]
                        },
                        "journeyKey": {
                          "type": "string"
                        },
                        "profileId": {
                          "type": "string"
                        },
                        "workflowId": {
                          "type": "string"
                        },
                        "runId": {
                          "type": "string"
                        },
                        "releaseId": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "running",
                            "waiting",
                            "completed",
                            "failed",
                            "cancelled"
                          ]
                        },
                        "step": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "timerDeadline": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "journalEntries": {
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "error": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "startedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "endedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "environment",
                        "journeyKey",
                        "profileId",
                        "workflowId",
                        "runId",
                        "releaseId",
                        "status",
                        "step",
                        "timerDeadline",
                        "journalEntries",
                        "error",
                        "startedAt",
                        "updatedAt",
                        "endedAt"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/destinations": {
      "post": {
        "operationId": "destinations.create",
        "tags": [
          "destinations"
        ],
        "summary": "Create a destination",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          },
                          "environment": {
                            "type": "string",
                            "enum": [
                              "development",
                              "production"
                            ]
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "webhook"
                            ]
                          },
                          "config": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": "string",
                                "format": "uri"
                              }
                            },
                            "required": [
                              "url"
                            ]
                          }
                        },
                        "required": [
                          "name",
                          "environment",
                          "type",
                          "config"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          },
                          "environment": {
                            "type": "string",
                            "enum": [
                              "development",
                              "production"
                            ]
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "sender_identity"
                            ]
                          },
                          "config": {
                            "type": "object",
                            "properties": {
                              "fromName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "fromEmail": {
                                "type": "string",
                                "format": "email"
                              }
                            },
                            "required": [
                              "fromName",
                              "fromEmail"
                            ]
                          }
                        },
                        "required": [
                          "name",
                          "environment",
                          "type",
                          "config"
                        ]
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created destination; the only response carrying the signing secret",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "environment": {
                          "type": "string",
                          "enum": [
                            "development",
                            "production"
                          ]
                        },
                        "name": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "webhook",
                            "sender_identity"
                          ]
                        },
                        "config": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        },
                        "webhookPayloadVersion": {
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "disabledAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "signingSecret": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "environment",
                        "name",
                        "type",
                        "config",
                        "webhookPayloadVersion",
                        "disabledAt",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "destinations.list",
        "tags": [
          "destinations"
        ],
        "summary": "List destinations in the selected environment",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "required": false,
            "name": "q",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of results; meta carries nextCursor and hasMore",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "orgId": {
                            "type": "string"
                          },
                          "environment": {
                            "type": "string",
                            "enum": [
                              "development",
                              "production"
                            ]
                          },
                          "name": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "webhook",
                              "sender_identity"
                            ]
                          },
                          "config": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          },
                          "webhookPayloadVersion": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "disabledAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "orgId",
                          "environment",
                          "name",
                          "type",
                          "config",
                          "webhookPayloadVersion",
                          "disabledAt",
                          "createdAt",
                          "updatedAt"
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/destinations/{id}": {
      "get": {
        "operationId": "destinations.get",
        "tags": [
          "destinations"
        ],
        "summary": "Fetch one destination",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "environment": {
                          "type": "string",
                          "enum": [
                            "development",
                            "production"
                          ]
                        },
                        "name": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "webhook",
                            "sender_identity"
                          ]
                        },
                        "config": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        },
                        "webhookPayloadVersion": {
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "disabledAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "environment",
                        "name",
                        "type",
                        "config",
                        "webhookPayloadVersion",
                        "disabledAt",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "destinations.update",
        "tags": [
          "destinations"
        ],
        "summary": "Update a destination",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "config": {},
                      "enabled": {
                        "type": "boolean"
                      }
                    }
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "environment": {
                          "type": "string",
                          "enum": [
                            "development",
                            "production"
                          ]
                        },
                        "name": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "webhook",
                            "sender_identity"
                          ]
                        },
                        "config": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        },
                        "webhookPayloadVersion": {
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "disabledAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "environment",
                        "name",
                        "type",
                        "config",
                        "webhookPayloadVersion",
                        "disabledAt",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "destinations.delete",
        "tags": [
          "destinations"
        ],
        "summary": "Delete a destination",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "deleted": {
                          "type": "boolean",
                          "enum": [
                            true
                          ]
                        }
                      },
                      "required": [
                        "deleted"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/domains": {
      "get": {
        "operationId": "domains.list",
        "tags": [
          "domains"
        ],
        "summary": "List sending domains",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "required": false,
            "name": "q",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of results; meta carries nextCursor and hasMore",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "orgId": {
                            "type": "string"
                          },
                          "domain": {
                            "type": "string"
                          },
                          "region": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "not_started",
                              "pending",
                              "success",
                              "failed",
                              "temporary_failure"
                            ]
                          },
                          "dkimStatus": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "spfStatus": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "clickTracking": {
                            "type": "boolean"
                          },
                          "dnsRecords": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "CNAME",
                                    "MX",
                                    "TXT"
                                  ]
                                },
                                "name": {
                                  "type": "string"
                                },
                                "value": {
                                  "type": "string"
                                },
                                "ttl": {
                                  "type": "string"
                                },
                                "priority": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "not_started",
                                    "pending",
                                    "success",
                                    "failed",
                                    "temporary_failure"
                                  ]
                                },
                                "recommended": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "type",
                                "name",
                                "value",
                                "ttl",
                                "status"
                              ]
                            }
                          },
                          "lastCheckedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "orgId",
                          "domain",
                          "region",
                          "status",
                          "dkimStatus",
                          "spfStatus",
                          "clickTracking",
                          "dnsRecords",
                          "lastCheckedAt",
                          "createdAt",
                          "updatedAt"
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "domains.create",
        "tags": [
          "domains"
        ],
        "summary": "Claim a sending domain",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "domain": {
                        "type": "string",
                        "maxLength": 253,
                        "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$"
                      }
                    },
                    "required": [
                      "domain"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The claimed domain with the DNS records to publish",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "domain": {
                          "type": "string"
                        },
                        "region": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "not_started",
                            "pending",
                            "success",
                            "failed",
                            "temporary_failure"
                          ]
                        },
                        "dkimStatus": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "spfStatus": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "clickTracking": {
                          "type": "boolean"
                        },
                        "dnsRecords": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "CNAME",
                                  "MX",
                                  "TXT"
                                ]
                              },
                              "name": {
                                "type": "string"
                              },
                              "value": {
                                "type": "string"
                              },
                              "ttl": {
                                "type": "string"
                              },
                              "priority": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "not_started",
                                  "pending",
                                  "success",
                                  "failed",
                                  "temporary_failure"
                                ]
                              },
                              "recommended": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "type",
                              "name",
                              "value",
                              "ttl",
                              "status"
                            ]
                          }
                        },
                        "lastCheckedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "domain",
                        "region",
                        "status",
                        "dkimStatus",
                        "spfStatus",
                        "clickTracking",
                        "dnsRecords",
                        "lastCheckedAt",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Error envelope; code: conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Error envelope; code: dependency_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/domains/{id}": {
      "get": {
        "operationId": "domains.get",
        "tags": [
          "domains"
        ],
        "summary": "Fetch one sending domain",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "domain": {
                          "type": "string"
                        },
                        "region": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "not_started",
                            "pending",
                            "success",
                            "failed",
                            "temporary_failure"
                          ]
                        },
                        "dkimStatus": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "spfStatus": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "clickTracking": {
                          "type": "boolean"
                        },
                        "dnsRecords": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "CNAME",
                                  "MX",
                                  "TXT"
                                ]
                              },
                              "name": {
                                "type": "string"
                              },
                              "value": {
                                "type": "string"
                              },
                              "ttl": {
                                "type": "string"
                              },
                              "priority": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "not_started",
                                  "pending",
                                  "success",
                                  "failed",
                                  "temporary_failure"
                                ]
                              },
                              "recommended": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "type",
                              "name",
                              "value",
                              "ttl",
                              "status"
                            ]
                          }
                        },
                        "lastCheckedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "domain",
                        "region",
                        "status",
                        "dkimStatus",
                        "spfStatus",
                        "clickTracking",
                        "dnsRecords",
                        "lastCheckedAt",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "domains.update",
        "tags": [
          "domains"
        ],
        "summary": "Toggle click tracking",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "clickTracking": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "clickTracking"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "domain": {
                          "type": "string"
                        },
                        "region": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "not_started",
                            "pending",
                            "success",
                            "failed",
                            "temporary_failure"
                          ]
                        },
                        "dkimStatus": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "spfStatus": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "clickTracking": {
                          "type": "boolean"
                        },
                        "dnsRecords": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "CNAME",
                                  "MX",
                                  "TXT"
                                ]
                              },
                              "name": {
                                "type": "string"
                              },
                              "value": {
                                "type": "string"
                              },
                              "ttl": {
                                "type": "string"
                              },
                              "priority": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "not_started",
                                  "pending",
                                  "success",
                                  "failed",
                                  "temporary_failure"
                                ]
                              },
                              "recommended": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "type",
                              "name",
                              "value",
                              "ttl",
                              "status"
                            ]
                          }
                        },
                        "lastCheckedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "domain",
                        "region",
                        "status",
                        "dkimStatus",
                        "spfStatus",
                        "clickTracking",
                        "dnsRecords",
                        "lastCheckedAt",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Error envelope; code: conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "domains.delete",
        "tags": [
          "domains"
        ],
        "summary": "Release a domain claim",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "deleted": {
                          "type": "boolean",
                          "enum": [
                            true
                          ]
                        }
                      },
                      "required": [
                        "deleted"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Error envelope; code: dependency_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/domains/{id}/verify": {
      "post": {
        "operationId": "domains.verify",
        "tags": [
          "domains"
        ],
        "summary": "Re-check DNS now",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "domain": {
                          "type": "string"
                        },
                        "region": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "not_started",
                            "pending",
                            "success",
                            "failed",
                            "temporary_failure"
                          ]
                        },
                        "dkimStatus": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "spfStatus": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "clickTracking": {
                          "type": "boolean"
                        },
                        "dnsRecords": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "CNAME",
                                  "MX",
                                  "TXT"
                                ]
                              },
                              "name": {
                                "type": "string"
                              },
                              "value": {
                                "type": "string"
                              },
                              "ttl": {
                                "type": "string"
                              },
                              "priority": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "not_started",
                                  "pending",
                                  "success",
                                  "failed",
                                  "temporary_failure"
                                ]
                              },
                              "recommended": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "type",
                              "name",
                              "value",
                              "ttl",
                              "status"
                            ]
                          }
                        },
                        "lastCheckedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "domain",
                        "region",
                        "status",
                        "dkimStatus",
                        "spfStatus",
                        "clickTracking",
                        "dnsRecords",
                        "lastCheckedAt",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Error envelope; code: dependency_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/deliveries": {
      "get": {
        "operationId": "deliveries.list",
        "tags": [
          "deliveries"
        ],
        "summary": "List deliveries, newest first",
        "security": [
          {
            "clerkSession": []
          },
          {
            "orgDeployKey": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "desc"
            },
            "required": false,
            "name": "direction",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "sent",
                "delivered",
                "bounced",
                "complained",
                "failed",
                "skipped_disabled",
                "skipped_paused",
                "skipped_suppressed",
                "skipped_quota",
                "skipped_frequency_cap",
                "skipped_consent",
                "skipped_domain",
                "skipped_ssrf",
                "would_send",
                "would_skip_disabled",
                "would_skip_paused",
                "would_skip_suppressed",
                "would_skip_quota",
                "would_skip_frequency_cap",
                "would_skip_consent",
                "would_skip_domain",
                "would_skip_ssrf"
              ]
            },
            "required": false,
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "required": false,
            "name": "journey",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "email",
                "webhook"
              ]
            },
            "required": false,
            "name": "channel",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "required": false,
            "name": "appId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "required": false,
            "name": "profileId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "since",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of results; meta carries nextCursor and hasMore",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "orgId": {
                            "type": "string"
                          },
                          "environment": {
                            "type": "string",
                            "enum": [
                              "development",
                              "production"
                            ]
                          },
                          "profileId": {
                            "type": "string"
                          },
                          "journey": {
                            "type": "string"
                          },
                          "step": {
                            "type": "string"
                          },
                          "channel": {
                            "type": "string",
                            "enum": [
                              "email",
                              "webhook"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "sent",
                              "delivered",
                              "bounced",
                              "complained",
                              "failed",
                              "skipped_disabled",
                              "skipped_paused",
                              "skipped_suppressed",
                              "skipped_quota",
                              "skipped_frequency_cap",
                              "skipped_consent",
                              "skipped_domain",
                              "skipped_ssrf",
                              "would_send",
                              "would_skip_disabled",
                              "would_skip_paused",
                              "would_skip_suppressed",
                              "would_skip_quota",
                              "would_skip_frequency_cap",
                              "would_skip_consent",
                              "would_skip_domain",
                              "would_skip_ssrf"
                            ]
                          },
                          "dryRun": {
                            "type": "boolean"
                          },
                          "recipient": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "providerId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "error": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "sentAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "settledAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "orgId",
                          "environment",
                          "profileId",
                          "journey",
                          "step",
                          "channel",
                          "status",
                          "dryRun",
                          "recipient",
                          "providerId",
                          "error",
                          "createdAt",
                          "updatedAt",
                          "sentAt",
                          "settledAt"
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/deliveries/{id}": {
      "get": {
        "operationId": "deliveries.get",
        "tags": [
          "deliveries"
        ],
        "summary": "Fetch one delivery with its payload",
        "security": [
          {
            "clerkSession": []
          },
          {
            "orgDeployKey": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "orgId": {
                          "type": "string"
                        },
                        "environment": {
                          "type": "string",
                          "enum": [
                            "development",
                            "production"
                          ]
                        },
                        "profileId": {
                          "type": "string"
                        },
                        "journey": {
                          "type": "string"
                        },
                        "step": {
                          "type": "string"
                        },
                        "channel": {
                          "type": "string",
                          "enum": [
                            "email",
                            "webhook"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "sent",
                            "delivered",
                            "bounced",
                            "complained",
                            "failed",
                            "skipped_disabled",
                            "skipped_paused",
                            "skipped_suppressed",
                            "skipped_quota",
                            "skipped_frequency_cap",
                            "skipped_consent",
                            "skipped_domain",
                            "skipped_ssrf",
                            "would_send",
                            "would_skip_disabled",
                            "would_skip_paused",
                            "would_skip_suppressed",
                            "would_skip_quota",
                            "would_skip_frequency_cap",
                            "would_skip_consent",
                            "would_skip_domain",
                            "would_skip_ssrf"
                          ]
                        },
                        "dryRun": {
                          "type": "boolean"
                        },
                        "recipient": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "providerId": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "error": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "sentAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "settledAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "payload": {
                          "type": "object",
                          "properties": {
                            "rendered": {
                              "type": "object",
                              "properties": {
                                "subject": {
                                  "type": "string"
                                },
                                "html": {
                                  "type": "string"
                                },
                                "text": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "subject",
                                "html",
                                "text"
                              ]
                            }
                          },
                          "additionalProperties": {}
                        }
                      },
                      "required": [
                        "id",
                        "orgId",
                        "environment",
                        "profileId",
                        "journey",
                        "step",
                        "channel",
                        "status",
                        "dryRun",
                        "recipient",
                        "providerId",
                        "error",
                        "createdAt",
                        "updatedAt",
                        "sentAt",
                        "settledAt",
                        "payload"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/feedback/ses": {
      "post": {
        "operationId": "deliveries.sesFeedback",
        "tags": [
          "deliveries"
        ],
        "summary": "SES delivery feedback via SNS (public)",
        "security": [],
        "requestBody": {
          "content": {
            "text/plain": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Accepted, per SNS's plain-text convention",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Rejected: signature, topic, or event problem"
          }
        }
      }
    },
    "/v1/unsubscribe": {
      "post": {
        "operationId": "deliveries.unsubscribe",
        "tags": [
          "deliveries"
        ],
        "summary": "One-click unsubscribe (public)",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "token",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Confirmation page",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or incomplete unsubscribe link"
          }
        }
      },
      "get": {
        "operationId": "deliveries.unsubscribePage",
        "tags": [
          "deliveries"
        ],
        "summary": "Unsubscribe confirmation page (public)",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "token",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The page offering the unsubscribe",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or incomplete unsubscribe link"
          }
        }
      }
    },
    "/v1/public/verify": {
      "get": {
        "operationId": "emails.verifyPage",
        "tags": [
          "emails"
        ],
        "summary": "Verification confirmation page (public)",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "token",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The page offering the verification",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or expired verification link"
          }
        }
      },
      "post": {
        "operationId": "emails.verify",
        "tags": [
          "emails"
        ],
        "summary": "Verify an email address (public)",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "token",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Verified page",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid, expired, or already-spent verification link"
          }
        }
      }
    },
    "/v1/suppressions": {
      "get": {
        "operationId": "suppressions.list",
        "tags": [
          "suppressions"
        ],
        "summary": "List suppressed addresses",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "required": false,
            "name": "q",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of results; meta carries nextCursor and hasMore",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "orgId": {
                            "type": "string"
                          },
                          "address": {
                            "type": "string"
                          },
                          "type": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "bounce",
                              "complaint",
                              "manual",
                              null
                            ]
                          },
                          "reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "source": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "suppressedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "orgId",
                          "address",
                          "type",
                          "reason",
                          "source",
                          "suppressedAt",
                          "createdAt",
                          "updatedAt"
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/suppressions/{id}": {
      "delete": {
        "operationId": "suppressions.delete",
        "tags": [
          "suppressions"
        ],
        "summary": "Un-suppress an address",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "deleted": {
                          "type": "boolean",
                          "enum": [
                            true
                          ]
                        }
                      },
                      "required": [
                        "deleted"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Error envelope; code: dependency_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/settings/org": {
      "get": {
        "operationId": "settings.get",
        "tags": [
          "settings"
        ],
        "summary": "Fetch org settings",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "environment": {
                          "type": "string",
                          "enum": [
                            "development",
                            "production"
                          ]
                        },
                        "ingestionPolicy": {
                          "type": "string",
                          "enum": [
                            "permissive",
                            "strict"
                          ]
                        },
                        "eventRetentionDays": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 548
                        },
                        "slug": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "environment",
                        "ingestionPolicy",
                        "eventRetentionDays",
                        "slug",
                        "name"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "settings.update",
        "tags": [
          "settings"
        ],
        "summary": "Update org settings",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "ingestionPolicy": {
                        "type": "string",
                        "enum": [
                          "permissive",
                          "strict"
                        ]
                      },
                      "eventRetentionDays": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 548
                      }
                    }
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "environment": {
                          "type": "string",
                          "enum": [
                            "development",
                            "production"
                          ]
                        },
                        "ingestionPolicy": {
                          "type": "string",
                          "enum": [
                            "permissive",
                            "strict"
                          ]
                        },
                        "eventRetentionDays": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 548
                        },
                        "slug": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "environment",
                        "ingestionPolicy",
                        "eventRetentionDays",
                        "slug",
                        "name"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/settings/api-keys": {
      "get": {
        "operationId": "settings.apiKeys.list",
        "tags": [
          "settings"
        ],
        "summary": "List org API keys",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of results; meta carries nextCursor and hasMore",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "createdBy": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "revoked": {
                            "type": "boolean"
                          },
                          "revocationReason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "expired": {
                            "type": "boolean"
                          },
                          "expiresAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "lastUsedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "createdAt",
                          "createdBy",
                          "revoked",
                          "revocationReason",
                          "expired",
                          "expiresAt",
                          "lastUsedAt"
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "settings.apiKeys.create",
        "tags": [
          "settings"
        ],
        "summary": "Create an org API key",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created key; the only response carrying the raw secret",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "createdBy": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "revoked": {
                          "type": "boolean"
                        },
                        "revocationReason": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "expired": {
                          "type": "boolean"
                        },
                        "expiresAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "lastUsedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "secret": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "createdAt",
                        "createdBy",
                        "revoked",
                        "revocationReason",
                        "expired",
                        "expiresAt",
                        "lastUsedAt",
                        "secret"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/settings/deploy-keys": {
      "get": {
        "operationId": "settings.deployKeys.list",
        "tags": [
          "settings"
        ],
        "summary": "List org deploy keys",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of results; meta carries nextCursor and hasMore",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "createdBy": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "revoked": {
                            "type": "boolean"
                          },
                          "revocationReason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "expired": {
                            "type": "boolean"
                          },
                          "expiresAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "lastUsedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "createdAt",
                          "createdBy",
                          "revoked",
                          "revocationReason",
                          "expired",
                          "expiresAt",
                          "lastUsedAt"
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "settings.deployKeys.create",
        "tags": [
          "settings"
        ],
        "summary": "Create an org deploy key",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created deploy key; the only response carrying the raw secret",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "createdBy": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "revoked": {
                          "type": "boolean"
                        },
                        "revocationReason": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "expired": {
                          "type": "boolean"
                        },
                        "expiresAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "lastUsedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "secret": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "createdAt",
                        "createdBy",
                        "revoked",
                        "revocationReason",
                        "expired",
                        "expiresAt",
                        "lastUsedAt",
                        "secret"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/settings/deploy-keys/{id}/revoke": {
      "post": {
        "operationId": "settings.deployKeys.revoke",
        "tags": [
          "settings"
        ],
        "summary": "Revoke an org deploy key",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "revocationReason": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      }
                    }
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "createdBy": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "revoked": {
                          "type": "boolean"
                        },
                        "revocationReason": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "expired": {
                          "type": "boolean"
                        },
                        "expiresAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "lastUsedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "createdAt",
                        "createdBy",
                        "revoked",
                        "revocationReason",
                        "expired",
                        "expiresAt",
                        "lastUsedAt"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/settings/api-keys/{id}/revoke": {
      "post": {
        "operationId": "settings.apiKeys.revoke",
        "tags": [
          "settings"
        ],
        "summary": "Revoke an org API key",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "revocationReason": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      }
                    }
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "createdBy": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "revoked": {
                          "type": "boolean"
                        },
                        "revocationReason": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "expired": {
                          "type": "boolean"
                        },
                        "expiresAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "lastUsedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "createdAt",
                        "createdBy",
                        "revoked",
                        "revocationReason",
                        "expired",
                        "expiresAt",
                        "lastUsedAt"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error envelope; code: not_found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing": {
      "get": {
        "operationId": "billing.summary",
        "tags": [
          "billing"
        ],
        "summary": "Billing summary for the current UTC month",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "allowanceMicros": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "walletBalanceMicros": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "periodStart": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "periodEnd": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "spentMicros": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "remainingMicros": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "usage": {
                          "type": "object",
                          "properties": {
                            "events": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "emails": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "webhooks": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "journeyRuns": {
                              "type": "integer",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "events",
                            "emails",
                            "webhooks",
                            "journeyRuns"
                          ]
                        },
                        "prices": {
                          "type": "object",
                          "properties": {
                            "event": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "email": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "webhook": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "journeyRun": {
                              "type": "integer",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "event",
                            "email",
                            "webhook",
                            "journeyRun"
                          ]
                        },
                        "warn": {
                          "type": "boolean"
                        },
                        "over": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "allowanceMicros",
                        "walletBalanceMicros",
                        "periodStart",
                        "periodEnd",
                        "spentMicros",
                        "remainingMicros",
                        "usage",
                        "prices",
                        "warn",
                        "over"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing/topups": {
      "get": {
        "operationId": "billing.topups.list",
        "tags": [
          "billing"
        ],
        "summary": "List wallet top-ups",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of results; meta carries nextCursor and hasMore",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "amountMicros": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "completed",
                              "failed"
                            ]
                          },
                          "stripeCheckoutSessionId": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "completedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "amountMicros",
                          "status",
                          "stripeCheckoutSessionId",
                          "createdAt",
                          "completedAt"
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "billing.topups.create",
        "tags": [
          "billing"
        ],
        "summary": "Start a wallet top-up",
        "security": [
          {
            "clerkSession": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "amountMicros": {
                        "type": "number",
                        "enum": [
                          10000000
                        ]
                      }
                    },
                    "required": [
                      "amountMicros"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The Stripe-hosted checkout to redirect to",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "checkoutUrl": {
                          "type": "string",
                          "format": "uri"
                        }
                      },
                      "required": [
                        "checkoutUrl"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error envelope; code: malformed_request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error envelope; code: invalid_key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Error envelope; code: forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error envelope; code: validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Error envelope; code: dependency_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "malformed_request",
                            "invalid_key",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "payload_too_large",
                            "validation_failed",
                            "trait_validation_failed",
                            "event_denied",
                            "trait_denied",
                            "over_quota",
                            "rate_limited",
                            "dependency_unavailable",
                            "internal",
                            "journey_fuel_exceeded",
                            "journey_timeout",
                            "journey_memory_exceeded",
                            "journey_error",
                            "journey_output_invalid",
                            "journey_nondeterministic",
                            "release_invalid",
                            "release_not_ready",
                            "project_exists",
                            "project_missing",
                            "artifact_too_large",
                            "deploy_key_scope"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhooks/stripe": {
      "post": {
        "operationId": "billing.stripeWebhook",
        "tags": [
          "billing"
        ],
        "summary": "Stripe webhook (public)",
        "security": [],
        "requestBody": {
          "content": {
            "text/plain": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Accepted, per Stripe's plain-text convention",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid signature"
          }
        }
      }
    }
  },
  "webhooks": {}
}
