Skip to Content
You are viewing a beta version of Clerk Docs
Visit the latest docs
Clerk logo

Clerk Docs

Ctrl + K
Go to clerk.com

Clerk Backend SDK

The Clerk Backend SDK(opens in a new tab) exposes Clerk's backend API resources and low-level authentication utilities for JavaScript environments. While the backend SDK is mainly used as a building block for Clerk's higher-level SDKs, it can also be used on its own for advanced flows and custom integrations.

Clerk SDKs expose an instance of the Clerk Backend SDK for use in server environments.

The Backend SDK is accessible via the clerkClient object if you are using Next.js.

import { clerkClient } from '@clerk/nextjs/server';

User operations

User operations are exposed under clerkClient.users. The following methods are available:

User get operations

User create operations

User update operations

User delete operations

Organization operations

Organization operations are exposed under clerkClient.organizations. The following methods are available:

Organization get operations

Organization create operations

Organization update operations

Organization delete operations

Allowlist Identifiers operations

Allowlist Identifiers operations are exposed under clerkClient.allowlistIdentifiers. The following methods are available:

Allowlist Identifiers get operations

Allowlist Identifiers create operations

Allowlist Identifiers delete operations

Session operations

Session operations are exposed under clerkClient.sessions. The following methods are available:

Session get operations

Session delete operations

Client operations

Client operations are exposed under clerkClient.clients. The following methods are available:

Client get operations

Invitation operations

Invitation operations are exposed under clerkClient.invitations. The following methods are available:

Invitation get operations

Invitation create operations

Invitation delete operations

Redirect URL operations

Redirect URLs are whitelisted URLs that facilitate secure authentication flows in native applications (e.g. React Native, Expo). In these contexts, Clerk ensures that security-critical nonces are passed only to the whitelisted URLs.

Redirect URL operations are exposed under clerkClient.redirectUrls. The following methods are available:

Redirect URL get operations

Redirect URL create operations

Redirect URL delete operations

Email address operations

A user can be associated with one or more email addresses.

Email address operations are exposed under clerkClient.emailAddresses. The following methods are available:

Email address get operations

Email address create operations

Email address update operations

Email address delete operations

Phone number operations

A user can be associated with one or more phone numbers.

Phone number operations are exposed under clerkClient.phoneNumbers. The following methods are available:

Phone number get operations

Phone number create operations

Phone number update operations

Phone number delete operations

Email create operations (deprecated)

This operation is now deprecated. Clerk no longer supports sending emails through Clerk's backend API.

SMS message operations (deprecated)

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

Last updated on March 7, 2024

What did you think of this content?

Clerk © 2024