Skip to content

List invite codes

GET
/api/v1/beta/codes
curl --request GET \
--url https://api.ultimateteam.ai/api/v1/beta/codes \
--header 'X-API-Key: <X-API-Key>'

List all invite codes with redemption status. Admin only.

Successful Response

Media typeapplication/json
ListCodesResponse

Response body listing all invite codes.

Attributes: codes: List of invite code information. total: Total number of codes.

object
codes
required
Codes
Array<object>
InviteCodeInfo

Information about a single invite code.

Attributes: id: The invite code’s UUID. code: The invite code string. batch_id: Batch grouping identifier. credit_limit: Credits provisioned on redemption. is_active: Whether the code is active. expires_at: When the code expires. created_at: When the code was created. redeemed_by: UUID of the user who redeemed (if any). redeemed_at: When the code was redeemed (if any).

object
batch_id
required
Any of:
string
code
required
Code
string
created_at
required
Created At
string
credit_limit
required
Credit Limit
integer
expires_at
required
Expires At
string
id
required
Id
string
is_active
required
Is Active
boolean
redeemed_at
Any of:
string
redeemed_by
Any of:
string
total
required
Total
integer
Examplegenerated
{
"codes": [
{
"batch_id": "example",
"code": "example",
"created_at": "example",
"credit_limit": 1,
"expires_at": "example",
"id": "example",
"is_active": true,
"redeemed_at": "example",
"redeemed_by": "example"
}
],
"total": 1
}