API Documentation
This is the documentation for the available API endpoints, which are built around the REST architecture. All the API endpoints will return a JSON response with the standard HTTP response codes and need a Bearer Authentication via an API Key.
Authentication
All the API endpoints require an API key sent by the Bearer Authentication method.
curl --request GET \
--url 'https://bitq.link/api/{endpoint}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://bitq.link/api/{endpoint}' \
--header 'Authorization: Bearer {api_key}' \
User
GET https://bitq.link/api/user
curl --request GET \
--url 'https://bitq.link/api/user' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://bitq.link/api/user' \
--header 'Authorization: Bearer {api_key}' \
{
"data": {
"id":"1",
"type":"users",
"email":"[email protected]",
"billing":{
"type":"personal",
"name":"John Doe",
"address":"Lorem Ipsum",
"city":"Dolor Sit",
"county":"Amet",
"zip":"5000",
"country":"",
"phone":"",
"tax_id":""
},
"is_enabled":true,
"plan_id":"custom",
"plan_expiration_date":"2025-12-12 00:00:00",
"plan_settings":{
...
},
"plan_trial_done":false,
"language":"english",
"timezone":"UTC",
"country":null,
"date":"2020-01-01 00:00:00",
"last_activity":"2020-01-01 00:00:00",
"total_logins":10
}
}
Links
GET https://bitq.link/api/links/
curl --request GET \
--url 'https://bitq.link/api/links/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://bitq.link/api/links/' \
--header 'Authorization: Bearer {api_key}' \
| Parameters | Details | Description |
|---|---|---|
| page | Optional | The page number that you want results from. Defaults to 1. |
| results_per_page | Optional | How many results you want per page. Allowed values are: 10 , 25 , 50 , 100 , 250. Defaults to 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,
"date": "2020-11-15 12:00:00"
}
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://bitq.link/api/links?&page=1",
"last": "https://bitq.link/api/links?&page=1",
"next": null,
"prev": null,
"self": "https://bitq.link/api/links?&page=1"
}
}
GET https://bitq.link/api/links/{link_id}
curl --request GET \
--url 'https://bitq.link/api/links/{link_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://bitq.link/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,
"date": "2020-11-15 12:00:00"
}
}
Projects
GET https://bitq.link/api/projects/
curl --request GET \
--url 'https://bitq.link/api/projects/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://bitq.link/api/projects/' \
--header 'Authorization: Bearer {api_key}' \
| Parameters | Details | Description |
|---|---|---|
| page | Optional | The page number that you want results from. Defaults to 1. |
| results_per_page | Optional | How many results you want per page. Allowed values are: 10 , 25 , 50 , 100 , 250. Defaults to 25. |
{
"data": [
{
"id": 1,
"name": "Development",
"color": "#0e23cc",
"last_datetime": "2021-03-14 21:22:37",
"datetime": "2021-02-04 17:51:07"
},
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://bitq.link/api/projects?&page=1",
"last": "https://bitq.link/api/projects?&page=1",
"next": null,
"prev": null,
"self": "https://bitq.link/api/projects?&page=1"
}
}
GET https://bitq.link/api/projects/{project_id}
curl --request GET \
--url 'https://bitq.link/api/projects/{project_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://bitq.link/api/projects/{project_id}' \
--header 'Authorization: Bearer {api_key}' \
{
"data": {
"id": 1,
"name": "Development",
"color": "#0e23cc",
"last_datetime": "2021-03-14 21:22:37",
"datetime": "2021-02-04 17:51:07"
}
}
POST https://bitq.link/api/projects
| Parameters | Details | Description |
|---|---|---|
| name | Required | - |
| color | Optional | - |
curl --request POST \
--url 'https://bitq.link/api/projects' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Production' \
--form 'color=#ffffff' \
--url 'https://bitq.link/api/projects' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Production' \
--form 'color=#ffffff' \
{
"data": {
"id": 1
}
}
POST https://bitq.link/api/projects/{project_id}
| Parameters | Details | Description |
|---|---|---|
| name | Optional | - |
| color | Optional | - |
curl --request POST \
--url 'https://bitq.link/api/projects/{project_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Production' \
--form 'color=#000000' \
--url 'https://bitq.link/api/projects/{project_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Production' \
--form 'color=#000000' \
{
"data": {
"id": 1
}
}
DELETE https://bitq.link/api/projects/{project_id}
curl --request DELETE \
--url 'https://bitq.link/api/projects/{project_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://bitq.link/api/projects/{project_id}' \
--header 'Authorization: Bearer {api_key}' \
Custom domains
GET https://bitq.link/api/domains/
curl --request GET \
--url 'https://bitq.link/api/domains/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://bitq.link/api/domains/' \
--header 'Authorization: Bearer {api_key}' \
| Parameters | Details | Description |
|---|---|---|
| page | Optional | The page number that you want results from. Defaults to 1. |
| results_per_page | Optional | How many results you want per page. Allowed values are: 10 , 25 , 50 , 100 , 250. Defaults to 25. |
{
"data": [
{
"id": 1,
"scheme": "https://",
"host": "example.com",
"custom_index_url": "",
"is_enabled": true,
"last_datetime": null,
"datetime": "2021-02-04 23:29:18"
},
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://bitq.link/api/domains?&page=1",
"last": "https://bitq.link/api/domains?&page=1",
"next": null,
"prev": null,
"self": "https://bitq.link/api/domains?&page=1"
}
}
GET https://bitq.link/api/domains/{domain_id}
curl --request GET \
--url 'https://bitq.link/api/domains/{domain_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://bitq.link/api/domains/{domain_id}' \
--header 'Authorization: Bearer {api_key}' \
{
"data": {
"id": 1,
"scheme": "https://",
"host": "example.com",
"custom_index_url": "",
"is_enabled": true,
"last_datetime": null,
"datetime": "2021-02-04 23:29:18"
}
}
POST https://bitq.link/api/domains
| Parameters | Details | Description |
|---|---|---|
| host | Required | - |
| custom_index_url | Optional | - |
| custom_not_found_url | Optional | - |
curl --request POST \
--url 'https://bitq.link/api/domains' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'host=domain.com' \
--form 'custom_index_url=https://mywebsite.com/' \
--form 'custom_not_found_url=https://mywebsite.com/404-page'
--url 'https://bitq.link/api/domains' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'host=domain.com' \
--form 'custom_index_url=https://mywebsite.com/' \
--form 'custom_not_found_url=https://mywebsite.com/404-page'
{
"data": {
"id": 1
}
}
POST https://bitq.link/api/domains/{domain_id}
| Parameters | Details | Description |
|---|---|---|
| host | Optional | - |
| custom_index_url | Optional | - |
| custom_not_found_url | Optional | - |
curl --request POST \
--url 'https://bitq.link/api/domains/{domain_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'host=domain.com' \
--url 'https://bitq.link/api/domains/{domain_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'host=domain.com' \
{
"data": {
"id": 1
}
}
DELETE https://bitq.link/api/domains/{domain_id}
curl --request DELETE \
--url 'https://bitq.link/api/domains/{domain_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://bitq.link/api/domains/{domain_id}' \
--header 'Authorization: Bearer {api_key}' \
Payments
GET https://bitq.link/api/payments/
curl --request GET \
--url 'https://bitq.link/api/payments/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://bitq.link/api/payments/' \
--header 'Authorization: Bearer {api_key}' \
| Parameters | Details | Description |
|---|---|---|
| page | Optional | The page number that you want results from. Defaults to 1. |
| results_per_page | Optional | How many results you want per page. Allowed values are: 10 , 25 , 50 , 100 , 250. Defaults to 25. |
{
"data": [
{
"id": 1,
"plan_id": 1,
"processor": "stripe",
"type": "one_time",
"frequency": "monthly",
"email": "[email protected]",
"name": null,
"total_amount": "4.99",
"currency": "USD",
"status": true,
"date": "2021-03-25 15:08:58"
},
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://bitq.link/api/payments?&page=1",
"last": "https://bitq.link/api/payments?&page=1",
"next": null,
"prev": null,
"self": "https://bitq.link/api/payments?&page=1"
}
}
GET https://bitq.link/api/payments/{payment_id}
curl --request GET \
--url 'https://bitq.link/api/payments/{payment_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://bitq.link/api/payments/{payment_id}' \
--header 'Authorization: Bearer {api_key}' \
{
"data": {
"id": 1,
"plan_id": 1,
"processor": "stripe",
"type": "one_time",
"frequency": "monthly",
"email": "[email protected]",
"name": null,
"total_amount": "4.99",
"currency": "USD",
"status": true,
"date": "2021-03-25 15:08:58"
}
}
Logs
GET https://bitq.link/api/logs/
curl --request GET \
--url 'https://bitq.link/api/logs/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://bitq.link/api/logs/' \
--header 'Authorization: Bearer {api_key}' \
| Parameters | Details | Description |
|---|---|---|
| page | Optional | The page number that you want results from. Defaults to 1. |
| results_per_page | Optional | How many results you want per page. Allowed values are: 10 , 25 , 50 , 100 , 250. Defaults to 25. |
{
"data": [
{
"type": "login.success",
"ip": "127.0.0.1",
"date": "2021-02-03 12:21:40"
},
{
"type": "login.success",
"ip": "127.0.0.1",
"date": "2021-02-03 12:23:26"
}
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://bitq.link/api/payments?&page=1",
"last": "https://bitq.link/api/payments?&page=1",
"next": null,
"prev": null,
"self": "https://bitq.link/api/payments?&page=1"
}
}