{"components":{"schemas":{"ApproveLinkIntent":{"additionalProperties":false,"properties":{"linkToken":{"maxLength":200,"minLength":32,"type":"string"}},"required":["linkToken"],"type":"object"},"CreateLinkIntent":{"additionalProperties":false,"properties":{"externalPlayerId":{"maxLength":200,"minLength":1,"pattern":"^[^\\u0000-\\u001f\\u007f]*$","type":"string"}},"required":["externalPlayerId"],"type":"object"},"DeveloperAccess":{"additionalProperties":false,"properties":{"authorized":{"const":true,"type":"boolean"},"email":{"format":"email","type":"string"},"mode":{"const":"sandbox","type":"string"}},"required":["authorized","email","mode"],"type":"object"},"DeveloperAction":{"discriminator":{"mapping":{"addMember":"#/components/schemas/addMemberAction","allocateGame":"#/components/schemas/allocateGameAction","allocateProject":"#/components/schemas/allocateProjectAction","createGame":"#/components/schemas/createGameAction","createOrganization":"#/components/schemas/createOrganizationAction","createProject":"#/components/schemas/createProjectAction","createRule":"#/components/schemas/createRuleAction","fundOrganization":"#/components/schemas/fundOrganizationAction","issueKey":"#/components/schemas/issueKeyAction","removeMember":"#/components/schemas/removeMemberAction","revokeKey":"#/components/schemas/revokeKeyAction","updateGame":"#/components/schemas/updateGameAction","updateMember":"#/components/schemas/updateMemberAction","updateProject":"#/components/schemas/updateProjectAction","updateRule":"#/components/schemas/updateRuleAction"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/addMemberAction"},{"$ref":"#/components/schemas/allocateGameAction"},{"$ref":"#/components/schemas/allocateProjectAction"},{"$ref":"#/components/schemas/createGameAction"},{"$ref":"#/components/schemas/createOrganizationAction"},{"$ref":"#/components/schemas/createProjectAction"},{"$ref":"#/components/schemas/createRuleAction"},{"$ref":"#/components/schemas/fundOrganizationAction"},{"$ref":"#/components/schemas/issueKeyAction"},{"$ref":"#/components/schemas/removeMemberAction"},{"$ref":"#/components/schemas/revokeKeyAction"},{"$ref":"#/components/schemas/updateGameAction"},{"$ref":"#/components/schemas/updateMemberAction"},{"$ref":"#/components/schemas/updateProjectAction"},{"$ref":"#/components/schemas/updateRuleAction"}]},"DeveloperActionResult":{"additionalProperties":false,"properties":{"id":{"format":"uuid","type":"string"},"issuedKey":{"anyOf":[{"type":"string"}],"description":"Present on issueKey only. Store a returned secret securely on your server; this is its only disclosure."},"kind":{"enum":["public","secret"],"type":"string"},"mode":{"const":"sandbox","type":"string"}},"required":["id","mode"],"type":"object"},"DeveloperError":{"additionalProperties":false,"properties":{"error":{"additionalProperties":false,"properties":{"code":{"enum":["AUTH_UNAVAILABLE","DEVELOPER_ACCESS_UNAVAILABLE","DEVELOPER_INVITATION_REQUIRED","EMAIL_VERIFICATION_REQUIRED","INVALID_CONTENT_TYPE","INVALID_CURSOR","INVALID_PLAYER","INVALID_PUBLIC_KEY","INVALID_RECORD_QUERY","INVALID_REQUEST","INVALID_SESSION_ORIGIN","PAYLOAD_TOO_LARGE","PLATFORM_DISABLED","PLATFORM_UNAVAILABLE","UNAUTHORIZED","already_linked","conflict","event_conflict","forbidden","game_limit","game_paused","insufficient_funds","invalid_action","invalid_event","invalid_key","invalid_link","invalid_metadata","invalid_player","limit_exceeded","link_disabled","not_found","owner_immutable","project_limit","retry_later","secret_key_required","unauthorized","unlimited_funding","user_unavailable"],"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"},"DeveloperEvent":{"additionalProperties":false,"properties":{"createdAt":{"format":"date-time","type":"string"},"eventId":{"format":"uuid","type":"string"},"eventType":{"maxLength":64,"pattern":"^[a-z][a-z0-9_.-]{0,63}$","type":"string"},"gameId":{"format":"uuid","type":"string"},"id":{"format":"uuid","type":"string"},"occurredAt":{"format":"date-time","type":"string"},"organizationId":{"format":"uuid","type":"string"},"playerId":{"format":"uuid","type":"string"},"reason":{"anyOf":[{"enum":["daily_player_cap","game_budget_exhausted","game_paused","game_payout_ceiling","player_not_linked","project_budget_exhausted","project_payout_ceiling","rate_limited","timestamp_out_of_window","unknown_or_inactive_rule","user_unavailable"],"type":"string"},{"type":"null"}]},"rewardGgbucks":{"description":"Integer sandbox TEST ggbucks. 1,000 units represent one test dollar.","maximum":1000000000000,"minimum":0,"type":"integer"},"status":{"enum":["accepted","rejected"],"type":"string"}},"required":["id","eventId","gameId","organizationId","playerId","eventType","occurredAt","status","reason","rewardGgbucks","createdAt"],"type":"object"},"DeveloperGame":{"additionalProperties":false,"properties":{"budgetGgbucks":{"description":"Integer sandbox TEST ggbucks. 1,000 units represent one test dollar.","maximum":1000000000000,"minimum":0,"type":"integer"},"createdAt":{"format":"date-time","type":"string"},"dailyPlayerCapGgbucks":{"description":"Integer sandbox TEST ggbucks. 1,000 units represent one test dollar.","maximum":1000000000000,"minimum":0,"type":"integer"},"id":{"format":"uuid","type":"string"},"maxPayoutGgbucks":{"description":"Integer sandbox TEST ggbucks. 1,000 units represent one test dollar.","maximum":1000000000000,"minimum":0,"type":"integer"},"name":{"type":"string"},"organizationId":{"format":"uuid","type":"string"},"platform":{"enum":["android","ios","other","unity","unreal","web"],"type":"string"},"projectId":{"format":"uuid","type":"string"},"spentGgbucks":{"description":"Integer sandbox TEST ggbucks. 1,000 units represent one test dollar.","maximum":1000000000000,"minimum":0,"type":"integer"},"status":{"enum":["active","paused"],"type":"string"}},"required":["id","projectId","organizationId","name","platform","status","maxPayoutGgbucks","budgetGgbucks","spentGgbucks","dailyPlayerCapGgbucks","createdAt"],"type":"object"},"DeveloperKey":{"additionalProperties":false,"properties":{"createdAt":{"format":"date-time","type":"string"},"gameId":{"format":"uuid","type":"string"},"id":{"format":"uuid","type":"string"},"kind":{"enum":["public","secret"],"type":"string"},"name":{"type":"string"},"organizationId":{"format":"uuid","type":"string"},"prefix":{"type":"string"},"publicKey":{"anyOf":[{"type":"null"},{"type":"string"}]},"revokedAt":{"anyOf":[{"type":"null"},{"format":"date-time","type":"string"}]}},"required":["id","gameId","organizationId","kind","name","prefix","publicKey","createdAt","revokedAt"],"type":"object"},"DeveloperMember":{"additionalProperties":false,"properties":{"clerkUserId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"organizationId":{"format":"uuid","type":"string"},"role":{"enum":["admin","owner","viewer"],"type":"string"}},"required":["id","organizationId","clerkUserId","role","createdAt"],"type":"object"},"DeveloperOrganization":{"additionalProperties":false,"properties":{"balanceGgbucks":{"description":"Integer sandbox TEST ggbucks. 1,000 units represent one test dollar.","maximum":1000000000000,"minimum":0,"type":"integer"},"createdAt":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"role":{"enum":["admin","owner","viewer"],"type":"string"},"unlimitedFunding":{"type":"boolean"}},"required":["id","name","unlimitedFunding","balanceGgbucks","role","createdAt"],"type":"object"},"DeveloperPlayer":{"additionalProperties":false,"properties":{"createdAt":{"format":"date-time","type":"string"},"externalPlayerId":{"maxLength":200,"minLength":1,"pattern":"^[^\\u0000-\\u001f\\u007f]*$","type":"string"},"gameId":{"format":"uuid","type":"string"},"ggbucksUserId":{"anyOf":[{"type":"null"},{"format":"uuid","type":"string"}]},"id":{"format":"uuid","type":"string"},"linkedAt":{"anyOf":[{"type":"null"},{"format":"date-time","type":"string"}]},"organizationId":{"format":"uuid","type":"string"},"username":{"anyOf":[{"type":"null"},{"type":"string"}]}},"required":["id","gameId","organizationId","externalPlayerId","ggbucksUserId","username","linkedAt","createdAt"],"type":"object"},"DeveloperProject":{"additionalProperties":false,"properties":{"budgetGgbucks":{"description":"Integer sandbox TEST ggbucks. 1,000 units represent one test dollar.","maximum":1000000000000,"minimum":0,"type":"integer"},"createdAt":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"maxPayoutGgbucks":{"description":"Integer sandbox TEST ggbucks. 1,000 units represent one test dollar.","maximum":1000000000000,"minimum":0,"type":"integer"},"name":{"type":"string"},"organizationId":{"format":"uuid","type":"string"},"spentGgbucks":{"description":"Integer sandbox TEST ggbucks. 1,000 units represent one test dollar.","maximum":1000000000000,"minimum":0,"type":"integer"}},"required":["id","organizationId","name","maxPayoutGgbucks","budgetGgbucks","spentGgbucks","createdAt"],"type":"object"},"DeveloperRecordPage":{"additionalProperties":false,"properties":{"kind":{"enum":["events","players"],"type":"string"},"nextCursor":{"anyOf":[{"type":"null"},{"type":"string"}]},"records":{"items":{"anyOf":[{"$ref":"#/components/schemas/DeveloperPlayer"},{"$ref":"#/components/schemas/DeveloperEvent"}]},"type":"array"}},"required":["kind","records","nextCursor"],"type":"object"},"DeveloperRule":{"additionalProperties":false,"properties":{"active":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"eventType":{"maxLength":64,"pattern":"^[a-z][a-z0-9_.-]{0,63}$","type":"string"},"gameId":{"format":"uuid","type":"string"},"id":{"format":"uuid","type":"string"},"organizationId":{"format":"uuid","type":"string"},"rewardGgbucks":{"description":"Integer sandbox TEST ggbucks. 1,000 units represent one test dollar.","exclusiveMinimum":0,"maximum":1000000000000,"minimum":0,"type":"integer"}},"required":["id","gameId","organizationId","eventType","rewardGgbucks","active","createdAt"],"type":"object"},"DeveloperSnapshot":{"additionalProperties":false,"properties":{"canCreateUnlimitedOrganization":{"type":"boolean"},"events":{"items":{"$ref":"#/components/schemas/DeveloperEvent"},"type":"array"},"games":{"items":{"$ref":"#/components/schemas/DeveloperGame"},"type":"array"},"keys":{"items":{"$ref":"#/components/schemas/DeveloperKey"},"type":"array"},"limits":{"additionalProperties":false,"properties":{"events":{"type":"number"},"players":{"type":"number"}},"required":["players","events"],"type":"object"},"members":{"items":{"$ref":"#/components/schemas/DeveloperMember"},"type":"array"},"mode":{"const":"sandbox","type":"string"},"organizations":{"items":{"$ref":"#/components/schemas/DeveloperOrganization"},"type":"array"},"players":{"items":{"$ref":"#/components/schemas/DeveloperPlayer"},"type":"array"},"projects":{"items":{"$ref":"#/components/schemas/DeveloperProject"},"type":"array"},"rules":{"items":{"$ref":"#/components/schemas/DeveloperRule"},"type":"array"},"unitsPerDollar":{"const":1000,"type":"number"}},"required":["mode","unitsPerDollar","canCreateUnlimitedOrganization","organizations","projects","games","keys","players","events","rules","members","limits"],"type":"object"},"GameEventInput":{"additionalProperties":false,"properties":{"eventId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"eventType":{"maxLength":64,"pattern":"^[a-z][a-z0-9_.-]{0,63}$","type":"string"},"metadata":{"additionalProperties":{"$ref":"#/components/schemas/MetadataValue1"},"description":"JSON object only; canonical UTF-8 encoding is limited to 4,096 bytes, nesting depth 6, 100 items per array and 100 entries per object. Finite JSON values and valid Unicode without NUL are required. Metadata is included in immutable replay hashing.","maxProperties":100,"propertyNames":{"description":"Valid Unicode without NUL or unpaired UTF-16 surrogates.","pattern":"^[^\\u0000]*$","type":"string"},"type":"object","x-ggbucks":{"maxArrayItems":100,"maxDepth":6,"maxObjectEntries":100,"maxUtf8Bytes":4096}},"occurredAt":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","type":"string"},"playerId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},"required":["eventId","playerId","eventType","occurredAt"],"type":"object"},"GameEventResult":{"additionalProperties":false,"properties":{"createdAt":{"format":"date-time","type":"string"},"eventId":{"format":"uuid","type":"string"},"eventType":{"maxLength":64,"pattern":"^[a-z][a-z0-9_.-]{0,63}$","type":"string"},"gameId":{"format":"uuid","type":"string"},"id":{"format":"uuid","type":"string"},"mode":{"const":"sandbox","type":"string"},"occurredAt":{"format":"date-time","type":"string"},"organizationId":{"format":"uuid","type":"string"},"playerId":{"format":"uuid","type":"string"},"reason":{"anyOf":[{"enum":["daily_player_cap","game_budget_exhausted","game_paused","game_payout_ceiling","player_not_linked","project_budget_exhausted","project_payout_ceiling","rate_limited","timestamp_out_of_window","unknown_or_inactive_rule","user_unavailable"],"type":"string"},{"type":"null"}]},"replayed":{"type":"boolean"},"rewardGgbucks":{"description":"Integer sandbox TEST ggbucks. 1,000 units represent one test dollar.","maximum":1000000000000,"minimum":0,"type":"integer"},"status":{"enum":["accepted","rejected"],"type":"string"}},"required":["id","eventId","gameId","organizationId","playerId","eventType","occurredAt","status","reason","rewardGgbucks","createdAt","replayed","mode"],"type":"object"},"GamePlayer":{"additionalProperties":false,"properties":{"externalPlayerId":{"maxLength":200,"minLength":1,"pattern":"^[^\\u0000-\\u001f\\u007f]*$","type":"string"},"linked":{"type":"boolean"},"linkedAt":{"anyOf":[{"type":"null"},{"format":"date-time","type":"string"}]},"mode":{"const":"sandbox","type":"string"},"playerId":{"format":"uuid","type":"string"}},"required":["playerId","externalPlayerId","linked","linkedAt","mode"],"type":"object"},"GamePublicConfig":{"additionalProperties":false,"properties":{"environment":{"const":"sandbox","type":"string"},"gameId":{"format":"uuid","type":"string"},"name":{"type":"string"},"platform":{"enum":["android","ios","other","unity","unreal","web"],"type":"string"},"productionRewardsEnabled":{"const":false,"type":"boolean"},"rules":{"items":{"additionalProperties":false,"properties":{"eventType":{"maxLength":64,"pattern":"^[a-z][a-z0-9_.-]{0,63}$","type":"string"},"rewardGgbucks":{"description":"Integer sandbox TEST ggbucks. 1,000 units represent one test dollar.","exclusiveMinimum":0,"maximum":1000000000000,"minimum":0,"type":"integer"}},"required":["eventType","rewardGgbucks"],"type":"object"},"type":"array"},"slug":{"format":"uuid","type":"string"},"status":{"enum":["active","paused"],"type":"string"},"thresholds":{"additionalProperties":false,"properties":{"dailyPlayerCapGgbucks":{"description":"Integer sandbox TEST ggbucks. 1,000 units represent one test dollar.","maximum":1000000000000,"minimum":0,"type":"integer"},"maxPayoutGgbucks":{"description":"Integer sandbox TEST ggbucks. 1,000 units represent one test dollar.","maximum":1000000000000,"minimum":0,"type":"integer"}},"required":["maxPayoutGgbucks","dailyPlayerCapGgbucks"],"type":"object"}},"required":["gameId","name","slug","environment","productionRewardsEnabled","platform","status","rules","thresholds"],"type":"object"},"InspectLinkIntent":{"additionalProperties":false,"properties":{"linkToken":{"maxLength":200,"minLength":32,"type":"string"}},"required":["linkToken"],"type":"object"},"LinkApproval":{"additionalProperties":false,"properties":{"gameId":{"format":"uuid","type":"string"},"linked":{"const":true,"type":"boolean"},"mode":{"const":"sandbox","type":"string"},"playerId":{"format":"uuid","type":"string"}},"required":["playerId","gameId","linked","mode"],"type":"object"},"LinkInspection":{"additionalProperties":false,"properties":{"expiresAt":{"format":"date-time","type":"string"},"externalPlayerId":{"maxLength":200,"minLength":1,"pattern":"^[^\\u0000-\\u001f\\u007f]*$","type":"string"},"gameName":{"type":"string"},"mode":{"const":"sandbox","type":"string"}},"required":["gameName","externalPlayerId","expiresAt","mode"],"type":"object"},"LinkIntentResult":{"additionalProperties":false,"properties":{"expiresAt":{"format":"date-time","type":"string"},"linkToken":{"description":"Illustrative repeated-A examples are inert. A real token is secret, one-time and expires after 10 minutes.","pattern":"^ggb_link_sandbox_[A-Za-z0-9_-]{43}$","type":"string"},"mode":{"const":"sandbox","type":"string"},"playerId":{"format":"uuid","type":"string"}},"required":["playerId","linkToken","expiresAt","mode"],"type":"object"},"MetadataValue0":{"anyOf":[{"description":"Valid Unicode without NUL or unpaired UTF-16 surrogates.","pattern":"^[^\\u0000]*$","type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"$ref":"#/components/schemas/MetadataValue1"},"maxItems":100,"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/MetadataValue1"},"maxProperties":100,"propertyNames":{"description":"Valid Unicode without NUL or unpaired UTF-16 surrogates.","pattern":"^[^\\u0000]*$","type":"string"},"type":"object"}]},"MetadataValue1":{"anyOf":[{"description":"Valid Unicode without NUL or unpaired UTF-16 surrogates.","pattern":"^[^\\u0000]*$","type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"$ref":"#/components/schemas/MetadataValue2"},"maxItems":100,"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/MetadataValue2"},"maxProperties":100,"propertyNames":{"description":"Valid Unicode without NUL or unpaired UTF-16 surrogates.","pattern":"^[^\\u0000]*$","type":"string"},"type":"object"}]},"MetadataValue2":{"anyOf":[{"description":"Valid Unicode without NUL or unpaired UTF-16 surrogates.","pattern":"^[^\\u0000]*$","type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"$ref":"#/components/schemas/MetadataValue3"},"maxItems":100,"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/MetadataValue3"},"maxProperties":100,"propertyNames":{"description":"Valid Unicode without NUL or unpaired UTF-16 surrogates.","pattern":"^[^\\u0000]*$","type":"string"},"type":"object"}]},"MetadataValue3":{"anyOf":[{"description":"Valid Unicode without NUL or unpaired UTF-16 surrogates.","pattern":"^[^\\u0000]*$","type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"$ref":"#/components/schemas/MetadataValue4"},"maxItems":100,"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/MetadataValue4"},"maxProperties":100,"propertyNames":{"description":"Valid Unicode without NUL or unpaired UTF-16 surrogates.","pattern":"^[^\\u0000]*$","type":"string"},"type":"object"}]},"MetadataValue4":{"anyOf":[{"description":"Valid Unicode without NUL or unpaired UTF-16 surrogates.","pattern":"^[^\\u0000]*$","type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"$ref":"#/components/schemas/MetadataValue5"},"maxItems":100,"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/MetadataValue5"},"maxProperties":100,"propertyNames":{"description":"Valid Unicode without NUL or unpaired UTF-16 surrogates.","pattern":"^[^\\u0000]*$","type":"string"},"type":"object"}]},"MetadataValue5":{"anyOf":[{"description":"Valid Unicode without NUL or unpaired UTF-16 surrogates.","pattern":"^[^\\u0000]*$","type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"$ref":"#/components/schemas/MetadataValue6"},"maxItems":100,"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/MetadataValue6"},"maxProperties":100,"propertyNames":{"description":"Valid Unicode without NUL or unpaired UTF-16 surrogates.","pattern":"^[^\\u0000]*$","type":"string"},"type":"object"}]},"MetadataValue6":{"anyOf":[{"description":"Valid Unicode without NUL or unpaired UTF-16 surrogates.","pattern":"^[^\\u0000]*$","type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":false,"maxItems":0,"type":"array"},{"additionalProperties":false,"maxProperties":0,"propertyNames":{"description":"Valid Unicode without NUL or unpaired UTF-16 surrogates.","pattern":"^[^\\u0000]*$","type":"string"},"type":"object"}]},"NativeAdmissionError":{"additionalProperties":true,"properties":{"error":{"additionalProperties":true,"properties":{"code":{"enum":["ACCOUNT_DISABLED","ACCOUNT_STATUS_UNAVAILABLE","CLIENT_UPDATE_REQUIRED","DEVICE_ACCOUNT_CONFLICT","DEVICE_AUTH_UNAVAILABLE","DEVICE_VERIFICATION_REQUIRED","GEO_BLOCKED","INVALID_TOKEN","INVALID_TOKEN_PAYLOAD","UNAUTHORIZED"],"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"},"addMemberAction":{"additionalProperties":false,"description":"Organization owner only. Add an admin or viewer by Clerk subject. Organization membership does not grant global dashboard access; the member must separately have an active invitation.","properties":{"clerkUserId":{"maxLength":200,"minLength":1,"type":"string"},"organizationId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"role":{"enum":["admin","viewer"],"type":"string"},"type":{"const":"addMember","type":"string"}},"required":["type","organizationId","clerkUserId","role"],"type":"object"},"allocateGameAction":{"additionalProperties":false,"description":"Owner or admin. Allocate unallocated project TEST funding to a game. Reject oversubscription and allocations above the game ceiling.","properties":{"amountGgbucks":{"exclusiveMinimum":0,"maximum":1000000000000,"minimum":0,"type":"integer"},"gameId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"type":{"const":"allocateGame","type":"string"}},"required":["type","gameId","amountGgbucks"],"type":"object"},"allocateProjectAction":{"additionalProperties":false,"description":"Owner or admin. Transfer available organization TEST funding into a project. Reject oversubscription and allocations above the project ceiling.","properties":{"amountGgbucks":{"exclusiveMinimum":0,"maximum":1000000000000,"minimum":0,"type":"integer"},"projectId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"type":{"const":"allocateProject","type":"string"}},"required":["type","projectId","amountGgbucks"],"type":"object"},"createGameAction":{"additionalProperties":false,"description":"Owner or admin. Create an active game with a platform, lifetime ceiling and UTC daily per-player cap.","properties":{"dailyPlayerCapGgbucks":{"maximum":1000000000000,"minimum":0,"type":"integer"},"maxPayoutGgbucks":{"maximum":1000000000000,"minimum":0,"type":"integer"},"name":{"maxLength":100,"minLength":1,"pattern":"^[^\\u0000-\\u001f\\u007f]*$","type":"string"},"platform":{"enum":["ios","android","web","unity","unreal","other"],"type":"string"},"projectId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"type":{"const":"createGame","type":"string"}},"required":["type","projectId","name","platform","maxPayoutGgbucks","dailyPlayerCapGgbucks"],"type":"object"},"createOrganizationAction":{"additionalProperties":false,"description":"Create an organization owned by the admitted developer. Unlimited TEST funding requires a separately authorized funding capability; project and game ceilings still apply.","properties":{"name":{"maxLength":100,"minLength":1,"pattern":"^[^\\u0000-\\u001f\\u007f]*$","type":"string"},"type":{"const":"createOrganization","type":"string"},"unlimitedFunding":{"default":false,"type":"boolean"}},"required":["type","name"],"type":"object"},"createProjectAction":{"additionalProperties":false,"description":"Owner or admin. Create a project with a hard lifetime maximum payout in integer TEST units.","properties":{"maxPayoutGgbucks":{"maximum":1000000000000,"minimum":0,"type":"integer"},"name":{"maxLength":100,"minLength":1,"pattern":"^[^\\u0000-\\u001f\\u007f]*$","type":"string"},"organizationId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"type":{"const":"createProject","type":"string"}},"required":["type","organizationId","name","maxPayoutGgbucks"],"type":"object"},"createRuleAction":{"additionalProperties":false,"description":"Owner or admin. Define a unique game event type with a fixed positive TEST reward. Event callers cannot choose a payout.","properties":{"eventType":{"maxLength":64,"pattern":"^[a-z][a-z0-9_.-]{0,63}$","type":"string"},"gameId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"rewardGgbucks":{"exclusiveMinimum":0,"maximum":1000000000000,"minimum":0,"type":"integer"},"type":{"const":"createRule","type":"string"}},"required":["type","gameId","eventType","rewardGgbucks"],"type":"object"},"fundOrganizationAction":{"additionalProperties":false,"description":"Owner or admin. Add sandbox TEST funding to a normal organization; no real payment or wallet credit occurs.","properties":{"amountGgbucks":{"exclusiveMinimum":0,"maximum":1000000000000,"minimum":0,"type":"integer"},"organizationId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"type":{"const":"fundOrganization","type":"string"}},"required":["type","organizationId","amountGgbucks"],"type":"object"},"issueKeyAction":{"additionalProperties":false,"description":"Owner or admin. Issue a public configuration identifier or server secret. issuedKey is returned only on issuance; secrets are stored as hashes and cannot be retrieved later.","properties":{"gameId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"kind":{"enum":["public","secret"],"type":"string"},"name":{"maxLength":100,"minLength":1,"pattern":"^[^\\u0000-\\u001f\\u007f]*$","type":"string"},"type":{"const":"issueKey","type":"string"}},"required":["type","gameId","kind","name"],"type":"object"},"removeMemberAction":{"additionalProperties":false,"description":"Organization owner only. Remove a non-owner member. The owner cannot be removed.","properties":{"memberId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"type":{"const":"removeMember","type":"string"}},"required":["type","memberId"],"type":"object"},"revokeKeyAction":{"additionalProperties":false,"description":"Owner or admin. Revoke a game key immediately. Events and linking recheck key state inside their transaction.","properties":{"keyId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"type":{"const":"revokeKey","type":"string"}},"required":["type","keyId"],"type":"object"},"updateGameAction":{"additionalProperties":false,"description":"Owner or admin. Pause or activate a game, update its name or caps. A ceiling cannot fall below its allocated budget or prior spending.","properties":{"dailyPlayerCapGgbucks":{"maximum":1000000000000,"minimum":0,"type":"integer"},"gameId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"maxPayoutGgbucks":{"maximum":1000000000000,"minimum":0,"type":"integer"},"name":{"maxLength":100,"minLength":1,"pattern":"^[^\\u0000-\\u001f\\u007f]*$","type":"string"},"status":{"enum":["active","paused"],"type":"string"},"type":{"const":"updateGame","type":"string"}},"required":["type","gameId"],"type":"object"},"updateMemberAction":{"additionalProperties":false,"description":"Organization owner only. Change an existing non-owner member to admin or viewer.","properties":{"memberId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"role":{"enum":["admin","viewer"],"type":"string"},"type":{"const":"updateMember","type":"string"}},"required":["type","memberId","role"],"type":"object"},"updateProjectAction":{"additionalProperties":false,"description":"Owner or admin. Update name or hard ceiling. The ceiling cannot fall below allocated budget or prior spending.","properties":{"maxPayoutGgbucks":{"maximum":1000000000000,"minimum":0,"type":"integer"},"name":{"maxLength":100,"minLength":1,"pattern":"^[^\\u0000-\\u001f\\u007f]*$","type":"string"},"projectId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"type":{"const":"updateProject","type":"string"}},"required":["type","projectId"],"type":"object"},"updateRuleAction":{"additionalProperties":false,"description":"Owner or admin. Change an existing rule reward or active state. Replayed events keep their original immutable decision.","properties":{"active":{"type":"boolean"},"rewardGgbucks":{"exclusiveMinimum":0,"maximum":1000000000000,"minimum":0,"type":"integer"},"ruleId":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"type":{"const":"updateRule","type":"string"}},"required":["type","ruleId"],"type":"object"}},"securitySchemes":{"DeveloperSessionBearer":{"bearerFormat":"Clerk session JWT","description":"An invited developer Clerk session issued through https://developers.ggbucks.com with a verified primary email and active immutable subject binding. Game keys do not authorize the console. Organization membership and role are checked separately.","scheme":"bearer","type":"http"},"GameServerSecret":{"bearerFormat":"ggb_sk_sandbox_<43 base64url characters>","description":"Secret game server credential. Keep it on a trusted server; never ship it in Unity, a browser, mobile binaries or public repositories. Public keys are rejected for writes. Revoked secrets are rejected.","scheme":"bearer","type":"http"},"NativeSessionBearer":{"bearerFormat":"Native Clerk session JWT","description":"Native ggbucks account session, subject to supported-country admission, active account, minimum native build and exact-session device permit admission. A country admission denial returns GEO_BLOCKED before the linking operation. In enforce mode capability challenge-v1 and a live permit bound to this same session are required. The permit is established by the native device verification flow, outside this public SDK contract.","scheme":"bearer","type":"http"},"PublicGameKey":{"description":"Public game configuration identifier: ggb_pk_sandbox_ plus 43 base64url characters. Exactly one publicKey parameter is required. Grants configuration reads only.","in":"query","name":"publicKey","type":"apiKey"}}},"info":{"description":"Public integration reference generated from the deployed backend contract. Sandbox TEST ggbucks only; accepted events never credit production wallets. Developer console access requires an invitation; game server integration uses separate game keys. Illustrative IDs, emails and repeated-A link tokens are inert. No administrative or customer API is included.","title":"ggbucks Developer and Game SDK API","version":"2.0.0"},"jsonSchemaDialect":"https://json-schema.org/draft/2020-12/schema","openapi":"3.1.0","paths":{"/api/developer/v1/access":{"get":{"description":"Requires an invited developer session issued through developers.ggbucks.com with a verified primary email. First use binds an active invitation to the immutable Clerk subject. Revoked, uninvited or mismatched subjects are denied. This request can claim an invitation; it does not create a native player account.","operationId":"getDeveloperAccess","responses":{"200":{"content":{"application/json":{"examples":{"example":{"value":{"data":{"authorized":true,"email":"developer@example.com","mode":"sandbox"}}}},"schema":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/DeveloperAccess"}},"required":["data"],"type":"object"}}},"description":"Successful sandbox response.","headers":{"Cache-Control":{"description":"Authenticated data and linking tokens must not be cached.","schema":{"const":"private, no-store","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Invalid request or allocation/cap constraint."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Missing or invalid credential/token."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Admission or organization permission denied."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Scoped resource not found."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Replay conflict, expired link or incompatible resource state."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Platform disabled or admission/database dependency temporarily unavailable; no successful mutation is implied."}},"security":[{"DeveloperSessionBearer":[]}],"summary":"Check developer dashboard admission","tags":["Developer"],"x-codeSamples":[{"label":"cURL","lang":"cURL","source":"# Illustrative request only. Replace IDs/tokens; events need a current occurredAt.\n# Native examples require an already admitted native session/device permit.\ncurl --fail-with-body --max-time 15 -X GET \\\n  \"https://api.ggbucks.com/api/developer/v1/access\" \\\n  -H \"Authorization: Bearer ${GGBUCKS_DEVELOPER_SESSION}\""},{"label":"Node.js (server)","lang":"JavaScript","source":"// Server only when using GGBUCKS_GAME_SECRET. Never log tokens or linkToken.\nconst url = new URL(\"https://api.ggbucks.com/api/developer/v1/access\");\nconst headers = {\n  \"Authorization\": \"Bearer PLACEHOLDER\"\n};\nheaders.Authorization = 'Bearer ' + process.env.GGBUCKS_DEVELOPER_SESSION;\nconst response = await fetch(url, { method: 'GET', headers, redirect: 'error', signal: AbortSignal.timeout(15000) });\nconst result = await response.json();\nif (!response.ok) throw new Error(result.error?.code ?? 'request_failed');\n"},{"label":"C# trusted environment","lang":"C#","source":"// Trusted server only for secret-key operations; native requests need an admitted session.\n// Never log credentials or linking tokens. Use a fixed API origin and disable redirects.\nusing var client = new System.Net.Http.HttpClient(new System.Net.Http.HttpClientHandler { AllowAutoRedirect = false });\nclient.Timeout = System.TimeSpan.FromSeconds(15);\nclient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue(\"Bearer\", System.Environment.GetEnvironmentVariable(\"GGBUCKS_DEVELOPER_SESSION\"));\nvar url = \"https://api.ggbucks.com/api/developer/v1/access\";\nusing var response = await client.GetAsync(url);\nvar payload = await response.Content.ReadAsStringAsync();\nresponse.EnsureSuccessStatusCode();\n// Parse the data/error envelope. Event status may be rejected even with HTTP 200."}],"x-ggbucks":{"audience":"public-integrators","credential":"developer-session","mode":"sandbox"}}},"/api/developer/v1/console":{"get":{"description":"Return only organizations where the invited account is a member, with project/game budgets, key metadata, reward rules, members and recent linked players/events. The snapshot has global limits of 500 players and 200 events across the admitted organizations. Use records pagination for complete scoped history. No player email or server secret is returned.","operationId":"getDeveloperConsole","responses":{"200":{"content":{"application/json":{"examples":{"example":{"value":{"data":{"canCreateUnlimitedOrganization":false,"events":[],"games":[],"keys":[],"limits":{"events":200,"players":500},"members":[],"mode":"sandbox","organizations":[],"players":[],"projects":[],"rules":[],"unitsPerDollar":1000}}}},"schema":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/DeveloperSnapshot"}},"required":["data"],"type":"object"}}},"description":"Successful sandbox response.","headers":{"Cache-Control":{"description":"Authenticated data and linking tokens must not be cached.","schema":{"const":"private, no-store","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Invalid request or allocation/cap constraint."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Missing or invalid credential/token."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Admission or organization permission denied."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Scoped resource not found."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Replay conflict, expired link or incompatible resource state."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Platform disabled or admission/database dependency temporarily unavailable; no successful mutation is implied."}},"security":[{"DeveloperSessionBearer":[]}],"summary":"Read the developer console","tags":["Developer"],"x-codeSamples":[{"label":"cURL","lang":"cURL","source":"# Illustrative request only. Replace IDs/tokens; events need a current occurredAt.\n# Native examples require an already admitted native session/device permit.\ncurl --fail-with-body --max-time 15 -X GET \\\n  \"https://api.ggbucks.com/api/developer/v1/console\" \\\n  -H \"Authorization: Bearer ${GGBUCKS_DEVELOPER_SESSION}\""},{"label":"Node.js (server)","lang":"JavaScript","source":"// Server only when using GGBUCKS_GAME_SECRET. Never log tokens or linkToken.\nconst url = new URL(\"https://api.ggbucks.com/api/developer/v1/console\");\nconst headers = {\n  \"Authorization\": \"Bearer PLACEHOLDER\"\n};\nheaders.Authorization = 'Bearer ' + process.env.GGBUCKS_DEVELOPER_SESSION;\nconst response = await fetch(url, { method: 'GET', headers, redirect: 'error', signal: AbortSignal.timeout(15000) });\nconst result = await response.json();\nif (!response.ok) throw new Error(result.error?.code ?? 'request_failed');\n"},{"label":"C# trusted environment","lang":"C#","source":"// Trusted server only for secret-key operations; native requests need an admitted session.\n// Never log credentials or linking tokens. Use a fixed API origin and disable redirects.\nusing var client = new System.Net.Http.HttpClient(new System.Net.Http.HttpClientHandler { AllowAutoRedirect = false });\nclient.Timeout = System.TimeSpan.FromSeconds(15);\nclient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue(\"Bearer\", System.Environment.GetEnvironmentVariable(\"GGBUCKS_DEVELOPER_SESSION\"));\nvar url = \"https://api.ggbucks.com/api/developer/v1/console\";\nusing var response = await client.GetAsync(url);\nvar payload = await response.Content.ReadAsStringAsync();\nresponse.EnsureSuccessStatusCode();\n// Parse the data/error envelope. Event status may be rejected even with HTTP 200."}],"x-ggbucks":{"audience":"public-integrators","credential":"developer-session","mode":"sandbox"}},"post":{"description":"Execute one strictly validated action. Owners and admins may manage project/game funding and rules; viewers can read. Only owners manage non-owner members. Global invitation is rechecked before organization locks for every mutation. All balances and rewards are TEST ggbucks; 1,000 integer units represent one test dollar. Organization to project to game allocation is transactional. Lifetime project/game ceilings, budgets and spending cannot be exceeded. issuedKey is shown once; store a secret only on your trusted server.","operationId":"executeDeveloperAction","requestBody":{"content":{"application/json":{"examples":{"addMember":{"summary":"addMember","value":{"clerkUserId":"user_example_studio_member","organizationId":"11111111-1111-4111-8111-111111111111","role":"viewer","type":"addMember"}},"allocateGame":{"summary":"allocateGame","value":{"amountGgbucks":25000,"gameId":"11111111-1111-4111-8111-111111111111","type":"allocateGame"}},"allocateProject":{"summary":"allocateProject","value":{"amountGgbucks":50000,"projectId":"11111111-1111-4111-8111-111111111111","type":"allocateProject"}},"createGame":{"summary":"createGame","value":{"dailyPlayerCapGgbucks":1000,"maxPayoutGgbucks":50000,"name":"Example Puzzle","platform":"unity","projectId":"11111111-1111-4111-8111-111111111111","type":"createGame"}},"createOrganization":{"summary":"createOrganization","value":{"name":"Example Studio","type":"createOrganization","unlimitedFunding":false}},"createProject":{"summary":"createProject","value":{"maxPayoutGgbucks":100000,"name":"Puzzle collection","organizationId":"11111111-1111-4111-8111-111111111111","type":"createProject"}},"createRule":{"summary":"createRule","value":{"eventType":"level.completed","gameId":"11111111-1111-4111-8111-111111111111","rewardGgbucks":100,"type":"createRule"}},"fundOrganization":{"summary":"fundOrganization","value":{"amountGgbucks":100000,"organizationId":"11111111-1111-4111-8111-111111111111","type":"fundOrganization"}},"issueKey":{"summary":"issueKey","value":{"gameId":"11111111-1111-4111-8111-111111111111","kind":"secret","name":"Development server","type":"issueKey"}},"removeMember":{"summary":"removeMember","value":{"memberId":"11111111-1111-4111-8111-111111111111","type":"removeMember"}},"revokeKey":{"summary":"revokeKey","value":{"keyId":"11111111-1111-4111-8111-111111111111","type":"revokeKey"}},"updateGame":{"summary":"updateGame","value":{"gameId":"11111111-1111-4111-8111-111111111111","status":"paused","type":"updateGame"}},"updateMember":{"summary":"updateMember","value":{"memberId":"11111111-1111-4111-8111-111111111111","role":"admin","type":"updateMember"}},"updateProject":{"summary":"updateProject","value":{"maxPayoutGgbucks":100000,"projectId":"11111111-1111-4111-8111-111111111111","type":"updateProject"}},"updateRule":{"summary":"updateRule","value":{"active":false,"ruleId":"11111111-1111-4111-8111-111111111111","type":"updateRule"}}},"schema":{"$ref":"#/components/schemas/DeveloperAction"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"example":{"value":{"data":{"id":"11111111-1111-4111-8111-111111111111","mode":"sandbox"}}}},"schema":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/DeveloperActionResult"}},"required":["data"],"type":"object"}}},"description":"Successful sandbox response.","headers":{"Cache-Control":{"description":"Authenticated data and linking tokens must not be cached.","schema":{"const":"private, no-store","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Invalid request or allocation/cap constraint."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Missing or invalid credential/token."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Admission or organization permission denied."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Scoped resource not found."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Replay conflict, expired link or incompatible resource state."},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"JSON body exceeds 16,384 UTF-8 bytes."},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Content-Type must be application/json."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Platform disabled or admission/database dependency temporarily unavailable; no successful mutation is implied."}},"security":[{"DeveloperSessionBearer":[]}],"summary":"Manage organizations, projects and games","tags":["Developer"],"x-codeSamples":[{"label":"cURL","lang":"cURL","source":"# Illustrative request only. Replace IDs/tokens; events need a current occurredAt.\n# Native examples require an already admitted native session/device permit.\ncurl --fail-with-body --max-time 15 -X POST \\\n  \"https://api.ggbucks.com/api/developer/v1/console\" \\\n  -H \"Authorization: Bearer ${GGBUCKS_DEVELOPER_SESSION}\" \\\n  -H \"Content-Type: application/json\" \\\n  --data '{\"type\":\"createOrganization\",\"name\":\"Example Studio\",\"unlimitedFunding\":false}'"},{"label":"Node.js (server)","lang":"JavaScript","source":"// Server only when using GGBUCKS_GAME_SECRET. Never log tokens or linkToken.\nconst url = new URL(\"https://api.ggbucks.com/api/developer/v1/console\");\nconst body = {\n  \"type\": \"createOrganization\",\n  \"name\": \"Example Studio\",\n  \"unlimitedFunding\": false\n};\nconst headers = {\n  \"Authorization\": \"Bearer PLACEHOLDER\",\n  \"Content-Type\": \"application/json\"\n};\nheaders.Authorization = 'Bearer ' + process.env.GGBUCKS_DEVELOPER_SESSION;\nconst response = await fetch(url, { method: 'POST', headers, redirect: 'error', signal: AbortSignal.timeout(15000), body: JSON.stringify(body) });\nconst result = await response.json();\nif (!response.ok) throw new Error(result.error?.code ?? 'request_failed');\n"},{"label":"C# trusted environment","lang":"C#","source":"// Trusted server only for secret-key operations; native requests need an admitted session.\n// Never log credentials or linking tokens. Use a fixed API origin and disable redirects.\nusing var client = new System.Net.Http.HttpClient(new System.Net.Http.HttpClientHandler { AllowAutoRedirect = false });\nclient.Timeout = System.TimeSpan.FromSeconds(15);\nclient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue(\"Bearer\", System.Environment.GetEnvironmentVariable(\"GGBUCKS_DEVELOPER_SESSION\"));\nvar url = \"https://api.ggbucks.com/api/developer/v1/console\";\n// Replace IDs/tokens; set a current occurredAt and durably retain event payload before sending.\nvar json = \"{\\\"type\\\":\\\"createOrganization\\\",\\\"name\\\":\\\"Example Studio\\\",\\\"unlimitedFunding\\\":false}\";\nusing var content = new System.Net.Http.StringContent(json, System.Text.Encoding.UTF8, \"application/json\");\nusing var response = await client.PostAsync(url, content);\nvar payload = await response.Content.ReadAsStringAsync();\nresponse.EnsureSuccessStatusCode();\n// Parse the data/error envelope. Event status may be rejected even with HTTP 200."}],"x-ggbucks":{"audience":"public-integrators","credential":"developer-session","mode":"sandbox"}}},"/api/developer/v1/records":{"get":{"description":"Choose players or events, then optionally constrain organization, project and game. Membership is checked on each page. Return newest records first by creation time and UUID; nextCursor is opaque and bound to the original kind and filters. Keep the same filters until nextCursor is null. Changing scope requires starting without a cursor. Unknown or repeated query parameters are rejected.","operationId":"listDeveloperRecords","parameters":[{"description":"Choose the player or event collection.","in":"query","name":"kind","required":true,"schema":{"enum":["players","events"],"type":"string"}},{"description":"Optional organizationId filter.","in":"query","name":"organizationId","required":false,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"description":"Optional projectId filter.","in":"query","name":"projectId","required":false,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"description":"Optional gameId filter.","in":"query","name":"gameId","required":false,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},{"description":"Opaque nextCursor from the previous page with unchanged kind and filters.","in":"query","name":"cursor","required":false,"schema":{"maxLength":800,"pattern":"^[A-Za-z0-9_-]+$","type":"string"}},{"description":"Page size, default 50, maximum 100.","in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"examples":{"example":{"value":{"data":{"kind":"players","nextCursor":null,"records":[{"createdAt":"2026-10-11T12:00:00.000Z","externalPlayerId":"studio-player-42","gameId":"11111111-1111-4111-8111-111111111111","ggbucksUserId":null,"id":"11111111-1111-4111-8111-111111111111","linkedAt":null,"organizationId":"11111111-1111-4111-8111-111111111111","username":null}]}}}},"schema":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/DeveloperRecordPage"}},"required":["data"],"type":"object"}}},"description":"Successful sandbox response.","headers":{"Cache-Control":{"description":"Authenticated data and linking tokens must not be cached.","schema":{"const":"private, no-store","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Invalid request or allocation/cap constraint."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Missing or invalid credential/token."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Admission or organization permission denied."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Scoped resource not found."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Replay conflict, expired link or incompatible resource state."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Platform disabled or admission/database dependency temporarily unavailable; no successful mutation is implied."}},"security":[{"DeveloperSessionBearer":[]}],"summary":"Page through linked players or reward decisions","tags":["Developer"],"x-codeSamples":[{"label":"cURL","lang":"cURL","source":"# Illustrative request only. Replace IDs/tokens; events need a current occurredAt.\n# Native examples require an already admitted native session/device permit.\ncurl --fail-with-body --max-time 15 -X GET \\\n  \"https://api.ggbucks.com/api/developer/v1/records?kind=players&limit=50\" \\\n  -H \"Authorization: Bearer ${GGBUCKS_DEVELOPER_SESSION}\""},{"label":"Node.js (server)","lang":"JavaScript","source":"// Server only when using GGBUCKS_GAME_SECRET. Never log tokens or linkToken.\nconst url = new URL(\"https://api.ggbucks.com/api/developer/v1/records\");\nurl.searchParams.set('kind', 'players');\nconst headers = {\n  \"Authorization\": \"Bearer PLACEHOLDER\"\n};\nheaders.Authorization = 'Bearer ' + process.env.GGBUCKS_DEVELOPER_SESSION;\nconst response = await fetch(url, { method: 'GET', headers, redirect: 'error', signal: AbortSignal.timeout(15000) });\nconst result = await response.json();\nif (!response.ok) throw new Error(result.error?.code ?? 'request_failed');\n"},{"label":"C# trusted environment","lang":"C#","source":"// Trusted server only for secret-key operations; native requests need an admitted session.\n// Never log credentials or linking tokens. Use a fixed API origin and disable redirects.\nusing var client = new System.Net.Http.HttpClient(new System.Net.Http.HttpClientHandler { AllowAutoRedirect = false });\nclient.Timeout = System.TimeSpan.FromSeconds(15);\nclient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue(\"Bearer\", System.Environment.GetEnvironmentVariable(\"GGBUCKS_DEVELOPER_SESSION\"));\nvar url = \"https://api.ggbucks.com/api/developer/v1/records?kind=players\";\nusing var response = await client.GetAsync(url);\nvar payload = await response.Content.ReadAsStringAsync();\nresponse.EnsureSuccessStatusCode();\n// Parse the data/error envelope. Event status may be rejected even with HTTP 200."}],"x-ggbucks":{"audience":"public-integrators","credential":"developer-session","mode":"sandbox"}}},"/api/game-sdk/v2/config":{"get":{"description":"A public game key is safe to include in a game client. It permits configuration reads only and cannot authorize events, link intents or console actions. Configuration includes active fixed reward rules, status and caps. A paused game can still return configuration. slug currently equals the game UUID.","operationId":"getGamePublicConfig","parameters":[{"description":"Exactly one public key; a secret key is rejected.","in":"query","name":"publicKey","required":true,"schema":{"maxLength":58,"minLength":58,"pattern":"^ggb_pk_sandbox_[A-Za-z0-9_-]{43}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"example":{"value":{"data":{"environment":"sandbox","gameId":"11111111-1111-4111-8111-111111111111","name":"Example Puzzle","platform":"unity","productionRewardsEnabled":false,"rules":[{"eventType":"level.completed","rewardGgbucks":100}],"slug":"11111111-1111-4111-8111-111111111111","status":"active","thresholds":{"dailyPlayerCapGgbucks":1000,"maxPayoutGgbucks":50000}}}}},"schema":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/GamePublicConfig"}},"required":["data"],"type":"object"}}},"description":"Successful sandbox response.","headers":{"Cache-Control":{"description":"Authenticated data and linking tokens must not be cached.","schema":{"const":"private, no-store","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Invalid request or allocation/cap constraint."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Missing or invalid credential/token."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Admission or organization permission denied."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Scoped resource not found."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Replay conflict, expired link or incompatible resource state."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Platform disabled or admission/database dependency temporarily unavailable; no successful mutation is implied."}},"security":[{"PublicGameKey":[]}],"summary":"Read game configuration with a public identifier","tags":["Game SDK"],"x-codeSamples":[{"label":"cURL","lang":"cURL","source":"# Illustrative request only. Replace IDs/tokens; events need a current occurredAt.\n# Native examples require an already admitted native session/device permit.\ncurl --fail-with-body --max-time 15 -X GET \\\n  \"https://api.ggbucks.com/api/game-sdk/v2/config?publicKey=${GGBUCKS_PUBLIC_KEY}\""},{"label":"Node.js (server)","lang":"JavaScript","source":"// Server only when using GGBUCKS_GAME_SECRET. Never log tokens or linkToken.\nconst url = new URL(\"https://api.ggbucks.com/api/game-sdk/v2/config\");\nurl.searchParams.set('publicKey', process.env.GGBUCKS_PUBLIC_KEY);\nconst headers = {};\nconst response = await fetch(url, { method: 'GET', headers, redirect: 'error', signal: AbortSignal.timeout(15000) });\nconst result = await response.json();\nif (!response.ok) throw new Error(result.error?.code ?? 'request_failed');\n"},{"label":"C# public configuration","lang":"C#","source":"// Trusted server only for secret-key operations; native requests need an admitted session.\n// Never log credentials or linking tokens. Use a fixed API origin and disable redirects.\nusing var client = new System.Net.Http.HttpClient(new System.Net.Http.HttpClientHandler { AllowAutoRedirect = false });\nclient.Timeout = System.TimeSpan.FromSeconds(15);\nvar url = \"https://api.ggbucks.com/api/game-sdk/v2/config\" + \"?publicKey=\" + System.Uri.EscapeDataString(System.Environment.GetEnvironmentVariable(\"GGBUCKS_PUBLIC_KEY\") ?? \"\");\nusing var response = await client.GetAsync(url);\nvar payload = await response.Content.ReadAsStringAsync();\nresponse.EnsureSuccessStatusCode();\n// Parse the data/error envelope. Event status may be rejected even with HTTP 200."}],"x-ggbucks":{"audience":"public-integrators","credential":"game-public-key","mode":"sandbox"}}},"/api/game-sdk/v2/events":{"post":{"description":"Send only after your trusted server verifies the game achievement. A key authenticates your server; it does not prove that gameplay is legitimate. eventId and playerId are UUIDs, occurredAt must be within 5 minutes of receipt, and eventType chooses an active game-scoped fixed reward rule. Callers cannot specify payouts. Admission checks linked active accounts, game state, UTC daily player cap, game/project budgets and lifetime ceilings. A valid authenticated event stores an immutable accepted or rejected decision and returns HTTP 200; inspect data.status and data.reason. Fresh events are limited to 120 per game per minute and excess attempts are stored as rejected/rate_limited. Reuse the same eventId and canonical JSON payload for durable retries; exact replay returns the original decision with replayed=true even after rules or budgets change. Reusing the ID with a changed payload returns 409. JSON property order does not matter; every field value, including timestamp text and metadata presence, does. Rejected decisions cannot later become accepted by replay. No production wallet is credited.","operationId":"ingestGameEvent","requestBody":{"content":{"application/json":{"examples":{"example":{"value":{"eventId":"11111111-1111-4111-8111-111111111111","eventType":"level.completed","metadata":{"level":7,"serverVerified":true},"occurredAt":"2026-10-11T12:00:00.000Z","playerId":"11111111-1111-4111-8111-111111111111"}}},"schema":{"$ref":"#/components/schemas/GameEventInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"example":{"value":{"data":{"createdAt":"2026-10-11T12:00:00.000Z","eventId":"11111111-1111-4111-8111-111111111111","eventType":"level.completed","gameId":"11111111-1111-4111-8111-111111111111","id":"11111111-1111-4111-8111-111111111111","mode":"sandbox","occurredAt":"2026-10-11T12:00:00.000Z","organizationId":"11111111-1111-4111-8111-111111111111","playerId":"11111111-1111-4111-8111-111111111111","reason":null,"replayed":false,"rewardGgbucks":100,"status":"accepted"}}},"rejected":{"value":{"data":{"createdAt":"2026-10-11T12:00:00.000Z","eventId":"11111111-1111-4111-8111-111111111111","eventType":"level.completed","gameId":"11111111-1111-4111-8111-111111111111","id":"11111111-1111-4111-8111-111111111111","mode":"sandbox","occurredAt":"2026-10-11T12:00:00.000Z","organizationId":"11111111-1111-4111-8111-111111111111","playerId":"11111111-1111-4111-8111-111111111111","reason":"daily_player_cap","replayed":false,"rewardGgbucks":0,"status":"rejected"}}}},"schema":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/GameEventResult"}},"required":["data"],"type":"object"}}},"description":"Immutable accepted or rejected sandbox decision. Inspect data.status; HTTP 200 does not imply a reward.","headers":{"Cache-Control":{"description":"Authenticated data and linking tokens must not be cached.","schema":{"const":"private, no-store","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Invalid request or allocation/cap constraint."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Missing or invalid credential/token."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Admission or organization permission denied."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Scoped resource not found."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Replay conflict, expired link or incompatible resource state."},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"JSON body exceeds 16,384 UTF-8 bytes."},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Content-Type must be application/json."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Platform disabled or admission/database dependency temporarily unavailable; no successful mutation is implied."}},"security":[{"GameServerSecret":[]}],"summary":"Record a server-verified rewarded-play event","tags":["Game SDK"],"x-codeSamples":[{"label":"cURL","lang":"cURL","source":"# Illustrative request only. Replace IDs/tokens; events need a current occurredAt.\n# Native examples require an already admitted native session/device permit.\ncurl --fail-with-body --max-time 15 -X POST \\\n  \"https://api.ggbucks.com/api/game-sdk/v2/events\" \\\n  -H \"Authorization: Bearer ${GGBUCKS_GAME_SECRET}\" \\\n  -H \"Content-Type: application/json\" \\\n  --data '{\"eventId\":\"11111111-1111-4111-8111-111111111111\",\"playerId\":\"11111111-1111-4111-8111-111111111111\",\"eventType\":\"level.completed\",\"occurredAt\":\"2026-10-11T12:00:00.000Z\",\"metadata\":{\"level\":7,\"serverVerified\":true}}'"},{"label":"Node.js (server)","lang":"JavaScript","source":"// Server only when using GGBUCKS_GAME_SECRET. Never log tokens or linkToken.\nconst url = new URL(\"https://api.ggbucks.com/api/game-sdk/v2/events\");\nconst body = {\n  \"eventId\": \"11111111-1111-4111-8111-111111111111\",\n  \"playerId\": \"11111111-1111-4111-8111-111111111111\",\n  \"eventType\": \"level.completed\",\n  \"occurredAt\": \"2026-10-11T12:00:00.000Z\",\n  \"metadata\": {\n    \"level\": 7,\n    \"serverVerified\": true\n  }\n};\n// Persist eventId and this exact payload before sending; reuse it for retries.\nbody.occurredAt = new Date().toISOString();\nconst headers = {\n  \"Authorization\": \"Bearer PLACEHOLDER\",\n  \"Content-Type\": \"application/json\"\n};\nheaders.Authorization = 'Bearer ' + process.env.GGBUCKS_GAME_SECRET;\nconst response = await fetch(url, { method: 'POST', headers, redirect: 'error', signal: AbortSignal.timeout(15000), body: JSON.stringify(body) });\nconst result = await response.json();\nif (!response.ok) throw new Error(result.error?.code ?? 'request_failed');\n// A 200 can contain a rejected decision: inspect result.data.status/reason.\n"},{"label":"C# trusted environment","lang":"C#","source":"// Trusted server only for secret-key operations; native requests need an admitted session.\n// Never log credentials or linking tokens. Use a fixed API origin and disable redirects.\nusing var client = new System.Net.Http.HttpClient(new System.Net.Http.HttpClientHandler { AllowAutoRedirect = false });\nclient.Timeout = System.TimeSpan.FromSeconds(15);\nclient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue(\"Bearer\", System.Environment.GetEnvironmentVariable(\"GGBUCKS_GAME_SECRET\"));\nvar url = \"https://api.ggbucks.com/api/game-sdk/v2/events\";\n// Replace IDs/tokens; set a current occurredAt and durably retain event payload before sending.\nvar json = \"{\\\"eventId\\\":\\\"11111111-1111-4111-8111-111111111111\\\",\\\"playerId\\\":\\\"11111111-1111-4111-8111-111111111111\\\",\\\"eventType\\\":\\\"level.completed\\\",\\\"occurredAt\\\":\\\"2026-10-11T12:00:00.000Z\\\",\\\"metadata\\\":{\\\"level\\\":7,\\\"serverVerified\\\":true}}\";\nusing var content = new System.Net.Http.StringContent(json, System.Text.Encoding.UTF8, \"application/json\");\nusing var response = await client.PostAsync(url, content);\nvar payload = await response.Content.ReadAsStringAsync();\nresponse.EnsureSuccessStatusCode();\n// Parse the data/error envelope. Event status may be rejected even with HTTP 200."}],"x-ggbucks":{"audience":"public-integrators","credential":"game-secret","events":{"exactPayloadReplay":true,"freshEventsPerGamePerMinute":120,"idempotencyScope":["gameId","eventId"],"maxClockSkewSeconds":300,"metadata":{"maxArrayItems":100,"maxDepth":6,"maxObjectEntries":100,"maxUtf8Bytes":4096},"rejectedReasons":["daily_player_cap","game_budget_exhausted","game_paused","game_payout_ceiling","player_not_linked","project_budget_exhausted","project_payout_ceiling","rate_limited","timestamp_out_of_window","unknown_or_inactive_rule","user_unavailable"],"replayChangedPayloadStatus":409},"mode":"sandbox"}}},"/api/game-sdk/v2/links":{"post":{"description":"Your trusted game server creates a player from its stable external identifier and a one-time 10-minute token. Send the token to the native ggbucks consent flow using ggbucks://developer-game-link?linkToken=<token>. Treat it as a secret: never log or persist it in analytics, browser history or untrusted storage. Already linked players and paused games are rejected. Repeated intent creation is not event-style idempotency and may create another token.","operationId":"createLinkIntent","requestBody":{"content":{"application/json":{"examples":{"example":{"value":{"externalPlayerId":"studio-player-42"}}},"schema":{"$ref":"#/components/schemas/CreateLinkIntent"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"example":{"value":{"data":{"expiresAt":"2026-10-11T12:00:00.000Z","linkToken":"ggb_link_sandbox_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","mode":"sandbox","playerId":"11111111-1111-4111-8111-111111111111"}}}},"schema":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/LinkIntentResult"}},"required":["data"],"type":"object"}}},"description":"Successful sandbox response.","headers":{"Cache-Control":{"description":"Authenticated data and linking tokens must not be cached.","schema":{"const":"private, no-store","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Invalid request or allocation/cap constraint."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Missing or invalid credential/token."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Admission or organization permission denied."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Scoped resource not found."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Replay conflict, expired link or incompatible resource state."},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"JSON body exceeds 16,384 UTF-8 bytes."},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Content-Type must be application/json."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Platform disabled or admission/database dependency temporarily unavailable; no successful mutation is implied."}},"security":[{"GameServerSecret":[]}],"summary":"Create a native account linking intent","tags":["Game SDK"],"x-codeSamples":[{"label":"cURL","lang":"cURL","source":"# Illustrative request only. Replace IDs/tokens; events need a current occurredAt.\n# Native examples require an already admitted native session/device permit.\ncurl --fail-with-body --max-time 15 -X POST \\\n  \"https://api.ggbucks.com/api/game-sdk/v2/links\" \\\n  -H \"Authorization: Bearer ${GGBUCKS_GAME_SECRET}\" \\\n  -H \"Content-Type: application/json\" \\\n  --data '{\"externalPlayerId\":\"studio-player-42\"}'"},{"label":"Node.js (server)","lang":"JavaScript","source":"// Server only when using GGBUCKS_GAME_SECRET. Never log tokens or linkToken.\nconst url = new URL(\"https://api.ggbucks.com/api/game-sdk/v2/links\");\nconst body = {\n  \"externalPlayerId\": \"studio-player-42\"\n};\nconst headers = {\n  \"Authorization\": \"Bearer PLACEHOLDER\",\n  \"Content-Type\": \"application/json\"\n};\nheaders.Authorization = 'Bearer ' + process.env.GGBUCKS_GAME_SECRET;\nconst response = await fetch(url, { method: 'POST', headers, redirect: 'error', signal: AbortSignal.timeout(15000), body: JSON.stringify(body) });\nconst result = await response.json();\nif (!response.ok) throw new Error(result.error?.code ?? 'request_failed');\n"},{"label":"C# trusted environment","lang":"C#","source":"// Trusted server only for secret-key operations; native requests need an admitted session.\n// Never log credentials or linking tokens. Use a fixed API origin and disable redirects.\nusing var client = new System.Net.Http.HttpClient(new System.Net.Http.HttpClientHandler { AllowAutoRedirect = false });\nclient.Timeout = System.TimeSpan.FromSeconds(15);\nclient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue(\"Bearer\", System.Environment.GetEnvironmentVariable(\"GGBUCKS_GAME_SECRET\"));\nvar url = \"https://api.ggbucks.com/api/game-sdk/v2/links\";\n// Replace IDs/tokens; set a current occurredAt and durably retain event payload before sending.\nvar json = \"{\\\"externalPlayerId\\\":\\\"studio-player-42\\\"}\";\nusing var content = new System.Net.Http.StringContent(json, System.Text.Encoding.UTF8, \"application/json\");\nusing var response = await client.PostAsync(url, content);\nvar payload = await response.Content.ReadAsStringAsync();\nresponse.EnsureSuccessStatusCode();\n// Parse the data/error envelope. Event status may be rejected even with HTTP 200."}],"x-ggbucks":{"audience":"public-integrators","credential":"game-secret","mode":"sandbox"}}},"/api/game-sdk/v2/players/{playerId}":{"get":{"description":"Server-only polling for a player belonging to the same game as the secret key. Returns linked state and time, without the native Clerk subject, account email or access token. Rejects paused games.","operationId":"getGamePlayer","parameters":[{"description":"UUID returned when the same game creates a player/link intent.","in":"path","name":"playerId","required":true,"schema":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"example":{"value":{"data":{"externalPlayerId":"studio-player-42","linked":false,"linkedAt":null,"mode":"sandbox","playerId":"11111111-1111-4111-8111-111111111111"}}}},"schema":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/GamePlayer"}},"required":["data"],"type":"object"}}},"description":"Successful sandbox response.","headers":{"Cache-Control":{"description":"Authenticated data and linking tokens must not be cached.","schema":{"const":"private, no-store","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Invalid request or allocation/cap constraint."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Missing or invalid credential/token."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Admission or organization permission denied."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Scoped resource not found."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Replay conflict, expired link or incompatible resource state."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperError"}}},"description":"Platform disabled or admission/database dependency temporarily unavailable; no successful mutation is implied."}},"security":[{"GameServerSecret":[]}],"summary":"Poll whether a game player is linked","tags":["Game SDK"],"x-codeSamples":[{"label":"cURL","lang":"cURL","source":"# Illustrative request only. Replace IDs/tokens; events need a current occurredAt.\n# Native examples require an already admitted native session/device permit.\ncurl --fail-with-body --max-time 15 -X GET \\\n  \"https://api.ggbucks.com/api/game-sdk/v2/players/11111111-1111-4111-8111-111111111111\" \\\n  -H \"Authorization: Bearer ${GGBUCKS_GAME_SECRET}\""},{"label":"Node.js (server)","lang":"JavaScript","source":"// Server only when using GGBUCKS_GAME_SECRET. Never log tokens or linkToken.\nconst url = new URL(\"https://api.ggbucks.com/api/game-sdk/v2/players/11111111-1111-4111-8111-111111111111\");\nconst headers = {\n  \"Authorization\": \"Bearer PLACEHOLDER\"\n};\nheaders.Authorization = 'Bearer ' + process.env.GGBUCKS_GAME_SECRET;\nconst response = await fetch(url, { method: 'GET', headers, redirect: 'error', signal: AbortSignal.timeout(15000) });\nconst result = await response.json();\nif (!response.ok) throw new Error(result.error?.code ?? 'request_failed');\n"},{"label":"C# trusted environment","lang":"C#","source":"// Trusted server only for secret-key operations; native requests need an admitted session.\n// Never log credentials or linking tokens. Use a fixed API origin and disable redirects.\nusing var client = new System.Net.Http.HttpClient(new System.Net.Http.HttpClientHandler { AllowAutoRedirect = false });\nclient.Timeout = System.TimeSpan.FromSeconds(15);\nclient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue(\"Bearer\", System.Environment.GetEnvironmentVariable(\"GGBUCKS_GAME_SECRET\"));\nvar url = \"https://api.ggbucks.com/api/game-sdk/v2/players/11111111-1111-4111-8111-111111111111\";\nusing var response = await client.GetAsync(url);\nvar payload = await response.Content.ReadAsStringAsync();\nresponse.EnsureSuccessStatusCode();\n// Parse the data/error envelope. Event status may be rejected even with HTTP 200."}],"x-ggbucks":{"audience":"public-integrators","credential":"game-secret","mode":"sandbox"}}},"/api/v0/game-sdk/v2/links/approve":{"post":{"description":"Native ggbucks app only, with the same session, account and device admission preconditions as inspection. Invoke after explicit user consent. Binds the game player to the canonical active native account, consumes the token and forbids rebinding. A consumed token replay by the same account returns the original approved state; a different account is denied. An unconsumed expired token, paused game or revoked issuing key is rejected. Linking is independent of developer dashboard invitations and does not credit a wallet.","operationId":"approveLinkIntent","parameters":[{"description":"Required by device enforcement mode. Declares native capability; it does not authenticate or create a device permit.","in":"header","name":"x-ggbucks-device-auth-capability","required":false,"schema":{"const":"challenge-v1","type":"string"}},{"description":"Native client version used by admission policy.","in":"header","name":"x-ggbucks-client-version","required":false,"schema":{"maxLength":64,"pattern":"^[A-Za-z0-9][A-Za-z0-9._+-]*$","type":"string"}},{"description":"Native platform. Required when native minimum-build admission is enabled.","in":"header","name":"x-native-platform","required":false,"schema":{"enum":["ios","android"],"type":"string"}},{"description":"Native release/build distribution identifier evaluated by minimum-build policy. Use the value supplied by the supported native app.","in":"header","name":"x-native-dist","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"examples":{"example":{"value":{"linkToken":"ggb_link_sandbox_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}}},"schema":{"$ref":"#/components/schemas/ApproveLinkIntent"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"example":{"value":{"data":{"gameId":"11111111-1111-4111-8111-111111111111","linked":true,"mode":"sandbox","playerId":"11111111-1111-4111-8111-111111111111"}}}},"schema":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/LinkApproval"}},"required":["data"],"type":"object"}}},"description":"Successful sandbox response.","headers":{"Cache-Control":{"description":"Authenticated data and linking tokens must not be cached.","schema":{"const":"private, no-store","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DeveloperError"},{"$ref":"#/components/schemas/NativeAdmissionError"}]}}},"description":"Invalid request or allocation/cap constraint."},"401":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DeveloperError"},{"$ref":"#/components/schemas/NativeAdmissionError"}]}}},"description":"Missing or invalid credential/token."},"403":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DeveloperError"},{"$ref":"#/components/schemas/NativeAdmissionError"}]}}},"description":"Admission or organization permission denied."},"404":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DeveloperError"},{"$ref":"#/components/schemas/NativeAdmissionError"}]}}},"description":"Scoped resource not found."},"409":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DeveloperError"},{"$ref":"#/components/schemas/NativeAdmissionError"}]}}},"description":"Replay conflict, expired link or incompatible resource state."},"413":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DeveloperError"},{"$ref":"#/components/schemas/NativeAdmissionError"}]}}},"description":"JSON body exceeds 16,384 UTF-8 bytes."},"415":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DeveloperError"},{"$ref":"#/components/schemas/NativeAdmissionError"}]}}},"description":"Content-Type must be application/json."},"426":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DeveloperError"},{"$ref":"#/components/schemas/NativeAdmissionError"}]}}},"description":"Native app/device capability update required before execution."},"503":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DeveloperError"},{"$ref":"#/components/schemas/NativeAdmissionError"}]}}},"description":"Platform disabled or admission/database dependency temporarily unavailable; no successful mutation is implied."}},"security":[{"NativeSessionBearer":[]}],"summary":"Approve linking after native user consent","tags":["Native linking"],"x-codeSamples":[{"label":"cURL","lang":"cURL","source":"# Illustrative request only. Replace IDs/tokens; events need a current occurredAt.\n# Native examples require an already admitted native session/device permit.\ncurl --fail-with-body --max-time 15 -X POST \\\n  \"https://api.ggbucks.com/api/v0/game-sdk/v2/links/approve\" \\\n  -H \"Authorization: Bearer ${GGBUCKS_NATIVE_SESSION}\" \\\n  -H \"x-ggbucks-device-auth-capability: challenge-v1\" \\\n  -H \"Content-Type: application/json\" \\\n  --data '{\"linkToken\":\"ggb_link_sandbox_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"}'"},{"label":"Node.js (native-app diagnostics)","lang":"JavaScript","source":"// For ggbucks native-app maintainers diagnosing an already admitted session only.\n// Never collect a player session on a game server or automate consent approval. Never log tokens or linkToken.\nconst url = new URL(\"https://api.ggbucks.com/api/v0/game-sdk/v2/links/approve\");\nconst body = {\n  \"linkToken\": \"ggb_link_sandbox_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"\n};\nconst headers = {\n  \"Authorization\": \"Bearer PLACEHOLDER\",\n  \"Content-Type\": \"application/json\",\n  \"x-ggbucks-device-auth-capability\": \"challenge-v1\"\n};\nheaders.Authorization = 'Bearer ' + process.env.GGBUCKS_NATIVE_SESSION;\nconst response = await fetch(url, { method: 'POST', headers, redirect: 'error', signal: AbortSignal.timeout(15000), body: JSON.stringify(body) });\nconst result = await response.json();\nif (!response.ok) throw new Error(result.error?.code ?? 'request_failed');\n"},{"label":"C# (native-app diagnostics)","lang":"C#","source":"// Trusted server only for secret-key operations; native requests need an admitted session.\n// Never log credentials or linking tokens. Use a fixed API origin and disable redirects.\nusing var client = new System.Net.Http.HttpClient(new System.Net.Http.HttpClientHandler { AllowAutoRedirect = false });\nclient.Timeout = System.TimeSpan.FromSeconds(15);\nclient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue(\"Bearer\", System.Environment.GetEnvironmentVariable(\"GGBUCKS_NATIVE_SESSION\"));\nclient.DefaultRequestHeaders.Add(\"x-ggbucks-device-auth-capability\", \"challenge-v1\");\nvar url = \"https://api.ggbucks.com/api/v0/game-sdk/v2/links/approve\";\n// Replace IDs/tokens; set a current occurredAt and durably retain event payload before sending.\nvar json = \"{\\\"linkToken\\\":\\\"ggb_link_sandbox_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\\\"}\";\nusing var content = new System.Net.Http.StringContent(json, System.Text.Encoding.UTF8, \"application/json\");\nusing var response = await client.PostAsync(url, content);\nvar payload = await response.Content.ReadAsStringAsync();\nresponse.EnsureSuccessStatusCode();\n// Parse the data/error envelope. Event status may be rejected even with HTTP 200."}],"x-ggbucks":{"audience":"public-integrators","credential":"native-session","mode":"sandbox","nativeAdmission":{"accountMustBeActive":true,"capability":"challenge-v1","denialBeforeExecutionHeader":"x-ggbucks-rejected-before-execution","minimumBuildPolicy":"conditional","permitScope":"exact-clerk-session"}}}},"/api/v0/game-sdk/v2/links/inspect":{"post":{"description":"Native ggbucks app only. Require a verified native Clerk session for an active account and the native device admission policy. In enforce mode, send challenge-v1 capability and a live device permit bound to this exact session; an approved different session is insufficient. Client headers cannot create a permit. The native app must satisfy minimum-build policy when enabled. Returns game name, external player identifier and expiry for consent; it does not bind the player. Expired, consumed, paused or revoked-key intents are rejected.","operationId":"inspectLinkIntent","parameters":[{"description":"Required by device enforcement mode. Declares native capability; it does not authenticate or create a device permit.","in":"header","name":"x-ggbucks-device-auth-capability","required":false,"schema":{"const":"challenge-v1","type":"string"}},{"description":"Native client version used by admission policy.","in":"header","name":"x-ggbucks-client-version","required":false,"schema":{"maxLength":64,"pattern":"^[A-Za-z0-9][A-Za-z0-9._+-]*$","type":"string"}},{"description":"Native platform. Required when native minimum-build admission is enabled.","in":"header","name":"x-native-platform","required":false,"schema":{"enum":["ios","android"],"type":"string"}},{"description":"Native release/build distribution identifier evaluated by minimum-build policy. Use the value supplied by the supported native app.","in":"header","name":"x-native-dist","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"examples":{"example":{"value":{"linkToken":"ggb_link_sandbox_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}}},"schema":{"$ref":"#/components/schemas/InspectLinkIntent"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"example":{"value":{"data":{"expiresAt":"2026-10-11T12:00:00.000Z","externalPlayerId":"studio-player-42","gameName":"Example Puzzle","mode":"sandbox"}}}},"schema":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/LinkInspection"}},"required":["data"],"type":"object"}}},"description":"Successful sandbox response.","headers":{"Cache-Control":{"description":"Authenticated data and linking tokens must not be cached.","schema":{"const":"private, no-store","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DeveloperError"},{"$ref":"#/components/schemas/NativeAdmissionError"}]}}},"description":"Invalid request or allocation/cap constraint."},"401":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DeveloperError"},{"$ref":"#/components/schemas/NativeAdmissionError"}]}}},"description":"Missing or invalid credential/token."},"403":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DeveloperError"},{"$ref":"#/components/schemas/NativeAdmissionError"}]}}},"description":"Admission or organization permission denied."},"404":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DeveloperError"},{"$ref":"#/components/schemas/NativeAdmissionError"}]}}},"description":"Scoped resource not found."},"409":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DeveloperError"},{"$ref":"#/components/schemas/NativeAdmissionError"}]}}},"description":"Replay conflict, expired link or incompatible resource state."},"413":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DeveloperError"},{"$ref":"#/components/schemas/NativeAdmissionError"}]}}},"description":"JSON body exceeds 16,384 UTF-8 bytes."},"415":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DeveloperError"},{"$ref":"#/components/schemas/NativeAdmissionError"}]}}},"description":"Content-Type must be application/json."},"426":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DeveloperError"},{"$ref":"#/components/schemas/NativeAdmissionError"}]}}},"description":"Native app/device capability update required before execution."},"503":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DeveloperError"},{"$ref":"#/components/schemas/NativeAdmissionError"}]}}},"description":"Platform disabled or admission/database dependency temporarily unavailable; no successful mutation is implied."}},"security":[{"NativeSessionBearer":[]}],"summary":"Inspect a linking request in the native consent flow","tags":["Native linking"],"x-codeSamples":[{"label":"cURL","lang":"cURL","source":"# Illustrative request only. Replace IDs/tokens; events need a current occurredAt.\n# Native examples require an already admitted native session/device permit.\ncurl --fail-with-body --max-time 15 -X POST \\\n  \"https://api.ggbucks.com/api/v0/game-sdk/v2/links/inspect\" \\\n  -H \"Authorization: Bearer ${GGBUCKS_NATIVE_SESSION}\" \\\n  -H \"x-ggbucks-device-auth-capability: challenge-v1\" \\\n  -H \"Content-Type: application/json\" \\\n  --data '{\"linkToken\":\"ggb_link_sandbox_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"}'"},{"label":"Node.js (native-app diagnostics)","lang":"JavaScript","source":"// For ggbucks native-app maintainers diagnosing an already admitted session only.\n// Never collect a player session on a game server or automate consent approval. Never log tokens or linkToken.\nconst url = new URL(\"https://api.ggbucks.com/api/v0/game-sdk/v2/links/inspect\");\nconst body = {\n  \"linkToken\": \"ggb_link_sandbox_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"\n};\nconst headers = {\n  \"Authorization\": \"Bearer PLACEHOLDER\",\n  \"Content-Type\": \"application/json\",\n  \"x-ggbucks-device-auth-capability\": \"challenge-v1\"\n};\nheaders.Authorization = 'Bearer ' + process.env.GGBUCKS_NATIVE_SESSION;\nconst response = await fetch(url, { method: 'POST', headers, redirect: 'error', signal: AbortSignal.timeout(15000), body: JSON.stringify(body) });\nconst result = await response.json();\nif (!response.ok) throw new Error(result.error?.code ?? 'request_failed');\n"},{"label":"C# (native-app diagnostics)","lang":"C#","source":"// Trusted server only for secret-key operations; native requests need an admitted session.\n// Never log credentials or linking tokens. Use a fixed API origin and disable redirects.\nusing var client = new System.Net.Http.HttpClient(new System.Net.Http.HttpClientHandler { AllowAutoRedirect = false });\nclient.Timeout = System.TimeSpan.FromSeconds(15);\nclient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue(\"Bearer\", System.Environment.GetEnvironmentVariable(\"GGBUCKS_NATIVE_SESSION\"));\nclient.DefaultRequestHeaders.Add(\"x-ggbucks-device-auth-capability\", \"challenge-v1\");\nvar url = \"https://api.ggbucks.com/api/v0/game-sdk/v2/links/inspect\";\n// Replace IDs/tokens; set a current occurredAt and durably retain event payload before sending.\nvar json = \"{\\\"linkToken\\\":\\\"ggb_link_sandbox_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\\\"}\";\nusing var content = new System.Net.Http.StringContent(json, System.Text.Encoding.UTF8, \"application/json\");\nusing var response = await client.PostAsync(url, content);\nvar payload = await response.Content.ReadAsStringAsync();\nresponse.EnsureSuccessStatusCode();\n// Parse the data/error envelope. Event status may be rejected even with HTTP 200."}],"x-ggbucks":{"audience":"public-integrators","credential":"native-session","mode":"sandbox","nativeAdmission":{"accountMustBeActive":true,"capability":"challenge-v1","denialBeforeExecutionHeader":"x-ggbucks-rejected-before-execution","minimumBuildPolicy":"conditional","permitScope":"exact-clerk-session"}}}}},"servers":[{"description":"ggbucks API (sandbox developer/game integration)","url":"https://api.ggbucks.com"}],"tags":[{"description":"Invited developer console, budgets and scoped records.","name":"Developer"},{"description":"Public client configuration and trusted game-server integration.","name":"Game SDK"},{"description":"Native ggbucks consent flow with canonical session/device admission.","name":"Native linking"}],"x-ggbucks":{"audience":"public-integrators","contractHash":"9ae5180d5f8f1de2cd25fc025b00af0ee00e1ae569dd787254956d0ebf116216","documentHash":"8d7060c0cb1ed48d2fce6d06f2ca41463dbbee0d1db0331a55634dc6cdf404e8","events":{"exactPayloadReplay":true,"freshEventsPerGamePerMinute":120,"idempotencyScope":["gameId","eventId"],"maxClockSkewSeconds":300,"metadata":{"maxArrayItems":100,"maxDepth":6,"maxObjectEntries":100,"maxUtf8Bytes":4096},"rejectedReasons":["daily_player_cap","game_budget_exhausted","game_paused","game_payout_ceiling","player_not_linked","project_budget_exhausted","project_payout_ceiling","rate_limited","timestamp_out_of_window","unknown_or_inactive_rule","user_unavailable"],"replayChangedPayloadStatus":409},"keys":{"publicPrefix":"ggb_pk_sandbox_","randomSuffixLength":43,"secretPrefix":"ggb_sk_sandbox_"},"linking":{"expiresAfterSeconds":600,"linkTokenPrefix":"ggb_link_sandbox_","nativeConsentRequired":true,"randomSuffixLength":43},"mode":"sandbox","nativeAdmission":{"accountMustBeActive":true,"capability":"challenge-v1","denialBeforeExecutionHeader":"x-ggbucks-rejected-before-execution","minimumBuildPolicy":"conditional","permitScope":"exact-clerk-session"},"pagination":{"defaultLimit":50,"maxLimit":100},"requestBodyMaxBytes":16384,"rewards":{"productionWalletCredit":false,"unitsPerDollar":1000},"schemaVersion":1,"snapshotLimits":{"events":200,"players":500}}}