Rename or move a folder
Renames a folder, moves it into another one, or both. Send parent_uuid null to move it to the top of the library; leave a field out to leave it alone. Everything inside the folder moves with it.
PATCH
/
api
/
v1
/
folders
/
{uuid}
const response = await fetch("https://api.sudomock.com/api/v1/folders/3fa85f64-5717-4562-b3fc-2c963f66afa6", {
method: "PATCH",
headers: {
"x-api-key": "sm_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Frames 8x10"
}),
});
const data = await response.json();
console.log(data);
<?php
$payload = <<<'JSON'
{
"name": "Frames 8x10"
}
JSON;
$ch = curl_init("https://api.sudomock.com/api/v1/folders/3fa85f64-5717-4562-b3fc-2c963f66afa6");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"x-api-key: sm_your_api_key",
"Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests
payload = {'name': 'Frames 8x10'}
response = requests.patch(
"https://api.sudomock.com/api/v1/folders/3fa85f64-5717-4562-b3fc-2c963f66afa6",
headers={"x-api-key": "sm_your_api_key"},
json=payload,
)
response.raise_for_status()
print(response.json())
require "net/http"
require "uri"
uri = URI("https://api.sudomock.com/api/v1/folders/3fa85f64-5717-4562-b3fc-2c963f66afa6")
request = Net::HTTP::Patch.new(uri)
request["x-api-key"] = "sm_your_api_key"
request["Content-Type"] = "application/json"
request.body = <<~JSON
{
"name": "Frames 8x10"
}
JSON
response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts response.body
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
payload := []byte(`{
"name": "Frames 8x10"
}`)
req, err := http.NewRequest("PATCH", "https://api.sudomock.com/api/v1/folders/3fa85f64-5717-4562-b3fc-2c963f66afa6", bytes.NewBuffer(payload))
if err != nil {
panic(err)
}
req.Header.Set("x-api-key", "sm_your_api_key")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String payload = """
{
"name": "Frames 8x10"
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.sudomock.com/api/v1/folders/3fa85f64-5717-4562-b3fc-2c963f66afa6"))
.header("x-api-key", "sm_your_api_key")
.header("Content-Type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString(payload))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
using System.Net.Http;
using System.Text;
var payload = """
{
"name": "Frames 8x10"
}
""";
var request = new HttpRequestMessage(HttpMethod.Patch, "https://api.sudomock.com/api/v1/folders/3fa85f64-5717-4562-b3fc-2c963f66afa6");
request.Headers.Add("x-api-key", "sm_your_api_key");
request.Content = new StringContent(payload, Encoding.UTF8, "application/json");
var client = new HttpClient();
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
curl -X PATCH "https://api.sudomock.com/api/v1/folders/3fa85f64-5717-4562-b3fc-2c963f66afa6" \
-H "x-api-key: sm_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Frames 8x10"
}'
{
"success": true,
"data": {
"uuid": "c4f1a7d2-3b85-4e60-9a1f-7d2c5e8b4061",
"name": "Frames",
"parent_uuid": "9e3b6c14-27af-4d58-b0e1-5c8a2f9d7340",
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-01T00:00:00Z",
"folder_count": 3,
"psd_mockup_count": 12,
"photo_mockup_count": 4,
"path": [
{
"uuid": "9e3b6c14-27af-4d58-b0e1-5c8a2f9d7340",
"name": "My mockups"
}
],
"total_folder_count": 5,
"total_psd_mockup_count": 31,
"total_photo_mockup_count": 8
}
}
const response = await fetch("https://api.sudomock.com/api/v1/folders/3fa85f64-5717-4562-b3fc-2c963f66afa6", {
method: "PATCH",
headers: {
"x-api-key": "sm_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Frames 8x10"
}),
});
const data = await response.json();
console.log(data);
<?php
$payload = <<<'JSON'
{
"name": "Frames 8x10"
}
JSON;
$ch = curl_init("https://api.sudomock.com/api/v1/folders/3fa85f64-5717-4562-b3fc-2c963f66afa6");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"x-api-key: sm_your_api_key",
"Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests
payload = {'name': 'Frames 8x10'}
response = requests.patch(
"https://api.sudomock.com/api/v1/folders/3fa85f64-5717-4562-b3fc-2c963f66afa6",
headers={"x-api-key": "sm_your_api_key"},
json=payload,
)
response.raise_for_status()
print(response.json())
require "net/http"
require "uri"
uri = URI("https://api.sudomock.com/api/v1/folders/3fa85f64-5717-4562-b3fc-2c963f66afa6")
request = Net::HTTP::Patch.new(uri)
request["x-api-key"] = "sm_your_api_key"
request["Content-Type"] = "application/json"
request.body = <<~JSON
{
"name": "Frames 8x10"
}
JSON
response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts response.body
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
payload := []byte(`{
"name": "Frames 8x10"
}`)
req, err := http.NewRequest("PATCH", "https://api.sudomock.com/api/v1/folders/3fa85f64-5717-4562-b3fc-2c963f66afa6", bytes.NewBuffer(payload))
if err != nil {
panic(err)
}
req.Header.Set("x-api-key", "sm_your_api_key")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String payload = """
{
"name": "Frames 8x10"
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.sudomock.com/api/v1/folders/3fa85f64-5717-4562-b3fc-2c963f66afa6"))
.header("x-api-key", "sm_your_api_key")
.header("Content-Type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString(payload))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
using System.Net.Http;
using System.Text;
var payload = """
{
"name": "Frames 8x10"
}
""";
var request = new HttpRequestMessage(HttpMethod.Patch, "https://api.sudomock.com/api/v1/folders/3fa85f64-5717-4562-b3fc-2c963f66afa6");
request.Headers.Add("x-api-key", "sm_your_api_key");
request.Content = new StringContent(payload, Encoding.UTF8, "application/json");
var client = new HttpClient();
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
curl -X PATCH "https://api.sudomock.com/api/v1/folders/3fa85f64-5717-4562-b3fc-2c963f66afa6" \
-H "x-api-key: sm_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Frames 8x10"
}'
{
"success": true,
"data": {
"uuid": "c4f1a7d2-3b85-4e60-9a1f-7d2c5e8b4061",
"name": "Frames",
"parent_uuid": "9e3b6c14-27af-4d58-b0e1-5c8a2f9d7340",
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-01T00:00:00Z",
"folder_count": 3,
"psd_mockup_count": 12,
"photo_mockup_count": 4,
"path": [
{
"uuid": "9e3b6c14-27af-4d58-b0e1-5c8a2f9d7340",
"name": "My mockups"
}
],
"total_folder_count": 5,
"total_psd_mockup_count": 31,
"total_photo_mockup_count": 8
}
}
Authorizations
API key with sm_ prefix. Get your key at https://sudomock.com/dashboard/api-keys
Path Parameters
Folder UUID
Body
application/json
Rename or move request for PATCH /api/v1/folders/{uuid}.
A field left out is left alone. parent_uuid: null moves the folder to the
top of the library, which is why "left out" and "sent as null" cannot be the
same thing here and are told apart by what the caller actually sent.
Was this page helpful?
⌘I
const response = await fetch("https://api.sudomock.com/api/v1/folders/3fa85f64-5717-4562-b3fc-2c963f66afa6", {
method: "PATCH",
headers: {
"x-api-key": "sm_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Frames 8x10"
}),
});
const data = await response.json();
console.log(data);
<?php
$payload = <<<'JSON'
{
"name": "Frames 8x10"
}
JSON;
$ch = curl_init("https://api.sudomock.com/api/v1/folders/3fa85f64-5717-4562-b3fc-2c963f66afa6");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"x-api-key: sm_your_api_key",
"Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests
payload = {'name': 'Frames 8x10'}
response = requests.patch(
"https://api.sudomock.com/api/v1/folders/3fa85f64-5717-4562-b3fc-2c963f66afa6",
headers={"x-api-key": "sm_your_api_key"},
json=payload,
)
response.raise_for_status()
print(response.json())
require "net/http"
require "uri"
uri = URI("https://api.sudomock.com/api/v1/folders/3fa85f64-5717-4562-b3fc-2c963f66afa6")
request = Net::HTTP::Patch.new(uri)
request["x-api-key"] = "sm_your_api_key"
request["Content-Type"] = "application/json"
request.body = <<~JSON
{
"name": "Frames 8x10"
}
JSON
response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts response.body
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
payload := []byte(`{
"name": "Frames 8x10"
}`)
req, err := http.NewRequest("PATCH", "https://api.sudomock.com/api/v1/folders/3fa85f64-5717-4562-b3fc-2c963f66afa6", bytes.NewBuffer(payload))
if err != nil {
panic(err)
}
req.Header.Set("x-api-key", "sm_your_api_key")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String payload = """
{
"name": "Frames 8x10"
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.sudomock.com/api/v1/folders/3fa85f64-5717-4562-b3fc-2c963f66afa6"))
.header("x-api-key", "sm_your_api_key")
.header("Content-Type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString(payload))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
using System.Net.Http;
using System.Text;
var payload = """
{
"name": "Frames 8x10"
}
""";
var request = new HttpRequestMessage(HttpMethod.Patch, "https://api.sudomock.com/api/v1/folders/3fa85f64-5717-4562-b3fc-2c963f66afa6");
request.Headers.Add("x-api-key", "sm_your_api_key");
request.Content = new StringContent(payload, Encoding.UTF8, "application/json");
var client = new HttpClient();
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
curl -X PATCH "https://api.sudomock.com/api/v1/folders/3fa85f64-5717-4562-b3fc-2c963f66afa6" \
-H "x-api-key: sm_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Frames 8x10"
}'
{
"success": true,
"data": {
"uuid": "c4f1a7d2-3b85-4e60-9a1f-7d2c5e8b4061",
"name": "Frames",
"parent_uuid": "9e3b6c14-27af-4d58-b0e1-5c8a2f9d7340",
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-01T00:00:00Z",
"folder_count": 3,
"psd_mockup_count": 12,
"photo_mockup_count": 4,
"path": [
{
"uuid": "9e3b6c14-27af-4d58-b0e1-5c8a2f9d7340",
"name": "My mockups"
}
],
"total_folder_count": 5,
"total_psd_mockup_count": 31,
"total_photo_mockup_count": 8
}
}