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

# PATCH /v1/workflows/{id}/ui-metadata

Update workflow UI metadata (node positions) in-place

` PATCH /v1/workflows/{id}/ui-metadata `

Update workflow UI metadata (node positions) in-place

## Parameters

### ` id ` (path, required)

Workflow ID

- ` value `: type ` string `

## Request body (required)

Content type: ` application/json `

UI metadata

- ` value `: type ` unknown `

  - ` oneOf alternative 1 `: type ` object `

  - ` oneOf alternative 2 `: type ` object `

    - Required fields: ` uiMetadata `

    - ` expectedCurrentVersion `: type ` integer `

      - minimum: ` 1 `

    - ` uiMetadata `: type ` object `

      - ` comments `: type ` array `

        - ` array item `: type ` object `

          - ` createdAt `: type ` string `

          - ` createdBy `: type ` object `

            - ` clientId `: type ` string `

            - ` name `: type ` string `

          - ` id `: type ` string `

          - ` nodeId `: type ` string `

          - ` position `: type ` object `

            - ` x `: type ` number `

            - ` y `: type ` number `

          - ` replies `: type ` array `

            - ` array item `: type ` object `

              - ` createdAt `: type ` string `

              - ` createdBy `: type ` object `

                - ` clientId `: type ` string `

                - ` name `: type ` string `

              - ` id `: type ` string `

              - ` text `: type ` string `

              - ` updatedAt `: type ` string `

          - ` resolved `: type ` boolean `

          - ` text `: type ` string `

          - ` updatedAt `: type ` string `

      - ` nodePositions `: type ` object `

      - ` stickyNotes `: type ` array `

        - ` array item `: type ` object `

          - ` color `: type ` string `

          - ` createdAt `: type ` string `

          - ` createdBy `: type ` object `

            - ` clientId `: type ` string `

            - ` name `: type ` string `

          - ` id `: type ` string `

          - ` position `: type ` object `

            - ` x `: type ` number `

            - ` y `: type ` number `

          - ` size `: type ` object `

            - ` height `: type ` number `

            - ` width `: type ` number `

          - ` text `: type ` string `

          - ` updatedAt `: type ` string `

          - ` zIndex `: type ` integer `

## Responses

### ` 200 ` — OK

Content type: ` application/json `

- ` value `: type ` object `

  - ` code `: type ` integer `

    - example: ` 200 `

  - ` data `: type ` object `

    - ` version `: type ` integer `

  - ` message `: type ` string `

    - example: ` "success" `

  - ` requestId `: type ` string `

    - example: ` "abc-123" `

### ` 400 ` — Bad Request

Content type: ` application/json `

- ` value `: type ` object `

  - ` code `: type ` integer `

  - ` details `: type ` array `

    - ` array item `: type ` unknown `

  - ` message `: type ` string `

  - ` requestId `: type ` string `

### ` 404 ` — Not Found

Content type: ` application/json `

- ` value `: type ` object `

  - ` code `: type ` integer `

  - ` details `: type ` array `

    - ` array item `: type ` unknown `

  - ` message `: type ` string `

  - ` requestId `: type ` string `

### ` 409 ` — Conflict

Content type: ` application/json `

- ` value `: type ` object `

  - ` code `: type ` integer `

  - ` details `: type ` array `

    - ` array item `: type ` unknown `

  - ` message `: type ` string `

  - ` requestId `: type ` string `

## Request examples

### cURL

```curl
curl -X PATCH 'https://api.example.com/v1/workflows/string/ui-metadata' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{}'
```

### JavaScript

```javascript
const response = await fetch('https://api.example.com/v1/workflows/string/ui-metadata', {
  method: 'PATCH',
  headers: {
      "Authorization": "Bearer YOUR_API_TOKEN",
      "Content-Type": "application/json"
  },
  body: JSON.stringify({})
});

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

### Python

```python
import requests

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN'
}

response = requests.patch('https://api.example.com/v1/workflows/string/ui-metadata', headers=headers, json={})
print(response.json())
```

### Go

```go
package main

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

func main() {
	body := strings.NewReader(`{}`)
	req, _ := http.NewRequest("PATCH", "https://api.example.com/v1/workflows/string/ui-metadata", body)
	req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
	req.Header.Set("Content-Type", "application/json")

	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
	result, _ := io.ReadAll(resp.Body)
	fmt.Println(string(result))
}
```