Skip to content

Delete Invite Code

DELETE
/api/superadmin/invite-codes/{code_id}
curl --request DELETE \
--url https://example.com/api/superadmin/invite-codes/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>'

Hard-delete an invite code.

Only succeeds if uses_count == 0. Returns {deleted: false} (not 404) if the code has been used — use PATCH to deactivate instead.

code_id
required
Code Id
string format: uuid

Successful Response

Media type application/json
DeleteInviteCodeResponse
object
deleted
required
Deleted
boolean
Example generated
{
"deleted": true
}

Validation Error

Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}