---
title: "🔒 Создать снимок Design из ссылки Figma и привязать к сущности. Если снимок этой ноды уже есть — только связь, без повторной загрузки."
method: POST
path: "/design/create"
tags: ["Design"]
---

# 🔒 Создать снимок Design из ссылки Figma и привязать к сущности. Если снимок этой ноды уже есть — только связь, без повторной загрузки.

`POST /design/create`

## Request

- Base URL: `http://localhost`
- URL: `http://localhost/design/create`
- Auth: one of:
  - API key in header `sid` and API key in header `rts` and API key in header `sig`
  - HTTP bearer

Создать снимок Design из ссылки Figma и привязать к сущности. Если снимок этой ноды уже есть — только связь, без повторной загрузки.

**Access:** `authorized` (10 ) · **Scope:** `write`

**Allows:** `task:update`, `feature:update`, `version:update`, `product:update`, `product:structure`, `task:create`, `product:read` (все обязательны; проверка в команде по ресурсу из запроса)

### TypeScript (copy-paste)

**`POST /design/create`**

<details open><summary><b>Body</b></summary>

```typescript
export interface DesignCreateBody {
  entityID: string
  src: string
  title?: string | null
  runID?: string | null
  mainFrame?: boolean | null
  productID?: string | null
}
```

</details>

<details open><summary><b>Response</b></summary>

```typescript
export type DesignCreateResponse = IServerResponse<Resp_design_create>

export interface IServerResponse<T = any> {
  code: number
  data: T
  srvTS: number
  rkey: string
}
```

</details>

> Полный файл типов: [`/docs/types`](/docs/types) · raw: [`/docs/api-types.ts`](/docs/api-types.ts)

## Headers

- `devID` string, uuid, required
- `tz` string, required
- `app` string, required
- `appVer` string, required
- `rKey` string

## Request body

- DesignCreateBody: JSON body for `design/create`
  - `entityID` string, uuid, required
  - `src` string, required
  - `title` string, nullable
  - `runID` string, nullable
  - `mainFrame` boolean, nullable
  - `productID` string, uuid, nullable

## Response `200`

OK — `IServerResponse<Resp_design_create>`

- object
  - `code` integer, required
  - `data` RespDesignCreate, required: Entity `Design` (table: Design )
    - `ID` string, uuid, required
    - `cID` string, uuid, required
    - `productID` string, uuid, nullable
    - `type` 'figma', required: `figma` = "figma"
    - `title` string, nullable
    - `version` string, required
    - `lastModified` string, nullable
    - `status` 'wait' | 'error' | 'ready', required: `wait` = "wait", `error` = "error", `ready` = "ready"
    - `snapshotFID` string, uuid, required
    - `contextFID` string, uuid, required
    - `assetsFID` string, uuid, nullable
    - `snapshotSize` integer, nullable
    - `contextSize` integer, nullable
    - `assetsSize` integer, nullable
    - `width` integer, required
    - `height` integer, required
    - `integrationID` string, uuid, nullable
    - `fileKey` string, nullable
    - `pageID` string, nullable
    - `pageName` string, nullable
    - `nodeID` string, nullable
    - `nodeType` string, nullable
    - `nodeUrl` string, nullable
    - `nodeName` string, nullable
    - `createdUID` string, uuid, required
    - `createdTS` integer, required: Unix timestamp in milliseconds
    - `updTS` integer, required: Unix timestamp in milliseconds
    - `updUID` string, required
  - `srvTS` integer, required: Server timestamp (ms)
  - `rkey` string, required: Request key

## Other responses

- `400`: BadRequest: Invalid Figma URL
- `401`: Unauthorized: Active user session required
- `403`: AccessNotAllowed: Privilege *:update of the entity (main frame - product:structure), task:create for an unsaved entity, product:read for a snapshot of another product
- `404`: NotFound: Figma node was not found
- `406`: TimeResync — расхождение rts с сервером
- `422`: UnprocessableContent: Figma integration is not connected, node-id is missing, or the company Figma account cannot access the file

---

[API](https://skmtc.dev/kosmodrom/apis/kosmodrom-backend-api.md) · [All operations](https://skmtc.dev/kosmodrom/apis/kosmodrom-backend-api/llms.txt) · [OpenAPI document](https://skmtc.dev/kosmodrom/apis/kosmodrom-backend-api/revisions/a143b51ba29a?raw)
