---
title: "Create Request"
method: POST
path: "/api/v1/requests"
---

# Create Request

`POST /api/v1/requests`

## Request

- Base URL: `https://trovastorage.it` (the document declares no server; this is the origin it was published from)
- URL: `https://trovastorage.it/api/v1/requests`
- Auth: one of:
  - API key in header `X-Access-Token`
  - HTTP bearer

The wizard's email step: the request is stored, and waits for the code
mailed to its address unless a verified account sent it.

## Request body

- RequestCreate
  - `category` string, required
  - `answers` AnswerIn[], required
    - `set` string, required
    - `question` string, required
    - `values` string[], required
    - `other` string, nullable
  - `details` string, nullable
  - `site_ids` string[], required
  - `direct_site_id` string, uuid, nullable
  - `contact_name` string, required
  - `contact_phone` string, nullable
  - `contact_preference` 'call' | 'message_only', required
  - `email` string, email, nullable
  - `accepted_terms` true, required
  - `origin` VisitOrigin: What the browser kept from the first page of the visit (M6): that page's `utm_source`, the host that linked to it and its path. Untrusted, all of it: `services/origin.py` decides what it means.
    - `source` string, nullable
    - `referrer` string, nullable
    - `page` string, nullable

## Response `201`

Successful Response

- RequestCreated: The same for an address with an account and one without.
  - `request_id` string, uuid, required
  - `distribution_state` string, required
  - `needs_code` boolean, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/trovastorage/apis/stock-your-inventory.md) · [All operations](https://skmtc.dev/trovastorage/apis/stock-your-inventory/llms.txt) · [OpenAPI document](https://skmtc.dev/trovastorage/apis/stock-your-inventory/revisions/c75f591a585c?raw)
