Docs

You are viewing an archived version of the docs.Go to latest version

Clerk Backend SDK

The Clerk Backend SDK 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';

The Backend SDK is accessible via the createClerkClient function if you are using Remix.

import { createClerkClient } from '@clerk/remix/api.server';

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

import { clerkClient } from "@clerk/fastify";

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

import clerkClient from '@clerk/clerk-sdk-node';

User operations

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

Get

Create

Update

Delete

Organization operations

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

Get

Create

Update

Delete

Allowlist Identifiers operations

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

Get

Create

Delete

Session operations

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

Get

Delete

Client operations

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

Get

Invitation operations

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

Get

Create

Delete

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

Email operations

Caution

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

Caution

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

Feedback

What did you think of this content?

Last updated on