Własne domeny
GET https://okk.link/api/domains/available
curl --request GET \
--url 'https://okk.link/api/domains/available' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://okk.link/api/domains/available' \
--header 'Authorization: Bearer {api_key}' \
| Parametry | Szczegóły | Opis |
|---|---|---|
| search | Opcjonalny String | Ciąg wyszukiwania. |
| search_by | Opcjonalny String | Pole, po którym szukasz. Dozwolone wartości: host. |
| datetime_field | Opcjonalny String | Dozwolone wartości: datetime, last_datetime |
| datetime_start | Opcjonalny String | Filtruj wyniki od tej daty i godziny. Format Y-m-d H:i:s. |
| datetime_end | Opcjonalny String | Filtruj wyniki do tej daty i godziny. Format Y-m-d H:i:s. |
| order_by | Opcjonalny String | Pole, według którego mają być sortowane wyniki. Dozwolone wartości: domain_id, datetime, last_datetime, host. |
| order_type | Opcjonalny String | Kolejność wyników. Dozwolone wartości: ASC dla sortowania rosnącego i DESC dla sortowania malejącego. |
| page | Opcjonalny Liczba całkowita | Numer strony, dla której chcesz uzyskać wyniki. Domyślnie 1. |
| results_per_page | Opcjonalny Liczba całkowita | Liczba wyników na stronę. Dozwolone wartości to: 10, 25, 50, 100, 250, 500, 1000. Domyślnie 25. |
{
"data": [
{
"id": 1,
"user_id": 1,
"type": 1,
"scheme": "Example",
"host": "Example",
"url": "https://example.com/",
"custom_index_url": "https://example.com/",
"custom_not_found_url": "https://example.com/",
"is_enabled": true,
"last_datetime": null,
"datetime": "2026-09-17 00:09:55"
}
],
"meta": {
"page": 1,
"total_pages": 1,
"results_per_page": 25,
"total_results": 1
},
"links": {
"first": "https://okk.link/api/domains/available?page=1",
"last": "https://okk.link/api/domains/available?page=1",
"next": null,
"prev": null,
"self": "https://okk.link/api/domains/available?page=1"
}
}
GET https://okk.link/api/domains/
curl --request GET \
--url 'https://okk.link/api/domains/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://okk.link/api/domains/' \
--header 'Authorization: Bearer {api_key}' \
| Parametry | Szczegóły | Opis |
|---|---|---|
| search | Opcjonalny String | Ciąg wyszukiwania. |
| search_by | Opcjonalny String | Pole, po którym szukasz. Dozwolone wartości: host. |
| is_enabled | Opcjonalny Boolean | |
| datetime_field | Opcjonalny String | Dozwolone wartości: datetime, last_datetime |
| datetime_start | Opcjonalny String | Filtruj wyniki od tej daty i godziny. Format Y-m-d H:i:s. |
| datetime_end | Opcjonalny String | Filtruj wyniki do tej daty i godziny. Format Y-m-d H:i:s. |
| order_by | Opcjonalny String | Pole, według którego mają być sortowane wyniki. Dozwolone wartości: domain_id, datetime, last_datetime, host. |
| order_type | Opcjonalny String | Kolejność wyników. Dozwolone wartości: ASC dla sortowania rosnącego i DESC dla sortowania malejącego. |
| page | Opcjonalny Liczba całkowita | Numer strony, dla której chcesz uzyskać wyniki. Domyślnie 1. |
| results_per_page | Opcjonalny Liczba całkowita | Liczba wyników na stronę. Dozwolone wartości to: 10, 25, 50, 100, 250, 500, 1000. Domyślnie 25. |
{
"data": [
{
"id": 1,
"user_id": 1,
"scheme": "Example",
"host": "Example",
"custom_index_url": "https://example.com/",
"custom_not_found_url": "https://example.com/",
"is_enabled": true,
"last_datetime": null,
"datetime": "2026-09-17 00:09:55"
}
],
"meta": {
"page": 1,
"total_pages": 1,
"results_per_page": 25,
"total_results": 1
},
"links": {
"first": "https://okk.link/api/domains?page=1",
"last": "https://okk.link/api/domains?page=1",
"next": null,
"prev": null,
"self": "https://okk.link/api/domains?page=1"
}
}
GET https://okk.link/api/domains/{domain_id}
curl --request GET \
--url 'https://okk.link/api/domains/{domain_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://okk.link/api/domains/{domain_id}' \
--header 'Authorization: Bearer {api_key}' \
{
"data": {
"id": 1,
"user_id": 1,
"scheme": "Example",
"host": "Example",
"custom_index_url": "https://example.com/",
"custom_not_found_url": "https://example.com/",
"is_enabled": true,
"last_datetime": null,
"datetime": "2026-09-17 00:09:55"
}
}
POST https://okk.link/api/domains
| Parametry | Szczegóły | Opis |
|---|---|---|
| host | Wymagany String | - |
| custom_index_url | Opcjonalny String | - |
| custom_not_found_url | Opcjonalny String | - |
| scheme | Opcjonalny String | - |
curl --request POST \
--url 'https://okk.link/api/domains' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'host=example.com' \
--form 'custom_index_url=https://example.com/' \
--form 'custom_not_found_url=https://example.com/404-page'
--url 'https://okk.link/api/domains' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'host=example.com' \
--form 'custom_index_url=https://example.com/' \
--form 'custom_not_found_url=https://example.com/404-page'
{
"data": {
"id": 1,
"user_id": 1,
"scheme": "Example",
"host": "Example",
"custom_index_url": "https://example.com/",
"custom_not_found_url": "https://example.com/",
"is_enabled": true,
"last_datetime": null,
"datetime": "2026-09-17 00:09:55"
}
}
POST https://okk.link/api/domains/{domain_id}
| Parametry | Szczegóły | Opis |
|---|---|---|
| host | Opcjonalny String | - |
| custom_index_url | Opcjonalny String | - |
| custom_not_found_url | Opcjonalny String | - |
| scheme | Opcjonalny String | - |
curl --request POST \
--url 'https://okk.link/api/domains/{domain_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'host=example.com' \
--url 'https://okk.link/api/domains/{domain_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'host=example.com' \
{
"data": {
"id": 1,
"user_id": 1,
"scheme": "Example",
"host": "Example",
"custom_index_url": "https://example.com/",
"custom_not_found_url": "https://example.com/",
"is_enabled": true,
"last_datetime": null,
"datetime": "2026-09-17 00:09:55"
}
}
DELETE https://okk.link/api/domains/{domain_id}
curl --request DELETE \
--url 'https://okk.link/api/domains/{domain_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://okk.link/api/domains/{domain_id}' \
--header 'Authorization: Bearer {api_key}' \