Skip to main content
GET
https://api.bit2connect.com
/
1.0
/
links
/
check
/
{code}
curl -X GET "https://api.bit2connect.com/1.0/links/check/my-custom-code" \
  -H "X-API-KEY: b2co_your_api_key"
{
  "success": true,
  "data": {
    "code": "my-custom-code",
    "available": true,
    "message": "Code is available for use"
  }
}

Request

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

Response

success
boolean
Indicates if the request was successful
data
object
Code availability information
data.code
string
The code that was checked
data.available
boolean
Whether the code is available for use (true = available, false = already in use)
data.message
string
Human-readable message about the code availability
curl -X GET "https://api.bit2connect.com/1.0/links/check/my-custom-code" \
  -H "X-API-KEY: b2co_your_api_key"
{
  "success": true,
  "data": {
    "code": "my-custom-code",
    "available": true,
    "message": "Code is available for use"
  }
}

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

VALIDATION_ERROR
string
Invalid code format or length
INVALID_API_KEY
string
API key is missing or invalid
RATE_LIMIT_EXCEEDED
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