---
search:
  tags:
    - Visibility setups
    - PATCH
seo:
  description: >-
    Records an edit as a NEW immutable setup version and returns the… Reference
    for the PATCH /visibility-setups/{setup_id} endpoint in the Zaraftis Public
    API.
sidebar:
  label: Update a visibility setup
  badge: PATCH
title: Update a visibility setup
type: openapi-operation
---
Records an edit as a NEW immutable setup version and returns the setup in the same shape as GET. Content edits (country, language, platform_ids, prompts, together with optional topics and competitors) always replace the complete measurement configuration; a partial content body is rejected. A name-only body renames the setup without a new version. Historical scans keep the version they used.

`PATCH /visibility-setups/{setup_id}`

**Request body** (`application/json`, required)

- `name` (string)
- `country` (string)
- `language` (string)
- `platform_ids` (string[])
- `topics` (object[])
- `prompts` (object[])
- `competitors` (object[])

Request body example:

```json
{
  "name": "string",
  "country": "st",
  "language": "string",
  "platform_ids": [
    "string"
  ],
  "topics": [
    {
      "title": "string"
    }
  ],
  "prompts": [
    {
      "text": "string",
      "topic_title": "string"
    }
  ],
  "competitors": [
    {
      "name": "string",
      "url": "http://example.com"
    }
  ]
}
```

**Responses**

- `200` — The saved setup after the edit
- `400` — bad\_request or validation\_failed
- `404` — not\_found: unknown id, or an id this key cannot see
- `429` — rate\_limited: wait the Retry-After seconds

Response example, 200:

```json
{
  "success": true,
  "data": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "name": "string",
    "brand": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "url": "string"
    },
    "country": "st",
    "language": "string",
    "creation_mode": "manual",
    "status": "active",
    "setup_checksum": "string",
    "current_version": 1,
    "platforms": [
      "string"
    ],
    "topics": [
      {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "title": "string"
      }
    ],
    "prompts": [
      {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "text": "string",
        "topic_id": "646807af-5da6-43aa-83d3-8ac1d15ab4e5"
      }
    ],
    "competitors": [
      {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "string",
        "url": "string"
      }
    ],
    "created_at": "2019-08-24T14:15:22Z"
  },
  "request_id": "string"
}
```
