at.happyproto.admin.createInvites

happyproto.at

Documentation

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.

main procedure

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.

Input

Encodingapplication/json
emails array Required

No description available.

maxLength: 50 itemsminLength: 1 items
expiresInDays integer Optional

No description available.

minimum: 1maximum: 30
idempotencyKey string Required

A UUID, new for each attempt; a retry reuses it.

Output

Encodingapplication/json
invites array Required

No description available.

Errors

AuthRequired This endpoint requires an authenticated caller.
Forbidden The caller is not HappyProto staff, or may not invite to the customers space: only its creator or a HappyView super user may.
InvalidRequest emails is not 1 to 50 distinct addresses, expiresInDays is not a whole number from 1 to 30, or idempotencyKey is not a UUID.
OperationInProgress A request with this idempotencyKey is still running.
Upstream 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.
Try It

Requests are sent directly from your browser. Some servers may block requests due to CORS.

Base URL for XRPC calls (e.g., https://bsky.social)
Enter valid JSON for the request body
View raw schema
{
  "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"
}
invite object

No description available.

Properties

email string Required

No description available.

expiresAt string datetime Required

An RFC 3339 formatted timestamp.

token string Required

The secret the invitee redeems. Shown once: HappyView and the provisioner keep only its hash.

View raw schema
{
  "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"
}

Lexicon Garden

@