Manage custom sitemap entries and URL redirect rules for the XML sitemap. Custom entries complement the auto-generated entries (from contents and site blocks). Rules define how URLs are transformed in the sitemap output.

16 endpoints

GET /sitemap/entries

List sitemap entries

Returns all custom sitemap entries.

Responses

Status

Description

200

Successful response

401

Unauthorized — invalid or missing API token

403

Forbidden — insufficient permissions

Examples

Bash
curl https://api.lynkow.com/v1/sitemap/entries \
  -H "Authorization: Bearer $API_TOKEN"

Response Example

JSON
{
  "data": [
    {
      "id": "f1a2b3c4-d5e6-7890-abcd-ef1234567890",
      "siteId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "url": "/pricing",
      "isExternal": false,
      "priority": 0.8,
      "changefreq": "monthly",
      "lastModified": "2025-04-01T00:00:00.000Z",
      "title": "Pricing Page",
      "createdAt": "2025-02-10T09:00:00.000Z",
      "updatedAt": "2025-04-01T12:00:00.000Z"
    },
    {
      "id": "a2b3c4d5-e6f7-8901-bcde-f12345678901",
      "siteId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "url": "https://partner-site.com/our-listing",
      "isExternal": true,
      "priority": 0.5,
      "changefreq": "yearly",
      "lastModified": null,
      "title": "Partner Listing",
      "createdAt": "2025-03-05T14:00:00.000Z",
      "updatedAt": "2025-03-05T14:00:00.000Z"
    }
  ],
  "meta": {
    "total": 12,
    "perPage": 50,
    "currentPage": 1,
    "lastPage": 1
  }
}

POST /sitemap/entries

Create a sitemap entry

Adds a custom URL to the sitemap. Set priority (0.0-1.0), changefreq (always, hourly, daily, weekly, monthly, yearly, never), and lastmod date.

Request Body

Content-Type: application/json

Field

Type

Required

Description

url

string

Yes

Required. 1-2048 characters

isExternal

boolean

No

Boolean

priority

number

No

Between 0 and 1

changefreq

"always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | "never"

No

One of: always, hourly, daily, weekly, monthly, yearly, never

lastModified

string

No

Last modification datetime (ISO 8601)

title

string

No

Display title. Max 255 characters

Responses

Status

Description

201

Successful response

401

Unauthorized — invalid or missing API token

403

Forbidden — insufficient permissions

422

Validation error

Examples

Bash
curl -X POST https://api.lynkow.com/v1/sitemap/entries \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "/pricing",
    "priority": 0.8,
    "changefreq": "monthly",
    "title": "Pricing Page"
  }'

Response Example

JSON
{
  "id": "f1a2b3c4-d5e6-7890-abcd-ef1234567890",
  "siteId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "url": "/pricing",
  "isExternal": false,
  "priority": 0.8,
  "changefreq": "monthly",
  "lastModified": null,
  "title": "Pricing Page",
  "createdAt": "2025-04-06T11:00:00.000Z",
  "updatedAt": "2025-04-06T11:00:00.000Z"
}

GET /sitemap/entries/export

Export sitemap entries as CSV

Downloads all custom sitemap entries as a CSV file.

Responses

Status

Description

200

Successful response

401

Unauthorized — invalid or missing API token

403

Forbidden — insufficient permissions

Examples

Bash
curl "https://api.lynkow.com/v1/sitemap/entries/export" \
  -H "Authorization: Bearer $API_TOKEN" \
  -o sitemap-entries.csv

Response Example

JSON
"Returns a CSV file (Content-Type: text/csv). Example output:\nurl,priority,changefreq,title,is_external,last_modified\n\"/pricing\",0.8,\"monthly\",\"Pricing Page\",false,\"2025-04-01\"\n"

POST /sitemap/entries/import

Import sitemap entries from CSV

Imports custom sitemap entries from a CSV file.

Request Body

Content-Type: application/json

Field

Type

Required

Description

entries

object[]

Yes

Required. Array of objects

Responses

Status

Description

201

Successful response

401

Unauthorized — invalid or missing API token

403

Forbidden — insufficient permissions

422

Validation error

Examples

Bash
curl -X POST https://api.lynkow.com/v1/sitemap/entries/import \
  -H "Authorization: Bearer $API_TOKEN" \
  -F "[email protected]"

Response Example

JSON
{
  "imported": 8,
  "skipped": 1,
  "errors": []
}

GET /sitemap/preview

Preview complete sitemap

Returns a preview of the full sitemap including both auto-generated and custom entries. Useful for verifying the sitemap before it goes live.

Responses

Status

Description

200

Successful response

401

Unauthorized — invalid or missing API token

403

Forbidden — insufficient permissions

Examples

Bash
# Returns the full XML sitemap preview
curl https://api.lynkow.com/v1/sitemap/preview \
  -H "Authorization: Bearer $API_TOKEN"

Response Example

JSON
{
  "data": [
    {
      "url": "https://www.example.com/blog/getting-started",
      "lastmod": "2025-04-05",
      "changefreq": "weekly",
      "priority": 0.8,
      "source": "content"
    },
    {
      "url": "https://www.example.com/about",
      "lastmod": "2025-03-20",
      "changefreq": "monthly",
      "priority": 0.6,
      "source": "site-block"
    },
    {
      "url": "https://www.example.com/pricing",
      "lastmod": "2025-04-01",
      "changefreq": "monthly",
      "priority": 0.8,
      "source": "custom"
    }
  ]
}

GET /sitemap/rules

List sitemap rules

Returns all URL redirect/rewrite rules applied to the sitemap.

Responses

Status

Description

200

Successful response

401

Unauthorized — invalid or missing API token

403

Forbidden — insufficient permissions

Examples

Bash
curl https://api.lynkow.com/v1/sitemap/rules \
  -H "Authorization: Bearer $API_TOKEN"

Response Example

JSON
{
  "data": [
    {
      "id": 1,
      "pattern": "/old-blog/*",
      "replacement": "/blog/*",
      "isActive": true,
      "createdAt": "2025-02-01T10:00:00.000Z"
    }
  ]
}

POST /sitemap/rules

Create a sitemap rule

Creates a new URL rule for the sitemap.

Request Body

Content-Type: application/json

Field

Type

Required

Description

sourceType

"content_type" | "category" | "tag" | "path_pattern"

Yes

Required. One of: content_type, category, tag, path_pattern

sourceValue

string

Yes

Required. 1-255 characters

priority

number

Yes

Required. Between 0 and 1

changefreq

"always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | "never"

Yes

Required. One of: always, hourly, daily, weekly, monthly, yearly, never

ruleOrder

number

No

Number

Responses

Status

Description

201

Successful response

401

Unauthorized — invalid or missing API token

403

Forbidden — insufficient permissions

422

Validation error

Examples

Bash
curl -X POST https://api.lynkow.com/v1/sitemap/rules \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"pattern": "/old-path/*", "replacement": "/new-path/*"}'

Response Example

JSON
{
  "data": {
    "id": 2,
    "pattern": "/old-path/*",
    "replacement": "/new-path/*",
    "isActive": true,
    "createdAt": "2025-04-06T12:00:00.000Z"
  }
}

PUT /sitemap/entries/:id

Update a sitemap entry

Updates an existing sitemap entry.

Parameters

Name

In

Type

Required

Description

id

path

string

Yes

Unique identifier

Request Body

Content-Type: application/json

Field

Type

Required

Description

url

string

No

1-2048 characters

isExternal

boolean

No

Boolean

priority

number

No

Between 0 and 1

changefreq

"always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | "never"

No

One of: always, hourly, daily, weekly, monthly, yearly, never

lastModified

string

No

Last modification datetime (ISO 8601)

title

string

No

Display title. Max 255 characters

Responses

Status

Description

200

Successful response

401

Unauthorized — invalid or missing API token

403

Forbidden — insufficient permissions

404

Not found

422

Validation error

Response Example

JSON
{
  "id": "f1a2b3c4-d5e6-7890-abcd-ef1234567890",
  "siteId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "url": "/pricing",
  "isExternal": false,
  "priority": 0.9,
  "changefreq": "weekly",
  "lastModified": "2025-04-06T00:00:00.000Z",
  "title": "Pricing Page",
  "createdAt": "2025-02-10T09:00:00.000Z",
  "updatedAt": "2025-04-06T11:30:00.000Z"
}

DELETE /sitemap/entries/:id

Delete a sitemap entry

Removes a custom entry from the sitemap.

Parameters

Name

In

Type

Required

Description

id

path

string

Yes

Unique identifier

Responses

Status

Description

200

Successful response

401

Unauthorized — invalid or missing API token

403

Forbidden — insufficient permissions

404

Not found

Response Example

JSON
{
  "description": "Returns HTTP 204 No Content on success."
}

PUT /sitemap/rules/:id

Update a sitemap rule

Updates an existing sitemap rule.

Parameters

Name

In

Type

Required

Description

id

path

string

Yes

Unique identifier

Request Body

Content-Type: application/json

Field

Type

Required

Description

sourceType

"content_type" | "category" | "tag" | "path_pattern"

No

One of: content_type, category, tag, path_pattern

sourceValue

string

No

1-255 characters

priority

number

No

Between 0 and 1

changefreq

"always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | "never"

No

One of: always, hourly, daily, weekly, monthly, yearly, never

ruleOrder

number

No

Number

Responses

Status

Description

200

Successful response

401

Unauthorized — invalid or missing API token

403

Forbidden — insufficient permissions

404

Not found

422

Validation error

Response Example

JSON
{
  "data": {
    "id": 1,
    "pattern": "/old-blog/*",
    "replacement": "/blog/*",
    "isActive": true,
    "createdAt": "2025-02-01T10:00:00.000Z",
    "updatedAt": "2025-04-06T12:00:00.000Z"
  }
}

DELETE /sitemap/rules/:id

Delete a sitemap rule

Removes a rule from the sitemap.

Parameters

Name

In

Type

Required

Description

id

path

string

Yes

Unique identifier

Responses

Status

Description

200

Successful response

401

Unauthorized — invalid or missing API token

403

Forbidden — insufficient permissions

404

Not found

Response Example

JSON
{
  "message": "Rule deleted"
}

GET /sitemap/sources

List Sources

Responses

Status

Description

200

Successful response

401

Unauthorized — invalid or missing API token

403

Forbidden — insufficient permissions


POST /sitemap/sources

Create a Source

Responses

Status

Description

201

Successful response

401

Unauthorized — invalid or missing API token

403

Forbidden — insufficient permissions

422

Validation error


GET /sitemap/sources/:id

Get a Source

Parameters

Name

In

Type

Required

Description

id

path

string

Yes

Unique identifier

Responses

Status

Description

200

Successful response

401

Unauthorized — invalid or missing API token

403

Forbidden — insufficient permissions

404

Not found


PUT /sitemap/sources/:id

Update a Source

Parameters

Name

In

Type

Required

Description

id

path

string

Yes

Unique identifier

Responses

Status

Description

200

Successful response

401

Unauthorized — invalid or missing API token

403

Forbidden — insufficient permissions

404

Not found

422

Validation error


DELETE /sitemap/sources/:id

Delete a Source

Parameters

Name

In

Type

Required

Description

id

path

string

Yes

Unique identifier

Responses

Status

Description

200

Successful response

401

Unauthorized — invalid or missing API token

403

Forbidden — insufficient permissions

404

Not found