{
  "openapi": "3.0.3",
  "info": {
    "contact": {
      "email": "platform@lifters.io",
      "name": "Atlas Platform Team"
    },
    "description": "High-throughput event ingestion service for the Atlas data pipeline.",
    "license": {
      "name": "MIT"
    },
    "termsOfService": "https://lifters.io/terms",
    "title": "Atlas Events API",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "/"
    }
  ],
  "paths": {
    "/api/v1/casino": {
      "post": {
        "description": "Records casino activity. Supports open, win and lose events.",
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/response.Envelope"
                    },
                    {
                      "properties": {
                        "data": {
                          "additionalProperties": {
                            "type": "string"
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.ErrorEnvelope"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.ErrorEnvelope"
                }
              }
            }
          }
        },
        "summary": "Ingest casino event",
        "tags": [
          "casino"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/dto.CasinoEventRequest"
              }
            }
          },
          "description": "Casino event payload",
          "required": true
        }
      }
    },
    "/api/v1/casino/batch": {
      "post": {
        "description": "Accepts up to HTTP_MAX_BATCH_SIZE casino events in a single call. Returns 207 Multi-Status\nwhen at least one item fails to publish; 422 if the batch structure or any item is invalid.",
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/response.Envelope"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/dto.RawBatchResponse"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            }
          },
          "207": {
            "description": "Multi-Status",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/response.Envelope"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/dto.RawBatchResponse"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.ErrorEnvelope"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.ErrorEnvelope"
                }
              }
            }
          }
        },
        "summary": "Ingest a batch of casino events",
        "tags": [
          "casino"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/dto.CasinoBatchRequest"
              }
            }
          },
          "description": "Batch payload",
          "required": true
        }
      }
    },
    "/api/v1/sport": {
      "post": {
        "description": "Records sports betting activity. Supports open, win, lose and cashout events.\nselections is always required (min 1). For open, send the full snapshot.\nFor win, lose and cashout, send only the selections that changed status.",
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/response.Envelope"
                    },
                    {
                      "properties": {
                        "data": {
                          "additionalProperties": {
                            "type": "string"
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.ErrorEnvelope"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.ErrorEnvelope"
                }
              }
            }
          }
        },
        "summary": "Ingest sport event",
        "tags": [
          "sport"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/dto.SportEventRequest"
              }
            }
          },
          "description": "Sport event payload",
          "required": true
        }
      }
    },
    "/api/v1/sport/batch": {
      "post": {
        "description": "Accepts up to HTTP_MAX_BATCH_SIZE sport events in a single call. Returns 207 Multi-Status\nwhen at least one item fails to publish; 422 if the batch structure or any item is invalid.\nselections is always required (min 1) for every event in the batch.",
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/response.Envelope"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/dto.RawBatchResponse"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            }
          },
          "207": {
            "description": "Multi-Status",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/response.Envelope"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/dto.RawBatchResponse"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.ErrorEnvelope"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.ErrorEnvelope"
                }
              }
            }
          }
        },
        "summary": "Ingest a batch of sport events",
        "tags": [
          "sport"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/dto.SportBatchRequest"
              }
            }
          },
          "description": "Batch payload",
          "required": true
        }
      }
    },
    "/api/v1/transaction": {
      "post": {
        "description": "Records financial transactions. Supports deposit and withdraw events.",
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/response.Envelope"
                    },
                    {
                      "properties": {
                        "data": {
                          "additionalProperties": {
                            "type": "string"
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.ErrorEnvelope"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.ErrorEnvelope"
                }
              }
            }
          }
        },
        "summary": "Ingest transaction event",
        "tags": [
          "transaction"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/dto.TransactionEventRequest"
              }
            }
          },
          "description": "Transaction event payload",
          "required": true
        }
      }
    },
    "/api/v1/transaction/batch": {
      "post": {
        "description": "Accepts up to HTTP_MAX_BATCH_SIZE transaction events in a single call. Returns 207 Multi-Status\nwhen at least one item fails to publish; 422 if the batch structure or any item is invalid.",
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/response.Envelope"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/dto.RawBatchResponse"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            }
          },
          "207": {
            "description": "Multi-Status",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/response.Envelope"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/dto.RawBatchResponse"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.ErrorEnvelope"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.ErrorEnvelope"
                }
              }
            }
          }
        },
        "summary": "Ingest a batch of transaction events",
        "tags": [
          "transaction"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/dto.TransactionBatchRequest"
              }
            }
          },
          "description": "Batch payload",
          "required": true
        }
      }
    },
    "/api/v1/user": {
      "post": {
        "description": "Manages user profile lifecycle. Supports register and update events.",
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/response.Envelope"
                    },
                    {
                      "properties": {
                        "data": {
                          "additionalProperties": {
                            "type": "string"
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.ErrorEnvelope"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.ErrorEnvelope"
                }
              }
            }
          }
        },
        "summary": "Ingest user event",
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/dto.UserEventRequest"
              }
            }
          },
          "description": "User event payload",
          "required": true
        }
      }
    },
    "/api/v1/user/batch": {
      "post": {
        "description": "Accepts up to HTTP_MAX_BATCH_SIZE user events in a single call. Returns 207 Multi-Status\nwhen at least one item fails to publish; 422 if the batch structure or any item is invalid.",
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/response.Envelope"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/dto.RawBatchResponse"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            }
          },
          "207": {
            "description": "Multi-Status",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/response.Envelope"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/dto.RawBatchResponse"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.ErrorEnvelope"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.ErrorEnvelope"
                }
              }
            }
          }
        },
        "summary": "Ingest a batch of user events",
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/dto.UserBatchRequest"
              }
            }
          },
          "description": "Batch payload",
          "required": true
        }
      }
    },
    "/health/live": {
      "get": {
        "description": "Returns 200 if the process is alive.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "summary": "Liveness probe",
        "tags": [
          "health"
        ]
      }
    },
    "/health/ready": {
      "get": {
        "description": "Returns 200 when the service is ready to handle traffic.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "summary": "Readiness probe",
        "tags": [
          "health"
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "dto.CasinoBatchRequest": {
        "description": "Batch casino event ingestion request.",
        "properties": {
          "events": {
            "items": {
              "$ref": "#/components/schemas/dto.CasinoEventRequest"
            },
            "minItems": 1,
            "type": "array"
          }
        },
        "required": [
          "events"
        ],
        "type": "object"
      },
      "dto.CasinoEventRequest": {
        "description": "Casino event ingestion request.",
        "properties": {
          "after_balance": {
            "type": "number"
          },
          "before_balance": {
            "type": "number"
          },
          "bet_amount": {
            "type": "number"
          },
          "bet_amount_bonus": {
            "type": "number"
          },
          "bet_dt": {
            "type": "string"
          },
          "bet_id": {
            "type": "string"
          },
          "bet_status": {
            "enum": [
              "open",
              "win",
              "lose"
            ],
            "type": "string"
          },
          "brand_id": {
            "type": "string"
          },
          "casino_session_id": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "day": {
            "description": "Day is server-enriched before Kafka publish and overrides client input.",
            "type": "integer"
          },
          "event": {
            "enum": [
              "open",
              "win",
              "lose"
            ],
            "type": "string"
          },
          "game_ext_id": {
            "type": "string"
          },
          "game_name": {
            "type": "string"
          },
          "game_provider": {
            "type": "string"
          },
          "game_provider_ext_id": {
            "type": "string"
          },
          "game_type": {
            "type": "string"
          },
          "geolocation_lat": {
            "type": "number"
          },
          "geolocation_long": {
            "type": "number"
          },
          "ip": {
            "type": "string"
          },
          "is_free_bet": {
            "type": "boolean"
          },
          "month": {
            "description": "Month is server-enriched before Kafka publish and overrides client input.",
            "type": "integer"
          },
          "org_id": {
            "type": "string"
          },
          "platform": {
            "enum": [
              "WEB",
              "MOBILE",
              "APP"
            ],
            "type": "string"
          },
          "user_id": {
            "type": "string"
          },
          "win_amount": {
            "type": "number"
          },
          "win_amount_bonus": {
            "type": "number"
          },
          "year": {
            "description": "Year is server-enriched before Kafka publish and overrides client input.",
            "type": "integer"
          }
        },
        "required": [
          "bet_dt",
          "bet_id",
          "brand_id",
          "casino_session_id",
          "currency",
          "event",
          "game_ext_id",
          "game_name",
          "game_provider",
          "game_type",
          "org_id",
          "user_id"
        ],
        "type": "object"
      },
      "dto.RawBatchItemResult": {
        "description": "Per-item outcome within a batch ingestion response.",
        "properties": {
          "eid": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "dto.RawBatchResponse": {
        "description": "Batch ingestion result with per-item status (207 Multi-Status on partial failure).",
        "properties": {
          "accepted": {
            "type": "integer"
          },
          "failed": {
            "type": "integer"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/dto.RawBatchItemResult"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "dto.SportBatchRequest": {
        "description": "Batch sport bet event ingestion request.",
        "properties": {
          "events": {
            "items": {
              "$ref": "#/components/schemas/dto.SportEventRequest"
            },
            "minItems": 1,
            "type": "array"
          }
        },
        "required": [
          "events"
        ],
        "type": "object"
      },
      "dto.SportEventRequest": {
        "description": "Sport bet event ingestion request.",
        "properties": {
          "after_balance": {
            "type": "number"
          },
          "before_balance": {
            "type": "number"
          },
          "bet_amount": {
            "type": "number"
          },
          "bet_amount_bonus": {
            "type": "number"
          },
          "bet_dt": {
            "type": "string"
          },
          "bet_id": {
            "type": "string"
          },
          "bet_odds": {
            "type": "number"
          },
          "bet_platform": {
            "enum": [
              "WEB",
              "MOBILE",
              "APP"
            ],
            "type": "string"
          },
          "bet_timing": {
            "enum": [
              "LIVE",
              "PREMATCH"
            ],
            "type": "string"
          },
          "bet_type": {
            "enum": [
              "SINGLE",
              "MULTIPLE"
            ],
            "type": "string"
          },
          "bet_virtual": {
            "type": "boolean"
          },
          "brand_id": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "day": {
            "description": "Day is server-enriched before Kafka publish and overrides client input.",
            "type": "integer"
          },
          "event": {
            "enum": [
              "open",
              "win",
              "lose",
              "cashout"
            ],
            "type": "string"
          },
          "geolocation_lat": {
            "type": "number"
          },
          "geolocation_long": {
            "type": "number"
          },
          "ip": {
            "type": "string"
          },
          "month": {
            "description": "Month is server-enriched before Kafka publish and overrides client input.",
            "type": "integer"
          },
          "org_id": {
            "type": "string"
          },
          "selections": {
            "description": "Selections is always required (min 1). For open, send the full snapshot.\nFor win, lose and cashout, send only the selections that changed status.",
            "items": {
              "$ref": "#/components/schemas/dto.SportSelection"
            },
            "minItems": 1,
            "type": "array"
          },
          "ticket_status": {
            "enum": [
              "cancel",
              "win",
              "cashout",
              "open",
              "lose",
              "reject",
              "refund"
            ],
            "type": "string"
          },
          "user_id": {
            "type": "string"
          },
          "win_amount": {
            "type": "number"
          },
          "year": {
            "description": "Year is server-enriched before Kafka publish and overrides client input.",
            "type": "integer"
          }
        },
        "required": [
          "bet_dt",
          "bet_id",
          "brand_id",
          "currency",
          "event",
          "org_id",
          "selections",
          "ticket_status",
          "user_id"
        ],
        "type": "object"
      },
      "dto.SportSelection": {
        "properties": {
          "selection_away_team": {
            "type": "string"
          },
          "selection_choice": {
            "type": "string"
          },
          "selection_competitors": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "selection_event_name": {
            "type": "string"
          },
          "selection_home_team": {
            "type": "string"
          },
          "selection_id": {
            "type": "string"
          },
          "selection_is_live": {
            "type": "boolean"
          },
          "selection_league": {
            "type": "string"
          },
          "selection_market": {
            "type": "string"
          },
          "selection_odds": {
            "type": "number"
          },
          "selection_sport_type": {
            "type": "string"
          },
          "selection_status": {
            "enum": [
              "refund",
              "cancel",
              "partial_lose",
              "win",
              "cashout",
              "partial_win",
              "open",
              "lose"
            ],
            "type": "string"
          },
          "selection_virtual": {
            "type": "boolean"
          },
          "sport_match_id": {
            "type": "string"
          }
        },
        "required": [
          "selection_id",
          "selection_status"
        ],
        "type": "object"
      },
      "dto.TransactionBatchRequest": {
        "description": "Batch financial transaction event ingestion request.",
        "properties": {
          "events": {
            "items": {
              "$ref": "#/components/schemas/dto.TransactionEventRequest"
            },
            "minItems": 1,
            "type": "array"
          }
        },
        "required": [
          "events"
        ],
        "type": "object"
      },
      "dto.TransactionEventRequest": {
        "description": "Financial transaction event ingestion request.",
        "properties": {
          "after_balance": {
            "type": "number"
          },
          "amount": {
            "type": "number"
          },
          "before_balance": {
            "type": "number"
          },
          "bonus_code": {
            "type": "string"
          },
          "bonus_credited": {
            "type": "boolean"
          },
          "brand_id": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "day": {
            "description": "Day is server-enriched before Kafka publish and overrides client input.",
            "type": "integer"
          },
          "event": {
            "enum": [
              "deposit",
              "withdraw"
            ],
            "type": "string"
          },
          "geolocation_lat": {
            "type": "number"
          },
          "geolocation_long": {
            "type": "number"
          },
          "ip": {
            "type": "string"
          },
          "is_first_transaction": {
            "type": "boolean"
          },
          "kyc_verified": {
            "type": "boolean"
          },
          "month": {
            "description": "Month is server-enriched before Kafka publish and overrides client input.",
            "type": "integer"
          },
          "org_id": {
            "type": "string"
          },
          "payment_method": {
            "type": "string"
          },
          "payment_provider": {
            "type": "string"
          },
          "status": {
            "enum": [
              "RECEIVED",
              "APPROVED",
              "REQUESTED",
              "PENDING",
              "UNDER_REVIEW",
              "DENIED"
            ],
            "type": "string"
          },
          "transaction_dt": {
            "type": "string"
          },
          "transaction_id": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          },
          "year": {
            "description": "Year is server-enriched before Kafka publish and overrides client input.",
            "type": "integer"
          }
        },
        "required": [
          "amount",
          "brand_id",
          "event",
          "org_id",
          "status",
          "transaction_dt",
          "transaction_id",
          "user_id"
        ],
        "type": "object"
      },
      "dto.UserBatchRequest": {
        "description": "Batch user lifecycle event ingestion request.",
        "properties": {
          "events": {
            "items": {
              "$ref": "#/components/schemas/dto.UserEventRequest"
            },
            "minItems": 1,
            "type": "array"
          }
        },
        "required": [
          "events"
        ],
        "type": "object"
      },
      "dto.UserEventRequest": {
        "description": "User lifecycle event ingestion request.",
        "properties": {
          "birthdate": {
            "type": "string"
          },
          "brand_id": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "day": {
            "description": "Day is server-enriched before Kafka publish and overrides client input.",
            "type": "integer"
          },
          "document": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "event": {
            "enum": [
              "register",
              "update"
            ],
            "type": "string"
          },
          "full_name": {
            "type": "string"
          },
          "gender": {
            "type": "integer"
          },
          "geolocation_lat": {
            "type": "number"
          },
          "geolocation_long": {
            "type": "number"
          },
          "ip": {
            "type": "string"
          },
          "is_test_account": {
            "type": "boolean"
          },
          "kyc_status": {
            "type": "string"
          },
          "month": {
            "description": "Month is server-enriched before Kafka publish and overrides client input.",
            "type": "integer"
          },
          "org_id": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "post_code": {
            "type": "string"
          },
          "registered_at": {
            "type": "string"
          },
          "registration_platform": {
            "enum": [
              "DESKTOP",
              "MOBILE",
              "APP"
            ],
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "status": {
            "enum": [
              "ACTIVE",
              "BLOCKED",
              "SUSPENDED",
              "BANNED",
              "SELF_EXCLUDED",
              "DEACTIVATED",
              "PENDING"
            ],
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          },
          "year": {
            "description": "Year is server-enriched before Kafka publish and overrides client input.",
            "type": "integer"
          }
        },
        "required": [
          "brand_id",
          "event",
          "org_id"
        ],
        "type": "object"
      },
      "response.Envelope": {
        "properties": {
          "data": {
            "description": "Data holds the response payload (can be any JSON-serialisable value)."
          }
        },
        "type": "object"
      },
      "response.ErrorEnvelope": {
        "properties": {
          "code": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "request_id": {
            "description": "RequestID echoes the request ID for correlation in support tickets.",
            "type": "string"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "description": "Type \"Bearer\" followed by a space and your JWT token.",
        "in": "header",
        "name": "Authorization",
        "type": "apiKey"
      }
    }
  }
}
