Skip to main content
GET

Request

string
required
Your project API key: b2co_your_api_key
string
required
The custom code to check for availability (3-50 characters, alphanumeric, hyphens, and underscores only)

Response

boolean
Indicates if the request was successful
object
Code availability information
string
The code that was checked
boolean
Whether the code is available for use (true = available, false = already in use)
string
Human-readable message about the code availability

Code Requirements

Code Format Rules:
  • Length: 3-50 characters
  • Allowed characters: letters (a-z, A-Z), numbers (0-9), hyphens (-), underscores (_)
  • Case sensitive: MyCode and mycode are different
  • Must be unique within your project

Error Codes

string
Invalid code format or length
string
API key is missing or invalid
string
Too many requests, please try again later

Usage Tips

Best Practice: Always check code availability before attempting to create a link with a custom code. This prevents CODE_ALREADY_EXISTS errors during link creation.
Use this endpoint in your workflow:
  1. Check if your desired code is available
  2. If available, proceed with link creation
  3. If not available, try a different code or let the system generate one automatically