Templates

Create a template from a website

Checks that the website is a public page Samva can read, creates an email template project from Samva's canonical TSX starter, and returns the template with status 201 and the request that makes the template assistant match the site. The assistant runs when the request is sent in the editor; it rebuilds the project's theme and blocks from the site and proposes a brand that applies only after the customer approves it. A 422 names why the site cannot be matched: not a web address, not public, no answer, a missing page, refused automated visits, or not a web page.

post/v1/templates/from-website

Request

  • Base URL: https://api.samva.dev
  • URL: https://api.samva.dev/v1/templates/from-website
  • Auth: API key in header x-api-key

Request body

urlstring required

The website whose look the template should match: a public https address, or a bare domain such as example.com.

namestring nullable
namespaceIdstring
idempotencyKeystring required

Repeating a request with the same key, address, name, and namespace returns the project the first one created, even if the site has since stopped answering. The same key with another address, name, or namespace is refused with a 409.

Response

Success

askstring required

The request to send the template assistant in the editor. The assistant reads the site, rebuilds the project's theme and blocks to match it, and proposes a brand that changes nothing until the customer applies it.

Changes

No recorded changes to this operation across all 1 revision of this API.