Update a topic form
Updates only the supplied form fields. allowedOrigins replaces the complete exact-origin allowlist; redirectUrl null clears the success redirect.
PATCH
Updates only the supplied form fields. allowedOrigins replaces the complete exact-origin allowlist; redirectUrl null clears the success redirect. The public key remains stable.
apiKeyheader
x-api-key<token>id*stringMatch
^tpc_[0-9a-hjkmnp-tv-z]{16,24}$formId*stringMatch
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$Format
uuidapplication/json- body
allowedOrigins?array<>|nullconfirmationTitle?|nullconfirmationMessage?|nullsuccessTitle?|nullsuccessMessage?|nullredirectUrl?|null|nullTopicForm
application/json- response
id*stringMatch
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$Format
uuidpublicKey*stringMatch
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$Format
uuidtopicId*TopicIdMatch
^tpc_[0-9a-hjkmnp-tv-z]{16,24}$allowedOrigins*array<>Items
items <= 20confirmationTitle*stringLength
1 <= length <= 120confirmationMessage*stringLength
1 <= length <= 2000successTitle*stringLength
1 <= length <= 120successMessage*stringLength
1 <= length <= 2000redirectUrl*|nulllinkOrigin*stringcreatedAt*stringupdatedAt*stringimport { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.topicForms.update({
"id": "example",
"formId": "example"
});Example Response
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"publicKey": "29f62ed2-b67a-44ba-84f5-217ecee94438",
"topicId": "string",
"allowedOrigins": [
"string"
],
"confirmationTitle": "string",
"confirmationMessage": "string",
"successTitle": "string",
"successMessage": "string",
"redirectUrl": "string",
"linkOrigin": "string",
"createdAt": "string",
"updatedAt": "string"
}