openapi: 3.0.3 info: title: SpaceX REST Capsules Payloads API description: 'Community-maintained, open-source REST API for SpaceX data — launches, rockets, capsules, cores, crew, dragons, payloads, ships, landpads, launchpads, Starlink satellites, the Tesla Roadster ephemeris, company info, and historical events. Source: https://github.com/r-spacex/SpaceX-API (Apache 2.0). STATUS: Maintenance-only as of 2024. New launches/missions are NOT being added. Existing data remains queryable; project remains hosted for historical lookups and as a teaching/sample API. Each resource is independently versioned. The Launches resource has both v4 and v5 surfaces; v5 omits the v4 response/query transforms (`tdb` typo retained for v4 parity). All other resources are v4-only. Authentication: only required for destructive (create/update/delete) admin routes via the `spacex-key` header. All read operations are public. Querying: every resource exposes a POST `/{resource}/query` endpoint that accepts a mongoose-paginate-v2 body of the form `{ query: , options: {...} }`. ' version: '4.0' contact: name: r-spacex community url: https://github.com/r-spacex/SpaceX-API license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0 x-generated-from: documentation x-last-validated: '2026-05-29' x-status: maintenance-only servers: - url: https://api.spacexdata.com description: Canonical hosted REST endpoint (community-operated) security: [] tags: - name: Payloads description: Detailed info about launch payloads. paths: /v4/payloads: get: operationId: listPayloads summary: List All Payloads description: Return every payload record. tags: - Payloads responses: '200': description: Array of payload records. content: application/json: schema: type: array items: $ref: '#/components/schemas/Payload' x-microcks-operation: delay: 0 dispatcher: FALLBACK /v4/payloads/{id}: get: operationId: getPayload summary: Get One Payload description: Return a single payload by its UUID. tags: - Payloads parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Payload record. content: application/json: schema: $ref: '#/components/schemas/Payload' '404': $ref: '#/components/responses/NotFound' x-microcks-operation: delay: 0 dispatcher: FALLBACK /v4/payloads/query: post: operationId: queryPayloads summary: Query Payloads description: Run a mongoose-paginate-v2 query against the payloads collection. tags: - Payloads requestBody: $ref: '#/components/requestBodies/QueryBody' responses: '200': description: Paginated payload result. content: application/json: schema: $ref: '#/components/schemas/PaginatedPayloads' x-microcks-operation: delay: 0 dispatcher: FALLBACK components: parameters: IdParam: name: id in: path required: true description: Resource UUID (MongoDB ObjectId, e.g. `5e9d0d95eda69973a809d1ec`). schema: type: string pattern: ^[a-f0-9]{24}$ schemas: Payload: type: object description: A launch payload. properties: id: type: string name: type: string nullable: true type: type: string nullable: true reused: type: boolean default: false launch: type: string nullable: true customers: type: array items: type: string norad_ids: type: array items: type: integer nationalities: type: array items: type: string manufacturers: type: array items: type: string mass_kg: type: number nullable: true mass_lbs: type: number nullable: true orbit: type: string nullable: true reference_system: type: string nullable: true regime: type: string nullable: true longitude: type: number nullable: true semi_major_axis_km: type: number nullable: true eccentricity: type: number nullable: true periapsis_km: type: number nullable: true apoapsis_km: type: number nullable: true inclination_deg: type: number nullable: true period_min: type: number nullable: true lifespan_years: type: number nullable: true epoch: type: string nullable: true format: date-time mean_motion: type: number nullable: true raan: type: number nullable: true arg_of_pericenter: type: number nullable: true mean_anomaly: type: number nullable: true dragon: type: object nullable: true properties: capsule: type: string nullable: true mass_returned_kg: type: number nullable: true mass_returned_lbs: type: number nullable: true flight_time_sec: type: integer nullable: true manifest: type: string nullable: true water_landing: type: boolean nullable: true land_landing: type: boolean nullable: true PaginationEnvelope: type: object description: Default mongoose-paginate-v2 wrapper. properties: totalDocs: type: integer offset: type: integer limit: type: integer totalPages: type: integer page: type: integer pagingCounter: type: integer hasPrevPage: type: boolean hasNextPage: type: boolean prevPage: type: integer nullable: true nextPage: type: integer nullable: true QueryRequest: type: object description: mongoose-paginate-v2 query body. properties: query: type: object description: MongoDB find() filter document. additionalProperties: true options: type: object description: Pagination + projection options. properties: select: description: Fields to include/exclude (string or object). oneOf: - type: string - type: object sort: description: Sort order (string or object). oneOf: - type: string - type: object offset: type: integer page: type: integer limit: type: integer pagination: type: boolean populate: description: Populate definitions (array, object, or string). oneOf: - type: array items: {} - type: object - type: string Error: type: object properties: message: type: string description: Human-readable error message. status: type: integer description: HTTP status code echoed in body. PaginatedPayloads: allOf: - $ref: '#/components/schemas/PaginationEnvelope' - type: object properties: docs: type: array items: $ref: '#/components/schemas/Payload' responses: NotFound: description: Resource not found. content: application/json: schema: $ref: '#/components/schemas/Error' requestBodies: QueryBody: description: mongoose-paginate-v2 query body. required: false content: application/json: schema: $ref: '#/components/schemas/QueryRequest' example: query: {} options: limit: 10 page: 1 securitySchemes: SpacexKey: type: apiKey in: header name: spacex-key description: 'Admin API key for destructive (create/update/delete) operations. Not required for any read endpoint. '