---
title: "Public Api Buy"
method: POST
path: "/api/v1/accounts"
tags: ["public-api"]
---

# Public Api Buy

`POST /api/v1/accounts`

## Request

- Base URL: `https://api.rahanetwork.cloud` (the document declares no server; this is the origin it was published from)
- URL: `https://api.rahanetwork.cloud/api/v1/accounts`
- Auth: none declared

Buy a new service, paid from the key's wallet. Needs ``Idempotency-Key``.

## Request body

- BuyBody
  - `product_id` integer, nullable: required, except for API agents
  - `gb` integer, nullable: API agents: GB of traffic; 0 is an unlimited account
  - `ip` integer, nullable: API agents: simultaneous IPs (an unlimited account's billed size; a volume account's device limit, up to the seller's cap)
  - `days` integer, nullable: API agents: the service's length
  - `test` boolean, nullable: API agents: a test account (volume, on the test squads)
  - `squads` string[], nullable: API agents: squad ids from GET /squads (omit for the regular ones)
  - `username` string, nullable: omit for a generated one
  - `discount_code` string, nullable
  - `custom` CustomSelection: GB and/or IP for a customizable product (what the product's config offers).
    - `gb` integer, nullable
    - `ip` integer, nullable
  - `customer` CustomerFields
    - `name` string, nullable
    - `contact` string, nullable
    - `note` string, nullable
  - `notify` boolean: false: the bot sends no receipt to Telegram

## Response `201`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-14** `4df251494ba6`: 3 info
  - added the new optional request property `squads`
  - added the new optional request property `test`
  - the `gb/anyOf[subschema #1]/` request property's min was decreased from `1.00` to `0.00`
- **2026-10-09** `a340bfa05fd5`: 5 info
  - added the new optional request property `days`
  - added the new optional request property `gb`
  - added the new optional request property `ip`
  - the request property `product_id` became optional
  - …1 more
- **2026-10-07** `b53005445497`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/rahanetwork/apis/remnabot/changes/api/v1/accounts/post.md)

---

[API](https://skmtc.dev/rahanetwork/apis/remnabot.md) - [All operations](https://skmtc.dev/rahanetwork/apis/remnabot/llms.txt) - [OpenAPI document](https://skmtc.dev/rahanetwork/apis/remnabot/revisions/9f53dd81b28b?raw)
