diff --git a/.changeset/slimy-windows-grab.md b/.changeset/slimy-windows-grab.md new file mode 100644 index 0000000000..9938f9a128 --- /dev/null +++ b/.changeset/slimy-windows-grab.md @@ -0,0 +1,12 @@ +--- +'@clerk/backend': patch +--- + +Deprecate `createSMSMessage` and `SMSMessageApi` from `clerkClient`. + +The `/sms_messages` Backend API endpoint will also be dropped in the future since this feature will no longer be available for new Clerk instances. + +For a brief period it will still be accessible for instances that have used it in the past 7 +days (13-11-2023 to 20-11-2023). + +New instances will get a 403 forbidden response if they try to access it. diff --git a/packages/backend/src/api/endpoints/SMSMessageApi.ts b/packages/backend/src/api/endpoints/SMSMessageApi.ts index a6234c7ad9..a47b9cc471 100644 --- a/packages/backend/src/api/endpoints/SMSMessageApi.ts +++ b/packages/backend/src/api/endpoints/SMSMessageApi.ts @@ -1,3 +1,5 @@ +import { deprecated } from '@clerk/shared/deprecated'; + import type { SMSMessage } from '../resources/SMSMessage'; import { AbstractAPI } from './AbstractApi'; @@ -8,8 +10,18 @@ type SMSParams = { message: string; }; +/** + * @deprecated This endpoint is no longer available and the function will be removed in the next major version. + */ export class SMSMessageAPI extends AbstractAPI { + /** + * @deprecated This endpoint is no longer available and the function will be removed in the next major version. + */ public async createSMSMessage(params: SMSParams) { + deprecated( + 'SMSMessageAPI.createSMSMessage', + 'This endpoint is no longer available and the function will be removed in the next major version.', + ); return this.request({ method: 'POST', path: basePath,