Skip to main content

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

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:
X-API-KEY: your-herodotus-cloud-api-key-here

Path Parameters

ParameterTypeDescription
idstringThe unique module ID (ULID)

Request Body

FieldTypeRequiredDescription
descriptionstringNoModule description
tagsarrayNoArray of tags
licensestringNoLicense identifier
abiobjectNoModule ABI as JSON
source_codeobjectNoSource code files as JSON object mapping paths to content

Example Request

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.

Not Found Response (404)

{
  "error": "Module not found"
}

Unauthorized Response (401)

{
  "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