# Update a dynamic component

> You're reading the Mindset v3 documentation. v3 is no longer sold; this is reference for existing customers. Mindset 4 docs are at /docs.

Updates the enabled status and/or instructions for a dynamic component.

**PATCH** `/api/v2/appuid/{appUid}/agents/uid/{agentUid}/dynamicComponents/name/{name}`

Updates the enabled status and/or instructions for a dynamic component. Only accessible when SDK3 is enabled for the app. The name, title, and description fields are read-only.

## Base URL

Requests go to your region's API host, for example `https://a.api.mindset.ai`. Hosts: `https://a.api.mindset.ai`, `https://b.api.mindset.ai`, `https://c.api.mindset.ai`, `https://d.api.mindset.ai`.

## Authorization

- `x-api-key` (string, required, header)

  Your API key.

## Path parameters

- `appUid` (string, required, path)

  Your application's uid

* `agentUid` (string, required, path)

  The agent's uid

- `name` (string, required, path)

  The component name (e.g., 'mindset-accordion')

## Request body

Content type: `application/json`.

- `enabled` (boolean, body)

  Whether the component is enabled for use by the AI agent

* `instructions` (string, body)

  Custom instructions for the AI agent on when and how to use this component

```json
{
  "enabled": true,
  "instructions": "string"
}
```

## Responses

### 200

Successful update

```json
{
  "name": "string",
  "title": "string",
  "description": "string",
  "enabled": true,
  "instructions": "string",
  "createdAt": "string",
  "modifiedAt": "string"
}
```

### 401

Unauthorized

### 403

Forbidden

### 404

Component not found, agent not found, or SDK3 not enabled for this app

### 422

Validation error - e.g., instructions too long or empty

### 500

Internal Server Error

## Example request

```bash
curl -X PATCH "https://a.api.mindset.ai/api/v2/appuid/{appUid}/agents/uid/{agentUid}/dynamicComponents/name/{name}" \
  -H "x-api-key: <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{"enabled":true,"instructions":"string"}'
```
