Skip to main content

BUTLER API Reference

Module Information

Service Files:

  • Private: service/butler.js
  • Public: service/butler.js

Available Services: 26 Documented Services: 12


butler.check_domain

Check if a domain is associated with an organization. Validates domain, retrieves organization details, hub information, and user data. Used for organization-specific login flows and domain verification.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/butler.check_domain

Parameters

ParameterTypeRequiredDefaultDescription
domainstringNo--

Returns

FieldTypeDescription
typeany-
propertiesany-

Possible Errors

Error codes not documented


butler.check_token

Validate a token (used for password reset, email verification, etc.). Checks token validity and returns associated metadata. Also generates a unique identifier suggestion based on the email address.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/butler.check_token

Parameters

ParameterTypeRequiredDefaultDescription
secretstringYes--

Returns

FieldTypeDescription
typeany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
INVALID_LINK-Token is invalid or malformed
LINK_EXPIRES-Token has expired or is not active

butler.complete_signup

Complete the signup process. Final step in multi-stage registration flow to finalize account creation.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/butler.complete_signup

butler.get_reset_token

Generate and send a password reset token via email. Creates a secret token and emails it to the user for password reset flow. Token is valid for 12 hours.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/butler.get_reset_token

Parameters

ParameterTypeRequiredDefaultDescription
emailstringYes--

Returns

FieldTypeDescription
typeany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
INVALID_EMAIL_FORMAT-Email format is invalid
USER_NOT_FOUND-No user found with this email (returns empty object for security)

butler.hello

Get geographic IP information for the current request. Uses geoip-lite to lookup location data based on client IP address. Useful for localization and analytics.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/butler.hello

Parameters

No parameters

Returns

FieldTypeDescription
typeany-
propertiesany-

Possible Errors

Error codes not documented


butler.ping

Health check endpoint. Returns visitor information and debug data. Used for testing server connectivity and basic functionality.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/butler.ping

Parameters

No parameters

Returns

FieldTypeDescription
typeany-
descriptionany-
noteany-

Possible Errors

Error codes not documented


butler.unsubscribe

Unsubscribe an email from mailing list. Updates the emailing table to mark the email as unsubscribed.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/butler.unsubscribe

Parameters

ParameterTypeRequiredDefaultDescription
emailstringYes--

Returns

FieldTypeDescription
typeany-
propertiesany-

Possible Errors

Error codes not documented


butler.set_pass_phrase

Set new password through reset link. Validates the reset token and updates user password. Token must be used within 12 hours and is deleted after successful password change.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/butler.set_pass_phrase

Parameters

ParameterTypeRequiredDefaultDescription
secretstringYes--
idstringYes--
passwordstringYes--

Returns

FieldTypeDescription
typeany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
BAD_PASSWORD-Password does not meet requirements
USER_NOT_FOUND-User does not exist
TOKEN_EXPIRED-Reset token expired (older than 12 hours)

butler.signup

Create a new Drumee account. Validates socket binding, checks for existing user, creates account schema from pool, and automatically logs in the new user. Sends welcome email upon successful signup.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)
LoggingEnabled

Endpoint:

https://hostname/-/svc/butler.signup

Parameters

ParameterTypeRequiredDefaultDescription
socket_idstringYes--
passwordstringYes--
emailstringYes--
firstnamestringNo--

Returns

FieldTypeDescription
typeany-
descriptionany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
NOT_BOUND-Socket ID not bound to session
USER_EXISTS-Email already registered
SERVER_BUSY-No available schema pools
SERVER_ERROR-Database or internal error during signup

butler.google_auth

Initiate Google OAuth authentication flow. Redirects user to Google login page for authorization.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/butler.google_auth

butler.google_callback

Handle Google OAuth callback. Processes authorization code from Google and completes authentication or signup.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/butler.google_callback

butler.b2b_signup_company

B2B signup step 1: Collect company information. First step in business account registration flow.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/butler.b2b_signup_company

butler.b2b_signup_password

B2B signup step 2: Set account password. Create password for business account after company info provided.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)
LoggingEnabled

Endpoint:

https://hostname/-/svc/butler.b2b_signup_password

butler.b2b_signup_personaldata

B2B signup step 3: Collect personal data. Gather user's personal information for business account.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/butler.b2b_signup_personaldata

butler.b2b_signup_otpverify

B2B signup step 4: Verify OTP code. Validate one-time password sent via SMS to complete B2B registration.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/butler.b2b_signup_otpverify

butler.b2b_signup_otpresend

B2B signup: Resend OTP code. Request a new one-time password if previous code expired or not received.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/butler.b2b_signup_otpresend

butler.b2c_signup_skip_otpverify

B2C signup: Skip OTP verification. Allow user to complete registration without SMS verification.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/butler.b2c_signup_skip_otpverify

butler.b2c_signup_password

B2C signup: Set account password. Create password for consumer account during registration.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)
LoggingEnabled

Endpoint:

https://hostname/-/svc/butler.b2c_signup_password

butler.b2c_signup_otpverify

B2C signup: Verify OTP code. Validate one-time password sent via SMS to complete consumer registration.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/butler.b2c_signup_otpverify

butler.get_otp

Get OTP (One-Time Password) code. Generates and sends OTP via SMS to the user's registered mobile number. Used for two-factor authentication.

PropertyValue
ScopeHub (requires hub context)
PermissionOwner (7)

Endpoint:

https://hostname/-/svc/butler.get_otp

Parameters

No parameters

Returns

FieldTypeDescription
typeany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
SMS_SEND_FAILED-Failed to send SMS (invalid receiver or SMS service error)

butler.b2c_signup_otpresend

B2C signup: Resend OTP code. Request a new one-time password if previous code expired or not received.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/butler.b2c_signup_otpresend

butler.set_password

Set password in forgot password flow. Part of multi-step password reset process. Validates token, sets new password, and either sends OTP for verification or auto-logs in user based on OTP settings.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/butler.set_password

Parameters

ParameterTypeRequiredDefaultDescription
secretstringYes--
passwordstringYes--
idstringYes--

Returns

FieldTypeDescription
typeany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
BAD_PASSWORD-Password does not meet requirements
DRUMATE_NOT_EXISTS-User does not exist
INVALID_SECRET-Token is invalid or expired
INVALID_METHOD-Token method is not forgot_password
INVALID_STEP-Token step is not 'password'

butler.password_otpverify

Verify OTP code for password reset flow. Final step in forgot password with OTP. Validates OTP code, marks email and mobile as verified, logs in user, and completes the password reset process.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/butler.password_otpverify

Parameters

ParameterTypeRequiredDefaultDescription
secretstringYes--
codestringYes--

Returns

FieldTypeDescription
typeany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
INVALID_SECRET-Token is invalid or expired
INVALID_METHOD-Token method is not forgot_password
INVALID_STEP-Token step is not 'otpverify'
INVALID_OTP-OTP code is incorrect (step changes to 'otpresend' for retry)

butler.password_otpresend

Resend OTP code for password reset. Generates a new OTP and sends it via SMS. Used when user doesn't receive the first OTP or it expires.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/butler.password_otpresend

Parameters

ParameterTypeRequiredDefaultDescription
secretstringYes--

Returns

FieldTypeDescription
typeany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
INVALID_SECRET-Token is invalid or expired
INVALID_METHOD-Token method is not forgot_password
INVALID_STEP-Token step must be 'otpresend' or 'otpverify'

butler.transferbox_files_send

Send files via transferbox. Transfer files to external recipients without requiring them to have Drumee accounts.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/butler.transferbox_files_send

butler.transferbox_files_delete

Delete files from transferbox. Remove previously sent files from transferbox storage.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/butler.transferbox_files_delete

  • ACL System - Permission model
  • Service Routing - URL patterns
  • Error Handling - Error codes