Component submissions

Accessor: client.submissions

Submit a custom motor or battery for inclusion in the shared catalog. Submissions are reviewed by the ThrustLab team before appearing in /v1/components. A submission itself cannot be simulated — to run the component while review is pending, also save it to your library as a custom component.

Methods

Methods
MethodEndpointReturns
client.submissions.create(component_data=...)POST /v1/submissionsNew submission in submitted state
client.submissions.list(status=...)GET /v1/submissionsCursorPager of your submissions
client.submissions.retrieve(submission_id)GET /v1/submissions/{id}Single submission
client.submissions.update(submission_id, **fields)PATCH /v1/submissions/{id}Updated submission
client.submissions.withdraw(submission_id)DELETE /v1/submissions/{id}None

Submit a custom motor

component_data is the full request body: component_type ("motor" or "battery"), name, manufacturer, data_json (the type-specific spec map), plus optional source_url and notes. See the API reference for every supported field.

Motor data_json.R is the phase-to-phase winding resistance in ohms — the datasheet value, what a meter reads across two motor leads. This matches a custom component's spec_json.R (see Creating your own components).

from thrustlab import Client

client = Client()
sub = client.submissions.create(component_data={
    "component_type": "motor",
    "name": "Acme-2826-880",
    "manufacturer": "Acme Motors",
    "source_url": "https://acmemotors.example/2826-880",
    "data_json": {
        "kv": 880,          # velocity constant, RPM/V
        "R": 0.05,          # phase-to-phase resistance, ohms (datasheet value)
        "n": 14,            # pole count
        "diameter": 28,     # stator can diameter, mm
        "length": 26,       # motor length, mm
        "weight": 195,      # g
        "iq_max": 60,       # max current, A (or "power_max" in W)
        "iq_nominal": 1.2,  # nominal (no-load) current, A
        "u_nominal": 10,    # nominal voltage, V
    },
})
print(sub["id"], sub["status"])  # sub_2c5tQ... submitted

Track review status

sub = client.submissions.retrieve("sub_2c5tQ...")
print(sub["status"])  # submitted | under_review | approved | rejected
print(sub.get("reviewer_notes"))  # populated when the review leaves notes

List your submissions

for sub in client.submissions.list():
    print(sub["id"], sub["status"], sub["name"])

Filter to one status with status:

approved = client.submissions.list(status="approved")

status accepts submitted, under_review, approved, or rejected.

Edit or withdraw before review

While a submission is still submitted — before a reviewer has touched it — you can edit it or pull it back:

client.submissions.update(sub["id"], name="Acme-2826-880 v2", notes="corrected weight")

client.submissions.withdraw(sub["id"])

update() accepts name, manufacturer, data_json, source_url, and notes; component_type isn't editable — open a new submission if you got that wrong. Once a submission moves to under_review, approved, or rejected, both calls raise a 409 (submission_already_reviewed) — reviewer actions happen through ThrustLab moderation, not the API. withdraw() deletes the submission outright and emits no event.

See also