Update template
curl --request PUT \
--url https://api.pictify.io/templates/{uid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"html": "<string>",
"fabricJSData": {},
"width": 123,
"height": 123,
"variableDefinitions": [
{
"name": "<string>",
"defaultValue": "<string>",
"description": "<string>",
"validation": {
"required": true,
"minLength": 123,
"maxLength": 123
}
}
]
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
html: '<string>',
fabricJSData: {},
width: 123,
height: 123,
variableDefinitions: [
{
name: '<string>',
defaultValue: '<string>',
description: '<string>',
validation: {required: true, minLength: 123, maxLength: 123}
}
]
})
};
fetch('https://api.pictify.io/templates/{uid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pictify.io/templates/{uid}"
payload = {
"name": "<string>",
"html": "<string>",
"fabricJSData": {},
"width": 123,
"height": 123,
"variableDefinitions": [
{
"name": "<string>",
"defaultValue": "<string>",
"description": "<string>",
"validation": {
"required": True,
"minLength": 123,
"maxLength": 123
}
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pictify.io/templates/{uid}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"html\": \"<string>\",\n \"fabricJSData\": {},\n \"width\": 123,\n \"height\": 123,\n \"variableDefinitions\": [\n {\n \"name\": \"<string>\",\n \"defaultValue\": \"<string>\",\n \"description\": \"<string>\",\n \"validation\": {\n \"required\": true,\n \"minLength\": 123,\n \"maxLength\": 123\n }\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}require 'uri'
require 'net/http'
url = URI("https://api.pictify.io/templates/{uid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"html\": \"<string>\",\n \"fabricJSData\": {},\n \"width\": 123,\n \"height\": 123,\n \"variableDefinitions\": [\n {\n \"name\": \"<string>\",\n \"defaultValue\": \"<string>\",\n \"description\": \"<string>\",\n \"validation\": {\n \"required\": true,\n \"minLength\": 123,\n \"maxLength\": 123\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"template": {
"uid": "<string>",
"name": "<string>",
"type": "<string>",
"category": "<string>",
"tags": [
"<string>"
],
"width": 123,
"height": 123,
"thumbnail": "<string>",
"variableDefinitions": [
{
"name": "<string>",
"defaultValue": "<string>",
"description": "<string>",
"validation": {
"required": true,
"minLength": 123,
"maxLength": 123
}
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}Templates
Update Template
PUT
/
templates
/
{uid}
Update template
curl --request PUT \
--url https://api.pictify.io/templates/{uid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"html": "<string>",
"fabricJSData": {},
"width": 123,
"height": 123,
"variableDefinitions": [
{
"name": "<string>",
"defaultValue": "<string>",
"description": "<string>",
"validation": {
"required": true,
"minLength": 123,
"maxLength": 123
}
}
]
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
html: '<string>',
fabricJSData: {},
width: 123,
height: 123,
variableDefinitions: [
{
name: '<string>',
defaultValue: '<string>',
description: '<string>',
validation: {required: true, minLength: 123, maxLength: 123}
}
]
})
};
fetch('https://api.pictify.io/templates/{uid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pictify.io/templates/{uid}"
payload = {
"name": "<string>",
"html": "<string>",
"fabricJSData": {},
"width": 123,
"height": 123,
"variableDefinitions": [
{
"name": "<string>",
"defaultValue": "<string>",
"description": "<string>",
"validation": {
"required": True,
"minLength": 123,
"maxLength": 123
}
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pictify.io/templates/{uid}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"html\": \"<string>\",\n \"fabricJSData\": {},\n \"width\": 123,\n \"height\": 123,\n \"variableDefinitions\": [\n {\n \"name\": \"<string>\",\n \"defaultValue\": \"<string>\",\n \"description\": \"<string>\",\n \"validation\": {\n \"required\": true,\n \"minLength\": 123,\n \"maxLength\": 123\n }\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}require 'uri'
require 'net/http'
url = URI("https://api.pictify.io/templates/{uid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"html\": \"<string>\",\n \"fabricJSData\": {},\n \"width\": 123,\n \"height\": 123,\n \"variableDefinitions\": [\n {\n \"name\": \"<string>\",\n \"defaultValue\": \"<string>\",\n \"description\": \"<string>\",\n \"validation\": {\n \"required\": true,\n \"minLength\": 123,\n \"maxLength\": 123\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"template": {
"uid": "<string>",
"name": "<string>",
"type": "<string>",
"category": "<string>",
"tags": [
"<string>"
],
"width": 123,
"height": 123,
"thumbnail": "<string>",
"variableDefinitions": [
{
"name": "<string>",
"defaultValue": "<string>",
"description": "<string>",
"validation": {
"required": true,
"minLength": 123,
"maxLength": 123
}
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}Authorizations
API key obtained from the Pictify dashboard
Path Parameters
Body
application/json
Response
200 - application/json
Template updated
Show child attributes
Show child attributes
⌘I