@clerk/clerk-mcp
Version:
An MCP server for Clerk generated by @buildwithalyer
1,646 lines • 225 kB
text/typescript
export const tools = [
{
description:
"The Clerk interstitial endpoint serves an html page that loads clerk.js in order to check the user's authentication state.\nIt is used by Clerk SDKs when the user's authentication state cannot be immediately determined.",
method: "get",
name: "GetPublicInterstitial",
url: "https://api.clerk.com/v1/public/interstitial",
auth: [
{
bearerFormat: "sk_<environment>_<secret value>",
description:
'Secret key, obtained under "API Keys" in the Clerk Dashboard.',
key: "bearerAuth",
scheme: "bearer",
type: "http",
},
],
params: [
{
deprecated: true,
description: "Please use `frontend_api` instead",
in: "query",
name: "frontendApi",
required: false,
explode: true,
schema: {
type: "string",
},
style: "form",
},
{
description: "The Frontend API key of your instance",
in: "query",
name: "frontend_api",
required: false,
explode: true,
schema: {
type: "string",
},
style: "form",
},
{
description: "The publishable key of your instance",
in: "query",
name: "publishable_key",
required: false,
explode: true,
schema: {
type: "string",
},
style: "form",
},
{
description: "The proxy URL of your instance",
in: "query",
name: "proxy_url",
required: false,
explode: true,
schema: {
type: "string",
},
style: "form",
},
{
description: "The domain of your instance",
in: "query",
name: "domain",
required: false,
explode: true,
schema: {
type: "string",
},
style: "form",
},
{
description: "The sign in URL of your instance",
in: "query",
name: "sign_in_url",
required: false,
explode: true,
schema: {
type: "string",
},
style: "form",
},
{
description: "Whether to use the domain for the script URL",
in: "query",
name: "use_domain_for_script",
required: false,
explode: true,
schema: {
type: "boolean",
},
style: "form",
},
],
defs: {},
},
{
description: "Retrieve the JSON Web Key Set of the instance",
method: "get",
name: "GetJWKS",
url: "https://api.clerk.com/v1/jwks",
auth: [
{
bearerFormat: "sk_<environment>_<secret value>",
description:
'Secret key, obtained under "API Keys" in the Clerk Dashboard.',
key: "bearerAuth",
scheme: "bearer",
type: "http",
},
],
defs: {},
},
{
description:
"Returns a list of all clients. The clients are returned sorted by creation date,\nwith the newest clients appearing first.\nWarning: the endpoint is being deprecated and will be removed in future versions.",
method: "get",
name: "GetClientList",
url: "https://api.clerk.com/v1/clients",
auth: [
{
bearerFormat: "sk_<environment>_<secret value>",
description:
'Secret key, obtained under "API Keys" in the Clerk Dashboard.',
key: "bearerAuth",
scheme: "bearer",
type: "http",
},
],
params: [
{
description:
"Whether to paginate the results.\nIf true, the results will be paginated.\nIf false, the results will not be paginated.",
in: "query",
name: "paginated",
required: false,
explode: true,
schema: {
type: "boolean",
},
style: "form",
},
{
description:
"Applies a limit to the number of results returned.\nCan be used for paginating the results together with `offset`.",
in: "query",
name: "limit",
required: false,
explode: true,
schema: {
default: 10,
maximum: 500,
minimum: 1,
type: "integer",
},
style: "form",
},
{
description:
"Skip the first `offset` results when paginating.\nNeeds to be an integer greater or equal to zero.\nTo be used in conjunction with `limit`.",
in: "query",
name: "offset",
required: false,
explode: true,
schema: {
default: 0,
minimum: 0,
type: "integer",
},
style: "form",
},
],
defs: {},
},
{
description: "Verifies the client in the provided token",
method: "post",
name: "VerifyClient",
url: "https://api.clerk.com/v1/clients/verify",
auth: [
{
bearerFormat: "sk_<environment>_<secret value>",
description:
'Secret key, obtained under "API Keys" in the Clerk Dashboard.',
key: "bearerAuth",
scheme: "bearer",
type: "http",
},
],
body: {
required: ["token"],
type: "object",
additionalProperties: false,
properties: {
token: {
description: "A JWT that represents the active client.",
type: "string",
},
},
description: "Parameters.",
},
contentType: "application/json",
defs: {},
},
{
description: "Returns the details of a client.",
method: "get",
name: "GetClient",
url: "https://api.clerk.com/v1/clients/{client_id}",
auth: [
{
bearerFormat: "sk_<environment>_<secret value>",
description:
'Secret key, obtained under "API Keys" in the Clerk Dashboard.',
key: "bearerAuth",
scheme: "bearer",
type: "http",
},
],
params: [
{
description: "Client ID.",
in: "path",
name: "client_id",
required: true,
explode: false,
schema: {
type: "string",
},
style: "simple",
},
],
defs: {},
},
{
description: "Create a new email address",
method: "post",
name: "CreateEmailAddress",
url: "https://api.clerk.com/v1/email_addresses",
auth: [
{
bearerFormat: "sk_<environment>_<secret value>",
description:
'Secret key, obtained under "API Keys" in the Clerk Dashboard.',
key: "bearerAuth",
scheme: "bearer",
type: "http",
},
],
body: {
required: ["user_id", "email_address"],
type: "object",
properties: {
user_id: {
description: "The ID representing the user",
type: "string",
},
email_address: {
description:
"The new email address. Must adhere to the RFC 5322 specification for email address format.",
type: "string",
},
verified: {
description:
"When created, the email address will be marked as verified.",
type: ["boolean", "null"],
},
primary: {
description:
"Create this email address as the primary email address for the user.\nDefault: false, unless it is the first email address.",
type: ["boolean", "null"],
},
},
},
contentType: "application/json",
defs: {},
},
{
description: "Returns the details of an email address.",
method: "get",
name: "GetEmailAddress",
url: "https://api.clerk.com/v1/email_addresses/{email_address_id}",
auth: [
{
bearerFormat: "sk_<environment>_<secret value>",
description:
'Secret key, obtained under "API Keys" in the Clerk Dashboard.',
key: "bearerAuth",
scheme: "bearer",
type: "http",
},
],
params: [
{
description: "The ID of the email address to retrieve",
in: "path",
name: "email_address_id",
required: true,
explode: false,
schema: {
type: "string",
},
style: "simple",
},
],
defs: {},
},
{
description: "Delete the email address with the given ID",
method: "delete",
name: "DeleteEmailAddress",
url: "https://api.clerk.com/v1/email_addresses/{email_address_id}",
auth: [
{
bearerFormat: "sk_<environment>_<secret value>",
description:
'Secret key, obtained under "API Keys" in the Clerk Dashboard.',
key: "bearerAuth",
scheme: "bearer",
type: "http",
},
],
params: [
{
description: "The ID of the email address to delete",
in: "path",
name: "email_address_id",
required: true,
explode: false,
schema: {
type: "string",
},
style: "simple",
},
],
defs: {},
},
{
description: "Updates an email address.",
method: "patch",
name: "UpdateEmailAddress",
url: "https://api.clerk.com/v1/email_addresses/{email_address_id}",
auth: [
{
bearerFormat: "sk_<environment>_<secret value>",
description:
'Secret key, obtained under "API Keys" in the Clerk Dashboard.',
key: "bearerAuth",
scheme: "bearer",
type: "http",
},
],
params: [
{
description: "The ID of the email address to update",
in: "path",
name: "email_address_id",
required: true,
explode: false,
schema: {
type: "string",
},
style: "simple",
},
],
body: {
type: "object",
properties: {
verified: {
description: "The email address will be marked as verified.",
type: ["boolean", "null"],
},
primary: {
description:
"Set this email address as the primary email address for the user.",
type: ["boolean", "null"],
},
},
},
contentType: "application/json",
defs: {},
},
{
description: "Create a new phone number",
method: "post",
name: "CreatePhoneNumber",
url: "https://api.clerk.com/v1/phone_numbers",
auth: [
{
bearerFormat: "sk_<environment>_<secret value>",
description:
'Secret key, obtained under "API Keys" in the Clerk Dashboard.',
key: "bearerAuth",
scheme: "bearer",
type: "http",
},
],
body: {
required: ["user_id", "phone_number"],
type: "object",
properties: {
user_id: {
description: "The ID representing the user",
type: "string",
},
phone_number: {
description:
"The new phone number. Must adhere to the E.164 standard for phone number format.",
type: "string",
},
verified: {
description:
"When created, the phone number will be marked as verified.",
type: ["boolean", "null"],
},
primary: {
description:
"Create this phone number as the primary phone number for the user. Default: false, unless it is the first phone number.",
type: ["boolean", "null"],
},
reserved_for_second_factor: {
description:
"Create this phone number as reserved for multi-factor authentication. The phone number must also be verified.\nIf there are no other reserved second factors, the phone number will be set as the default second factor.",
type: ["boolean", "null"],
},
},
},
contentType: "application/json",
defs: {},
},
{
description: "Returns the details of a phone number",
method: "get",
name: "GetPhoneNumber",
url: "https://api.clerk.com/v1/phone_numbers/{phone_number_id}",
auth: [
{
bearerFormat: "sk_<environment>_<secret value>",
description:
'Secret key, obtained under "API Keys" in the Clerk Dashboard.',
key: "bearerAuth",
scheme: "bearer",
type: "http",
},
],
params: [
{
description: "The ID of the phone number to retrieve",
in: "path",
name: "phone_number_id",
required: true,
explode: false,
schema: {
type: "string",
},
style: "simple",
},
],
defs: {},
},
{
description: "Delete the phone number with the given ID",
method: "delete",
name: "DeletePhoneNumber",
url: "https://api.clerk.com/v1/phone_numbers/{phone_number_id}",
auth: [
{
bearerFormat: "sk_<environment>_<secret value>",
description:
'Secret key, obtained under "API Keys" in the Clerk Dashboard.',
key: "bearerAuth",
scheme: "bearer",
type: "http",
},
],
params: [
{
description: "The ID of the phone number to delete",
in: "path",
name: "phone_number_id",
required: true,
explode: false,
schema: {
type: "string",
},
style: "simple",
},
],
defs: {},
},
{
description: "Updates a phone number",
method: "patch",
name: "UpdatePhoneNumber",
url: "https://api.clerk.com/v1/phone_numbers/{phone_number_id}",
auth: [
{
bearerFormat: "sk_<environment>_<secret value>",
description:
'Secret key, obtained under "API Keys" in the Clerk Dashboard.',
key: "bearerAuth",
scheme: "bearer",
type: "http",
},
],
params: [
{
description: "The ID of the phone number to update",
in: "path",
name: "phone_number_id",
required: true,
explode: false,
schema: {
type: "string",
},
style: "simple",
},
],
body: {
type: "object",
properties: {
verified: {
description: "The phone number will be marked as verified.",
type: ["boolean", "null"],
},
primary: {
description:
"Set this phone number as the primary phone number for the user.",
type: ["boolean", "null"],
},
reserved_for_second_factor: {
description:
"Set this phone number as reserved for multi-factor authentication.\nThe phone number must also be verified.\nIf there are no other reserved second factors, the phone number will be set as the default second factor.",
type: ["boolean", "null"],
},
},
},
contentType: "application/json",
defs: {},
},
{
description:
"Returns a list of all sessions.\nThe sessions are returned sorted by creation date, with the newest sessions appearing first.\n**Deprecation Notice (2024-01-01):** All parameters were initially considered optional, however\nmoving forward at least one of `client_id` or `user_id` parameters should be provided.",
method: "get",
name: "GetSessionList",
url: "https://api.clerk.com/v1/sessions",
auth: [
{
bearerFormat: "sk_<environment>_<secret value>",
description:
'Secret key, obtained under "API Keys" in the Clerk Dashboard.',
key: "bearerAuth",
scheme: "bearer",
type: "http",
},
],
params: [
{
description: "List sessions for the given client",
in: "query",
name: "client_id",
required: false,
explode: true,
schema: {
type: "string",
},
style: "form",
},
{
description: "List sessions for the given user",
in: "query",
name: "user_id",
required: false,
explode: true,
schema: {
type: "string",
},
style: "form",
},
{
description: "Filter sessions by the provided status",
in: "query",
name: "status",
required: false,
explode: true,
schema: {
enum: [
"abandoned",
"active",
"ended",
"expired",
"removed",
"replaced",
"revoked",
],
type: "string",
},
style: "form",
},
{
description:
"Whether to paginate the results.\nIf true, the results will be paginated.\nIf false, the results will not be paginated.",
in: "query",
name: "paginated",
required: false,
explode: true,
schema: {
type: "boolean",
},
style: "form",
},
{
description:
"Applies a limit to the number of results returned.\nCan be used for paginating the results together with `offset`.",
in: "query",
name: "limit",
required: false,
explode: true,
schema: {
default: 10,
maximum: 500,
minimum: 1,
type: "integer",
},
style: "form",
},
{
description:
"Skip the first `offset` results when paginating.\nNeeds to be an integer greater or equal to zero.\nTo be used in conjunction with `limit`.",
in: "query",
name: "offset",
required: false,
explode: true,
schema: {
default: 0,
minimum: 0,
type: "integer",
},
style: "form",
},
],
defs: {},
},
{
description:
"Create a new active session for the provided user ID.\n\n**This operation is intended only for use in testing, and is not available for production instances.** If you are looking to generate a user session from the backend,\nwe recommend using the [Sign-in Tokens](https://clerk.com/docs/reference/backend-api/tag/Sign-in-Tokens#operation/CreateSignInToken) resource instead.",
method: "post",
name: "createSession",
url: "https://api.clerk.com/v1/sessions",
auth: [
{
bearerFormat: "sk_<environment>_<secret value>",
description:
'Secret key, obtained under "API Keys" in the Clerk Dashboard.',
key: "bearerAuth",
scheme: "bearer",
type: "http",
},
],
body: {
required: ["user_id"],
type: "object",
properties: {
user_id: {
description: "The ID representing the user",
type: "string",
},
},
},
contentType: "application/json",
defs: {},
},
{
description: "Retrieve the details of a session",
method: "get",
name: "GetSession",
url: "https://api.clerk.com/v1/sessions/{session_id}",
auth: [
{
bearerFormat: "sk_<environment>_<secret value>",
description:
'Secret key, obtained under "API Keys" in the Clerk Dashboard.',
key: "bearerAuth",
scheme: "bearer",
type: "http",
},
],
params: [
{
description: "The ID of the session",
in: "path",
name: "session_id",
required: true,
explode: false,
schema: {
type: "string",
},
style: "simple",
},
],
defs: {},
},
{
description:
'Sets the status of a session as "revoked", which is an unauthenticated state.\nIn multi-session mode, a revoked session will still be returned along with its client object, however the user will need to sign in again.',
method: "post",
name: "RevokeSession",
url: "https://api.clerk.com/v1/sessions/{session_id}/revoke",
auth: [
{
bearerFormat: "sk_<environment>_<secret value>",
description:
'Secret key, obtained under "API Keys" in the Clerk Dashboard.',
key: "bearerAuth",
scheme: "bearer",
type: "http",
},
],
params: [
{
description: "The ID of the session",
in: "path",
name: "session_id",
required: true,
explode: false,
schema: {
type: "string",
},
style: "simple",
},
],
defs: {},
},
{
description:
"Returns the session if it is authenticated, otherwise returns an error.\nWARNING: This endpoint is deprecated and will be removed in future versions. We strongly recommend switching to networkless verification using short-lived session tokens,\n which is implemented transparently in all recent SDK versions (e.g. [NodeJS SDK](https://clerk.com/docs/backend-requests/handling/nodejs#clerk-express-require-auth)).\n For more details on how networkless verification works, refer to our [Session Tokens documentation](https://clerk.com/docs/backend-requests/resources/session-tokens).",
method: "post",
name: "VerifySession",
url: "https://api.clerk.com/v1/sessions/{session_id}/verify",
auth: [
{
bearerFormat: "sk_<environment>_<secret value>",
description:
'Secret key, obtained under "API Keys" in the Clerk Dashboard.',
key: "bearerAuth",
scheme: "bearer",
type: "http",
},
],
params: [
{
description: "The ID of the session",
in: "path",
name: "session_id",
required: true,
explode: false,
schema: {
type: "string",
},
style: "simple",
},
],
body: {
type: "object",
additionalProperties: false,
properties: {
token: {
description:
"The JWT that is sent via the `__session` cookie from your frontend.\nNote: this JWT must be associated with the supplied session ID.",
type: "string",
},
},
description: "Parameters.",
},
contentType: "application/json",
defs: {},
},
{
description: "Creates a session JSON Web Token (JWT) based on a session.",
method: "post",
name: "CreateSessionToken",
url: "https://api.clerk.com/v1/sessions/{session_id}/tokens",
auth: [
{
bearerFormat: "sk_<environment>_<secret value>",
description:
'Secret key, obtained under "API Keys" in the Clerk Dashboard.',
key: "bearerAuth",
scheme: "bearer",
type: "http",
},
],
params: [
{
description: "The ID of the session",
in: "path",
name: "session_id",
required: true,
explode: false,
schema: {
type: "string",
},
style: "simple",
},
],
body: {
type: "object",
properties: {
expires_in_seconds: {
description:
"Use this parameter to override the default session token lifetime.",
maximum: 315360000,
minimum: 30,
type: ["number", "null"],
},
},
},
contentType: "application/json",
defs: {},
},
{
description:
"Creates a JSON Web Token(JWT) based on a session and a JWT Template name defined for your instance",
method: "post",
name: "CreateSessionTokenFromTemplate",
url: "https://api.clerk.com/v1/sessions/{session_id}/tokens/{template_name}",
auth: [
{
bearerFormat: "sk_<environment>_<secret value>",
description:
'Secret key, obtained under "API Keys" in the Clerk Dashboard.',
key: "bearerAuth",
scheme: "bearer",
type: "http",
},
],
params: [
{
description: "The ID of the session",
in: "path",
name: "session_id",
required: true,
explode: false,
schema: {
type: "string",
},
style: "simple",
},
{
description:
"The name of the JWT Template defined in your instance (e.g. `custom_hasura`).",
in: "path",
name: "template_name",
required: true,
explode: false,
schema: {
type: "string",
},
style: "simple",
},
],
body: {
type: "object",
properties: {
expires_in_seconds: {
description: "Use this parameter to override the JWT token lifetime.",
maximum: 315360000,
minimum: 30,
type: ["number", "null"],
},
},
},
contentType: "application/json",
defs: {},
},
{
description:
"Returns a list of all templates.\nThe templates are returned sorted by position.",
method: "get",
name: "GetTemplateList",
url: "https://api.clerk.com/v1/templates/{template_type}",
auth: [
{
bearerFormat: "sk_<environment>_<secret value>",
description:
'Secret key, obtained under "API Keys" in the Clerk Dashboard.',
key: "bearerAuth",
scheme: "bearer",
type: "http",
},
],
params: [
{
description: "The type of templates to list (email or SMS)",
in: "path",
name: "template_type",
required: true,
explode: false,
schema: {
enum: ["email", "sms"],
type: "string",
},
style: "simple",
},
{
description:
"Whether to paginate the results.\nIf true, the results will be paginated.\nIf false, the results will not be paginated.",
in: "query",
name: "paginated",
required: false,
explode: true,
schema: {
type: "boolean",
},
style: "form",
},
{
description:
"Applies a limit to the number of results returned.\nCan be used for paginating the results together with `offset`.",
in: "query",
name: "limit",
required: false,
explode: true,
schema: {
default: 10,
maximum: 500,
minimum: 1,
type: "integer",
},
style: "form",
},
{
description:
"Skip the first `offset` results when paginating.\nNeeds to be an integer greater or equal to zero.\nTo be used in conjunction with `limit`.",
in: "query",
name: "offset",
required: false,
explode: true,
schema: {
default: 0,
minimum: 0,
type: "integer",
},
style: "form",
},
],
defs: {},
},
{
description: "Returns the details of a template",
method: "get",
name: "GetTemplate",
url: "https://api.clerk.com/v1/templates/{template_type}/{slug}",
auth: [
{
bearerFormat: "sk_<environment>_<secret value>",
description:
'Secret key, obtained under "API Keys" in the Clerk Dashboard.',
key: "bearerAuth",
scheme: "bearer",
type: "http",
},
],
params: [
{
description: "The type of templates to retrieve (email or SMS)",
in: "path",
name: "template_type",
required: true,
explode: false,
schema: {
enum: ["email", "sms"],
type: "string",
},
style: "simple",
},
{
description:
"The slug (i.e. machine-friendly name) of the template to retrieve",
in: "path",
name: "slug",
required: true,
explode: false,
schema: {
type: "string",
},
style: "simple",
},
],
defs: {},
},
{
description: "Updates the existing template of the given type and slug",
method: "put",
name: "UpsertTemplate",
url: "https://api.clerk.com/v1/templates/{template_type}/{slug}",
auth: [
{
bearerFormat: "sk_<environment>_<secret value>",
description:
'Secret key, obtained under "API Keys" in the Clerk Dashboard.',
key: "bearerAuth",
scheme: "bearer",
type: "http",
},
],
params: [
{
description: "The type of template to update",
in: "path",
name: "template_type",
required: true,
explode: false,
schema: {
enum: ["email", "sms"],
type: "string",
},
style: "simple",
},
{
description: "The slug of the template to update",
in: "path",
name: "slug",
required: true,
explode: false,
schema: {
type: "string",
},
style: "simple",
},
],
body: {
type: "object",
additionalProperties: false,
properties: {
name: {
description: "The user-friendly name of the template",
type: "string",
},
subject: {
description:
"The email subject.\nApplicable only to email templates.",
type: ["string", "null"],
},
markup: {
description:
"The editor markup used to generate the body of the template",
type: ["string", "null"],
},
body: {
description: "The template body before variable interpolation",
type: "string",
},
delivered_by_clerk: {
description:
"Whether Clerk should deliver emails or SMS messages based on the current template",
type: ["boolean", "null"],
},
from_email_name: {
description:
"The local part of the From email address that will be used for emails.\nFor example, in the address 'hello@example.com', the local part is 'hello'.\nApplicable only to email templates.",
type: "string",
},
reply_to_email_name: {
description:
"The local part of the Reply To email address that will be used for emails.\nFor example, in the address 'hello@example.com', the local part is 'hello'.\nApplicable only to email templates.",
type: "string",
},
},
},
contentType: "application/json",
defs: {},
},
{
description: "Reverts an updated template to its default state",
method: "post",
name: "RevertTemplate",
url: "https://api.clerk.com/v1/templates/{template_type}/{slug}/revert",
auth: [
{
bearerFormat: "sk_<environment>_<secret value>",
description:
'Secret key, obtained under "API Keys" in the Clerk Dashboard.',
key: "bearerAuth",
scheme: "bearer",
type: "http",
},
],
params: [
{
description: "The type of template to revert",
in: "path",
name: "template_type",
required: true,
explode: false,
schema: {
enum: ["email", "sms"],
type: "string",
},
style: "simple",
},
{
description: "The slug of the template to revert",
in: "path",
name: "slug",
required: true,
explode: false,
schema: {
type: "string",
},
style: "simple",
},
],
defs: {},
},
{
description:
"Returns a preview of a template for a given template_type, slug and body",
method: "post",
name: "PreviewTemplate",
url: "https://api.clerk.com/v1/templates/{template_type}/{slug}/preview",
auth: [
{
bearerFormat: "sk_<environment>_<secret value>",
description:
'Secret key, obtained under "API Keys" in the Clerk Dashboard.',
key: "bearerAuth",
scheme: "bearer",
type: "http",
},
],
params: [
{
description: "The type of template to preview",
in: "path",
name: "template_type",
required: true,
explode: false,
schema: {
type: "string",
},
style: "simple",
},
{
description: "The slug of the template to preview",
in: "path",
name: "slug",
required: true,
explode: false,
schema: {
type: "string",
},
style: "simple",
},
],
body: {
type: "object",
additionalProperties: false,
properties: {
subject: {
description:
"The email subject.\nApplicable only to email templates.",
type: ["string", "null"],
},
body: {
description: "The template body before variable interpolation",
type: "string",
},
from_email_name: {
description:
"The local part of the From email address that will be used for emails.\nFor example, in the address 'hello@example.com', the local part is 'hello'.\nApplicable only to email templates.",
type: "string",
},
reply_to_email_name: {
description:
"The local part of the Reply To email address that will be used for emails.\nFor example, in the address 'hello@example.com', the local part is 'hello'.\nApplicable only to email templates.",
type: "string",
},
},
description: "Required parameters",
},
contentType: "application/json",
defs: {},
},
{
description:
"Toggles the delivery by Clerk for a template of a given type and slug.\nIf disabled, Clerk will not deliver the resulting email or SMS.\nThe app developer will need to listen to the `email.created` or `sms.created` webhooks in order to handle delivery themselves.",
method: "post",
name: "ToggleTemplateDelivery",
url: "https://api.clerk.com/v1/templates/{template_type}/{slug}/toggle_delivery",
auth: [
{
bearerFormat: "sk_<environment>_<secret value>",
description:
'Secret key, obtained under "API Keys" in the Clerk Dashboard.',
key: "bearerAuth",
scheme: "bearer",
type: "http",
},
],
params: [
{
description: "The type of template to toggle delivery for",
in: "path",
name: "template_type",
required: true,
explode: false,
schema: {
enum: ["email", "sms"],
type: "string",
},
style: "simple",
},
{
description: "The slug of the template for which to toggle delivery",
in: "path",
name: "slug",
required: true,
explode: false,
schema: {
type: "string",
},
style: "simple",
},
],
body: {
type: "object",
additionalProperties: false,
properties: {
delivered_by_clerk: {
description:
"Whether Clerk should deliver emails or SMS messages based on the current template",
type: "boolean",
},
},
},
contentType: "application/json",
defs: {},
},
{
description:
"Returns a list of all users.\nThe users are returned sorted by creation date, with the newest users appearing first.",
method: "get",
name: "GetUserList",
url: "https://api.clerk.com/v1/users",
auth: [
{
bearerFormat: "sk_<environment>_<secret value>",
description:
'Secret key, obtained under "API Keys" in the Clerk Dashboard.',
key: "bearerAuth",
scheme: "bearer",
type: "http",
},
],
params: [
{
description:
"Returns users with the specified email addresses.\nAccepts up to 100 email addresses.\nAny email addresses not found are ignored.",
in: "query",
name: "email_address",
required: false,
explode: true,
schema: {
type: "array",
items: {
type: "string",
},
},
style: "form",
},
{
description:
"Returns users with the specified phone numbers.\nAccepts up to 100 phone numbers.\nAny phone numbers not found are ignored.",
in: "query",
name: "phone_number",
required: false,
explode: true,
schema: {
type: "array",
items: {
type: "string",
},
},
style: "form",
},
{
description:
"Returns users with the specified external ids.\nFor each external id, the `+` and `-` can be\nprepended to the id, which denote whether the\nrespective external id should be included or\nexcluded from the result set.\nAccepts up to 100 external ids.\nAny external ids not found are ignored.",
in: "query",
name: "external_id",
required: false,
explode: true,
schema: {
type: "array",
items: {
type: "string",
},
},
style: "form",
},
{
description:
"Returns users with the specified usernames.\nAccepts up to 100 usernames.\nAny usernames not found are ignored.",
in: "query",
name: "username",
required: false,
explode: true,
schema: {
type: "array",
items: {
type: "string",
},
},
style: "form",
},
{
description:
"Returns users with the specified web3 wallet addresses.\nAccepts up to 100 web3 wallet addresses.\nAny web3 wallet addressed not found are ignored.",
in: "query",
name: "web3_wallet",
required: false,
explode: true,
schema: {
type: "array",
items: {
type: "string",
},
},
style: "form",
},
{
description:
"Returns users with the user ids specified.\nFor each user id, the `+` and `-` can be\nprepended to the id, which denote whether the\nrespective user id should be included or\nexcluded from the result set.\nAccepts up to 100 user ids.\nAny user ids not found are ignored.",
in: "query",
name: "user_id",
required: false,
explode: true,
schema: {
type: "array",
items: {
type: "string",
},
},
style: "form",
},
{
description:
"Returns users that have memberships to the\ngiven organizations.\nFor each organization id, the `+` and `-` can be\nprepended to the id, which denote whether the\nrespective organization should be included or\nexcluded from the result set.\nAccepts up to 100 organization ids.",
in: "query",
name: "organization_id",
required: false,
explode: true,
schema: {
type: "array",
items: {
type: "string",
},
},
style: "form",
},
{
description:
"Returns users that match the given query.\nFor possible matches, we check the email addresses, phone numbers, usernames, web3 wallets, user ids, first and last names.\nThe query value doesn't need to match the exact value you are looking for, it is capable of partial matches as well.",
in: "query",
name: "query",
required: false,
explode: true,
schema: {
type: "string",
},
style: "form",
},
{
description:
"Returns users with emails that match the given query, via case-insensitive partial match.\nFor example, `email_address_query=ello` will match a user with the email `HELLO@example.com`.",
in: "query",
name: "email_address_query",
required: false,
explode: true,
schema: {
type: "string",
},
style: "form",
},
{
description:
"Returns users with phone numbers that match the given query, via case-insensitive partial match.\nFor example, `phone_number_query=555` will match a user with the phone number `+1555xxxxxxx`.",
in: "query",
name: "phone_number_query",
required: false,
explode: true,
schema: {
type: "string",
},
style: "form",
},
{
description:
"Returns users with usernames that match the given query, via case-insensitive partial match.\nFor example, `username_query=CoolUser` will match a user with the username `SomeCoolUser`.",
in: "query",
name: "username_query",
required: false,
explode: true,
schema: {
type: "string",
},
style: "form",
},
{
description:
"Returns users with names that match the given query, via case-insensitive partial match.",
in: "query",
name: "name_query",
required: false,
explode: true,
schema: {
type: "string",
},
style: "form",
},
{
description:
"Returns users which are either banned (`banned=true`) or not banned (`banned=false`).",
in: "query",
name: "banned",
required: false,
explode: true,
schema: {
type: "boolean",
},
style: "form",
},
{
description:
"Returns users whose last session activity was before the given date (with millisecond precision).\nExample: use 1700690400000 to retrieve users whose last session activity was before 2023-11-23.",
in: "query",
name: "last_active_at_before",
required: false,
example: 1700690400000,
explode: true,
schema: {
type: "integer",
},
style: "form",
},
{
description:
"Returns users whose last session activity was after the given date (with millisecond precision).\nExample: use 1700690400000 to retrieve users whose last session activity was after 2023-11-23.",
in: "query",
name: "last_active_at_after",
required: false,
example: 1700690400000,
explode: true,
schema: {
type: "integer",
},
style: "form",
},
{
deprecated: true,
description:
"Returns users that had session activity since the given date.\nExample: use 1700690400000 to retrieve users that had session activity from 2023-11-23 until the current day.\nDeprecated in favor of `last_active_at_after`.",
in: "query",
name: "last_active_at_since",
required: false,
example: 1700690400000,
explode: true,
schema: {
type: "integer",
},
style: "form",
},
{
description:
"Returns users who have been created before the given date (with millisecond precision).\nExample: use 1730160000000 to retrieve users who have been created before 2024-10-29.",
in: "query",
name: "created_at_before",
required: false,
example: 1730160000000,
explode: true,
schema: {
type: "integer",
},
style: "form",
},
{
description:
"Returns users who have been created after the given date (with millisecond precision).\nExample: use 1730160000000 to retrieve users who have been created after 2024-10-29.",
in: "query",
name: "created_at_after",
required: false,
example: 1730160000000,
explode: true,
schema: {
type: "integer",
},
style: "form",
},
{
description:
"Applies a limit to the number of results returned.\nCan be used for paginating the results together with `offset`.",
in: "query",
name: "limit",
required: false,
explode: true,
schema: {
default: 10,
maximum: 500,
minimum: 1,
type: "integer",
},
style: "form",
},
{
description:
"Skip the first `offset` results when paginating.\nNeeds to be an integer greater or equal to zero.\nTo be used in conjunction with `limit`.",
in: "query",
name: "offset",
required: false,
explode: true,
schema: {
default: 0,
minimum: 0,
type: "integer",
},
style: "form",
},
{
description:
"Allows to return users in a particular order.\nAt the moment, you can order the returned users by their `created_at`,`updated_at`,`email_address`,`web3wallet`,`first_name`,`last_name`,`phone_number`,`username`,`last_active_at`,`last_sign_in_at`.\nIn order to specify the direction, you can use the `+/-` symbols prepended in the property to order by.\nFor example, if you want users to be returned in descending order according to their `created_at` property, you can use `-created_at`.\nIf you don't use `+` or `-`, then `+` is implied. We only support one `order_by` parameter, and if multiple `order_by` parameters are provided, we will only keep the first one. For example,\nif you pass `order_by=username&order_by=created_at`, we will consider only the first `order_by` parameter, which is `username`. The `created_at` parameter will be ignored in this case.",
in: "query",
name: "order_by",
required: false,
explode: true,
schema: {
default: "-created_at",
type: "string",
},
style: "form",
},
],
defs: {},
},
{
description:
"Creates a new user. Your user management settings determine how you should setup your user model.\n\nAny email address and phone number created using this method will be marked as verified.\n\nNote: If you are performing a migration, check out our guide on [zero downtime migrations](https://clerk.com/docs/deployments/migrate-overview).\n\nA rate limit rule of 20 requests per 10 seconds is applied to this endpoint.",
method: "post",
name: "CreateUser",
url: "https://api.clerk.com/v1/users",
auth: [
{
bearerFormat: "sk_<environment>_<secret value>",
description:
'Secret key, obtained under "API Keys" in the Clerk Dashboard.',
key: "bearerAuth",
scheme: "bearer",
type: "http",
},
],
body: {
type: "object",
additionalProperties: false,
properties: {
external_id: {
description:
"The ID of the user as used in your external systems or your previous authentication solution.\nMust be unique across your instance.",
type: ["string", "null"],
},
first_name: {
description: "The first name to assign to the user",
type: ["string", "null"],
},
last_name: {
description: "The last name to assign to the user",
type: ["string", "null"],
},
email_address: {
description:
"Email addresses to add to the user.\nMust be unique across your instance.\nThe first email address will be set as the user's primary email address.",
type: "array",
items: {
type: "string",
},
},
phone_number: {
description:
"Phone numbers to add to the user.\nMust be unique across your instance.\nThe first phone number will be set as the user's primary phone number.",
type: "array",
items: {
type: "string",
},
},
web3_wallet: {
description:
"Web3 wallets to add to the user.\nMust be unique across your instance.\nThe first wallet will be set as the user's primary wallet.",
type: "array",
items: {
type: "string",
},
},
username: {
description:
"The username to give to the user.\nIt must be unique across your instance.",
type: ["string", "null"],
},
password: {
description:
"The plaintext password to give the user.\nMust be at least 8 characters long, and can not be in any list of hacked passwords.",
type: ["string", "null"],
},
password_digest: {
description:
"In case you already have the password digests and not the passwords, you can use them for the newly created user via this property.\nThe digests should be generated with one of the supported algorithms.\nThe hashing algorithm can be specified using the `password_hasher` property.",
type: ["string", "null"],
},
password_hasher: {
$ref: "#/$defs/PasswordHasher",
},
skip_password_checks: {
description:
"When set to `true` all password checks are skipped.\nIt is recommended to use this method only when migrating plaintext passwords to Clerk.\nUpon migration the user base should be prompted to pick stronger password.",
type: ["boolean", "null"],
},
skip_password_requirement: {
description:
"When set to `true`, `password` is not required anymore when creating the user and can be omitted.\nThis is useful when you are trying to create a user that doesn't have a password, in an instance that is using passwords.\nPlease note that you cannot use this flag if password is the only way for a user to sign into your instance.",
type: ["boolean", "null"],
},
totp_secret: {
description:
"In case TOTP is configured on the instance, you can provide the secret to enable it on the newly created user without the need to reset it.\nPlease note that currently the supported options are:\n* Period: 30 seconds\n* Code length: 6 digits\n* Algorithm: SHA1",
type: ["string", "null"],
},
backup_codes: {
description:
"If Backup Codes are configured on the instance, you can provide them to enable it on the newly created user without the need to reset them.\nYou must provide the backup codes in plain format or the corresponding bcrypt digest.",
type: "array",
items: {
type: "string",
},
},
public_met