Update a design template
curl --request PATCH \
--url https://api.heymilo.ai/api/v2/design-templates/{template_id} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"name": "<string>",
"design_config": {
"primary_color": "#0F766E"
}
}
'import requests
url = "https://api.heymilo.ai/api/v2/design-templates/{template_id}"
payload = {
"name": "<string>",
"design_config": { "primary_color": "#0F766E" }
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', design_config: {primary_color: '#0F766E'}})
};
fetch('https://api.heymilo.ai/api/v2/design-templates/{template_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.heymilo.ai/api/v2/design-templates/{template_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'design_config' => [
'primary_color' => '#0F766E'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.heymilo.ai/api/v2/design-templates/{template_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"design_config\": {\n \"primary_color\": \"#0F766E\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.heymilo.ai/api/v2/design-templates/{template_id}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"design_config\": {\n \"primary_color\": \"#0F766E\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.heymilo.ai/api/v2/design-templates/{template_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"design_config\": {\n \"primary_color\": \"#0F766E\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "E00CF3AFCF58",
"name": "Dark Mode Welcome Page",
"template_type": "welcome_page",
"design_config": {
"background_color": "#ffffff",
"font_family": "Inter, sans-serif",
"header_text": "Welcome to Your Interview",
"primary_color": "#007bff",
"show_logo": true
},
"created_at": 1739612400,
"updated_at": 1739617200,
"object": "design_template"
},
"meta": {}
}{
"error": {
"type": "invalid_request_error",
"code": "validation_error",
"message": "The request body failed validation",
"param": "<string>",
"doc_url": "<string>",
"errors": [
{
"code": "invalid_param",
"message": "title must be between 3 and 200 characters",
"param": "title"
}
]
}
}{
"error": {
"type": "invalid_request_error",
"code": "validation_error",
"message": "The request body failed validation",
"param": "<string>",
"doc_url": "<string>",
"errors": [
{
"code": "invalid_param",
"message": "title must be between 3 and 200 characters",
"param": "title"
}
]
}
}{
"error": {
"type": "invalid_request_error",
"code": "validation_error",
"message": "The request body failed validation",
"param": "<string>",
"doc_url": "<string>",
"errors": [
{
"code": "invalid_param",
"message": "title must be between 3 and 200 characters",
"param": "title"
}
]
}
}{
"error": {
"type": "invalid_request_error",
"code": "validation_error",
"message": "The request body failed validation",
"param": "<string>",
"doc_url": "<string>",
"errors": [
{
"code": "invalid_param",
"message": "title must be between 3 and 200 characters",
"param": "title"
}
]
}
}{
"error": {
"type": "invalid_request_error",
"code": "validation_error",
"message": "The request body failed validation",
"param": "<string>",
"doc_url": "<string>",
"errors": [
{
"code": "invalid_param",
"message": "title must be between 3 and 200 characters",
"param": "title"
}
]
}
}{
"error": {
"type": "invalid_request_error",
"code": "validation_error",
"message": "The request body failed validation",
"param": "<string>",
"doc_url": "<string>",
"errors": [
{
"code": "invalid_param",
"message": "title must be between 3 and 200 characters",
"param": "title"
}
]
}
}Update a design template
Rename a template or change its design. design_config keys are merged into the stored config: keys left out keep their values, and a key sent as null goes back to HeyMilo’s default. The template_type cannot be changed.
design_config only accepts the keys for the template’s page type. URL and image fields must be https:// URLs (or an empty string to unset), colors must be hex, and hide_powered_by_heymilo: true needs the white-label entitlement.
PATCH
/
api
/
v2
/
design-templates
/
{template_id}
Update a design template
curl --request PATCH \
--url https://api.heymilo.ai/api/v2/design-templates/{template_id} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"name": "<string>",
"design_config": {
"primary_color": "#0F766E"
}
}
'import requests
url = "https://api.heymilo.ai/api/v2/design-templates/{template_id}"
payload = {
"name": "<string>",
"design_config": { "primary_color": "#0F766E" }
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', design_config: {primary_color: '#0F766E'}})
};
fetch('https://api.heymilo.ai/api/v2/design-templates/{template_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.heymilo.ai/api/v2/design-templates/{template_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'design_config' => [
'primary_color' => '#0F766E'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.heymilo.ai/api/v2/design-templates/{template_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"design_config\": {\n \"primary_color\": \"#0F766E\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.heymilo.ai/api/v2/design-templates/{template_id}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"design_config\": {\n \"primary_color\": \"#0F766E\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.heymilo.ai/api/v2/design-templates/{template_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"design_config\": {\n \"primary_color\": \"#0F766E\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "E00CF3AFCF58",
"name": "Dark Mode Welcome Page",
"template_type": "welcome_page",
"design_config": {
"background_color": "#ffffff",
"font_family": "Inter, sans-serif",
"header_text": "Welcome to Your Interview",
"primary_color": "#007bff",
"show_logo": true
},
"created_at": 1739612400,
"updated_at": 1739617200,
"object": "design_template"
},
"meta": {}
}{
"error": {
"type": "invalid_request_error",
"code": "validation_error",
"message": "The request body failed validation",
"param": "<string>",
"doc_url": "<string>",
"errors": [
{
"code": "invalid_param",
"message": "title must be between 3 and 200 characters",
"param": "title"
}
]
}
}{
"error": {
"type": "invalid_request_error",
"code": "validation_error",
"message": "The request body failed validation",
"param": "<string>",
"doc_url": "<string>",
"errors": [
{
"code": "invalid_param",
"message": "title must be between 3 and 200 characters",
"param": "title"
}
]
}
}{
"error": {
"type": "invalid_request_error",
"code": "validation_error",
"message": "The request body failed validation",
"param": "<string>",
"doc_url": "<string>",
"errors": [
{
"code": "invalid_param",
"message": "title must be between 3 and 200 characters",
"param": "title"
}
]
}
}{
"error": {
"type": "invalid_request_error",
"code": "validation_error",
"message": "The request body failed validation",
"param": "<string>",
"doc_url": "<string>",
"errors": [
{
"code": "invalid_param",
"message": "title must be between 3 and 200 characters",
"param": "title"
}
]
}
}{
"error": {
"type": "invalid_request_error",
"code": "validation_error",
"message": "The request body failed validation",
"param": "<string>",
"doc_url": "<string>",
"errors": [
{
"code": "invalid_param",
"message": "title must be between 3 and 200 characters",
"param": "title"
}
]
}
}{
"error": {
"type": "invalid_request_error",
"code": "validation_error",
"message": "The request body failed validation",
"param": "<string>",
"doc_url": "<string>",
"errors": [
{
"code": "invalid_param",
"message": "title must be between 3 and 200 characters",
"param": "title"
}
]
}
}Authorizations
Body
application/json
Request body for updating a design template. Send only what changes.
Response
Successful Response
Was this page helpful?