Skip to Content

Suggest designs for a brief

Suggest designs for a brief. Request: POST /v1/templates/suggestions. Scope: templates:read.

POST
/v1/templates/suggestions

Ranks Samva's gallery designs for a brief and returns the three to start a new email from, best first, each with the galleryTemplateId that creates a template from it. When the brief names a company's email, recreation says whether the gallery recreates that kind of email from it, recreates another kind (start from it for the look), or has none. The ranking is deterministic: the same brief returns the same designs.

Authorization

apiKey
headerx-api-key<token>

Request Body

application/json
  1. body
brief*string

What the email is for, as a person would ask for it: who sends it, to whom, and why. Naming a company's email ("like the Vercel login email") starts from Samva's recreation of it when the gallery has one.

Length1 <= length <= 4000

Response Body

TemplateStarterSuggestions

application/json
  1. response
suggestions*array<>

Best first; a new email for this brief starts from the first.

recreation*|||null
Example Request
import { createClient } from "samva";

const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });

const result = await samva.templates.suggestStarters({
  "brief": "example"
});
Example Response
{
  "suggestions": [
    {
      "galleryTemplateId": "string",
      "slug": "string",
      "name": "string",
      "description": "string",
      "intent": "string",
      "tags": [
        "string"
      ],
      "structure": "string",
      "imagery": "none",
      "recreates": "string",
      "reason": "string"
    }
  ],
  "recreation": {
    "status": "exact",
    "company": "string",
    "galleryTemplateId": "string"
  }
}

Related documentation