Skip to content
On this page
On this page

Wrab API

For providersUpdated

Providers need the Wrab API for two things: fetching the current license token without replacing it by hand, and sending push notifications to their Wrabbit subscribers. This page covers the addresses, authorization, limits and every error code. Push notifications step by step — Push notifications; updating the token with a script — License.

#Basics

  • Address: https://api.wrab.club. Requests and responses are JSON in UTF-8.
  • Every request carries the wpk_… API key — in the Authorization: Bearer or X-Wrab-Push-Key header. The license token is not passed to the API: it is public and changes with every renewal.
  • The key is bound to the provider and the subscription domain and does not change when the license is renewed.
  • Responses are not cached (Cache-Control: no-store).
Authorization headerHTTP
Authorization: Bearer wpk_...
# or
X-Wrab-Push-Key: wpk_...

#API key

The provider dashboard issues the key on the “License” screen for an active license on a domain verified with a TXT record. It is shown once — keep it like a password, on your server, not in the panel and not in the app. Details — API key.

#Endpoints

RequestWhat it doesRequires
GET /v1/provider/licenseThe domain’s current license token — belowA key and an active license
POST /v1/provider/push/sendQueue a push — SendingA license with push, a verified domain
GET /v1/provider/push/messagesThe domain’s recent sends: limit 1–200, default 50A license with push
GET /v1/provider/push/messages/{id}Status and counters of one sendA license with push
GET /v1/provider/push/statsHow many devices are subscribed, current limits, push_blockedA license with push
POST /v1/provider/push/keyRotate the API key — belowA license with push
GET /v1/provider/push/remnawaveSettings for automatic pushes from Remnawave webhooksA license with push
PUT /v1/provider/push/remnawaveTurn on or change automatic pushes — WebhooksA license with push
DELETE /v1/provider/push/remnawaveTurn automatic pushes offA license with push
POST /v1/provider/remnawave/webhook/{id}Webhook receiver: the Remnawave panel calls it, not you. PUT /push/remnawave returns the addressAn X-Remnawave-Signature signature

#Current license token

Requestbash
curl -sS https://api.wrab.club/v1/provider/license \
  -H "Authorization: Bearer $WRAB_API_KEY"
Response 200JSON
{
  "dom": "sub.example.com",
  "token": "v1.<base64url(payload)>.<base64url(sig)>",
  "format": 1,
  "kid": "k1",
  "features": ["brand", "hide", "routing", "app", "push"],
  "issued_at": "2026-11-13T09:00:00Z",
  "expires_at": "2027-12-20T09:00:00Z",
  "paid_until": "2027-12-13T09:00:00Z",
  "header": { "key": "wrab-license", "value": "v1.<base64url(payload)>.<base64url(sig)>" },
  "next_check": 86400
}
FieldValue
domThe key’s and license’s domain
tokenThe current token: the domain’s unrevoked, unexpired token with the latest paid term
formatToken format: 1 or 2 — License format
kidSigning key label
featuresLicense features
issued_at, expires_atToken issue and end time, RFC 3339 in UTC. The token term is the paid term plus grace days
paid_untilEnd of the paid term; may be absent
headerWhat to put in the Wrabbit rule: key is the header name, value is the token
next_checkIn how many seconds to ask again: 86400 (a day), and 3600 less than 8 days before expires_at

This request does not need the push feature — an active license on the key’s domain is enough. Without one the answer is 404 license_not_found: renew the license in the dashboard. A ready-made script for Remnawave — Automatic token updates.

#Push notifications

Who to send to and how, the queue and automatic push texts are in Push notifications; this page lists every field and status. To check the key, license and domain without sending anything, use a request with dry_run: it counts recipients and does not spend the daily limit.

Check without sendingbash
curl -sS https://api.wrab.club/v1/provider/push/send \
  -H "Authorization: Bearer $WRAB_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"category": "service", "target": "all", "body": "Test", "dry_run": true}'
Response 200JSON
{ "dry_run": true, "dom": "sub.example.com", "target_count": 1234 }

A real send answers 202 with message_id, status: "queued", target_count and duplicate: false; a repeat with the same idempotency_key gives 200 and duplicate: true. An unknown field in the body is a 400 invalid_json error: this catches typos like sub_hashes.

#Send fields

FieldRequiredMeaning
categoryyesservice — status, billing, maintenance; promo — advertising: the API accepts it, but there are no recipients, since the app has no consent screen
targetyesall — every subscriber of the domain; sub — specific subscribers by sub_hash
hashesfor sub1–1000 sub_hash values (64 hex); not sent with all
bodyyesUp to 300 characters; line breaks are allowed, other control characters are not
titlenoUp to 80 characters
localizednoTexts for the device languages ru and en with the same limits; without a translation — title and body
urlnohttps://… without credentials in the address, or a safe deep link, up to 512 bytes
collapse_idnoUp to 64 visible ASCII characters: a new push with the same id replaces the previous one on the device (apns-collapse-id)
idempotency_keynoUp to 128 visible ASCII characters, or the Idempotency-Key header; a repeat with the same key returns the earlier send. The rw: prefix is reserved for automatic pushes
domnoIf present, must match the license domain
dry_runnotrue — only count recipients, send nothing

#Send status and log

GET /v1/provider/push/messages/{id} returns one send, GET /v1/provider/push/messages?limit=50 the latest sends of the domain (from the API, the dashboard and automatic pushes, up to 200). The log is kept for 180 days.

FieldValues
statusqueued, sending, done (sent), cancelled
cancel_reasonOnly for cancelled: push_blocked — pushes stopped by an administrator; license_inactive — the license is not valid; domain_not_verified — the domain is not verified; domain_transferred — the domain moved to another provider; provider_inactive — the provider account is disabled; expired — it waited in the queue too long; apns_config_error — a sending failure on the Wrabbit side, contact support
sourceapi or remnawave (an automatic push from a webhook); automatic pushes also have event
target_countHow many devices were targeted
sent_count, failed_count, invalid_countDelivered to Apple, not delivered, the device no longer accepts pushes
pending_countHow many are still waiting — only in the single-send response
created_at, started_at, finished_atQueued, started and finished time, UTC

GET /v1/provider/push/stats — devices (devices subscribed to the domain's pushes), devices_promo_opt_in (of them, with advertising consent; always 0 with 2.2.0), subscriptions (distinct subscriptions), limits (daily limits), push_blocked and license_expires_at.

#Rotating the key

New keybash
curl -sS -X POST https://api.wrab.club/v1/provider/push/key \
  -H "Authorization: Bearer $WRAB_API_KEY"
Response 200JSON
{ "key": "wpk_...", "key_hint": "...", "dom": "sub.example.com" }

The request is signed with the current key. The response holds the new key, shown once. The old key stops working immediately: replace it in every script and bot before the next request.

#Request limits

LimitValue
Requests per minute from one IP, before the key check (IPv6 — per /64 network)120
Requests per minute per license, after the key check60
Push sends per daySeparate for service, promo and automatic pushes — Push limits

Going over gives 429 rate_limited with Retry-After: 60 or 429 daily_limit_exceeded with Retry-After: 3600. Retry no sooner than the given number of seconds.

#Error codes

An error comes with an HTTP status and an error body: a machine-readable code and a message hint, which may be empty. Rely on code.

Error exampleHTTP
HTTP/1.1 403 Forbidden
Content-Type: application/json; charset=utf-8
Cache-Control: no-store


{ "error": { "code": "domain_not_verified", "message": "..." } }
Key and license errors
HTTPcodeWhat it means and what to do
401push_key_requiredNo key, or it doesn’t look like wpk_…. Pass the key in Authorization: Bearer or X-Wrab-Push-Key
401push_key_invalidThe key was not found or was replaced. Get the current one in the dashboard
401license_expiredThe license with push on the domain has expired or been revoked. Renew it
403feature_requiredThe domain’s license has no push. Get a new token in the dashboard
403provider_inactiveThe provider account is disabled. Contact support
403domain_not_verifiedThe domain is not verified with a TXT record or has moved to another provider — Domain verification
403domain_mismatchThe dom field of the request does not match the license domain
403push_blockedPush sending was stopped by a Wrabbit administrator: complaints or rule violations. Contact support
404license_not_foundGET /license only: the key’s domain has no active license. Renew it in the dashboard
Request errors
HTTPcodeWhat it means and what to do
400invalid_jsonThe body is not JSON, a field has the wrong type, or a field is unknown
400invalid_categorycategory must be service or promo
400invalid_targettarget must be all or sub; hashes is not passed with all
400invalid_hashessub needs 1–1000 sub_hash values, each 64 hex characters
400invalid_textEmpty body, text too long, or control characters
400invalid_localizedOnly the ru and en keys are allowed in localized
400invalid_urlurl must be https://… or a safe wrabbit://…, up to 512 bytes — Links from push notifications
400invalid_collapse_idUp to 64 visible ASCII characters
400invalid_idempotency_keyUp to 128 visible ASCII characters, without the rw: prefix
400secret_required, invalid_secretThe first webhook setup needs secret — the panel’s WEBHOOK_SECRET_HEADER, 32–256 characters [a-zA-Z0-9]
400invalid_events, invalid_name, invalid_templatesAn unknown event or an empty list, a name longer than 64 characters, an error in templates — see message
404not_foundYour domain has no such send or webhook setting
429rate_limitedThe per-minute request limit. Wait for Retry-After
429daily_limit_exceededThe daily send limit. Wait for Retry-After
500internalAn error on our side. Retry later; if it persists — support
503push_disabled, webhooks_disabledSending or webhook intake is temporarily off on the Wrabbit side

Responses of the panel webhook address (200 queued and ignored, 401 bad_signature, 403 license_inactive, 413 body_too_large) are seen not by your script but by Remnawave in its webhook log — their meaning is in Push notifications.

Updated November 14, 2026 · Found a mistake? →