---
title: "Edit an unlocked organization component as an administrator"
---

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

# Edit an unlocked organization component as an administrator

Path: CloudRaker Workspace API › Agent components

`PUT /agent-components/{slug}`

## Authentication

- `bearerAuth`, http, header `Authorization`

## Path parameters

- `slug` (`updateAgentComponent.path.slug`; string, required)
  - pattern `^[a-z][a-z0-9-]{0,63}$`

## Request body

_Required._

- `expectedRevision` (`updateAgentComponent.expectedRevision`; integer, required)
  - max 9007199254740991
- `definition` (`updateAgentComponent.definition`; map<unknown>, required)

## Example request

```json
{
  "expectedRevision": 9007199254740991,
  "definition": {
    "property1": null,
    "property2": null
  }
}
```

## Code samples

### cURL

```bash
curl --request PUT \
  --url 'https://api.cloudraker.com/agent-components/<slug>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "expectedRevision": 9007199254740991,
  "definition": {
    "property1": null,
    "property2": null
  }
}
'
```

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/agent-components/<slug>';
const options = {
  method: 'PUT',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({
    expectedRevision: 9007199254740991,
    definition: {property1: null, property2: null}
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.cloudraker.com/agent-components/<slug>"

payload = {
    "expectedRevision": 9007199254740991,
    "definition": {
        "property1": None,
        "property2": None
    }
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Edit an unlocked organization component as an administrator

#### Example

```json
{
  "data": null
}
```

- `data` (`updateAgentComponent.response.200.data`; unknown, required)

### 400

Validation Error

#### Example

```json
{
  "success": false,
  "error": [
    null
  ],
  "data": null
}
```

- `success` (`updateAgentComponent.response.400.success`; boolean, required)
  - one of `false`
- `error` (`updateAgentComponent.response.400.error`; array<unknown>, required)
- `data` (`updateAgentComponent.response.400.data`; unknown, required)


Source: https://docs.cloudraker.com/workspace/api/agent-components/update-agent-component/index.md
