> ## Documentation Index
> Fetch the complete documentation index at: https://sudomock.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> The base URL is https://api.sudomock.com.
> Authenticate every request with the x-api-key header. Keys begin with sm_.
> A render returns the finished image at data.print_files[0].export_path. A request sent with is_async true returns a job_id to poll at GET /api/v1/jobs/{job_id}.
> Prefer the official SDKs over hand-written HTTP calls: npm install sudomock for Node, pip install sudomock for Python.

# Move mockups and folders into a folder

> Moves any mix of PSD mockups, photo mockups and folders into one folder, or to the top of the library with target_folder_uuid null. Everything listed moves together or nothing does. Moving a mockup never changes its id, so renders, webhooks and integrations are unaffected.

```js Node.js theme={"theme":{"light":"github-light","dark":"vesper"}}
const response = await fetch("https://api.sudomock.com/api/v1/folders/move", {
  method: "POST",
  headers: {
    "x-api-key": "sm_your_api_key",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "psd_mockup_uuids": [
      "8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8"
    ],
    "target_folder_uuid": "c4f1a7d2-3b85-4e60-9a1f-7d2c5e8b4061"
  }),
});

const data = await response.json();
console.log(data);
```

```php PHP theme={"theme":{"light":"github-light","dark":"vesper"}}
<?php

$payload = <<<'JSON'
{
  "psd_mockup_uuids": [
    "8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8"
  ],
  "target_folder_uuid": "c4f1a7d2-3b85-4e60-9a1f-7d2c5e8b4061"
}
JSON;

$ch = curl_init("https://api.sudomock.com/api/v1/folders/move");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
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;
```

```python Python theme={"theme":{"light":"github-light","dark":"vesper"}}
import requests

payload = {'psd_mockup_uuids': ['8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8'],
 'target_folder_uuid': 'c4f1a7d2-3b85-4e60-9a1f-7d2c5e8b4061'}

response = requests.post(
    "https://api.sudomock.com/api/v1/folders/move",
    headers={"x-api-key": "sm_your_api_key"},
    json=payload,
)

response.raise_for_status()
print(response.json())
```

```ruby Ruby theme={"theme":{"light":"github-light","dark":"vesper"}}
require "net/http"
require "uri"

uri = URI("https://api.sudomock.com/api/v1/folders/move")
request = Net::HTTP::Post.new(uri)
request["x-api-key"] = "sm_your_api_key"
request["Content-Type"] = "application/json"

request.body = <<~JSON
  {
    "psd_mockup_uuids": [
      "8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8"
    ],
    "target_folder_uuid": "c4f1a7d2-3b85-4e60-9a1f-7d2c5e8b4061"
  }
JSON

response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
  http.request(request)
end

puts response.body
```

```go Go theme={"theme":{"light":"github-light","dark":"vesper"}}
package main

import (
	"bytes"
	"fmt"
	"io"
	"net/http"
)

func main() {
	payload := []byte(`{
  "psd_mockup_uuids": [
    "8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8"
  ],
  "target_folder_uuid": "c4f1a7d2-3b85-4e60-9a1f-7d2c5e8b4061"
}`)

	req, err := http.NewRequest("POST", "https://api.sudomock.com/api/v1/folders/move", 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))
}
```

```java Java theme={"theme":{"light":"github-light","dark":"vesper"}}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

String payload = """
{
  "psd_mockup_uuids": [
    "8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8"
  ],
  "target_folder_uuid": "c4f1a7d2-3b85-4e60-9a1f-7d2c5e8b4061"
}
""";

HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.sudomock.com/api/v1/folders/move"))
    .header("x-api-key", "sm_your_api_key")
    .header("Content-Type", "application/json")
    .POST(HttpRequest.BodyPublishers.ofString(payload))
    .build();

HttpResponse<String> response = HttpClient.newHttpClient()
    .send(request, HttpResponse.BodyHandlers.ofString());

System.out.println(response.body());
```

```csharp .NET theme={"theme":{"light":"github-light","dark":"vesper"}}
using System.Net.Http;
using System.Text;

var payload = """
{
  "psd_mockup_uuids": [
    "8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8"
  ],
  "target_folder_uuid": "c4f1a7d2-3b85-4e60-9a1f-7d2c5e8b4061"
}
""";

var request = new HttpRequestMessage(HttpMethod.Post, "https://api.sudomock.com/api/v1/folders/move");
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());
```

```bash cURL theme={"theme":{"light":"github-light","dark":"vesper"}}
curl -X POST "https://api.sudomock.com/api/v1/folders/move" \
  -H "x-api-key: sm_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "psd_mockup_uuids": [
      "8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8"
    ],
    "target_folder_uuid": "c4f1a7d2-3b85-4e60-9a1f-7d2c5e8b4061"
  }'
```

```json Response theme={"theme":{"light":"github-light","dark":"vesper"}}
{
  "success": true,
  "data": {
    "target_folder_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "moved_psd_mockups": 1,
    "moved_photo_mockups": 0,
    "moved_folders": 0
  }
}
```


## OpenAPI

````yaml openapi.json POST /api/v1/folders/move
openapi: 3.1.0
info:
  title: SudoMock API
  description: >-
    Product mockup API. Render PSD templates, turn product photos into reusable
    mockups, create still images and videos, personalize text with fonts, and
    manage asynchronous jobs and signed webhooks.


    Every endpoint answers failures with the same envelope, so the status codes,
    the error_code values and the retry rule are documented once at
    https://sudomock.com/docs/errors rather than repeated per operation.
  version: 1.0.0
servers:
  - url: https://api.sudomock.com
    description: Production
security: []
tags:
  - name: PSD mockups
    description: Turn a Photoshop file into a reusable mockup, then render it.
  - name: Photo mockups
    description: Turn a product photo into a reusable mockup, then render artwork onto it.
  - name: Video mockups
    description: Render a mockup as a short video.
  - name: Fonts
    description: Upload and manage the fonts available to text layers.
  - name: Background removal
    description: Isolate a subject from its background as a standalone step.
  - name: Patterns
    description: Check a repeating pattern tile for seams and fix them.
  - name: Studio
    description: Open an embedded editor session and read what the customer produced in it.
  - name: Webhook endpoints
    description: Register signed endpoints and manage their secrets.
  - name: Webhook deliveries
    description: Inspect, replay and retry what those endpoints received.
  - name: Jobs
    description: Poll queued renders and seam fixes, and read their results.
  - name: Account
    description: Read the current account, its plan and its remaining credits.
  - name: Folders
    description: Group mockups into folders that nest.
paths:
  /api/v1/folders/move:
    post:
      tags:
        - Folders
      summary: Move mockups and folders into a folder
      description: >-
        Moves any mix of PSD mockups, photo mockups and folders into one folder,
        or to the top of the library with target_folder_uuid null. Everything
        listed moves together or nothing does. Moving a mockup never changes its
        id, so renders, webhooks and integrations are unaffected.
      operationId: post_folder_move_api_v1_folders_move_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FolderMoveRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FolderMoveResponse'
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: Node.js
          source: >-
            const response = await
            fetch("https://api.sudomock.com/api/v1/folders/move", {
              method: "POST",
              headers: {
                "x-api-key": "sm_your_api_key",
                "Content-Type": "application/json",
              },
              body: JSON.stringify({
                "psd_mockup_uuids": [
                  "8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8"
                ],
                "target_folder_uuid": "c4f1a7d2-3b85-4e60-9a1f-7d2c5e8b4061"
              }),
            });


            const data = await response.json();

            console.log(data);
        - lang: PHP
          source: |-
            <?php

            $payload = <<<'JSON'
            {
              "psd_mockup_uuids": [
                "8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8"
              ],
              "target_folder_uuid": "c4f1a7d2-3b85-4e60-9a1f-7d2c5e8b4061"
            }
            JSON;

            $ch = curl_init("https://api.sudomock.com/api/v1/folders/move");
            curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
            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;
        - lang: Python
          source: >-
            import requests


            payload = {'psd_mockup_uuids':
            ['8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8'],
             'target_folder_uuid': 'c4f1a7d2-3b85-4e60-9a1f-7d2c5e8b4061'}

            response = requests.post(
                "https://api.sudomock.com/api/v1/folders/move",
                headers={"x-api-key": "sm_your_api_key"},
                json=payload,
            )


            response.raise_for_status()

            print(response.json())
        - lang: Ruby
          source: >-
            require "net/http"

            require "uri"


            uri = URI("https://api.sudomock.com/api/v1/folders/move")

            request = Net::HTTP::Post.new(uri)

            request["x-api-key"] = "sm_your_api_key"

            request["Content-Type"] = "application/json"


            request.body = <<~JSON
              {
                "psd_mockup_uuids": [
                  "8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8"
                ],
                "target_folder_uuid": "c4f1a7d2-3b85-4e60-9a1f-7d2c5e8b4061"
              }
            JSON


            response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do
            |http|
              http.request(request)
            end


            puts response.body
        - lang: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tpayload := []byte(`{\n  \"psd_mockup_uuids\": [\n    \"8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8\"\n  ],\n  \"target_folder_uuid\": \"c4f1a7d2-3b85-4e60-9a1f-7d2c5e8b4061\"\n}`)\n\n\treq, err := http.NewRequest(\"POST\", \"https://api.sudomock.com/api/v1/folders/move\", bytes.NewBuffer(payload))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"x-api-key\", \"sm_your_api_key\")\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\tres, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer res.Body.Close()\n\n\tbody, _ := io.ReadAll(res.Body)\n\tfmt.Println(string(body))\n}"
        - lang: Java
          source: |-
            import java.net.URI;
            import java.net.http.HttpClient;
            import java.net.http.HttpRequest;
            import java.net.http.HttpResponse;

            String payload = """
            {
              "psd_mockup_uuids": [
                "8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8"
              ],
              "target_folder_uuid": "c4f1a7d2-3b85-4e60-9a1f-7d2c5e8b4061"
            }
            """;

            HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://api.sudomock.com/api/v1/folders/move"))
                .header("x-api-key", "sm_your_api_key")
                .header("Content-Type", "application/json")
                .POST(HttpRequest.BodyPublishers.ofString(payload))
                .build();

            HttpResponse<String> response = HttpClient.newHttpClient()
                .send(request, HttpResponse.BodyHandlers.ofString());

            System.out.println(response.body());
        - lang: .NET
          source: >-
            using System.Net.Http;

            using System.Text;


            var payload = """

            {
              "psd_mockup_uuids": [
                "8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8"
              ],
              "target_folder_uuid": "c4f1a7d2-3b85-4e60-9a1f-7d2c5e8b4061"
            }

            """;


            var request = new HttpRequestMessage(HttpMethod.Post,
            "https://api.sudomock.com/api/v1/folders/move");

            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());
        - lang: cURL
          source: |-
            curl -X POST "https://api.sudomock.com/api/v1/folders/move" \
              -H "x-api-key: sm_your_api_key" \
              -H "Content-Type: application/json" \
              -d '{
                "psd_mockup_uuids": [
                  "8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8"
                ],
                "target_folder_uuid": "c4f1a7d2-3b85-4e60-9a1f-7d2c5e8b4061"
              }'
components:
  schemas:
    FolderMoveRequest:
      properties:
        target_folder_uuid:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The folder everything listed moves into. Null moves it all to the
            top of the library.
          examples:
            - c4f1a7d2-3b85-4e60-9a1f-7d2c5e8b4061
        psd_mockup_uuids:
          items:
            type: string
          type: array
          maxItems: 500
          description: PSD mockups to move, up to 500.
        photo_mockup_uuids:
          items:
            type: string
          type: array
          maxItems: 500
          description: Photo mockups to move, up to 500.
        folder_uuids:
          items:
            type: string
          type: array
          maxItems: 500
          description: Folders to move, with everything inside them, up to 500.
      type: object
      title: FolderMoveRequest
      description: >-
        Move request for POST /api/v1/folders/move.


        Everything listed moves together or nothing does. Send

        `target_folder_uuid: null` to move the selection to the top of the
        library.
      example:
        psd_mockup_uuids:
          - 8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8
        target_folder_uuid: c4f1a7d2-3b85-4e60-9a1f-7d2c5e8b4061
    FolderMoveResponse:
      properties:
        success:
          type: boolean
          description: Always true on a successful response.
          default: true
          examples:
            - true
        data:
          $ref: '#/components/schemas/FolderMoveData'
          description: What moved.
      type: object
      required:
        - data
      title: FolderMoveResponse
      description: Move response for POST /api/v1/folders/move.
    FolderMoveData:
      properties:
        target_folder_uuid:
          anyOf:
            - type: string
            - type: 'null'
          description: The folder everything moved into. Null means the top of the library.
        moved_psd_mockups:
          type: integer
          description: PSD mockups moved.
          default: 0
          examples:
            - 1
        moved_photo_mockups:
          type: integer
          description: Photo mockups moved.
          default: 0
          examples:
            - 0
        moved_folders:
          type: integer
          description: Folders moved.
          default: 0
          examples:
            - 0
      type: object
      title: FolderMoveData
      description: What one move moved.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key with sm_ prefix. Get your key at
        https://sudomock.com/dashboard/api-keys

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.