단축 링크를 만들고 조회하는 JSON API입니다. 계정에 발급된 API 키(또는 해당 시 플랫폼 API_TOKEN)를 사용하세요.
공개 API: https://anyurl.bond - JSON은 /api/v1/.
Authorization
Authorization: Bearer 1234
Authorization: Bearer에 정확한 API 키를 넣으세요. 대시보드 로그인은 같은 키와 이메일을 사용합니다.
POST /api/v1/shorten
{"long_url":"https://example.com","expiration_time":"24h","max_uses":100,"allow_bots":false}
{"long_url":"https://example.com","permanent":true}
expiration_time 및 max_uses는 유료 플랜용 선택 항목입니다. 미결제 시 월 단위(UTC, 1일 초기화) 한도가 있으며 요청 본문과 관계없이 각 링크는 약 10분 후 만료됩니다.
GET /api/v1/info/{short_code}
짧은 코드의 메타데이터와 유효성을 반환하며 클릭 수는 늘리지 않습니다.
GET /api/v1/me
요금제, 패널의 실효 한도, 이번 달(UTC) 사용량(신규 링크·API 수정)을 반환합니다.
GET /api/v1/links
?limit=50&offset=0
해당 API 키로 만든 단축 링크만 나열합니다(owner_id가 그 키와 일치;GET /info와 같은 범위). 플랫폼 API 토큰은 이 엔드포인트를 쓸 수 없습니다. 쿼리: limit(기본 50, 최대 100), offset(기본 0, 최대 100000). JSON: links(항목마다 GET /info와 동일 필드), total, limit, offset. 목록은 행을 삭제하거나 클릭을 올리지 않습니다.
PUT / PATCH /api/v1/info/{short_code}
{"long_url":"https://example.com/new","expiration_time":"24h","max_uses":20,"allow_bots":false}
기존 단축 코드를 바꾸려면 /api/v1/info/{short_code}에 PUT 또는 PATCH를 사용하세요(POST /shorten 아님). JSON 본문: long_url, expiration_time, max_uses, allow_bots 중 일부. 필드를 생략하면 그대로 둡니다. expiration_time ""로 시한 만료 해제;max_uses -1로 무제한 사용. 응답 형식은 GET /info와 같습니다.
토큰 1234는 예시입니다 - 실제 API 키를 사용하세요. 호스트: https://anyurl.bond.
/api/v1/shorten - 전체 JSON(호스트 https://anyurl.bond)curl -sS -X POST 'https://anyurl.bond/api/v1/shorten' \
-H 'Authorization: Bearer 1234' \
-H 'Content-Type: application/json' \
-d "{\"long_url\":\"https://example.com\",\"expiration_time\":\"24h\",\"max_uses\":100,\"allow_bots\":false}"
/api/v1/shorten - 최소 본문(유료: 기본 24시간 만료)curl -sS -X POST 'https://anyurl.bond/api/v1/shorten' \
-H 'Authorization: Bearer 1234' \
-H 'Content-Type: application/json' \
-d "{\"long_url\":\"https://example.com\"}"
/api/v1/shorten - 영구(유료;스마트 편집 1회 소비)curl -sS -X POST 'https://anyurl.bond/api/v1/shorten' \
-H 'Authorization: Bearer 1234' \
-H 'Content-Type: application/json' \
-d "{\"long_url\":\"https://example.com\",\"permanent\":true}"
/api/v1/info/{short_code} - 단축 코드 예시 abc123curl -sS 'https://anyurl.bond/api/v1/info/abc123' \
-H 'Authorization: Bearer 1234'
/api/v1/mecurl -sS 'https://anyurl.bond/api/v1/me' \
-H 'Authorization: Bearer 1234'
/api/v1/links - 단축 링크 페이지 매김curl -sS 'https://anyurl.bond/api/v1/links?limit=50&offset=0' \
-H 'Authorization: Bearer 1234'
/api/v1/info/{short_code}curl -sS -X PATCH 'https://anyurl.bond/api/v1/info/abc123' \
-H 'Authorization: Bearer 1234' \
-H 'Content-Type: application/json' \
-d "{\"long_url\":\"https://example.com/updated-destination\"}"
/api/v1/info/{short_code}curl -sS -X PUT 'https://anyurl.bond/api/v1/info/abc123' \
-H 'Authorization: Bearer 1234' \
-H 'Content-Type: application/json' \
-d "{\"long_url\":\"https://example.com/updated\",\"expiration_time\":\"7d\",\"max_uses\":50,\"allow_bots\":true}"
-v) 디버깅용curl -v -X POST 'https://anyurl.bond/api/v1/shorten' \
-H 'Authorization: Bearer 1234' \
-H 'Content-Type: application/json' \
-d "{\"long_url\":\"https://example.com\"}"
무료 API: UTC 기준 달력월마다 신규 단축 링크 최대 100개이며, 매월 1일에 한도가 초기화됩니다. 각 링크는 약 10분 후에 만료됩니다. 유료 플랜도 같은 월 단위입니다.