iFragment

Create an order

POST
/v1/orders

Checks the recipient, holds the price on your balance and queues the Order (QUEUED). Repeating with the same externalId returns the existing Order (with different parameters: 409, code -9207). Stars: quantity 50 to 1,000,000; Premium: months 3, 6 or 12.

Authorization

apiKey
X-API-Key<token>

ifk_<clientId>_<secret>, for example ifk_48aa52d67c0fef6decb05b36_lVlZSWKN43sgb2vfEpFbqtzQ0ePNZya6yZr-RmJ4wxo

In: header

Header Parameters

Idempotency-Key*string

8 to 128 characters [A-Za-z0-9._:-], unique per operation

Match^[A-Za-z0-9._:-]{8,128}$

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/orders" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "externalId": "bot-order-1024",    "username": "durov",    "product": "STARS",    "quantity": 100  }'

{  "success": true,  "data": {    "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",    "externalId": "bot-order-1024",    "product": "STARS",    "quantity": 100,    "months": null,    "username": "durov",    "recipientName": "Pavel Durov",    "status": "QUEUED",    "price": "1.65",    "currency": "USD",    "failure": null,    "createdAt": "2026-10-06T09:15:22.443Z",    "sentAt": null,    "completedAt": null  },  "meta": {    "requestId": "9f1c2b7e-3a4d-4e5f-8a6b-7c8d9e0f1a2b",    "timestamp": "2026-10-06T09:15:22.481Z",    "processingTimeMs": 38  }}