at.happyproto.admin.createInvites
Invite customers: mint one single-use customers-space invite per address, each expiring after expiresInDays, and record which address each went to, so a redeemed invite pairs the address with the account. Redeemed with actor.acceptInvite. Staff only.
Details · procedure
| Kind | procedure |
|---|---|
| Authority | admin.happyproto.at |
| Indexed |
Checks
Validunlimited-stringdefs.invite.properties.emailNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.invite.properties.tokenNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.main.input.schema.properties.idempotencyKeyNo maxLength, maxGraphemes or format limits this string.
{
"$type": "com.atproto.lexicon.schema",
"defs": {
"invite": {
"properties": {
"email": {
"type": "string"
},
"expiresAt": {
"format": "datetime",
"type": "string"
},
"token": {
"description": "The secret the invitee redeems. Shown once: HappyView and the provisioner keep only its hash.",
"type": "string"
}
},
"required": [
"email",
"token",
"expiresAt"
],
"type": "object"
},
"main": {
"description": "Invite customers: mint one single-use customers-space invite per address, each expiring after expiresInDays, and record which address each went to, so a redeemed invite pairs the address with the account. Redeemed with actor.acceptInvite. Staff only.",
"errors": [
{
"description": "This endpoint requires an authenticated caller.",
"name": "AuthRequired"
},
{
"description": "The caller is not HappyProto staff, or may not invite to the customers space: only its creator or a HappyView super user may.",
"name": "Forbidden"
},
{
"description": "emails is not 1 to 50 distinct addresses, expiresInDays is not a whole number from 1 to 30, or idempotencyKey is not a UUID.",
"name": "InvalidRequest"
},
{
"description": "A request with this idempotencyKey is still running.",
"name": "OperationInProgress"
},
{
"description": "The customers space is not configured, an invite could not be made, or the addresses could not be recorded. Nothing is returned then: an invite whose address is not recorded is never handed out, and simply expires.",
"name": "Upstream"
}
],
"input": {
"encoding": "application/json",
"schema": {
"properties": {
"emails": {
"items": {
"maxLength": 254,
"type": "string"
},
"maxLength": 50,
"minLength": 1,
"type": "array"
},
"expiresInDays": {
"default": 14,
"maximum": 30,
"minimum": 1,
"type": "integer"
},
"idempotencyKey": {
"description": "A UUID, new for each attempt; a retry reuses it.",
"type": "string"
}
},
"required": [
"emails",
"idempotencyKey"
],
"type": "object"
}
},
"output": {
"encoding": "application/json",
"schema": {
"properties": {
"invites": {
"items": {
"ref": "#invite",
"type": "ref"
},
"type": "array"
}
},
"required": [
"invites"
],
"type": "object"
}
},
"type": "procedure"
}
},
"id": "at.happyproto.admin.createInvites",
"lexicon": 1
}