resellerhq

API request builder

Pick one of our documented operations and get a ready curl, Python or Node snippet, with the real base URL and an Idempotency-Key where the operation spends money.

One of the operations our API documents. Its parameters are filled with their own documented examples.

Which snippet to generate for the operation above.

Result

curl command ready

A ready curl request for POST /v1/numbers/orders, with https://resellerhq.com/api as the base URL and every parameter filled from its own documented example.

  • Warning

    Idempotency-Key is required on this operation

    createNumberOrder spends money, so a request retried after a dropped connection needs the same Idempotency-Key and body to replay the stored response safely rather than buying a second time — the snippet below already carries a placeholder value.

    Generate your own key per real request with crypto.randomUUID() (or an equivalent UUID v4) rather than reusing the placeholder below — the idempotency-key-generator tool shows the exact retry rules that key then follows.

curl request

curl -X POST "https://resellerhq.com/api/v1/numbers/orders" \ -H "Authorization: Bearer $RHQ_API_KEY" \ -H "Idempotency-Key: 2f1c9a52-7d0e-4a8e-9a53-0c1f6f3f2b11" \ -H "Content-Type: application/json" \ -d '{"country":"US","duration":"30d","customerId":"cus_01K6XJ4Q8ZT3M9R5V2B7WDHNCA","coupon":"LAUNCH25"}'

Replace the placeholder environment variable with your own key — this never holds or sends a real one.

  • This does not run the request — it only builds the snippet from the operation's own documented parameters, and cannot confirm a real call with a real key behaves the same way.
  • A parameter with no documented example is filled with its own name as a placeholder, not a guessed real value.

What this is

This API request builder turns one of our documented operations into a snippet you can run as-is — the real base URL, the exact path and query parameters our OpenAPI document gives as examples, and an Idempotency-Key header on any operation that spends money.

Every operation here comes straight from the same committed OpenAPI document our own API docs are built from, never a hand-kept copy that can drift: the method, the path, every parameter and its documented example value, and whether that operation spends money. Picking an operation and a language only ever rearranges those facts into one of three shapes — it invents nothing about what the operation itself accepts.

An operation that can charge the wallet — ordering or renewing a number, registering or renewing a domain, buying or resizing a licence — gets an Idempotency-Key header in its snippet automatically, with a placeholder value standing in for the one your own client should generate per real request.

How to read the result

The snippet is ready to run once the placeholder environment variable is swapped for a real key: nothing here holds, generates or sends one. A path parameter such as a customer id is filled with its own documented example value rather than left as a literal brace, so the URL in the snippet is one that would actually resolve.

Switching the language keeps the same operation and the same example values, only the syntax around them changes — curl's own flags, Python's requests library, or Node's built-in fetch — so comparing the three side by side is a matter of changing one field, not rebuilding the request from scratch.

Common mistakes

  • Pasting the snippet with the placeholder environment variable still unset — The snippet reads a key from an environment variable named in the snippet itself, never a literal value — run it with that variable actually set to your own key, or every request answers 401 before anything else about it is tested.
  • Reusing the Idempotency-Key placeholder value across more than one real request — The value shown for a money-spending operation is a fixed example for reading the shape of the header, not a key your own client should actually send more than once — generate a fresh one per real request, as the idempotency-key-generator tool explains.

Questions

Does this tool actually send the request anywhere?

No. Nothing here makes a network call of its own — it only builds the text of a request from an operation's own documented method, path and example values, for you to run with your own tools and your own key.

Where does the Idempotency-Key value in the snippet come from?

It is a fixed example: the operation's own documented Idempotency-Key example from our OpenAPI document where it has one, and otherwise the example our idempotency guide uses. Either way it stands in for the key your own client has to generate per real request with crypto.randomUUID() or an equivalent — never a value this page expects you to actually reuse against a live request.

Why is a path parameter filled with a specific value instead of left blank?

So the snippet's URL is one that would actually resolve rather than a template with a literal brace in it — the value filled in is the parameter's own documented example from our OpenAPI document, not a guess about a real record on your account.

Can I build a snippet for an operation that is not in the list?

Only operations our OpenAPI document actually describes are offered, since a snippet for anything else would have no documented parameters or examples to build from — the full set this page can choose from is exactly the set our API docs themselves cover.

Build on the same API this tool is part of: numbers, domains and mailboxes, one key.

Read the API

API example

Example request
curl -X POST https://163-123-236-68.sslip.io/api/tools/api-request-builder \
  -H "Content-Type: application/json" \
  -d '{}'
Example response
{
  "tool": "api-request-builder",
  "input": {
    "operation": "createNumberOrder",
    "language": "curl"
  },
  "result": {
    "verdict": {
      "tone": "neutral",
      "headline": "curl command ready",
      "summary": "A ready curl request for POST /v1/numbers/orders, with https://resellerhq.com/api as the base URL and every parameter filled from its own documented example."
    },
    "findings": [
      {
        "id": "idempotency-key-required",
        "severity": "warn",
        "title": "Idempotency-Key is required on this operation",
        "detail": "createNumberOrder spends money, so a request retried after a dropped connection needs the same Idempotency-Key and body to replay the stored response safely rather than buying a second time — the snippet below already carries a placeholder value.",
        "fix": "Generate your own key per real request with crypto.randomUUID() (or an equivalent UUID v4) rather than reusing the placeholder below — the idempotency-key-generator tool shows the exact retry rules that key then follows."
      }
    ],
    "parts": [
      {
        "kind": "record",
        "title": "curl request",
        "value": "curl -X POST \"https://resellerhq.com/api/v1/numbers/orders\" \\\n  -H \"Authorization: Bearer $RHQ_API_KEY\" \\\n  -H \"Idempotency-Key: 2f1c9a52-7d0e-4a8e-9a53-0c1f6f3f2b11\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"country\":\"US\",\"duration\":\"30d\",\"customerId\":\"cus_01K6XJ4Q8ZT3M9R5V2B7WDHNCA\",\"coupon\":\"LAUNCH25\"}'",
        "capped": true,
        "copyLabel": "Copy curl command",
        "note": "Replace the placeholder environment variable with your own key — this never holds or sends a real one."
      }
    ],
    "limits": [
      "This does not run the request — it only builds the snippet from the operation's own documented parameters, and cannot confirm a real call with a real key behaves the same way.",
      "A parameter with no documented example is filled with its own name as a placeholder, not a guessed real value."
    ]
  }
}

Related tools

For developers

Postman collection generator

Get a full Postman Collection v2.1 JSON for our API, with the real base URL and a bearer-auth placeholder already set — paste it straight into Postman.

For developers

Idempotency key generator

Make a UUID v4 for the Idempotency-Key header, with a ready curl line and our own retry rules explained next to it.

For developers

API error code explainer

Type one of our documented error codes, a bare status, or paste a whole response body, and get the exact status, message, meaning and what to change in the request.