---
title: "Create public buy request via API key"
method: POST
path: "/v1/external/buy_requests"
tags: ["External"]
---

# Create public buy request via API key

`POST /v1/external/buy_requests`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/v1/external/buy_requests`
- Auth: none declared

## Headers

- `X-API-Key` string, nullable

## Request body

- BuyRequestIn: Body for POST /v1/buy_requests/.
  - `name` string, required: Short, scannable headline for the buy request — what you're looking for. Sales-oriented language: a supplier reads this first and decides whether to keep reading. Required.
  - `description` string, nullable: Markdown-friendly long-form description of the request. Specs, constraints, why generic alternatives won't do, preferred delivery method — anything a supplier would need to decide whether they can fulfil this.
  - `quantity` integer: How many units the poster wants.
  - `max_price` union: Optional ceiling the poster is willing to pay per unit.
    - number
    - string
  - `currency` string, nullable
  - `contact` string, nullable: Free-form contact info (email/phone/Telegram handle/whatever) shown publicly on the buy request so suppliers can reach the poster. No format enforced. Partle doesn't broker the message.
  - `reference_url` string, nullable: Optional link to a sample, datasheet, manufacturer page, or any reference image of the desired item.
  - `product_id` integer, nullable: Optional link to a canonical Partle product if the poster is asking for one specific known SKU. For custom or freeform asks, leave null.

## Response `201`

Successful Response

- BuyRequestOut: Owner-facing shape (everything).
  - `id` integer, required
  - `user_id` integer, required
  - `name` string, required
  - `description` string, nullable
  - `quantity` integer, required
  - `max_price` string, nullable
  - `currency` string, nullable
  - `contact` string, nullable
  - `reference_url` string, nullable
  - `product_id` integer, nullable
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `closed_at` string, date-time, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/rubenayla/apis/partle-api.md) · [All operations](https://skmtc.dev/rubenayla/apis/partle-api/llms.txt) · [OpenAPI document](https://skmtc.dev/rubenayla/apis/partle-api/revisions/2e12d4d3c6dd?raw)
