Skip to content

Preview rename

POST
/api/v1/tags/rename/preview
curl --request POST \
--url https://example.com/api/v1/tags/rename/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "confirmed": true, "new_tag": "example", "old_tag": "example" }'

Shows a preview of the rename. It requires a signed-in User with the data scope. It can return 400 if the request is invalid, 401 if the session is missing or expired and 403 if access is denied. Route: /api/v1/tags/rename/preview. Inputs: . Do not automatically replay this operation after an uncertain result.

Media typeapplication/json

Legacy rename and preview arguments retain their names; optional consent follows the durable merge rule for every adapter (#1110).

object
confirmed
boolean
new_tag
required
string
old_tag
required
string
Examplegenerated
{
"confirmed": true,
"new_tag": "example",
"old_tag": "example"
}
Media typeapplication/json
object
affected_count
required
integer format: int64
items
required
Array<object>

One tagged object in a Home.

object
id
required
string
kind
required
string
path
required
string
title
string | null
new_tag
required
string
old_tag
required
string
supports_rewrite
required

True when an indexed Markdown or Sidecar source can be rewritten.

boolean
truncated
required
boolean
Examplegenerated
{
"affected_count": 1,
"items": [
{
"id": "example",
"kind": "example",
"path": "example",
"title": "example"
}
],
"new_tag": "example",
"old_tag": "example",
"supports_rewrite": true,
"truncated": true
}
Media typeapplication/json

The standard API error response: { "error": { ... } }.

object
error
required

Error details.

object
code
required

Stable machine-readable code.

string
Allowed values: bad_request unauthorized forbidden not_found conflict name_conflict_case name_too_long push_endpoint_rejected too_many_requests internal service_unavailable
details
One of:

Optional field or operation details.

object
key
additional properties
string
message
required

Safe text for logs or a user-facing error message.

string
Example
{
"error": {
"code": "bad_request"
}
}