{"openapi":"3.1.0","info":{"title":"PlaylogiQ API","version":"1.0.0","description":"Public REST API for the PlaylogiQ CRM + Gamification Hub. All endpoints are authenticated with an operator API key via the `x-api-key` header. A key may be BRAND-PINNED (recommended) — it writes only to its brand and ignores any brand hint — or tenant-wide, in which case brand-scoped endpoints accept an optional `x-brand` header (or `?brand=` query parameter, a brand id or slug; default brand when omitted). Keys carry least-privilege scopes (empty = full; a PAM ingestion key holds only `events:write`)."},"servers":[{"url":"/api/v1"}],"security":[{"ApiKeyAuth":[]}],"tags":[{"name":"System","description":"Health and service metadata"},{"name":"Events","description":"Player event ingestion"},{"name":"Players","description":"Player records and profiles"},{"name":"Segments","description":"Player segmentation"},{"name":"Campaigns","description":"Omnichannel campaigns"},{"name":"Notifications","description":"Templates and message sending"},{"name":"Gamification","description":"Levels, missions, badges, currencies, player profiles"},{"name":"Bonuses","description":"Bonus definitions"},{"name":"Tournaments","description":"Tournament definitions"},{"name":"Analytics","description":"Read-only analytics, cohorts and ad-hoc reports"}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Operator API key (prefixed `plq_`). May be brand-pinned (writes only to its brand) and scoped (e.g. `events:write` for ingestion)."}},"parameters":{"BrandHeader":{"name":"x-brand","in":"header","required":false,"description":"Optional brand id (UUID) or slug to scope the request. May also be supplied as the `?brand=` query parameter. Defaults to the tenant's default brand when omitted.","schema":{"type":"string"}},"BrandQuery":{"name":"brand","in":"query","required":false,"description":"Optional brand id (UUID) or slug. Alternative to the `x-brand` header.","schema":{"type":"string"}}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["UNAUTHORIZED","BAD_REQUEST","NOT_FOUND","INTERNAL_ERROR"]},"details":{"type":"object","additionalProperties":true}},"required":["error"]},"Pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer"},"pages":{"type":"integer"}}},"Player":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"external_id":{"type":"string"},"email":{"type":["string","null"],"format":"email"},"phone":{"type":["string","null"]},"status":{"type":"string","enum":["active","suspended","self_excluded","closed"]},"metadata":{"type":"object","additionalProperties":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Segment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"type":{"type":"string"},"rules":{"type":"object","additionalProperties":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Campaign":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["draft","scheduled","running","paused","completed","cancelled"]},"type":{"type":"string","enum":["one_shot","recurring","triggered","journey"]},"channels":{"type":"array","items":{"type":"string","enum":["email","telegram","push","in_app"]}},"target_segment_id":{"type":["string","null"],"format":"uuid"},"schedule":{"type":"object","additionalProperties":true},"config":{"type":"object","additionalProperties":true},"stats":{"type":"object","additionalProperties":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"NotificationTemplate":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"channel":{"type":"string","enum":["email","telegram","push","in_app"]},"locale":{"type":"string","enum":["en","it","es"]},"subject":{"type":["string","null"]},"body":{"type":"string"},"variables":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"QueuedNotification":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tenant_id":{"type":"string","format":"uuid"},"player_id":{"type":"string","format":"uuid"},"channel":{"type":"string","enum":["email","telegram","push","in_app"]},"template_id":{"type":["string","null"],"format":"uuid"},"payload":{"type":"object","additionalProperties":true},"status":{"type":"string"},"scheduled_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"}}},"Level":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"tier":{"type":"integer"},"min_points":{"type":"integer"},"max_points":{"type":["integer","null"]},"benefits":{"type":"object","additionalProperties":true},"created_at":{"type":"string","format":"date-time"}}},"Mission":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"type":{"type":"string","enum":["daily","weekly","one_time","progressive","collaborative"]},"status":{"type":"string","enum":["active","completed","expired","cancelled"]},"rules":{"type":"object","additionalProperties":true},"rewards":{"type":"object","additionalProperties":true},"max_completions_per_player":{"type":["integer","null"]},"starts_at":{"type":["string","null"],"format":"date-time"},"ends_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Badge":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"icon_url":{"type":["string","null"],"format":"uri"},"criteria":{"type":"object","additionalProperties":true},"rarity":{"type":"string","enum":["common","rare","epic","legendary"]},"created_at":{"type":"string","format":"date-time"}}},"PointCurrency":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"symbol":{"type":"string"},"type":{"type":"string","enum":["real","virtual","bonus"]},"created_at":{"type":"string","format":"date-time"}}},"Bonus":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"type":{"type":"string","enum":["welcome","reload","cashback","free_spins","no_deposit","custom"]},"value":{"type":"number"},"value_type":{"type":"string"},"wagering_requirement":{"type":"number"},"config":{"type":"object","additionalProperties":true},"expires_in_hours":{"type":["integer","null"]},"active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}},"Tournament":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["draft","active","ended","cancelled"]},"game_config":{"type":"object","additionalProperties":true},"prize_pool":{"type":"object","additionalProperties":true},"max_participants":{"type":["integer","null"]},"starts_at":{"type":["string","null"],"format":"date-time"},"ends_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"PlayerGamificationProfile":{"type":"object","properties":{"player_id":{"type":"string","format":"uuid"},"current_level":{"type":["object","null"],"additionalProperties":true},"point_balances":{"type":"array","items":{"type":"object","additionalProperties":true}},"active_missions":{"type":"array","items":{"type":"object","additionalProperties":true}},"badges_earned":{"type":"array","items":{"type":"object","additionalProperties":true}}}}},"responses":{"Unauthorized":{"description":"Invalid or missing API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The API key lacks the scope required for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"BadRequest":{"description":"Malformed request or failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Resource not found (or not visible to this tenant).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/health":{"get":{"tags":["System"],"summary":"Health check","description":"Returns service status and Supabase connectivity. Public — no API key required.","security":[],"responses":{"200":{"description":"Service healthy.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok","degraded"]},"version":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"service":{"type":"string"},"checks":{"type":"object","additionalProperties":true}}}}}},"503":{"description":"Service degraded (a dependency check failed)."}}}},"/events":{"post":{"tags":["Events"],"summary":"Ingest player event(s)","description":"Ingest a single event or a batch (up to 100). Players are upserted by `player_id` (operator external id). Requires the `events:write` scope. Brand-scoped: a brand-pinned API key attributes every event to its brand and IGNORES `x-brand`/`?brand=`; a legacy tenant-wide key uses the brand hint (or the tenant's default brand). Send `event_id` for idempotent retries — re-sends with the same key are de-duplicated. The raw payload is always retained; a configured per-brand mapping may translate the event type and derive canonical fields.","parameters":[{"$ref":"#/components/parameters/BrandHeader"},{"$ref":"#/components/parameters/BrandQuery"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["player_id","event_type"],"properties":{"player_id":{"type":"string","description":"Operator's player id"},"event_type":{"type":"string"},"event_id":{"type":"string","maxLength":128,"description":"Idempotency key — re-sends with the same value are de-duplicated."},"payload":{"type":"object","additionalProperties":true},"timestamp":{"type":"string","format":"date-time"},"session_id":{"type":"string"}}},{"type":"object","required":["events"],"properties":{"events":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","required":["player_id","event_type"],"properties":{"player_id":{"type":"string"},"event_type":{"type":"string"},"event_id":{"type":"string","maxLength":128},"payload":{"type":"object","additionalProperties":true},"timestamp":{"type":"string","format":"date-time"},"session_id":{"type":"string"}}}}}}]}}}},"responses":{"200":{"description":"Events accepted and queued.","content":{"application/json":{"schema":{"type":"object","properties":{"received":{"type":"integer","description":"Events in the request."},"stored":{"type":"integer","description":"Newly stored (excludes idempotent duplicates)."},"deduped":{"type":"integer","description":"Duplicates skipped via event_id."},"rejected":{"type":"integer","description":"Refused by the mapping's reject policy (if any)."},"ignored":{"type":"integer","description":"Dropped by the mapping's ignore policy (if any)."},"unknown_event_types":{"type":"array","items":{"type":"string"},"description":"Stored types that are neither canonical nor mapped (if any)."},"rejected_event_types":{"type":"array","items":{"type":"string"},"description":"Distinct types that were rejected (if any)."},"status":{"type":"string","example":"queued"},"timestamp":{"type":"string","format":"date-time"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}}}},"/players":{"get":{"tags":["Players"],"summary":"List players","parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"maximum":100}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Matches email or external_id."},{"name":"status","in":"query","schema":{"type":"string","enum":["active","suspended","self_excluded","closed"]}},{"$ref":"#/components/parameters/BrandHeader"},{"$ref":"#/components/parameters/BrandQuery"}],"responses":{"200":{"description":"Paginated list of players.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Player"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"tags":["Players"],"summary":"Create or upsert a player","description":"Idempotent on (brand, external_id). Also syncs language/currency on the player profile.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["external_id"],"properties":{"external_id":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"status":{"type":"string","enum":["active","suspended","self_excluded","closed"]},"metadata":{"type":"object","additionalProperties":true},"language":{"type":"string","enum":["en","it","es"],"default":"en"},"currency":{"type":"string","description":"3-letter ISO code","default":"EUR"},"brand":{"type":"string","description":"Brand id or slug"}}}}}},"responses":{"201":{"description":"Player created or updated.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Player"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/players/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"PlaylogiQ player UUID (not external_id)."}],"get":{"tags":["Players"],"summary":"Get a player","description":"Returns the player plus its joined player_profiles record.","responses":{"200":{"description":"Player found.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Player"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"tags":["Players"],"summary":"Update a player","description":"Metadata is shallow-merged into the existing JSONB.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["active","suspended","self_excluded","closed"]},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"metadata":{"type":"object","additionalProperties":true}}}}}},"responses":{"200":{"description":"Player updated.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Player"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/segments":{"get":{"tags":["Segments"],"summary":"List segments","parameters":[{"name":"type","in":"query","schema":{"type":"string"}},{"$ref":"#/components/parameters/BrandHeader"},{"$ref":"#/components/parameters/BrandQuery"}],"responses":{"200":{"description":"List of segments.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Segment"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"tags":["Segments"],"summary":"Create a segment","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","type"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"rules":{"type":"object","additionalProperties":true},"brand":{"type":"string","description":"Brand id or slug"}}}}}},"responses":{"201":{"description":"Segment created.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Segment"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/campaigns":{"get":{"tags":["Campaigns"],"summary":"List campaigns","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["draft","scheduled","running","paused","completed","cancelled"]}},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"maximum":100}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}},{"$ref":"#/components/parameters/BrandHeader"},{"$ref":"#/components/parameters/BrandQuery"}],"responses":{"200":{"description":"List of campaigns.","content":{"application/json":{"schema":{"type":"object","properties":{"campaigns":{"type":"array","items":{"$ref":"#/components/schemas/Campaign"}},"total":{"type":"integer"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"tags":["Campaigns"],"summary":"Create a campaign","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","type","channels"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["one_shot","recurring","triggered","journey"]},"channels":{"type":"array","minItems":1,"items":{"type":"string","enum":["email","telegram","push","in_app"]}},"target_segment_id":{"type":"string","format":"uuid"},"brand":{"type":"string","description":"Brand id or slug"}}}}}},"responses":{"201":{"description":"Campaign created.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Campaign"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/campaigns/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Campaigns"],"summary":"Get a campaign","responses":{"200":{"description":"Campaign found.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Campaign"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"tags":["Campaigns"],"summary":"Update a campaign / transition status","description":"Status transitions are validated: draft→scheduled|running, scheduled→running|cancelled, running→paused|cancelled, paused→running|cancelled; completed and cancelled are terminal.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["draft","scheduled","running","paused","completed","cancelled"]},"channels":{"type":"array","minItems":1,"items":{"type":"string","enum":["email","telegram","push","in_app"]}},"target_segment_id":{"type":["string","null"],"format":"uuid"},"config":{"type":"object","additionalProperties":true},"schedule":{"type":"object","additionalProperties":true}}}}}},"responses":{"200":{"description":"Campaign updated.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Campaign"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"delete":{"tags":["Campaigns"],"summary":"Cancel a campaign","description":"Soft-cancel — sets status to `cancelled`.","responses":{"200":{"description":"Campaign cancelled.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Campaign"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/notifications/templates":{"get":{"tags":["Notifications"],"summary":"List notification templates","parameters":[{"name":"channel","in":"query","schema":{"type":"string","enum":["email","telegram","push","in_app"]}},{"name":"active","in":"query","schema":{"type":"boolean","default":true},"description":"Set to false to list inactive templates."},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"maximum":100}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}},{"$ref":"#/components/parameters/BrandHeader"},{"$ref":"#/components/parameters/BrandQuery"}],"responses":{"200":{"description":"List of templates.","content":{"application/json":{"schema":{"type":"object","properties":{"templates":{"type":"array","items":{"$ref":"#/components/schemas/NotificationTemplate"}},"total":{"type":"integer"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"tags":["Notifications"],"summary":"Create a notification template","description":"Variables are auto-extracted from `{{handlebars}}` placeholders in body + subject.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","channel","body"],"properties":{"name":{"type":"string"},"channel":{"type":"string","enum":["email","telegram","push","in_app"]},"locale":{"type":"string","enum":["en","it","es"],"default":"en"},"subject":{"type":"string"},"body":{"type":"string"},"variables":{"type":"array","items":{"type":"string"}},"brand":{"type":"string","description":"Brand id or slug"}}}}}},"responses":{"201":{"description":"Template created.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/NotificationTemplate"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/notifications/templates/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Notifications"],"summary":"Get a template","responses":{"200":{"description":"Template found.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/NotificationTemplate"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"tags":["Notifications"],"summary":"Update a template","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"channel":{"type":"string","enum":["email","telegram","push","in_app"]},"locale":{"type":"string","enum":["en","it","es"]},"subject":{"type":["string","null"]},"body":{"type":"string"},"variables":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Template updated.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/NotificationTemplate"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"delete":{"tags":["Notifications"],"summary":"Deactivate a template","description":"Soft-delete — sets `active` to false.","responses":{"200":{"description":"Template deactivated.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/NotificationTemplate"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/notifications/send":{"post":{"tags":["Notifications"],"summary":"Queue a notification","description":"Enqueues a single notification to a player in `notification_queue` (status `queued`). Delivery is handled asynchronously. Returns 202.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["player_id","channel"],"properties":{"player_id":{"type":"string","format":"uuid"},"channel":{"type":"string","enum":["email","telegram","push","in_app"]},"template_id":{"type":"string","format":"uuid"},"payload":{"type":"object","additionalProperties":true}}}}}},"responses":{"202":{"description":"Notification queued.","content":{"application/json":{"schema":{"type":"object","properties":{"queued":{"type":"boolean"},"notification_id":{"type":"string","format":"uuid"},"data":{"$ref":"#/components/schemas/QueuedNotification"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/gamification/levels":{"get":{"tags":["Gamification"],"summary":"List levels","parameters":[{"$ref":"#/components/parameters/BrandHeader"},{"$ref":"#/components/parameters/BrandQuery"}],"responses":{"200":{"description":"List of levels (ordered by tier).","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Level"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"tags":["Gamification"],"summary":"Create a level","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","tier","min_points"],"properties":{"name":{"type":"string"},"tier":{"type":"integer","minimum":1},"min_points":{"type":"integer","minimum":0},"max_points":{"type":["integer","null"],"minimum":0},"benefits":{"type":"object","additionalProperties":true},"brand":{"type":"string","description":"Brand id or slug"}}}}}},"responses":{"201":{"description":"Level created.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Level"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/gamification/levels/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Gamification"],"summary":"Get a level","responses":{"200":{"description":"Level found.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Level"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"tags":["Gamification"],"summary":"Update a level","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"tier":{"type":"integer","minimum":1},"min_points":{"type":"integer","minimum":0},"max_points":{"type":["integer","null"],"minimum":0},"benefits":{"type":"object","additionalProperties":true}}}}}},"responses":{"200":{"description":"Level updated.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Level"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"delete":{"tags":["Gamification"],"summary":"Delete a level","responses":{"200":{"description":"Level deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/gamification/missions":{"get":{"tags":["Gamification"],"summary":"List missions","parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"maximum":100}},{"name":"status","in":"query","schema":{"type":"string","enum":["active","completed","expired","cancelled"]}},{"name":"type","in":"query","schema":{"type":"string","enum":["daily","weekly","one_time","progressive","collaborative"]}},{"$ref":"#/components/parameters/BrandHeader"},{"$ref":"#/components/parameters/BrandQuery"}],"responses":{"200":{"description":"Paginated list of missions.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Mission"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"tags":["Gamification"],"summary":"Create a mission","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","type"],"properties":{"name":{"type":"string"},"description":{"type":["string","null"]},"type":{"type":"string","enum":["daily","weekly","one_time","progressive","collaborative"]},"status":{"type":"string","enum":["active","completed","expired","cancelled"],"default":"active"},"rules":{"type":"object","additionalProperties":true},"rewards":{"type":"object","additionalProperties":true},"max_completions_per_player":{"type":["integer","null"],"minimum":1},"starts_at":{"type":["string","null"],"format":"date-time"},"ends_at":{"type":["string","null"],"format":"date-time"},"brand":{"type":"string","description":"Brand id or slug"}}}}}},"responses":{"201":{"description":"Mission created.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Mission"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/gamification/missions/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Gamification"],"summary":"Get a mission","responses":{"200":{"description":"Mission found.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Mission"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"tags":["Gamification"],"summary":"Update a mission","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":["string","null"]},"type":{"type":"string","enum":["daily","weekly","one_time","progressive","collaborative"]},"status":{"type":"string","enum":["active","completed","expired","cancelled"]},"rules":{"type":"object","additionalProperties":true},"rewards":{"type":"object","additionalProperties":true},"max_completions_per_player":{"type":["integer","null"],"minimum":1},"starts_at":{"type":["string","null"]},"ends_at":{"type":["string","null"]}}}}}},"responses":{"200":{"description":"Mission updated.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Mission"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"delete":{"tags":["Gamification"],"summary":"Delete a mission","responses":{"200":{"description":"Mission deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/gamification/badges":{"get":{"tags":["Gamification"],"summary":"List badges","parameters":[{"$ref":"#/components/parameters/BrandHeader"},{"$ref":"#/components/parameters/BrandQuery"}],"responses":{"200":{"description":"List of badges.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Badge"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"tags":["Gamification"],"summary":"Create a badge","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"description":{"type":["string","null"]},"icon_url":{"type":["string","null"],"format":"uri"},"criteria":{"type":"object","additionalProperties":true},"rarity":{"type":"string","enum":["common","rare","epic","legendary"],"default":"common"},"brand":{"type":"string","description":"Brand id or slug"}}}}}},"responses":{"201":{"description":"Badge created.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Badge"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/gamification/badges/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Gamification"],"summary":"Get a badge","responses":{"200":{"description":"Badge found.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Badge"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"tags":["Gamification"],"summary":"Update a badge","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":["string","null"]},"icon_url":{"type":["string","null"],"format":"uri"},"criteria":{"type":"object","additionalProperties":true},"rarity":{"type":"string","enum":["common","rare","epic","legendary"]}}}}}},"responses":{"200":{"description":"Badge updated.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Badge"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"delete":{"tags":["Gamification"],"summary":"Delete a badge","responses":{"200":{"description":"Badge deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/gamification/currencies":{"get":{"tags":["Gamification"],"summary":"List point currencies","parameters":[{"$ref":"#/components/parameters/BrandHeader"},{"$ref":"#/components/parameters/BrandQuery"}],"responses":{"200":{"description":"List of point currencies.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PointCurrency"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"tags":["Gamification"],"summary":"Create a point currency","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","symbol","type"],"properties":{"name":{"type":"string"},"symbol":{"type":"string"},"type":{"type":"string","enum":["real","virtual","bonus"]},"brand":{"type":"string","description":"Brand id or slug"}}}}}},"responses":{"201":{"description":"Currency created.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PointCurrency"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/gamification/currencies/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Gamification"],"summary":"Get a point currency","responses":{"200":{"description":"Currency found.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PointCurrency"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"tags":["Gamification"],"summary":"Update a point currency","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"symbol":{"type":"string"},"type":{"type":"string","enum":["real","virtual","bonus"]}}}}}},"responses":{"200":{"description":"Currency updated.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PointCurrency"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"delete":{"tags":["Gamification"],"summary":"Delete a point currency","responses":{"200":{"description":"Currency deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/gamification/player/{playerId}":{"parameters":[{"name":"playerId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Gamification"],"summary":"Get a player's gamification profile","description":"Returns current level, point balances, active missions, and earned badges.","responses":{"200":{"description":"Gamification profile.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PlayerGamificationProfile"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/bonuses":{"get":{"tags":["Bonuses"],"summary":"List bonuses","parameters":[{"$ref":"#/components/parameters/BrandHeader"},{"$ref":"#/components/parameters/BrandQuery"}],"responses":{"200":{"description":"List of bonuses.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Bonus"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"tags":["Bonuses"],"summary":"Create a bonus","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","type","value","value_type"],"properties":{"name":{"type":"string"},"type":{"type":"string","enum":["welcome","reload","cashback","free_spins","no_deposit","custom"]},"value":{"type":"number"},"value_type":{"type":"string"},"wagering_requirement":{"type":"number","default":0},"config":{"type":"object","additionalProperties":true},"expires_in_hours":{"type":["integer","null"]},"active":{"type":"boolean","default":true},"brand":{"type":"string","description":"Brand id or slug"}}}}}},"responses":{"201":{"description":"Bonus created.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Bonus"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/bonuses/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Bonuses"],"summary":"Get a bonus","responses":{"200":{"description":"Bonus found.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Bonus"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"tags":["Bonuses"],"summary":"Update a bonus","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["welcome","reload","cashback","free_spins","no_deposit","custom"]},"value":{"type":"number"},"value_type":{"type":"string"},"wagering_requirement":{"type":"number"},"config":{"type":"object","additionalProperties":true},"expires_in_hours":{"type":["integer","null"]},"active":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Bonus updated.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Bonus"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"delete":{"tags":["Bonuses"],"summary":"Delete a bonus","responses":{"200":{"description":"Bonus deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/tournaments":{"get":{"tags":["Tournaments"],"summary":"List tournaments","parameters":[{"$ref":"#/components/parameters/BrandHeader"},{"$ref":"#/components/parameters/BrandQuery"}],"responses":{"200":{"description":"List of tournaments.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Tournament"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"tags":["Tournaments"],"summary":"Create a tournament","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["draft","active","ended","cancelled"],"default":"draft"},"game_config":{"type":"object","additionalProperties":true},"prize_pool":{"type":"object","additionalProperties":true},"max_participants":{"type":["integer","null"]},"starts_at":{"type":["string","null"],"format":"date-time"},"ends_at":{"type":["string","null"],"format":"date-time"},"brand":{"type":"string","description":"Brand id or slug"}}}}}},"responses":{"201":{"description":"Tournament created.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Tournament"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/tournaments/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Tournaments"],"summary":"Get a tournament","responses":{"200":{"description":"Tournament found.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Tournament"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"tags":["Tournaments"],"summary":"Update a tournament","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["draft","active","ended","cancelled"]},"game_config":{"type":"object","additionalProperties":true},"prize_pool":{"type":"object","additionalProperties":true},"max_participants":{"type":["integer","null"]},"starts_at":{"type":["string","null"],"format":"date-time"},"ends_at":{"type":["string","null"],"format":"date-time"}}}}}},"responses":{"200":{"description":"Tournament updated.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Tournament"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"delete":{"tags":["Tournaments"],"summary":"Delete a tournament","responses":{"200":{"description":"Tournament deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/players/{id}/next-best-action":{"get":{"tags":["Players"],"summary":"Recommended next action for a player","description":"Derived from the player's churn/value/engagement scores + lifecycle stage. Returns action, priority, reason and a channel hint.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Next-best-action recommendation.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"player_id":{"type":"string"},"action":{"type":"string"},"priority":{"type":"string","enum":["high","medium","low"]},"reason":{"type":"string"},"channelHint":{"type":"string","enum":["personal","email","push","any"]}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/analytics/summary":{"get":{"tags":["Analytics"],"summary":"Headline KPIs","description":"Players, active, revenue (GGR/NGR), deposits, avg LTV and lifecycle stage counts. Optional `x-brand` header / `?brand=` to scope to one brand.","responses":{"200":{"description":"KPI summary + lifecycle counts.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","additionalProperties":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/analytics/timeseries":{"get":{"tags":["Analytics"],"summary":"Daily players + event volume","parameters":[{"name":"from","in":"query","schema":{"type":"string","format":"date-time"},"description":"Start of range (ISO). Default 30 days ago."},{"name":"tz","in":"query","schema":{"type":"string"},"description":"IANA timezone for day bucketing. Default UTC."}],"responses":{"200":{"description":"Daily series.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/analytics/revenue":{"get":{"tags":["Analytics"],"summary":"Revenue breakdowns","parameters":[{"name":"dimension","in":"query","required":true,"schema":{"type":"string","enum":["country","device","os","browser","platform","game","provider","category","heatmap","bonus_roi"]}},{"name":"from","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"tz","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Breakdown rows.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/analytics/cohorts":{"get":{"tags":["Analytics"],"summary":"Cohort retention + quality","parameters":[{"name":"months","in":"query","schema":{"type":"integer","minimum":1,"maximum":36,"default":12}}],"responses":{"200":{"description":"Retention + profile per cohort.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","additionalProperties":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/reports/run":{"get":{"tags":["Analytics"],"summary":"Ad-hoc report (metric × dimension)","parameters":[{"name":"metric","in":"query","required":true,"schema":{"type":"string","enum":["players","events","deposits","wagered"]}},{"name":"dimension","in":"query","required":true,"schema":{"type":"string","enum":["day","week","status","country","game","event_type"]}},{"name":"from","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Bucketed report rows.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/export/{dataset}":{"get":{"tags":["Analytics"],"summary":"Bulk export for BI / warehouse sync","description":"Cursor-paginated keyset export of a dataset. Pass the returned `next_cursor` to continue; append-only streams make this an incremental sync.","parameters":[{"name":"dataset","in":"path","required":true,"schema":{"type":"string","enum":["players","events","transactions"]}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Opaque cursor from a previous response. Omit to start from the beginning."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":1000,"default":200}}],"responses":{"200":{"description":"A page of rows plus the next cursor (null when exhausted).","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":true}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/segments/{id}/export":{"get":{"tags":["Segments"],"summary":"Export a segment's membership as an audience","description":"Cursor-paginated keyset export of the segment's current members, with the player columns a downstream audience needs (external_id, email, phone, name, consent, country). Pass `next_cursor` to continue; `format=csv` returns CSV with the cursor in the `x-next-cursor` header.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Opaque cursor from a previous response. Omit to start from the beginning."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":1000,"default":200}},{"name":"format","in":"query","schema":{"type":"string","enum":["json","csv"],"default":"json"}}],"responses":{"200":{"description":"A page of audience rows plus the next cursor (null when exhausted).","content":{"application/json":{"schema":{"type":"object","properties":{"segment":{"type":"object","additionalProperties":true},"data":{"type":"array","items":{"type":"object","additionalProperties":true}},"next_cursor":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}