Skip to main content
POST
/
models
Create a model
curl --request POST \
  --url https://app.gomangrove.com/api/v1/models \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": {
    "name": "Carbon Calculation Model",
    "yaml": "nexus:\n  - name: Net Carbon Removal\n    formula: input_1 - input_2\n"
  }
}
'
{
  "id": "mdl_abc123def456",
  "name": "Carbon Calculation Model",
  "version": 1,
  "is_latest": true,
  "cadence": null,
  "partition_type": null,
  "order": 1,
  "created_at": "2025-01-15T10:00:00.000Z",
  "updated_at": "2025-01-15T10:00:00.000Z"
}

Authorizations

Authorization
string
header
required

Body

application/json
model
object
required

Response

201

id
string
name
string
version
integer
is_latest
boolean
cadence
string | null
partition_type
string | null
order
integer
created_at
string<date-time>
updated_at
string<date-time>