`POST /api/v1/modules` — upload a module.
POST
/api/v1/modules
const url = 'https://example.com/api/v1/modules';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"content":"example","name":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/modules \ --header 'Content-Type: application/json' \ --data '{ "content": "example", "name": "example" }'Request Body required
Section titled “Request Body required ” Media type application/json
Request body for POST /api/v1/modules.
object
content
required
Raw YAML content.
string
name
required
Module name (must match the name field in the YAML).
string
Example generated
{ "content": "example", "name": "example"}Responses
Section titled “ Responses ”Module uploaded
Media type application/json
Response body for module endpoints.
object
name
required
string
uploaded_at
required
integer format: int64
uploaded_by
required
string
Example generated
{ "name": "example", "uploaded_at": 1, "uploaded_by": "example"}Invalid module content