```php
<?php

require_once '../../core/api_bootstrap.php';

$data = Request::post();

try {

Validator::required($data,[
'category_id',
'city_id',
'title'
]);

$db = new Database();
$conn = $db->connect();

/*
Get category slug
*/
$cat = $conn->prepare("SELECT slug FROM categories WHERE id=:id");
$cat->execute([':id'=>$data['category_id']]);
$cat = $cat->fetch();

/*
Get city slug
*/
$city = $conn->prepare("SELECT name FROM cities WHERE id=:id");
$city->execute([':id'=>$data['city_id']]);
$city = $city->fetch();

$citySlug = Slug::generate($city['name']);

$slug = $cat['slug']."-".$citySlug;

$query="

INSERT INTO service_city_pages
(
category_id,
sub_category_id,
city_id,
slug,
title,
content,
meta_title,
meta_description,
meta_keywords,
schema_markup
)

VALUES
(
:category_id,
:sub_category_id,
:city_id,
:slug,
:title,
:content,
:meta_title,
:meta_description,
:meta_keywords,
:schema_markup
)

";

$stmt=$conn->prepare($query);

$stmt->execute([

':category_id'=>$data['category_id'],
':sub_category_id'=>$data['sub_category_id'] ?? null,
':city_id'=>$data['city_id'],
':slug'=>$slug,
':title'=>$data['title'],
':content'=>$data['content'] ?? null,
':meta_title'=>$data['meta_title'] ?? null,
':meta_description'=>$data['meta_description'] ?? null,
':meta_keywords'=>$data['meta_keywords'] ?? null,
':schema_markup'=>$data['schema_markup'] ?? null

]);

Response::success([
"id"=>$conn->lastInsertId(),
"slug"=>$slug
],"Service SEO page created");

}
catch(Exception $e){

Logger::log("system.log",$e->getMessage());
Response::error("Server error",500);

}