Skip to main content
PUT
https://api.bit2connect.com
/
1.0
/
links
/
{code}
/
status
curl -X PUT "https://api.bit2connect.com/1.0/links/summer-sale/status" \
  -H "X-API-KEY: b2co_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"status": "PAUSED"}'
{
  "success": true,
  "data": {
    "message": "Link paused successfully",
    "id": "clp123abc456",
    "code": "summer-sale",
    "status": "PAUSED",
    "updatedAt": "2024-01-15T10:35:00Z"
  }
}

Request

X-API-KEY
string
required
Your project API key: b2co_your_api_key
code
string
required
The unique short code of the link to update
status
string
required
New status for the link. Must be either ACTIVE or PAUSED

Response

success
boolean
Indicates if the request was successful
data
object
The updated link information
data.message
string
Success message describing the action performed
data.id
string
Unique identifier of the link
data.code
string
Unique short code of the link
data.status
string
Updated status of the link (ACTIVE or PAUSED)
data.updatedAt
string
ISO 8601 timestamp when the link was last updated
curl -X PUT "https://api.bit2connect.com/1.0/links/summer-sale/status" \
  -H "X-API-KEY: b2co_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"status": "PAUSED"}'
{
  "success": true,
  "data": {
    "message": "Link paused successfully",
    "id": "clp123abc456",
    "code": "summer-sale",
    "status": "PAUSED",
    "updatedAt": "2024-01-15T10:35:00Z"
  }
}

Error Codes

VALIDATION_ERROR
string
Invalid status parameter provided
Link with the specified code does not exist or belongs to another project
INVALID_API_KEY
string
API key is missing or invalid
RATE_LIMIT_EXCEEDED
string
Too many requests, please try again later
BAD_REQUEST
string
Link is already in the requested status or operation is not allowed (e.g., activating expired link)