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

# Update Module

> Update metadata for an existing HDP module

# Update Module

Updates metadata for an existing HDP module. Only the provided fields will be updated. This endpoint requires authentication.

## Endpoint

```
PATCH /modules/{id}
```

## Authentication

This endpoint requires authentication using an API key:

```bash theme={null}
X-API-KEY: your-herodotus-cloud-api-key-here
```

## Path Parameters

| Parameter | Type   | Description                 |
| --------- | ------ | --------------------------- |
| id        | string | The unique module ID (ULID) |

## Request Body

| Field        | Type   | Required | Description                                               |
| ------------ | ------ | -------- | --------------------------------------------------------- |
| description  | string | No       | Module description                                        |
| tags         | array  | No       | Array of tags                                             |
| license      | string | No       | License identifier                                        |
| abi          | object | No       | Module ABI as JSON                                        |
| source\_code | object | No       | Source code files as JSON object mapping paths to content |

### Example Request

```bash theme={null}
curl -X PATCH https://staging.hdp.api.herodotus.cloud/modules/01JPJ03YJT1A93D6NF56G4GVEQ \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: your-herodotus-cloud-api-key-here" \
  -d '{
    "description": "Updated description",
    "tags": ["updated", "tags"],
    "license": "Apache-2.0"
  }'
```

## Response

### Success Response (200 OK)

Returns the updated module with the same structure as [Get Module](./get-module).

### Not Found Response (404)

```json theme={null}
{
  "error": "Module not found"
}
```

### Unauthorized Response (401)

```json theme={null}
{
  "error": "Missing Herodotus Cloud X-API-KEY header"
}
```

## Notes

* Authentication is required for this endpoint
* Only the fields provided in the request body will be updated
* Fields not included in the request will remain unchanged
* The `source_code` field should be a JSON object mapping file paths to file contents
* The `abi` field should be a valid JSON object
