Generate a new import-ready configuration in one request
Send configuration, server, and tweak values from your backend and receive encrypted configuration text ready to import. You can optionally apply Cloud Protect, export the result to the cloud, or use both together.
Quick rule: Existing Panel configuration: Client API. New configuration from request data: Business API.
The credentials are separate: manage the Client API credential in Panel > API > Client API and the Business API credential in Panel > API > Business API.
Overview
The endpoint validates the complete payload, builds the configuration and resources in memory, and encrypts the export. By default it returns that importable text directly. Optional delivery fields can wrap it with Cloud Protect and/or store it as a cloud share. It never reads or modifies configurations already saved in Panel; use Client API for that workflow.
Authentication
Send the credential using X-API-Key or Authorization Bearer. If both are present, X-API-Key takes precedence.
Transport
Example
Notes
X-API-Key
X-API-Key: YOUR_BUSINESS_API_KEY
Recommended explicit header for server-to-server requests.
Authorization
Authorization: Bearer YOUR_BUSINESS_API_KEY
Standard Bearer authentication alternative.
Get your Business API key:
Generate a Business API credential to receive it once, or rotate an existing credential if you no longer have it.
Open Business API account management.
Keep credentials server-side. Never embed the Business API credential in a mobile app, browser bundle, public repository, or client-visible log.
Complete request
This example includes configuration fields, one server, and one tweak. Omit optional fields that your generated configuration does not need.
Only name is required. Omitting servers and tweaks produces a valid generated configuration with empty resource lists.
{
"name": "Minimal Partner Config"
}
Cloud Protect and cloud export
cloud_protected and export_to_cloud are independent. Enable either one or combine them. expiry and is_one_time_import are valid only when export_to_cloud is true.
Always generated by the service as a lowercase 32-character UUID hex value, matching configurations created in Panel. It is returned in X-Configuration-Key and in the generated root object.
A direct URL the client can use as the configuration update source. Use HTTPS and return importable configuration content from that URL; omit it when the file should not update from a remote source.
A message displayed with the generated configuration. HTML and configuration message placeholders are supported; line breaks and surrounding whitespace are preserved.
The local date and optional time after which the client must no longer use the configuration. Use YYYY-MM-DD HH:mm, or legacy YYYY-MM-DD for end-of-day expiry. Omit or send null for no expiry.
The access password recipients must supply when opening the configuration. Send plaintext over HTTPS; the service hashes it before export and never returns or stores the plaintext.
A local allowlist of app Device IDs, separated by semicolons, such as ID1;ID2;ID3. Omit it to allow any device. Cloud HWID lookup is not available for generated files.
App display names or Android package names to block while the configuration is used. Matching is case-insensitive. Separate multiple entries with new lines or semicolons; for example WhatsApp;com.example.two.
When true, permits recipients to view or reuse server connection details. unlock_user_pass automatically enables it. Defaults to false and is superseded by unlock_all.
When true, permits recipients to view server usernames and passwords and automatically enables unlock_server. Defaults to false and is superseded by unlock_all.
When true, allows the servers and tweaks in this configuration to be offered as shared resources to other configurations in the app. Defaults to false.
When true, the recipient can export and reshare the generated configuration from the app. Defaults to false when omitted, keeping the file locked to its recipient.
When true, marks the generated payload for Cloud Protect, wraps it in a protected envelope, and registers the key material needed by the app. Defaults to false.
When true, uploads the generated result to the configured cloud-share disk and returns the short app import link as the response body. Defaults to false.
An optional array of server objects. Omit it or send an empty array for no servers. Items are generated only for this response and are not saved in Panel.
An optional array of tweak objects. Omit it or send an empty array for no tweaks. Items are generated only for this response and are not saved in Panel.
Message placeholders
The message field can contain these placeholders. They are resolved while the generated configuration is built, before the encrypted text response is returned.
[config_name] — Configuration name.
[created_at] — Creation date and time in YYYY-MM-DD HH:mm:ss format.
[created_date] — Creation date in YYYY-MM-DD format.
[updated_at] — Last-updated date and time in YYYY-MM-DD HH:mm:ss format.
[updated_date] — Last-updated date in YYYY-MM-DD format.
[server_count] — Number of servers included in the generated configuration.
[tweak_count] — Number of tweaks included in the generated configuration.
[server_list] — Server names in alphabetical order, separated by commas.
[tweak_list] — Tweak names in alphabetical order, separated by commas.
Placeholders are case-sensitive. Unknown placeholders remain unchanged. Empty server or tweak lists resolve to an empty string.
The top-level version is always 5 and matches the real data cipher. version_code and version_name come from Business API administration. Callers do not send version fields.
When unlock_all is true, device and app restrictions, expiry, password, HWID lock, individual unlock flags, and custom-resource mode are normalized off in the generated export. Cloud Protect and cloud export remain independent delivery choices.
Server and tweak fields are tunnel-specific, matching the Configuration form. Sending a field that is hidden for the selected tunnel returns HTTP 422. Server and tweak names and categories are limited to 100 characters.
Required for OVPN, SSH, DNSTT, and UDP Hysteria tunnel types.
Connection hosts and credentials in the tunnel-specific format shown below. Separators such as semicolons, colons, and @ are part of the value and must not be URL-encoded.
IPv6 value formats:
Keep host-only addresses unbracketed, for example 2001:db8::10.
When a port follows, wrap each IPv6 address in brackets, for example [2001:db8::10]:22@user:pass.
Multiple candidates may share one port and credentials, for example [2001:db8::10];[2001:db8::11]:22@user:pass.
Tweak examples include an IPv6 proxy or UDP DNSTT resolver: [2001:db8::10]:8080 or [2001:db8::53]:53.
Optional HTTP payload for OVPN/SSH-style tunnels. Use app tokens such as [crlf] for line boundaries; line breaks and surrounding whitespace are preserved exactly.
Optional UDP Hysteria SNI value. [host], [ip], [ssh_host], [rlb], [bughost], [cf], their uppercase forms, and the existing extended host aliases resolve to the selected Hysteria endpoint host; [proxy] is not supported. This belongs to the tweak and follows the app's unlock_payload protection.
A successful request returns plain text, not a JSON wrapper. Direct mode returns the generated import content; cloud mode returns the short cloud import link.
Read the response body as text. X-Configuration-Key identifies the generated configuration. X-Cloud-Protected reports whether Cloud Protect was applied, and X-Export-Mode is direct or cloud. Cache-Control: no-store tells intermediaries and clients not to retain the sensitive response.
Cloud export response body
When export_to_cloud is true, the body is the app import link. The cloud share stores the generated content; if cloud_protected is also true, the stored content is the Cloud Protect envelope.
UTC calendar-day limit, consumed requests, remaining requests, and reset time.
Retry-After
Seconds until retry, included on a 429 response.
A valid authenticated request consumes the per-minute limit, including a request that later fails payload validation.
Daily quota is consumed only after the payload passes validation and generation is about to run.
A generation that fails after validation (HTTP 500) does not refund its consumed daily quota unit.
Reset header values are Unix timestamps. Daily windows reset at 00:00 UTC; minute windows are aligned to UTC epoch minutes.
Credential rotation does not reset usage because counters belong to the Business API account, not its credential.
JSON errors
HTTP status
Meaning
401
The credential is missing, malformed, or invalid.
403
The Business API account, its owner, or access status is inactive.
413
The generated result exceeds the configured maximum size for cloud export.
422
One or more configuration, server, or tweak parameters failed validation.
429
The per-minute limit, daily quota, or invalid-authentication limit was exceeded.
500
An unexpected generation, Cloud Protect, cloud upload, or server failure occurred. The consumed daily quota unit is not refunded. Do not retry indefinitely.
503
Quota enforcement is temporarily unavailable, or the API is in maintenance mode.
Validation error example
{
"success": false,
"message": "The given data was invalid.",
"errors": {
"name": ["The name field is required."]
}
}
Daily quota error example
{
"success": false,
"message": "The Business API daily quota has been exceeded.",
"error": "daily_quota_exceeded",
"scope": "daily",
"daily_quota": {
"limit": 2000,
"used": 2000,
"remaining": 0,
"reset_at": 1783814400,
"reset_at_iso8601": "2026-07-12T00:00:00+00:00",
"retry_after": 22500
}
}
A per-minute 429 has error rate_limit_exceeded and places the same metadata shape under rate_limit.
A quota-enforcement 503 has error quota_service_unavailable and a Retry-After header; retry only after that interval. A maintenance 503 from the global API status carries a status field instead, has no Retry-After header, and clears when the API status returns to available.
Behavior and security
Generated configuration, server, and tweak entities are built in memory and are not saved to Panel. Cloud Protect stores its key material, and export_to_cloud stores share metadata plus the generated content so the import link can work.
unique_key is system-owned for the configuration and every server and tweak. Callers must not send it. Each successful generation, including a retry, receives fresh values; no stored record is created or updated.
Cloud Protect and cloud export are optional delivery features. Cloud update, cloud password, and cloud HWID remain disabled because the generated configuration itself is not saved. Generated configurations are locked to their recipient by default; send allow_reshare: true to permit re-export.
Each panel user has one Business API account and one current credential.
Send requests only over HTTPS and apply strict outbound timeout and retry limits.
Do not log credentials, configuration passwords, private keys, or full generated response bodies.
Rotate the credential immediately after suspected exposure. The previous credential stops authenticating, while daily usage remains unchanged.
Credential display is one-time only. The panel stores a hash and a short preview, not a recoverable copy. Losing the secret requires credential rotation.