Links
Check Code Availability
Check if a custom code is available for use before creating a link
GET
Request
string
required
Your project API key:
b2co_your_api_keystring
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:
MyCodeandmycodeare 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
Use this endpoint in your workflow:- Check if your desired code is available
- If available, proceed with link creation
- If not available, try a different code or let the system generate one automatically