clerk / clerk/clerk-sdk-ruby

Organization name updates are getting rejected by the Clerk API that are false positives

Open
#130 1 comment 0 reactions 1 assignee View on GitHub

@tmilewski is already working on this.

Since Mar 31, 2026.

Dominant language
Ruby
Stars
32
Forks
19
Avg merge
19h 27m
Merged PRs (30d)
1

Description

Hi, it seems like this is an issue with the API itself, but I'm posting it here since we found it through using this SDK. Feel free to redirect/close if this is not the right place.

Description

The Clerk API rejects organization names containing consecutive single-letter abbreviations like "B.C." with the error:

│ The organization name "B.C. LTD. (Example Organization)" is invalid: contains a URL

This appears to be a false positive in the server-side URL detection logic. The substring "B.C" is being matched as a domain-like pattern (similar to example.com), but "B.C." is a common abbreviation for the Canadian province.

Reproduction

   clerk = Clerk::SDK.new
   clerk.organizations.create(
     request: Clerk::Models::Operations::CreateOrganizationRequest.new(
       name: "1234567 B.C. LTD.",
       created_by: "user_xxx"
     )
   )
   # => Clerk::Models::Errors::ClerkErrors: "The organization name ... is invalid: contains a URL"

This also affects organizations.update

Some observations:
Names with two or more consecutive single-letter abbreviations are rejected:

  • "B.C. LTD." — rejected ("B.C" looks like a domain)
  • "U.S.A. Holdings" — rejected ("U.S" / "S.A" looks like a domain)

Names with lone initials or multi-letter abbreviations are fine:

  • "Steven D. Smith"
  • "Dr. Jane Smith"
  • "Maple Leaf Ltd."

SDK version we're using is clerk-sdk-ruby 5.1.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.