Skip to content
ZenithDocs
English

Create a rocket

Add a rocket to an account.

POST/rockets

Authorizations

  • bearerAuthbearer <JWT>

    A token issued by the console.

Request body

The rocket to create.

  • namestringrequired

    Display name.

  • status"design" | "testing" | "flying" | "retired"

    Lifecycle of a rocket.

  • stagesStage[]required

    At least one stage.

    Show child attributes
    • namestringrequired

      Name of the stage.

    • enginesinteger<int32>required

      Number of engines on the stage.

    • reusableboolean

      Whether the stage lands back.

Request
curl -X POST 'https://api.rockets.example/v1/rockets' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Zenith Heavy",
  "status": "design",
  "stages": [
    {
      "name": "Booster",
      "engines": 9,
      "reusable": false
    }
  ]
}'
application/json
{
  "name": "Zenith Heavy",
  "status": "design",
  "stages": [
    {
      "name": "Booster",
      "engines": 9,
      "reusable": false
    }
  ]
}

Responses

201

201The rocket was created.

  • idstring<uuid>required

    Identifier of the rocket.

  • namestringrequired

    Display name.

  • status"design" | "testing" | "flying" | "retired"required

    Lifecycle of a rocket.

  • thrustinteger<int64>

    Thrust at sea level, in kilonewtons.

  • stagesStage[]required

    Stages, from the booster upwards.

    Show child attributes
    • namestringrequired

      Name of the stage.

    • enginesinteger<int32>required

      Number of engines on the stage.

    • reusableboolean

      Whether the stage lands back.

  • createdAtstring<date-time>

Response
{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "name": "Zenith Heavy",
  "status": "design",
  "thrust": 7600,
  "stages": [
    {
      "name": "Booster",
      "engines": 9,
      "reusable": false
    }
  ],
  "createdAt": "2026-01-01T00:00:00Z"
}

422

422The payload did not pass validation.

  • codestringrequired

    Machine-readable code.

  • messagestringrequired

    What went wrong.

  • errorsobject[]

    One entry per rejected field.

    Show child attributes
    • fieldstring

    • reasonstring

Response
{
  "code": "not_found",
  "message": "string",
  "errors": [
    {
      "field": "stages",
      "reason": "must contain at least one stage"
    }
  ]
}

Last updated on