Class UserRequest

java.lang.Object
ai.vectros.types.UserRequest

public final class UserRequest extends Object
  • Method Details

    • getExternalId

      public String getExternalId()
      Returns:
      Your own unique identifier for this user. Drives idempotent upsert: if a user with this externalId already exists, it is returned instead of creating a duplicate.
    • getEmail

      public Optional<String> getEmail()
      Returns:
      The user's email address. Used for display and notifications only; it is not used for authentication to the Vectros API.
    • getStatus

      public Optional<UserRequestStatus> getStatus()
      Returns:
      The user's lifecycle status. ACTIVE users can be used normally; SUSPENDED users are retained but blocked from new operations. PENDING is a server-managed state for invitations awaiting acceptance — you cannot set it directly. (A pending user becomes ACTIVE by sending status=ACTIVE together with inviteToken, externalSubject, and emailVerifiedAttestation=true.) You may set only ACTIVE or SUSPENDED directly.
    • getType

      public Optional<UserRequestType> getType()
      Returns:
      The kind of user. HUMAN (the default) is a real person; SERVICE is a bot, agent, scheduled job, or other named integration with no specific person behind it. Service users may omit email. The type is immutable after creation — to change it, create a new user.
    • getPayload

      public Optional<Map<String,Object>> getPayload()
      Returns:
      Arbitrary key-value attributes to store on the user, useful for carrying additional data from your own system.
    • getSchemaId

      public Optional<String> getSchemaId()
      Returns:
      Optional ID of a record schema (created via POST /v1/schemas) that drives payload validation and lookup indexing. When set, the schema must belong to your account, the payload is validated against the schema's fields on save, and the schema's lookup fields become queryable via GET /v1/users (using type, field, and a lookup mode). When omitted, the payload is free-form and no lookup rows are written.
    • getInviteToken

      public Optional<String> getInviteToken()
      Returns:
      The raw invite token from the invitation email link. Required to activate a pending invitation (moving the user from PENDING to ACTIVE); ignored otherwise. The token's signature is verified server-side.
    • getExternalSubject

      public Optional<String> getExternalSubject()
      Returns:
      The user's identifier in your own authentication system (for example, a Cognito sub or Auth0 user ID). Required to activate a pending invitation; ignored on subsequent updates. Treat it as immutable once the user is activated.
    • getEmailVerifiedAttestation

      public Optional<Boolean> getEmailVerifiedAttestation()
      Returns:
      Your attestation that the invitee's email was verified by your authentication system before this call. Must be true to activate a pending invitation. Vectros cannot inspect your authentication system, so asserting this accurately is your responsibility.
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • getAdditionalProperties

      public Map<String,Object> getAdditionalProperties()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • builder

      public static UserRequest.ExternalIdStage builder()