Documentation
FRANKLAB API

API reference

Every partner billing API endpoint with parameters.

Open .md
Open in AI

Work with an AI assistant

Shares the current documentation without your keys. Long sections are copied in full for you to paste into chat.

Cursor and Claude Code accept short prompts in links. For long sections, ChatGPT and Antigravity, paste the copied documentation manually.

Ask support

Content generation and processing: Video · Images, text and audio · Utilities and montage. The reference below covers billing, keys and webhooks.

media

post/franklab/jobs/import

Authentication: partner API key.

Request example (replace sample values)
curl --fail-with-body -X POST \
  -H "X-API-Key: ${FRANKLAB_KEY:?Set your API key}" \
  -H "Content-Type: application/json" \
  --data-raw '{"kind":"image","url":"https://example.com/reference.png"}' \
  "https://apergrex.ru/franklab/api/franklab/jobs/import"

Prepare an input file

Import a direct public HTTPS URL or inspect a file already owned by your account. Supply exactly one of url and storedFileId. Returns data.storedFileId, url, mimeType, sizeBytes and measured width/height, durationSeconds/fps or pageCount depending on kind. Limits: image 30 MiB, video 100 MiB, audio 50 MiB, PDF/TXT/MD 20 MiB. The selected model may impose stricter limits. No transcoding is performed.

Request body
kind *stringimage, video, audio or document
urlstringDirect public HTTPS file URL; mutually exclusive with storedFileId.
storedFileIdstringUUID v4 of an owned file; mutually exclusive with url.
Responses
  • 200 File prepared; success=true, metadata in data.
  • 400 Invalid source, unavailable file, unsupported format or size.
  • 401 Missing or invalid API key
  • 403 Legacy service keys are rejected: a partner API key is required
  • 429 Import limit: 10 requests per minute; concurrent downloads and inspections are bounded. Retry later.

billing

get/v1/billing/api-keys

Authentication: partner API key.

Request example (replace sample values)
curl --fail-with-body -X GET \
  -H "X-API-Key: ${FRANKLAB_KEY:?Set your API key}" \
  "https://apergrex.ru/franklab/api/v1/billing/api-keys"

List API keys

The partner's keys: prefix, label, active flag, dates. Raw keys are never returned.

Responses
  • 200 Key list
  • 401 Missing or invalid API key
  • 403 Legacy service keys are rejected: a partner API key is required
  • 429 Rate limit exceeded (default 60 requests/minute per API key; session-authenticated cabinet operations are counted per partner); the Retry-After header gives seconds until the window resets
post/v1/billing/api-keys

Authentication: cabinet session. Manage keys in settings

Create an API key

Creates a new fl_live_… key (partner SESSION auth, not an API key: a key must not be able to mint keys). The raw value is returned exactly once — store it immediately.

Request body
labelstringFree-form label (up to 120 chars)
Responses
  • 201 Key created; the raw value is shown once
  • 401 Missing or expired cabinet session
  • 403 Access denied; a cabinet session is required, not an API key
  • 429 Rate limit exceeded (default 60 requests/minute per API key; session-authenticated cabinet operations are counted per partner); the Retry-After header gives seconds until the window resets
delete/v1/billing/api-keys/{id}

Authentication: cabinet session. Manage keys in settings

Revoke an API key

Deactivates one of your keys by its id (partner SESSION auth). Idempotent: a foreign id matches nothing and returns no error.

Parameters (1)
id *path · stringKey identifier
Responses
  • 200 Key deactivated (or already inactive)
  • 401 Missing or expired cabinet session
  • 403 Access denied; a cabinet session is required, not an API key
  • 429 Rate limit exceeded (default 60 requests/minute per API key; session-authenticated cabinet operations are counted per partner); the Retry-After header gives seconds until the window resets
get/v1/billing/balance

Authentication: partner API key.

Request example (replace sample values)
curl --fail-with-body -X GET \
  -H "X-API-Key: ${FRANKLAB_KEY:?Set your API key}" \
  "https://apergrex.ru/franklab/api/v1/billing/balance"

Partner balance

Returns total (lifetime credited), used (lifetime confirmed spend), reserved (held by open task reservations), available (total − used − reserved, floored at 0) the isLow flag (true when available is below lowBalanceThresholdFranks) and that threshold itself as lowBalanceThresholdFranks — the same one that triggers the billing.low_balance webhook. Amounts are in franks (₣), the platform's internal accounting unit.

Responses
  • 200 Balance returned
  • 401 Missing or invalid API key
  • 403 Legacy service keys are rejected: a partner API key is required
  • 429 Rate limit exceeded (default 60 requests/minute per API key; session-authenticated cabinet operations are counted per partner); the Retry-After header gives seconds until the window resets
get/v1/billing/legal-invoices/{id}/pdf

Authentication: partner API key.

Request example (replace sample values)
curl --fail-with-body -X GET \
  -H "X-API-Key: ${FRANKLAB_KEY:?Set your API key}" \
  "https://apergrex.ru/franklab/api/v1/billing/legal-invoices/${FRANKLAB_ID:?Set the resource identifier}/pdf"

Invoice PDF

The invoice PDF (inline; occasionally a redirect to the bank's file). Limit: 12 requests/min.

Parameters (1)
id *path · stringInvoice identifier
Responses
  • 200 PDF file
  • 302 Redirect to the bank's PDF file
  • 401 Missing or invalid API key
  • 403 Legacy service keys are rejected: a partner API key is required
  • 429 Rate limit exceeded (default 60 requests/minute per API key; session-authenticated cabinet operations are counted per partner); the Retry-After header gives seconds until the window resets
post/v1/billing/legal-invoices/{id}/refresh

Authentication: partner API key.

Request example (replace sample values)
curl --fail-with-body -X POST \
  -H "X-API-Key: ${FRANKLAB_KEY:?Set your API key}" \
  "https://apergrex.ru/franklab/api/v1/billing/legal-invoices/${FRANKLAB_ID:?Set the resource identifier}/refresh"

Refresh an invoice

Fetches the current invoice status from the bank. Limit: 6 requests/min.

Parameters (1)
id *path · stringInvoice identifier
Responses
  • 200 Current status
  • 401 Missing or invalid API key
  • 403 Legacy service keys are rejected: a partner API key is required
  • 429 Rate limit exceeded (default 60 requests/minute per API key; session-authenticated cabinet operations are counted per partner); the Retry-After header gives seconds until the window resets
post/v1/billing/legal-invoices/{id}/sbp-link

Authentication: partner API key.

Request example (replace sample values)
curl --fail-with-body -X POST \
  -H "X-API-Key: ${FRANKLAB_KEY:?Set your API key}" \
  "https://apergrex.ru/franklab/api/v1/billing/legal-invoices/${FRANKLAB_ID:?Set the resource identifier}/sbp-link"

SBP B2B link

Creates an SBP B2B payment QR link for the invoice. Limit: 6 requests/min.

Parameters (1)
id *path · stringInvoice identifier
Responses
  • 200 SBP link
  • 401 Missing or invalid API key
  • 403 Legacy service keys are rejected: a partner API key is required
  • 429 Rate limit exceeded (default 60 requests/minute per API key; session-authenticated cabinet operations are counted per partner); the Retry-After header gives seconds until the window resets
post/v1/billing/legal-invoices/create

Authentication: partner API key.

Request example (replace sample values)
curl --fail-with-body -X POST \
  -H "X-API-Key: ${FRANKLAB_KEY:?Set your API key}" \
  -H "Content-Type: application/json" \
  --data-raw '{"amountRub":1000,"expectedProfileRevision":1}' \
  "https://apergrex.ru/franklab/api/v1/billing/legal-invoices/create"

Create a legal invoice

Creates an invoice via T-Bank Business; on payment the balance is credited automatically (RUB→₣ 1:1). Limit: 3 requests/min. Replace sample company details with your own; obtain expectedProfileRevision from the current GET /v1/billing/legal-invoices/profile response.

Request body
amountRub *integerInvoice amount in rubles (1–100,000)
expectedProfileRevision *integerThe profile revision to create against (≥1; guards against stale requisites)
commentstringComment (up to 140 chars)
Responses
  • 201 Invoice created
  • 401 Missing or invalid API key
  • 403 Legacy service keys are rejected: a partner API key is required
  • 429 Rate limit exceeded (default 60 requests/minute per API key; session-authenticated cabinet operations are counted per partner); the Retry-After header gives seconds until the window resets
get/v1/billing/legal-invoices/history

Authentication: partner API key.

Request example (replace sample values)
curl --fail-with-body -X GET \
  -H "X-API-Key: ${FRANKLAB_KEY:?Set your API key}" \
  "https://apergrex.ru/franklab/api/v1/billing/legal-invoices/history"

Invoice history

Legal invoices with statuses, amounts and credit dates.

Parameters (2)
pagequery · integerPage number
limitquery · integer · ≤100Page size
Responses
  • 200 Invoice list
  • 401 Missing or invalid API key
  • 403 Legacy service keys are rejected: a partner API key is required
  • 429 Rate limit exceeded (default 60 requests/minute per API key; session-authenticated cabinet operations are counted per partner); the Retry-After header gives seconds until the window resets
get/v1/billing/legal-invoices/profile

Authentication: partner API key.

Request example (replace sample values)
curl --fail-with-body -X GET \
  -H "X-API-Key: ${FRANKLAB_KEY:?Set your API key}" \
  "https://apergrex.ru/franklab/api/v1/billing/legal-invoices/profile"

Legal company profile

The company profile used for legal invoicing (tax id, name, address, etc.).

Responses
  • 200 Profile
  • 401 Missing or invalid API key
  • 403 Legacy service keys are rejected: a partner API key is required
  • 429 Rate limit exceeded (default 60 requests/minute per API key; session-authenticated cabinet operations are counted per partner); the Retry-After header gives seconds until the window resets
put/v1/billing/legal-invoices/profile

Authentication: partner API key.

Request example (replace sample values)
curl --fail-with-body -X PUT \
  -H "X-API-Key: ${FRANKLAB_KEY:?Set your API key}" \
  -H "Content-Type: application/json" \
  --data-raw '{"companyName":"Example company","inn":"0000000000","email":"billing@example.com"}' \
  "https://apergrex.ru/franklab/api/v1/billing/legal-invoices/profile"

Upsert the company profile

Creates or updates the invoicing company profile. Replace sample company details with your own; obtain expectedProfileRevision from the current GET /v1/billing/legal-invoices/profile response.

Request body
companyName *stringCompany name (2–512 chars)
inn *stringTax ID (INN) — 10 or 12 digits
email *stringContact e-mail for invoices
kppstringKPP — 9 digits (when applicable)
phonestringPhone (up to 32 chars)
expectedProfileRevisionintegerOptimistic locking: expected profile revision (≥1)
Responses
  • 200 Profile saved
  • 401 Missing or invalid API key
  • 403 Legacy service keys are rejected: a partner API key is required
  • 429 Rate limit exceeded (default 60 requests/minute per API key; session-authenticated cabinet operations are counted per partner); the Retry-After header gives seconds until the window resets
get/v1/billing/payment/history

Authentication: partner API key.

Request example (replace sample values)
curl --fail-with-body -X GET \
  -H "X-API-Key: ${FRANKLAB_KEY:?Set your API key}" \
  "https://apergrex.ru/franklab/api/v1/billing/payment/history"

Top-up history

The list of top-up payments with their statuses (pending/authorized/confirmed/canceled/rejected/failed). Returns the last 50 payments.

Responses
  • 200 Top-up history
  • 401 Missing or invalid API key
  • 403 Legacy service keys are rejected: a partner API key is required
  • 429 Rate limit exceeded (default 60 requests/minute per API key; session-authenticated cabinet operations are counted per partner); the Retry-After header gives seconds until the window resets
post/v1/billing/payment/link

Authentication: partner API key.

Request example (replace sample values)
curl --fail-with-body -X POST \
  -H "X-API-Key: ${FRANKLAB_KEY:?Set your API key}" \
  -H "Idempotency-Key: ${FRANKLAB_IDEMPOTENCY_KEY:?Set this header; reuse its value for the same operation}" \
  -H "Content-Type: application/json" \
  --data-raw '{"amountRub":1000}' \
  "https://apergrex.ru/franklab/api/v1/billing/payment/link"

Top-up payment link

Creates a T-Bank payment link for topping up the balance (RUB→₣ 1:1). The Idempotency-Key header is required: a retry with the same key returns the same payment instead of creating a new one. Card saving is not available programmatically. The link is opened by the payer in a browser. Limit: 3 requests/min.

Parameters (1)
Idempotency-Key *header · stringIdempotency key (up to 128 chars; a retry with the same key and amount returns the same payment, a different amount yields 409)
Request body
amountRub *integerAmount in rubles (1–100,000); 1 RUB = 1 ₣
descriptionstringFree-form description (up to 140 chars)
Responses
  • 201 Payment created (or an existing one returned): paymentUrl to pay
  • 400 Missing/invalid Idempotency-Key or amount out of range
  • 401 Missing or invalid API key
  • 403 Legacy service keys are rejected: a partner API key is required
  • 429 Rate limit exceeded (default 60 requests/minute per API key; session-authenticated cabinet operations are counted per partner); the Retry-After header gives seconds until the window resets
get/v1/billing/pricing/catalog

Authentication: partner API key.

Request example (replace sample values)
curl --fail-with-body -X GET \
  -H "X-API-Key: ${FRANKLAB_KEY:?Set your API key}" \
  "https://apergrex.ru/franklab/api/v1/billing/pricing/catalog"

Price catalog

The base price showcase grouped by media family (video/image/audio/text/processing) with billing units. All prices are in franks — the platform's internal accounting unit (not a currency); the item.unitOfAccount field is 'Франки'. The item.currency field is a deprecated alias of unitOfAccount (transition period, will be removed). The response is not cached (no-store); re-reading once per 24 hours is enough (refreshAfterSeconds).

Responses
  • 200 Price catalog
  • 401 Missing or invalid API key
  • 403 Legacy service keys are rejected: a partner API key is required
  • 429 Rate limit exceeded (default 60 requests/minute per API key; session-authenticated cabinet operations are counted per partner); the Retry-After header gives seconds until the window resets
post/v1/billing/pricing/estimate

Authentication: partner API key.

Request example (replace sample values)
curl --fail-with-body -X POST \
  -H "X-API-Key: ${FRANKLAB_KEY:?Set your API key}" \
  -H "Content-Type: application/json" \
  --data-raw '{"modelId":"mars-v1-5","duration":5,"operation":"text_to_video","mode":"std","resolution":"720p"}' \
  "https://apergrex.ru/franklab/api/v1/billing/pricing/estimate"

Operation cost estimate

A side-effect-free cost quote for a planned operation at your tariff (the same seam that reserves funds on submit). Pass the model and parameters; media URLs are not accepted — pass reference counts instead.

Request body
modelId *stringModel identifier (same as /studio/models)
durationintegerVideo duration in seconds (3–30)
operationstringOperation kind: text_to_video, image_to_video, reference_to_video, first_last_frame, text_to_image, image_to_image, audio_generation, video_to_video
resolutionstringResolution (720p/1080p/4k — model-dependent; 1k/2k for xAI Image)
aspectRatiostringAspect ratio
modestringModel mode where applicable
executionModestringExecution route (xai_api/supergrok/openai_api/openai_codex)
qualitystringQuality tier: low/medium for gpt-image-2 (codex route) and xAI Image 2 (low/medium); high applies to gpt-image-2 only
promptstringPrompt (up to 3000 chars; needed for google-model token pricing)
imageCountintegerInput image count (MIST i2i)
referenceImageCountintegerReference image count (0–30)
referenceVideoCountintegerReference video count (0–10)
referenceAudioCountintegerReference audio count (0–10)
imageOutputCountintegerImages per request, `n` (1–9): price multiplier for xAI Image / Image 2, Kling omni-image (jupiter-v1-5) and GPT Image
voiceCountintegerKling video: number of voices in the launch voice_list (0–10). The voice surcharge applies only when the prompt contains <<<voice_N>>> markup
Responses
  • 200 Cost quote at the effective tariff
  • 401 Missing or invalid API key
  • 403 Legacy service keys are rejected: a partner API key is required
  • 429 Rate limit exceeded (default 60 requests/minute per API key; session-authenticated cabinet operations are counted per partner); the Retry-After header gives seconds until the window resets
get/v1/billing/tariff

Authentication: partner API key.

Request example (replace sample values)
curl --fail-with-body -X GET \
  -H "X-API-Key: ${FRANKLAB_KEY:?Set your API key}" \
  "https://apergrex.ru/franklab/api/v1/billing/tariff"

Tariff plan

The effective tariff (base/pro/max/ultra), assigned and earned plans, lifetime spend (₣), the next tier and the spend still required, plus the discount percent against the base price list.

Responses
  • 200 Tariff returned
  • 401 Missing or invalid API key
  • 403 Legacy service keys are rejected: a partner API key is required
  • 429 Rate limit exceeded (default 60 requests/minute per API key; session-authenticated cabinet operations are counted per partner); the Retry-After header gives seconds until the window resets
get/v1/billing/transactions

Authentication: partner API key.

Request example (replace sample values)
curl --fail-with-body -X GET \
  -H "X-API-Key: ${FRANKLAB_KEY:?Set your API key}" \
  "https://apergrex.ru/franklab/api/v1/billing/transactions"

Transaction history

Paginated ledger of operations: type (topup/reservation/confirm/refund; debit is a rare legacy row kind; bonus_reversal claws back a bonus credit and is not spend), amount in ₣, price per unit, task, date, attribution; kind is the operation kind (top-up, bonus, task or order hold/charge/refund, adjustment, etc.) and label/description carry its short Russian caption. Pagination by page/limit (limit ≤ 100).

Parameters (6)
typequery · string · topup | reservation | confirm | refund | debit | bonus_reversalFilter by transaction type (debit is a legacy row kind; bonus_reversal claws back a bonus credit)
attributionquery · string · all | company | personalWhose top-ups to show: all / company / personal
dateFromquery · stringRange start (ISO 8601)
dateToquery · stringRange end (ISO 8601)
pagequery · integerPage number
limitquery · integer · ≤100Page size
Responses
  • 200 Paginated transaction list
  • 401 Missing or invalid API key
  • 403 Legacy service keys are rejected: a partner API key is required
  • 429 Rate limit exceeded (default 60 requests/minute per API key; session-authenticated cabinet operations are counted per partner); the Retry-After header gives seconds until the window resets
get/v1/billing/transactions/export

Authentication: partner API key.

Request example (replace sample values)
curl --fail-with-body -X GET \
  -H "X-API-Key: ${FRANKLAB_KEY:?Set your API key}" \
  "https://apergrex.ru/franklab/api/v1/billing/transactions/export"

Export transactions as CSV

CSV download of the ledger (attachment). Same filters as the list endpoint; up to 10,000 rows per export — beyond that a `# truncated: …` comment line with the full count is appended.

Parameters (5)
typequery · string · topup | reservation | confirm | refund | debit | bonus_reversalFilter by transaction type (debit is a legacy row kind; bonus_reversal claws back a bonus credit)
dateFromquery · stringRange start (ISO 8601)
dateToquery · stringRange end (ISO 8601)
formatquery · string · csvExport format; csv is the only option
attributionquery · string · all | company | personalWhose top-ups to include: all / company / personal
Responses
  • 200 CSV file
  • 401 Missing or invalid API key
  • 403 Legacy service keys are rejected: a partner API key is required
  • 429 Rate limit exceeded (default 60 requests/minute per API key; session-authenticated cabinet operations are counted per partner); the Retry-After header gives seconds until the window resets
get/v1/billing/usage/daily

Authentication: partner API key.

Request example (replace sample values)
curl --fail-with-body -X GET \
  -H "X-API-Key: ${FRANKLAB_KEY:?Set your API key}" \
  "https://apergrex.ru/franklab/api/v1/billing/usage/daily"

Daily usage

Confirmed spend per UTC day: confirm rows minus task-less refunds.

Parameters (2)
dateFromquery · stringRange start (ISO 8601)
dateToquery · stringRange end (ISO 8601)
Responses
  • 200 Per-day aggregation
  • 401 Missing or invalid API key
  • 403 Legacy service keys are rejected: a partner API key is required
  • 429 Rate limit exceeded (default 60 requests/minute per API key; session-authenticated cabinet operations are counted per partner); the Retry-After header gives seconds until the window resets

webhooks

get/v1/webhooks/deliveries

Authentication: partner API key.

Request example (replace sample values)
curl --fail-with-body -X GET \
  -H "X-API-Key: ${FRANKLAB_KEY:?Set your API key}" \
  "https://apergrex.ru/franklab/api/v1/webhooks/deliveries"

Delivery history

The partner's last 50 deliveries with statuses (pending/delivering/delivered/uncertain/dead_lettered), attempts and response codes.

Parameters (2)
endpointIdquery · stringFilter by endpoint
statusquery · string · pending | delivering | delivered | uncertain | dead_letteredFilter by delivery status
Responses
  • 200 Delivery list
  • 401 Missing or invalid API key
  • 403 Legacy service keys are rejected: a partner API key is required
  • 429 Rate limit exceeded (default 60 requests/minute per API key; session-authenticated cabinet operations are counted per partner); the Retry-After header gives seconds until the window resets
post/v1/webhooks/deliveries/{id}/replay

Authentication: partner API key.

Request example (replace sample values)
curl --fail-with-body -X POST \
  -H "X-API-Key: ${FRANKLAB_KEY:?Set your API key}" \
  "https://apergrex.ru/franklab/api/v1/webhooks/deliveries/${FRANKLAB_ID:?Set the resource identifier}/replay"

Replay a delivery

Re-queues a delivery (uncertain, dead_lettered or delivered) under the same eventId. Limit: 30 requests/min.

Parameters (1)
id *path · stringDelivery identifier
Responses
  • 200 Delivery re-queued
  • 401 Missing or invalid API key
  • 403 Legacy service keys are rejected: a partner API key is required
  • 429 Rate limit exceeded (default 60 requests/minute per API key; session-authenticated cabinet operations are counted per partner); the Retry-After header gives seconds until the window resets
get/v1/webhooks/endpoints

Authentication: partner API key.

Request example (replace sample values)
curl --fail-with-body -X GET \
  -H "X-API-Key: ${FRANKLAB_KEY:?Set your API key}" \
  "https://apergrex.ru/franklab/api/v1/webhooks/endpoints"

List webhook endpoints

The partner's endpoints: URL, subscriptions, active flag. Secrets are never returned.

Responses
  • 200 Endpoint list
  • 401 Missing or invalid API key
  • 403 Legacy service keys are rejected: a partner API key is required
  • 429 Rate limit exceeded (default 60 requests/minute per API key; session-authenticated cabinet operations are counted per partner); the Retry-After header gives seconds until the window resets
post/v1/webhooks/endpoints

Authentication: partner API key.

Request example (replace sample values)
curl --fail-with-body -X POST \
  -H "X-API-Key: ${FRANKLAB_KEY:?Set your API key}" \
  -H "Content-Type: application/json" \
  --data-raw '{"url":"https://example.com/franklab-hook","eventTypes":["billing.settled","task.succeeded"]}' \
  "https://apergrex.ru/franklab/api/v1/webhooks/endpoints"

Register an endpoint

Creates an endpoint; the whsec_… secret is returned exactly once. The URL must be public HTTPS; internal addresses are rejected. Up to 10 endpoints per partner. Limit: 10 requests/min.

Request body
url *stringPublic HTTPS receiver URL
eventTypes *arrayEvent types (billing.settled, billing.refunded, billing.topup.confirmed, billing.low_balance, billing.invoice.status_changed, task.succeeded, task.failed, task.refunded, webhook.test)
descriptionstringLabel (up to 140 chars)
Responses
  • 201 Endpoint created; the secret is shown once
  • 401 Missing or invalid API key
  • 403 Legacy service keys are rejected: a partner API key is required
  • 429 Rate limit exceeded (default 60 requests/minute per API key; session-authenticated cabinet operations are counted per partner); the Retry-After header gives seconds until the window resets
delete/v1/webhooks/endpoints/{id}

Authentication: partner API key.

Request example (replace sample values)
curl --fail-with-body -X DELETE \
  -H "X-API-Key: ${FRANKLAB_KEY:?Set your API key}" \
  "https://apergrex.ru/franklab/api/v1/webhooks/endpoints/${FRANKLAB_ID:?Set the resource identifier}"

Delete an endpoint

Deletes one of your endpoints; its pending deliveries go with it.

Parameters (1)
id *path · stringEndpoint identifier
Responses
  • 200 Endpoint deleted
  • 401 Missing or invalid API key
  • 403 Legacy service keys are rejected: a partner API key is required
  • 429 Rate limit exceeded (default 60 requests/minute per API key; session-authenticated cabinet operations are counted per partner); the Retry-After header gives seconds until the window resets
post/v1/webhooks/endpoints/{id}/rotate-secret

Authentication: partner API key.

Request example (replace sample values)
curl --fail-with-body -X POST \
  -H "X-API-Key: ${FRANKLAB_KEY:?Set your API key}" \
  "https://apergrex.ru/franklab/api/v1/webhooks/endpoints/${FRANKLAB_ID:?Set the resource identifier}/rotate-secret"

Rotate the secret

Generates a new signing secret; the new value is returned exactly once. The old secret keeps working for 6 more hours (grace window): deliveries are signed with the new secret (X-Franklab-Signature) and additionally with the previous one (X-Franklab-Signature-Previous) — during the grace window the receiver may verify either signature. The response carries previousSecretValidUntil, the end of the window. After the window the previous secret is wiped. Limit: 10 requests/min.

Parameters (1)
id *path · stringEndpoint identifier
Responses
  • 200 The new secret
  • 401 Missing or invalid API key
  • 403 Legacy service keys are rejected: a partner API key is required
  • 429 Rate limit exceeded (default 60 requests/minute per API key; session-authenticated cabinet operations are counted per partner); the Retry-After header gives seconds until the window resets
post/v1/webhooks/endpoints/{id}/test

Authentication: partner API key.

Request example (replace sample values)
curl --fail-with-body -X POST \
  -H "X-API-Key: ${FRANKLAB_KEY:?Set your API key}" \
  "https://apergrex.ru/franklab/api/v1/webhooks/endpoints/${FRANKLAB_ID:?Set the resource identifier}/test"

Send a test event

Enqueues a webhook.test event for EXACTLY this endpoint — verify receipt and the signature. Limit: 6 requests/min.

Parameters (1)
id *path · stringEndpoint identifier
Responses
  • 200 Event enqueued
  • 401 Missing or invalid API key
  • 403 Legacy service keys are rejected: a partner API key is required
  • 429 Rate limit exceeded (default 60 requests/minute per API key; session-authenticated cabinet operations are counted per partner); the Retry-After header gives seconds until the window resets
/en/docs/reference.md
Need help?Contact support