> ## 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.

# Publish Module

> Publish an HDP module to the marketplace

# Publish Module

Publishes an HDP module to the marketplace, making it visible to all users. This endpoint requires authentication.

## Endpoint

```
POST /modules/{id}/publish
```

## 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) |

## Example Request

```bash theme={null}
curl -X POST https://staging.hdp.api.herodotus.cloud/modules/01JPJ03YJT1A93D6NF56G4GVEQ/publish \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: your-herodotus-cloud-api-key-here"
```

## Response

### Success Response (200 OK)

```json theme={null}
{
  "message": "Module published to marketplace"
}
```

### 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
* Publishing a module makes it visible in the marketplace
* Published modules can be discovered by all users
* Use the [Unpublish Module](./unpublish-module) endpoint to remove a module from the marketplace
