---
title: "Purchase Ship"
method: POST
path: "/my/ships"
tags: ["Fleet"]
---

# Purchase Ship

`POST /my/ships`

Purchase a ship from a Shipyard. In order to use this function, a ship under your agent's ownership must be in a waypoint that has the `Shipyard` trait, and the Shipyard must sell the type of the desired ship.

Shipyards typically offer ship types, which are predefined templates of ships that have dedicated roles. A template comes with a preset of an engine, a reactor, and a frame. It may also include a few modules and mounts.

## Request body

- object
  - `shipType` ShipTypeJson, required — unresolved $ref
  - `waypointSymbol` string, required — The symbol of the waypoint you want to purchase the ship at.

## Response `201`

Purchased ship successfully.

- object
  - `data` object, required
    - `agent` AgentJson, required — unresolved $ref
    - `ship` ShipJson, required — unresolved $ref
    - `transaction` ShipyardTransactionJson, required — unresolved $ref

---

[API](https://skmtc.net/spacetradersapi/apis/spacetraders-api.md) · [All operations](https://skmtc.net/spacetradersapi/apis/spacetraders-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/spacetradersapi/spacetraders-api/revisions/197cf9b9a2b6/schema)
