Redeem invite code
POST
/api/v1/beta/codes/redeem
const url = 'https://api.ultimateteam.ai/api/v1/beta/codes/redeem';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"code":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.ultimateteam.ai/api/v1/beta/codes/redeem \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "code": "example" }'Redeem an invite code during signup. Public, rate-limited.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
RedeemCodeRequest
Request body for redeeming an invite code.
Attributes: code: The invite code string to redeem.
object
code
required
Code
Invite code to redeem
string
Examplegenerated
{ "code": "example"}Responses
Section titled “ Responses ”Successful Response
Media typeapplication/json
RedeemCodeResponse
Response body after attempting to redeem an invite code.
Attributes: valid: Whether the code was successfully redeemed. credit_limit: Credits provisioned (only present if valid). reason: Why redemption failed (only present if invalid).
object
Examplegenerated
{ "credit_limit": 1, "reason": "example", "valid": true}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}