ลิงก์
GET https://1rl.io/api/links/
curl --request GET \
--url 'https://1rl.io/api/links/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://1rl.io/api/links/' \
--header 'Authorization: Bearer {api_key}' \
| พารามิเตอร์ | รายละเอียด | คำอธิบาย |
|---|---|---|
| page | ไม่บังคับ จำนวนเต็ม | หมายเลขหน้าที่คุณต้องการผลลัพธ์จาก ค่าเริ่มต้นคือ 1. |
| results_per_page | ไม่บังคับ จำนวนเต็ม | คุณต้องการผลลัพธ์กี่รายการต่อหน้า ค่าที่อนุญาตคือ: 10 , 25 , 50 , 100 , 250 , 500 , 1000 ค่าเริ่มต้นคือ 25. |
{
"data": [
{
"id": 1,
"project_id": null,
"domain_id": 0,
"type": "link",
"url": "example",
"location_url": "https://example.com/",
"settings": {
"password": null,
"sensitive_content": false
},
"clicks": 10,
"order": 0,
"start_date": null,
"end_date": null,
"datetime": "2025-12-02 15:59:20",
}
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://1rl.io/api/links?page=1",
"last": "https://1rl.io/api/links?page=1",
"next": null,
"prev": null,
"self": "https://1rl.io/api/links?page=1"
}
}
GET https://1rl.io/api/links/{link_id}
curl --request GET \
--url 'https://1rl.io/api/links/{link_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://1rl.io/api/links/{link_id}' \
--header 'Authorization: Bearer {api_key}' \
{
"data": {
"id": 1,
"project_id": null,
"domain_id": 0,
"type": "link",
"url": "example",
"location_url": "https://example.com/",
"settings": {
"password": null,
"sensitive_content": false
},
"clicks": 10,
"order": 0,
"start_date": null,
"end_date": null,
"datetime": "2025-12-02 15:59:20",
}
}
POST https://1rl.io/api/links
| พารามิเตอร์ | รายละเอียด | คำอธิบาย |
|---|---|---|
| type | ไม่บังคับ สตริง | link |
| location_url | จำเป็น สตริง | URL ของปลายทางมีให้บริการเมื่อ: is_bulk = 0 |
| location_urls | จำเป็น สตริง | URL ของปลายทางมีให้บริการเมื่อ: is_bulk = 1 |
| url | ไม่บังคับ สตริง | อัลลิอัส URL ของลิงก์ที่สร้างขึ้น ทิ้งว่างไว้สำหรับการสร้างแบบสุ่มมีให้บริการเมื่อ: is_bulk = 0 |
| is_bulk | ไม่บังคับ บูลีน | |
| domain_id | ไม่บังคับ จำนวนเต็ม | - |
| project_id | ไม่บังคับ จำนวนเต็ม | - |
| pixels_ids | ไม่บังคับ อาร์เรย์ จำนวนเต็ม | - |
| email_reports | ไม่บังคับ อาร์เรย์ | Notification handler ids |
| schedule | ไม่บังคับ บูลีน | - |
| start_date | ไม่บังคับ สตริง | มีให้บริการเมื่อ: schedule = true |
| end_date | ไม่บังคับ สตริง | มีให้บริการเมื่อ: schedule = true |
| clicks_limit | ไม่บังคับ จำนวนเต็ม | - |
| expiration_url | ไม่บังคับ สตริง | - |
| sensitive_content | ไม่บังคับ บูลีน | - |
| http_status_code | ไม่บังคับ จำนวนเต็ม | ค่าที่อนุญาต: 301, 302, 307, 308 |
| app_linking_is_enabled | ไม่บังคับ บูลีน | - |
| cloaking_is_enabled | ไม่บังคับ บูลีน | - |
| cloaking_title | ไม่บังคับ สตริง | - |
| cloaking_meta_description | ไม่บังคับ สตริง | - |
| cloaking_custom_js | ไม่บังคับ สตริง | - |
| cloaking_favicon | ไม่บังคับ ไฟล์ | - |
| cloaking_opengraph | ไม่บังคับ ไฟล์ | - |
| password | ไม่บังคับ สตริง | - |
| forward_query_parameters_is_enabled | ไม่บังคับ บูลีน | - |
| utm_source | ไม่บังคับ สตริง | - |
| utm_medium | ไม่บังคับ สตริง | - |
| utm_campaign | ไม่บังคับ สตริง | - |
| targeting_type | ไม่บังคับ สตริง | continent_code , country_code , device_type , browser_language , rotation , os_name , browser_name |
| targeting_continent_code_key[index] | ไม่บังคับ สตริง | มีให้บริการเมื่อ: targeting_type = continent_code |
| targeting_continent_code_value[index] | ไม่บังคับ สตริง | มีให้บริการเมื่อ: targeting_type = continent_code |
| targeting_country_code_key[index] | ไม่บังคับ สตริง | มีให้บริการเมื่อ: targeting_type = country_code |
| targeting_country_code_value[index] | ไม่บังคับ สตริง | มีให้บริการเมื่อ: targeting_type = country_code |
| targeting_city_name_key[index] | ไม่บังคับ สตริง | มีให้บริการเมื่อ: targeting_type = city_name |
| targeting_city_name_value[index] | ไม่บังคับ สตริง | มีให้บริการเมื่อ: targeting_type = city_name |
| targeting_device_type_key[index] | ไม่บังคับ สตริง | มีให้บริการเมื่อ: targeting_type = device_type |
| targeting_device_type_value[index] | ไม่บังคับ สตริง | มีให้บริการเมื่อ: targeting_type = device_type |
| targeting_browser_language_key[index] | ไม่บังคับ สตริง | มีให้บริการเมื่อ: targeting_type = browser_language |
| targeting_browser_language_value[index] | ไม่บังคับ สตริง | มีให้บริการเมื่อ: targeting_type = browser_language |
| targeting_rotation_key[index] | ไม่บังคับ สตริง | มีให้บริการเมื่อ: targeting_type = rotation |
| targeting_rotation_value[index] | ไม่บังคับ สตริง | มีให้บริการเมื่อ: targeting_type = rotation |
| targeting_os_name_key[index] | ไม่บังคับ สตริง | มีให้บริการเมื่อ: targeting_type = os_name |
| targeting_os_name_value[index] | ไม่บังคับ สตริง | มีให้บริการเมื่อ: targeting_type = os_name |
| targeting_browser_name_key[index] | ไม่บังคับ สตริง | มีให้บริการเมื่อ: targeting_type = browser_name |
| targeting_browser_name_value[index] | ไม่บังคับ สตริง | มีให้บริการเมื่อ: targeting_type = browser_name |
curl --request POST \
--url 'https://1rl.io/api/links' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'url=example' \
--form 'location_url=https://1rl.io/' \
--url 'https://1rl.io/api/links' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'url=example' \
--form 'location_url=https://1rl.io/' \
{
"data": {
"id": 1
}
}
POST https://1rl.io/api/links/{link_id}
| พารามิเตอร์ | รายละเอียด | คำอธิบาย |
|---|---|---|
| location_url | ไม่บังคับ สตริง | URL ของปลายทาง |
| url | ไม่บังคับ สตริง | อัลลิอัส URL ของลิงก์ที่สร้างขึ้น ทิ้งว่างไว้สำหรับการสร้างแบบสุ่ม |
| domain_id | ไม่บังคับ จำนวนเต็ม | - |
| project_id | ไม่บังคับ จำนวนเต็ม | - |
| pixels_ids | ไม่บังคับ อาร์เรย์ จำนวนเต็ม | - |
| email_reports | ไม่บังคับ อาร์เรย์ | Notification handler ids |
| schedule | ไม่บังคับ บูลีน | - |
| start_date | ไม่บังคับ สตริง | มีให้บริการเมื่อ: schedule = true |
| end_date | ไม่บังคับ สตริง | มีให้บริการเมื่อ: schedule = true |
| clicks_limit | ไม่บังคับ จำนวนเต็ม | - |
| expiration_url | ไม่บังคับ สตริง | - |
| sensitive_content | ไม่บังคับ บูลีน | - |
| http_status_code | ไม่บังคับ จำนวนเต็ม | ค่าที่อนุญาต: 301, 302, 307, 308 |
| app_linking_is_enabled | ไม่บังคับ บูลีน | - |
| cloaking_is_enabled | ไม่บังคับ บูลีน | - |
| cloaking_title | ไม่บังคับ สตริง | - |
| cloaking_meta_description | ไม่บังคับ สตริง | - |
| cloaking_custom_js | ไม่บังคับ สตริง | - |
| cloaking_favicon | ไม่บังคับ ไฟล์ | - |
| cloaking_opengraph | ไม่บังคับ ไฟล์ | - |
| password | ไม่บังคับ สตริง | - |
| forward_query_parameters_is_enabled | ไม่บังคับ บูลีน | - |
| utm_source | ไม่บังคับ สตริง | - |
| utm_medium | ไม่บังคับ สตริง | - |
| utm_campaign | ไม่บังคับ สตริง | - |
| targeting_type | ไม่บังคับ สตริง | continent_code , country_code , device_type , browser_language , rotation , os_name , browser_name |
| targeting_continent_code_key[index] | ไม่บังคับ สตริง | มีให้บริการเมื่อ: targeting_type = continent_code |
| targeting_continent_code_value[index] | ไม่บังคับ สตริง | มีให้บริการเมื่อ: targeting_type = continent_code |
| targeting_country_code_key[index] | ไม่บังคับ สตริง | มีให้บริการเมื่อ: targeting_type = country_code |
| targeting_country_code_value[index] | ไม่บังคับ สตริง | มีให้บริการเมื่อ: targeting_type = country_code |
| targeting_city_name_key[index] | ไม่บังคับ สตริง | มีให้บริการเมื่อ: targeting_type = city_name |
| targeting_city_name_value[index] | ไม่บังคับ สตริง | มีให้บริการเมื่อ: targeting_type = city_name |
| targeting_device_type_key[index] | ไม่บังคับ สตริง | มีให้บริการเมื่อ: targeting_type = device_type |
| targeting_device_type_value[index] | ไม่บังคับ สตริง | มีให้บริการเมื่อ: targeting_type = device_type |
| targeting_browser_language_key[index] | ไม่บังคับ สตริง | มีให้บริการเมื่อ: targeting_type = browser_language |
| targeting_browser_language_value[index] | ไม่บังคับ สตริง | มีให้บริการเมื่อ: targeting_type = browser_language |
| targeting_rotation_key[index] | ไม่บังคับ สตริง | มีให้บริการเมื่อ: targeting_type = rotation |
| targeting_rotation_value[index] | ไม่บังคับ สตริง | มีให้บริการเมื่อ: targeting_type = rotation |
| targeting_os_name_key[index] | ไม่บังคับ สตริง | มีให้บริการเมื่อ: targeting_type = os_name |
| targeting_os_name_value[index] | ไม่บังคับ สตริง | มีให้บริการเมื่อ: targeting_type = os_name |
| targeting_browser_name_key[index] | ไม่บังคับ สตริง | มีให้บริการเมื่อ: targeting_type = browser_name |
| targeting_browser_name_value[index] | ไม่บังคับ สตริง | มีให้บริการเมื่อ: targeting_type = browser_name |
curl --request POST \
--url 'https://1rl.io/api/links/{link_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'is_enabled=0' \
--url 'https://1rl.io/api/links/{link_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'is_enabled=0' \
{
"data": {
"id": 1
}
}
DELETE https://1rl.io/api/links/{link_id}
curl --request DELETE \
--url 'https://1rl.io/api/links/{link_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://1rl.io/api/links/{link_id}' \
--header 'Authorization: Bearer {api_key}' \