Skip to content

Update Invite Code

PATCH
/api/superadmin/invite-codes/{code_id}
curl --request PATCH \
--url https://example.com/api/superadmin/invite-codes/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "is_active": true, "description": "example" }'

Update invite code description or active status.

code_id
required
Code Id
string format: uuid
Media type application/json
UpdateInviteCodeRequest
object
is_active
Any of:
boolean
description
Any of:
string
Example generated
{
"is_active": true,
"description": "example"
}

Successful Response

Media type application/json
InviteCodeResponse
object
id
required
Id
string
code
required
Code
string
description
Any of:
string
created_by
required
Created By
string
max_uses
Any of:
integer
uses_count
required
Uses Count
integer
expires_at
Any of:
string
org_id
Any of:
string
role
required
Role
string
is_active
required
Is Active
boolean
created_at
Any of:
string
Example generated
{
"id": "example",
"code": "example",
"description": "example",
"created_by": "example",
"max_uses": 1,
"uses_count": 1,
"expires_at": "example",
"org_id": "example",
"role": "example",
"is_active": true,
"created_at": "example"
}

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": {}
}
]
}