The "Check url slug" API allows check the blog slug validation which is needed before publishing any blog post. Please use blogs/check-slug.readonly. you can find the POST ID from the post edit url.
http
GET https://services.leadconnectorhq.com/blogs/posts/url-slug-existsAuthorization
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
Authorization | string | Yes | Bearer token generated from the Leadway portal. See Authentication. | |
Version | string | Yes | 2021-07-28 | API version. |
Query parameters
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
urlSlug | string | Yes | ||
locationId | string | Yes | ve9EPM428h8vShlRW1KT | |
postId | string | No | 66f429b8afdce84227a4610d |
Responses
200 - Successful response
exists(boolean, required): Indicates whether the url slug exists or not
json
{
"exists": true
}400 - Bad Request
json
{}422 - Unprocessable Entity
json
{}Example
curl -X GET 'https://services.leadconnectorhq.com/blogs/posts/url-slug-exists' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'const response = await fetch('https://services.leadconnectorhq.com/blogs/posts/url-slug-exists', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/blogs/posts/url-slug-exists',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()<?php
$ch = curl_init('https://services.leadconnectorhq.com/blogs/posts/url-slug-exists');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);