{"openapi":"3.1.0","info":{"title":"Clerk (BYOK) API","version":"0.1.0","description":"Clerk (BYOK) lets an AI assistant read your own Clerk data through the Clerk API with a key you supply (Clerk secret key (sk_live_... or sk_test_...)). Read-only: 12 tools (get_instance, list_users, count_users, get_user, list_organizations, get_organization, list_organization_memberships, list_sessions, list_invitations, list_waitlist_entries, list_domains, list_jwt_templates). The BYOK key...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-clerk.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-clerk/docs"},"termsOfService":"https://connectorbay.com/byok-clerk/terms"},"servers":[{"url":"https://byok-clerk.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-clerk/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/get_instance":{"post":{"operationId":"get_instance","summary":"Show the Clerk instance the secret key belongs to: id, environment type (development or production) and allowed origins.","description":"Show the Clerk instance the secret key belongs to: id, environment type (development or production) and allowed origins. Use for \"Which Clerk instance is my secret key for, development or production\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_instanceArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_users":{"post":{"operationId":"list_users","summary":"List users of the instance, newest first by default, with name, username, email addresses, ban and lock flags and sign-i","description":"List users of the instance, newest first by default, with name, username, email addresses, ban and lock flags and sign-in times (times are Unix milliseconds). Use for \"Which users signed up most recently in my Clerk app\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"query":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Free-text match over email, phone, username, wallet, user id and names (partial match).","title":"Query"},"email_address_query":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Users whose email contains this text (case-insensitive).","title":"Email Address Query"},"name_query":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Users whose name contains this text (case-insensitive).","title":"Name Query"},"banned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True for only banned users, false for only users who are not banned.","title":"Banned"},"order_by":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":"-created_at","description":"Sort field with optional + or - prefix, for example -created_at, +last_sign_in_at, username, last_active_at.","title":"Order By"},"limit":{"anyOf":[{"maximum":500,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many results to return (1 to 500).","title":"Limit"},"offset":{"anyOf":[{"maximum":1000000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Number of results to skip, for paging together with limit.","title":"Offset"}},"title":"list_usersArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/count_users":{"post":{"operationId":"count_users","summary":"Count users in the instance, optionally only those matching a text query or the banned flag. Use for \"How many users doe","description":"Count users in the instance, optionally only those matching a text query or the banned flag. Use for \"How many users does my Clerk app have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"query":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Free-text match over email, phone, username, wallet, user id and names.","title":"Query"},"email_address_query":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Count only users whose email contains this text.","title":"Email Address Query"},"banned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to count only banned users, false for only users who are not banned.","title":"Banned"}},"title":"count_usersArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_user":{"post":{"operationId":"get_user","summary":"Get one user by id: name, username, email addresses, two-factor and password flags, ban status and sign-in times. Use fo","description":"Get one user by id: name, username, email addresses, two-factor and password flags, ban status and sign-in times. Use for \"Show Clerk user user_2NNEqL2nrIRdJ194ndJqAHwEfxC\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"user_id":{"description":"User id (starts with user_), as returned by list_users.","maxLength":100,"title":"User Id","type":"string"}},"required":["user_id"],"title":"get_userArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_organizations":{"post":{"operationId":"list_organizations","summary":"List organizations of the instance with name, slug, member counts and creation time, newest first by default. Use for \"W","description":"List organizations of the instance with name, slug, member counts and creation time, newest first by default. Use for \"What organizations exist in my Clerk app\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"query":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Match by organization id (exact) or by name or slug (partial).","title":"Query"},"include_members_count":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":true,"description":"True to include members_count for each organization.","title":"Include Members Count"},"order_by":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":"-created_at","description":"Sort by name, created_at or members_count with optional + or - prefix, for example -members_count.","title":"Order By"},"limit":{"anyOf":[{"maximum":500,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many results to return (1 to 500).","title":"Limit"},"offset":{"anyOf":[{"maximum":1000000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Number of results to skip, for paging together with limit.","title":"Offset"}},"title":"list_organizationsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_organization":{"post":{"operationId":"get_organization","summary":"Get one organization by id or slug: name, slug, member count, pending invitations and limits. Use for \"Show details of t","description":"Get one organization by id or slug: name, slug, member count, pending invitations and limits. Use for \"Show details of the Clerk organization acme\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization_id":{"description":"Organization id (starts with org_) or organization slug, as returned by list_organizations.","maxLength":100,"title":"Organization Id","type":"string"}},"required":["organization_id"],"title":"get_organizationArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_organization_memberships":{"post":{"operationId":"list_organization_memberships","summary":"List the members of one organization with role and the member's user id, name and identifier. Use for \"Who are the membe","description":"List the members of one organization with role and the member's user id, name and identifier. Use for \"Who are the members of Clerk organization org_2NNEqL2nrIRdJ194ndJqAHwEfxC and what roles do they have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization_id":{"description":"Organization id (starts with org_) or organization slug, as returned by list_organizations.","maxLength":100,"title":"Organization Id","type":"string"},"order_by":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Sort field such as created_at, with optional + or - prefix.","title":"Order By"},"query":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Match members by email, phone, username, wallet, user id or name.","title":"Query"},"limit":{"anyOf":[{"maximum":500,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many results to return (1 to 500).","title":"Limit"},"offset":{"anyOf":[{"maximum":1000000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Number of results to skip, for paging together with limit.","title":"Offset"}},"required":["organization_id"],"title":"list_organization_membershipsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_sessions":{"post":{"operationId":"list_sessions","summary":"List sessions with user id, status and activity times; filter by user, client or status. Times are Unix milliseconds. Us","description":"List sessions with user id, status and activity times; filter by user, client or status. Times are Unix milliseconds. Use for \"Does user_2NNEqL2nrIRdJ194ndJqAHwEfxC have any active Clerk sessions\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"user_id":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only sessions of this user id.","title":"User Id"},"client_id":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only sessions of this client id.","title":"Client Id"},"status":{"anyOf":[{"enum":["abandoned","active","ended","expired","removed","replaced","revoked"],"type":"string"},{"type":"null"}],"default":null,"description":"Session status: abandoned, active, ended, expired, removed, replaced or revoked.","title":"Status"},"limit":{"anyOf":[{"maximum":500,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many results to return (1 to 500).","title":"Limit"},"offset":{"anyOf":[{"maximum":1000000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Number of results to skip, for paging together with limit.","title":"Offset"}},"title":"list_sessionsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_invitations":{"post":{"operationId":"list_invitations","summary":"List non-revoked sign-up invitations with email, status and expiry; filter by status or email text. Use for \"Which Clerk","description":"List non-revoked sign-up invitations with email, status and expiry; filter by status or email text. Use for \"Which Clerk invitations are still pending\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"status":{"anyOf":[{"enum":["pending","accepted","revoked","expired"],"type":"string"},{"type":"null"}],"default":null,"description":"Invitation status: pending, accepted, revoked or expired.","title":"Status"},"query":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Match by invitation email address or id.","title":"Query"},"order_by":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":"-created_at","description":"Sort by created_at, email_address or expires_at with optional + or - prefix.","title":"Order By"},"limit":{"anyOf":[{"maximum":500,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many results to return (1 to 500).","title":"Limit"},"offset":{"anyOf":[{"maximum":1000000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Number of results to skip, for paging together with limit.","title":"Offset"}},"title":"list_invitationsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_waitlist_entries":{"post":{"operationId":"list_waitlist_entries","summary":"List waitlist entries with email, status and dates, newest first by default. Use for \"Who is on the Clerk waitlist and w","description":"List waitlist entries with email, status and dates, newest first by default. Use for \"Who is on the Clerk waitlist and who has been invited\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"status":{"anyOf":[{"enum":["pending","invited","completed","rejected"],"type":"string"},{"type":"null"}],"default":null,"description":"Entry status: pending, invited, completed or rejected.","title":"Status"},"query":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Match by email address or waitlist entry id.","title":"Query"},"order_by":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":"-created_at","description":"Sort by created_at, email_address or invited_at with optional + or - prefix.","title":"Order By"},"limit":{"anyOf":[{"maximum":500,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many results to return (1 to 500).","title":"Limit"},"offset":{"anyOf":[{"maximum":1000000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Number of results to skip, for paging together with limit.","title":"Offset"}},"title":"list_waitlist_entriesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_domains":{"post":{"operationId":"list_domains","summary":"List the domains of the instance (primary and satellite) with their frontend API and accounts portal URLs. Use for \"Whic","description":"List the domains of the instance (primary and satellite) with their frontend API and accounts portal URLs. Use for \"Which domains does my Clerk instance use\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_domainsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_jwt_templates":{"post":{"operationId":"list_jwt_templates","summary":"List the instance's JWT templates with name, token lifetime, clock skew and signing algorithm (claims are not returned).","description":"List the instance's JWT templates with name, token lifetime, clock skew and signing algorithm (claims are not returned). Use for \"What JWT templates are configured in Clerk\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":500,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many results to return (1 to 500).","title":"Limit"},"offset":{"anyOf":[{"maximum":1000000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Number of results to skip, for paging together with limit.","title":"Offset"}},"title":"list_jwt_templatesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}