Introduction
Welcome to our API documentation!
Our API is still under construction and not everything is publicly available yet. If you have a use case for a specific endpoint not listed here, reach us at [email protected] so that we make it available.
Base URL
https://app.seowl.co/
Authenticating requests
Authenticate requests to this API's endpoints by sending an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
You can retrieve your API key by visiting your profile and clicking API Keys. Then fetch a token using api/token endpoint
Authentification
API endpoints related to authentification
Refresh a token.
Example request:
curl --request POST \
"http://seowl.test/api/refresh" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://seowl.test/api/refresh"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://seowl.test/api/refresh',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'http://seowl.test/api/refresh'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers)
response.json()Received response:
Request failed with error:
Get a JWT via API Key
Example request:
curl --request POST \
"http://seowl.test/api/token" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"key\": \"optio\"
}"
const url = new URL(
"http://seowl.test/api/token"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"key": "optio"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://seowl.test/api/token',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'key' => 'optio',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'http://seowl.test/api/token'
payload = {
"key": "optio"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (200):
{
"access_token": "<token>",
"exp": 60
}
Example response (400):
{
"error": "Invalid Api Key"
}
Example response (401):
{
"error": "Unauthorized"
}
Example response (500):
{
"message": "Server Error"
}
Received response:
Request failed with error:
Backlinks management
APIs for managing backlinks
Add a list of backlinks to a site from a string
requires authentication
Example request:
curl --request POST \
"http://seowl.test/api/backlinks" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"urls\": \"quae\",
\"tags\": [
\"voluptas\"
],
\"site_id\": \"qui\",
\"expected_dofollow\": false,
\"cost\": 15
}"
const url = new URL(
"http://seowl.test/api/backlinks"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"urls": "quae",
"tags": [
"voluptas"
],
"site_id": "qui",
"expected_dofollow": false,
"cost": 15
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://seowl.test/api/backlinks',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'urls' => 'quae',
'tags' => [
'voluptas',
],
'site_id' => 'qui',
'expected_dofollow' => false,
'cost' => 15,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'http://seowl.test/api/backlinks'
payload = {
"urls": "quae",
"tags": [
"voluptas"
],
"site_id": "qui",
"expected_dofollow": false,
"cost": 15
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (200):
[{
"id": 1,
"url": "https://www.google.com",
"href": "",
"anchor": "",
"dofollow": false,
"https": false,
"live": false,
"present": false,
"indexed": false,
"obl" : 0,
"ip" : "",
"geoloc": "",
"cost": 100,
"type": 1,
"expected_dofollow": true,
"tags" : []
"site_id": 1
}]
Example response (422):
{
"message": "The given data was invalid.",
"errors": {
"site_id": [
"The site_id field is required.",
"The site_id field must be numerical"
],
"urls": [
"The urls field is required."
]
}
}
Example response (401):
{
"error": "Unauthorized"
}
Example response (500):
{
"message": "Server Error"
}
Received response:
Request failed with error:
IndexedAPI
APIs for indexation checking
Get the list of created tasks
requires authentication
Example request:
curl --request GET \
--get "http://seowl.test/api/index/tasks" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://seowl.test/api/index/tasks"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://seowl.test/api/index/tasks',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'http://seowl.test/api/index/tasks'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
[
{
"id": 456,
"name": "Task name",
"user_id": 123,
"deleted_at": null,
"created_at": "2021-08-25T15:08:48.000000Z",
"updated_at": "2021-08-25T15:08:48.000000Z",
"not_indexed_count": 415,
"indexed_count": 125,
"processing_count": 45
}
]
Received response:
Request failed with error:
Create a new indexation check task
requires authentication
Example request:
curl --request POST \
"http://seowl.test/api/index/tasks" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"quidem\",
\"links\": [
\"quod\"
]
}"
const url = new URL(
"http://seowl.test/api/index/tasks"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "quidem",
"links": [
"quod"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://seowl.test/api/index/tasks',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'quidem',
'links' => [
'quod',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'http://seowl.test/api/index/tasks'
payload = {
"name": "quidem",
"links": [
"quod"
]
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (200):
{
"id": 456,
"name": "Task name",
"user_id": 123,
"deleted_at": null,
"created_at": "2021-08-25T15:08:48.000000Z",
"updated_at": "2021-08-25T15:08:48.000000Z",
"not_indexed_count": 415,
"indexed_count": 125,
"processing_count": 45
}
Received response:
Request failed with error:
Get details of a given task
requires authentication
Example request:
curl --request GET \
--get "http://seowl.test/api/index/tasks/3615" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://seowl.test/api/index/tasks/3615"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://seowl.test/api/index/tasks/3615',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'http://seowl.test/api/index/tasks/3615'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"id": 456,
"name": "Task name",
"user_id": 123,
"deleted_at": null,
"created_at": "2021-08-25T15:08:48.000000Z",
"updated_at": "2021-08-25T15:08:48.000000Z",
"not_indexed_count": 123,
"indexed_count": 456,
"processing_count": 78,
"items": [
{
"id": 123,
"url": "http://example.com",
"site_check": 0,
"inurl_check": 0,
"job_status": 0,
"indexed": 0,
"index_check_task_id": 19,
"created_at": "2021-08-25T15:08:48.000000Z",
"updated_at": "2021-11-23T15:06:38.000000Z"
},
]
}
Received response:
Request failed with error:
Delete a given task
requires authentication
Example request:
curl --request DELETE \
"http://seowl.test/api/index/tasks/409" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://seowl.test/api/index/tasks/409"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->delete(
'http://seowl.test/api/index/tasks/409',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'http://seowl.test/api/index/tasks/409'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers)
response.json()Example response (200):
{ 'status' : 'ok }
Received response:
Request failed with error:
Get remaining credits
requires authentication
Example request:
curl --request GET \
--get "http://seowl.test/api/index/usage" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://seowl.test/api/index/usage"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://seowl.test/api/index/usage',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'http://seowl.test/api/index/usage'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{ 'credits' : 123 }
Received response:
Request failed with error:
Recheck a selected list of URLs
requires authentication
cost 1 credit per URL
Example request:
curl --request POST \
"http://seowl.test/api/index/9/refresh" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"ids\": [
7
]
}"
const url = new URL(
"http://seowl.test/api/index/9/refresh"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"ids": [
7
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://seowl.test/api/index/9/refresh',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'ids' => [
7,
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'http://seowl.test/api/index/9/refresh'
payload = {
"ids": [
7
]
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (200):
{}
Example response (400):
{
'error' : 'insufficient_funds'
}
Received response:
Request failed with error:
Keywords management
Get list of keywords from a website
requires authentication
Example request:
curl --request GET \
--get "http://seowl.test/api/sites/662/keywords?id=et" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://seowl.test/api/sites/662/keywords"
);
const params = {
"id": "et",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://seowl.test/api/sites/662/keywords',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'id'=> 'et',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'http://seowl.test/api/sites/662/keywords'
params = {
'id': 'et',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()Example response (200):
[{
"id": 51,
"keyword": "my keyword",
"url_pattern": null,
"rank_last_check_date": "2020-09-01T19:16:39.000000Z",
"google_region_id": 3,
"site_id": 5,
"latitude": null,
"longitude": null,
"location_label": null,
}]
Example response (401):
{
"error": "Unauthorized"
}
Example response (500):
{
"message": "Server Error"
}
Received response:
Request failed with error:
Sites management
APIs for managing sites
List the sites
requires authentication
Example request:
curl --request GET \
--get "http://seowl.test/api/sites" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://seowl.test/api/sites"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://seowl.test/api/sites',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'http://seowl.test/api/sites'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
[
{
"id": 1,
"name": "My website",
"url": "https://www.google.com",
"user_id": 12,
"created_at": "2019-05-03 14:14:14",
"updated_at": "2019-05-03 14:14:14"
}
]
Example response (401):
{
"error": "Unauthorized"
}
Example response (500):
{
"message": "Server Error"
}
Received response:
Request failed with error:
Add a new website to user
requires authentication
Example request:
curl --request POST \
"http://seowl.test/api/sites" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"ut\",
\"url\": \"provident\",
\"gsc\": false,
\"findBacklinks\": true,
\"region\": 11
}"
const url = new URL(
"http://seowl.test/api/sites"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "ut",
"url": "provident",
"gsc": false,
"findBacklinks": true,
"region": 11
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://seowl.test/api/sites',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'ut',
'url' => 'provident',
'gsc' => false,
'findBacklinks' => true,
'region' => 11,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'http://seowl.test/api/sites'
payload = {
"name": "ut",
"url": "provident",
"gsc": false,
"findBacklinks": true,
"region": 11
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (200):
{
"id": 1,
"name": "My website",
"url": "https://www.google.com",
"user_id": 12,
"created_at": "2019-05-03 14:14:14",
"updated_at": "2019-05-03 14:14:14"
}
Example response (422):
{
"message": "The given data was invalid.",
"errors": {
"name": [
"The name field is required."
],
"url": [
"The url field is required."
]
}
}
Example response (401):
{
"error": "Unauthorized"
}
Example response (500):
{
"message": "Server Error"
}
Received response:
Request failed with error:
Get details of a website
requires authentication
Example request:
curl --request GET \
--get "http://seowl.test/api/sites/23925?id=unde" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://seowl.test/api/sites/23925"
);
const params = {
"id": "unde",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://seowl.test/api/sites/23925',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'id'=> 'unde',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'http://seowl.test/api/sites/23925'
params = {
'id': 'unde',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()Example response (200):
{
"id": 1,
"name": "My website",
"url": "https://www.google.com",
"user_id": 12,
"created_at": "2019-05-03 14:14:14",
"updated_at": "2019-05-03 14:14:14"
}
Example response (401):
{
"error": "Unauthorized"
}
Example response (500):
{
"message": "Server Error"
}
Received response:
Request failed with error:
Update the specified site details
requires authentication
Example request:
curl --request PUT \
"http://seowl.test/api/sites/219?id=rerum" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"dolores\",
\"url\": \"ut\"
}"
const url = new URL(
"http://seowl.test/api/sites/219"
);
const params = {
"id": "rerum",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "dolores",
"url": "ut"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->put(
'http://seowl.test/api/sites/219',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'id'=> 'rerum',
],
'json' => [
'name' => 'dolores',
'url' => 'ut',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'http://seowl.test/api/sites/219'
payload = {
"name": "dolores",
"url": "ut"
}
params = {
'id': 'rerum',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('PUT', url, headers=headers, json=payload, params=params)
response.json()Example response (200):
{
"id": 1,
"name": "My website",
"url": "https://www.google.com",
"user_id": 12,
}
Example response (401):
{
"error": "Unauthorized"
}
Example response (500):
{
"message": "Server Error"
}
Received response:
Request failed with error:
Remove the specified site
requires authentication
Example request:
curl --request DELETE \
"http://seowl.test/api/sites/1?id=voluptates" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://seowl.test/api/sites/1"
);
const params = {
"id": "voluptates",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->delete(
'http://seowl.test/api/sites/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'id'=> 'voluptates',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'http://seowl.test/api/sites/1'
params = {
'id': 'voluptates',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers, params=params)
response.json()Example response (200):
{
"id": 1
}
Example response (401):
{
"error": "Unauthorized"
}
Example response (500):
{
"message": "Server Error"
}
Received response:
Request failed with error: