@@ -22,7 +22,7 @@ Clerk Backend API: The Clerk REST Backend API, meant to be accessed by backend s
2222### Versions
2323
2424When the API changes in a way that isn't compatible with older versions, a new version is released.
25- Each version is identified by its release date, e.g. ` 2025-03-12 ` . For more information, please see [ Clerk API Versions] ( https://clerk.com/docs/versioning/available-versions ) .
25+ Each version is identified by its release date, e.g. ` 2025-04-10 ` . For more information, please see [ Clerk API Versions] ( https://clerk.com/docs/versioning/available-versions ) .
2626
2727Please see https://clerk.com/docs for more information.
2828
@@ -129,11 +129,16 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
129129from clerk_backend_api import Clerk
130130
131131
132- with Clerk() as clerk:
132+ with Clerk(
133+ bearer_auth = " <YOUR_BEARER_TOKEN_HERE>" ,
134+ ) as clerk:
133135
134- clerk.miscellaneous.get_public_interstitial( frontend_api_query_parameter1 = " pub_1a2b3c4d " , publishable_key = " <value> " , proxy_url = " https://fine-tarragon.info " , domain = " great-director.net " , sign_in_url = " https://likable-freckle.net/ " , use_domain_for_script = False )
136+ res = clerk.email_addresses.get( email_address_id = " email_address_id_example " )
135137
136- # Use the SDK ...
138+ assert res is not None
139+
140+ # Handle response
141+ print (res)
137142```
138143
139144</br >
@@ -146,11 +151,16 @@ from clerk_backend_api import Clerk
146151
147152async def main ():
148153
149- async with Clerk() as clerk:
154+ async with Clerk(
155+ bearer_auth = " <YOUR_BEARER_TOKEN_HERE>" ,
156+ ) as clerk:
150157
151- await clerk.miscellaneous.get_public_interstitial_async( frontend_api_query_parameter1 = " pub_1a2b3c4d " , publishable_key = " <value> " , proxy_url = " https://fine-tarragon.info " , domain = " great-director.net " , sign_in_url = " https://likable-freckle.net/ " , use_domain_for_script = False )
158+ res = await clerk.email_addresses.get_async( email_address_id = " email_address_id_example " )
152159
153- # Use the SDK ...
160+ assert res is not None
161+
162+ # Handle response
163+ print (res)
154164
155165asyncio.run(main())
156166```
@@ -180,6 +190,27 @@ with Clerk(
180190
181191 # Use the SDK ...
182192
193+ ```
194+
195+ ### Per-Operation Security Schemes
196+
197+ Some operations in this SDK require the security scheme to be specified at the request level. For example:
198+ ``` python
199+ import clerk_backend_api
200+ from clerk_backend_api import Clerk
201+
202+
203+ with Clerk() as clerk:
204+
205+ res = clerk.management.upsert_user(security = clerk_backend_api.ManagementUpsertUserSecurity(
206+ management_token = " <YOUR_BEARER_TOKEN_HERE>" ,
207+ ),
email_address = " [email protected] " ,
first_name = " Diana" ,
last_name = " Schmidt-Kutch" )
208+
209+ assert res is not None
210+
211+ # Handle response
212+ print (res)
213+
183214```
184215<!-- End Authentication [security] -->
185216
@@ -246,6 +277,14 @@ def verify_machine_token(request: httpx.Request):
246277* [ create] ( docs/sdks/allowlistidentifiers/README.md#create ) - Add identifier to the allow-list
247278* [ delete] ( docs/sdks/allowlistidentifiers/README.md#delete ) - Delete identifier from allow-list
248279
280+ ### [ aws_credentials] ( docs/sdks/awscredentials/README.md )
281+
282+ * [ list] ( docs/sdks/awscredentials/README.md#list ) - List all AWS Credentials
283+ * [ create] ( docs/sdks/awscredentials/README.md#create ) - Create an AWS Credential
284+ * [ get] ( docs/sdks/awscredentials/README.md#get ) - Retrieve an AWS Credential
285+ * [ delete] ( docs/sdks/awscredentials/README.md#delete ) - Delete an AWS Credential
286+ * [ update] ( docs/sdks/awscredentials/README.md#update ) - Update an AWS Credential
287+
249288### [ beta_features] ( docs/sdks/betafeatures/README.md )
250289
251290* [ update_instance_settings] ( docs/sdks/betafeatures/README.md#update_instance_settings ) - Update instance settings
@@ -321,10 +360,35 @@ def verify_machine_token(request: httpx.Request):
321360* [ update] ( docs/sdks/jwttemplates/README.md#update ) - Update a JWT template
322361* [ delete] ( docs/sdks/jwttemplates/README.md#delete ) - Delete a Template
323362
363+ ### [ machine_tokens] ( docs/sdks/machinetokens/README.md )
364+
365+ * [ create] ( docs/sdks/machinetokens/README.md#create ) - Create a machine token
366+
367+ ### [ machines] ( docs/sdks/machines/README.md )
368+
369+ * [ list] ( docs/sdks/machines/README.md#list ) - Get a list of machines for an instance
370+ * [ create] ( docs/sdks/machines/README.md#create ) - Create a machine
371+ * [ get] ( docs/sdks/machines/README.md#get ) - Retrieve a machine
372+ * [ update] ( docs/sdks/machines/README.md#update ) - Update a machine
373+ * [ delete] ( docs/sdks/machines/README.md#delete ) - Delete a machine
374+ * [ get_secret_key] ( docs/sdks/machines/README.md#get_secret_key ) - Retrieve a machine secret key
375+ * [ create_scope] ( docs/sdks/machines/README.md#create_scope ) - Create a machine scope
376+ * [ delete_scope] ( docs/sdks/machines/README.md#delete_scope ) - Delete a machine scope
377+
378+ ### [ management] ( docs/sdks/management/README.md )
379+
380+ * [ upsert_user] ( docs/sdks/management/README.md#upsert_user ) - Upsert a user
381+ * [ create_organization] ( docs/sdks/management/README.md#create_organization ) - Create an organization
382+ * [ create_application] ( docs/sdks/management/README.md#create_application ) - Create an application (instance)
383+
324384### [ miscellaneous] ( docs/sdks/miscellaneous/README.md )
325385
326386* [ get_public_interstitial] ( docs/sdks/miscellaneous/README.md#get_public_interstitial ) - Returns the markup for the interstitial page
327387
388+ ### [ oauth_access_tokens] ( docs/sdks/oauthaccesstokens/README.md )
389+
390+ * [ verify] ( docs/sdks/oauthaccesstokens/README.md#verify ) - Verify an OAuth Access Token
391+
328392### [ oauth_applications] ( docs/sdks/oauthapplicationssdk/README.md )
329393
330394* [ list] ( docs/sdks/oauthapplicationssdk/README.md#list ) - Get a list of OAuth applications for an instance
@@ -340,6 +404,7 @@ def verify_machine_token(request: httpx.Request):
340404* [ list] ( docs/sdks/organizationdomainssdk/README.md#list ) - Get a list of all domains of an organization.
341405* [ update] ( docs/sdks/organizationdomainssdk/README.md#update ) - Update an organization domain.
342406* [ delete] ( docs/sdks/organizationdomainssdk/README.md#delete ) - Remove a domain from an organization.
407+ * [ list_all] ( docs/sdks/organizationdomainssdk/README.md#list_all ) - List all organization domains
343408
344409### [ organization_invitations] ( docs/sdks/organizationinvitationssdk/README.md )
345410
@@ -403,7 +468,6 @@ def verify_machine_token(request: httpx.Request):
403468* [ get] ( docs/sdks/sessions/README.md#get ) - Retrieve a session
404469* [ refresh] ( docs/sdks/sessions/README.md#refresh ) - Refresh a session
405470* [ revoke] ( docs/sdks/sessions/README.md#revoke ) - Revoke a session
406- * [ ~~ verify~~ ] ( docs/sdks/sessions/README.md#verify ) - Verify a session :warning : ** Deprecated**
407471* [ create_token] ( docs/sdks/sessions/README.md#create_token ) - Create a session token
408472* [ create_token_from_template] ( docs/sdks/sessions/README.md#create_token_from_template ) - Create a session token from a jwt template
409473
@@ -435,6 +499,8 @@ def verify_machine_token(request: httpx.Request):
435499* [ delete] ( docs/sdks/users/README.md#delete ) - Delete a user
436500* [ ban] ( docs/sdks/users/README.md#ban ) - Ban a user
437501* [ unban] ( docs/sdks/users/README.md#unban ) - Unban a user
502+ * [ bulk_ban] ( docs/sdks/users/README.md#bulk_ban ) - Ban multiple users
503+ * [ bulk_unban] ( docs/sdks/users/README.md#bulk_unban ) - Unban multiple users
438504* [ lock] ( docs/sdks/users/README.md#lock ) - Lock a user
439505* [ unlock] ( docs/sdks/users/README.md#unlock ) - Unlock a user
440506* [ set_profile_image] ( docs/sdks/users/README.md#set_profile_image ) - Set user profile image
@@ -549,12 +615,12 @@ By default, an API error will raise a models.SDKError exception, which has the f
549615| ` .raw_response ` | * httpx.Response* | The raw HTTP response |
550616| ` .body ` | * str* | The response content |
551617
552- When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective * Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the ` verify_async ` method may raise the following exceptions:
618+ When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective * Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the ` create_async ` method may raise the following exceptions:
553619
554- | Error Type | Status Code | Content Type |
555- | ------------------ | ------------- | ---------------- |
556- | models.ClerkErrors | 400, 401, 404 | application/json |
557- | models.SDKError | 4XX, 5XX | \* /\* |
620+ | Error Type | Status Code | Content Type |
621+ | ------------------ | ----------------------- | ---------------- |
622+ | models.ClerkErrors | 400, 401, 403, 404, 422 | application/json |
623+ | models.SDKError | 4XX, 5XX | \* /\* |
558624
559625### Example
560626
@@ -568,8 +634,10 @@ with Clerk(
568634 res = None
569635 try :
570636
571- res = clerk.clients.verify(request = {
572- " token" : " jwt_token_example" ,
637+ res = clerk.aws_credentials.create(request = {
638+ " access_key_id" : " <id>" ,
639+ " secret_access_key" : " <value>" ,
640+ " user_pool_ids" : [],
573641 })
574642
575643 assert res is not None
@@ -699,14 +767,18 @@ The `Clerk` class implements the context manager protocol and registers a finali
699767from clerk_backend_api import Clerk
700768def main ():
701769
702- with Clerk() as clerk:
770+ with Clerk(
771+ bearer_auth = " <YOUR_BEARER_TOKEN_HERE>" ,
772+ ) as clerk:
703773 # Rest of application here...
704774
705775
706776# Or when using async:
707777async def amain ():
708778
709- async with Clerk() as clerk:
779+ async with Clerk(
780+ bearer_auth = " <YOUR_BEARER_TOKEN_HERE>" ,
781+ ) as clerk:
710782 # Rest of application here...
711783```
712784<!-- End Resource Management [resource-management] -->
0 commit comments