Skip to Content
Clerk logo

Clerk Docs

Ctrl + K
Go to

Available methods

The Ruby SDK mirrors the Backend API. The SDK is organized into resources, which are listed below. Each resource has a set of methods that correspond to the API endpoints.

All examples assume you have an instance of the Clerk::SDK:

sdk =

Allowlist identifiers

Retrieve the list of allowlist identifiers.


Add a new identifier to the allowlist. If notify is true, an email will be sent to notify the owner of the identifier.

sdk.allowlist_identifiers.create(identifier: "", notify: true)

Delete an allowlist identifier, given a valid ID. Throws an error if the ID is invalid.



Toggle allowlist-only sign-ups on/off.

sdk.allowlist.update(restricted_to_allowlist: true)


Retrieve a single client by its ID, if the ID is valid. Throws an error otherwise.


Retrieve the list of clients.


Verify the JWT and return the client.



Send an email message to an email address ID belonging to another user.

sdk.emails.create( email_address_id: "ema_xyz", from_email_name: "noreply", subject: "Welcome", body: "<html>...</html>", )


Retrieve a single session by its ID, if the ID is valid. Throws an error otherwise.


Retrieve a list of sessions.


Revokes a session given its ID, if the ID is valid. Throws an error otherwise.


Verify whether a session with a given ID corresponds to the provided session token. Throws an error if the provided ID is invalid.

sdk.sessions.verify_token("sess_xyz", "jwt")

SMS Messages (deprecated)

This resource is deprecated. Clerk no longer supports sending SMS messages through Clerk's backend API.

Send an SMS message to a phone number ID belonging to another user.

sdk.sms_messages.create(phone_number_id: "idn_xyz", message: "Welcome!")


Retrieves a list of users.


Retrieves a list of users, with filters:

sdk.users.all(email_address: ["", ""])

Updates a user with a given ID. The provided ID must be valid, otherwise an error will be thrown.

sdk.users.update("user_xyz", {first_name: "John"})

Deletes a user given a valid ID. Throws an error otherwise.


Last updated on November 27, 2023

What did you think of this content?

Clerk © 2023