Rename a share link
Changes the slug. The old link immediately stops working, with no redirect. Request: PATCH /v1/template-projects/{projectId}/share-link.
PATCH
Changes the slug. The old link immediately stops working, with no redirect.
apiKeyheader
x-api-key<token>projectId*stringMatch
^tproj_[0-9a-hjkmnp-tv-z]{16,24}$application/json- body
slug*stringMatch
^[a-z0-9-]{3,60}$Success
application/json- response
slug*stringMatch
^[a-z0-9-]{3,60}$url*stringcanonicalPath*stringviews*integerRange
-9007199254740991 <= value <= 9007199254740991opens*integerRange
-9007199254740991 <= value <= 9007199254740991updatedAt*stringimport { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.templateShareLinks.rename({
"projectId": "example",
"slug": "example"
});Example Response
{
"slug": "string",
"url": "string",
"canonicalPath": "string",
"views": -9007199254740991,
"opens": -9007199254740991,
"updatedAt": "string"
}