Create user
marzban_users_createCreates a Marzban VPN user with optional data limit, expiration, inbounds, proxies, and template-based configuration.
Instructions
Creates a new user. dataLimit accepts a human size ("10GB"), expire a relative duration ("30d") or absolute date — both default to unlimited when omitted. templateId fills dataLimit/inbounds/expire from a user template; any field also given explicitly overrides the template value.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| expire | No | e.g. "30d". Omit for no expiration. | |
| status | No | Defaults to active. | |
| proxies | No | Protocol name -> settings, e.g. {"vless": {"id": "<uuid>"}} or {"shadowsocks": {}} to auto-generate credentials. Omit to leave unchanged on update. On create there is no server default — omitting this (without templateId) errors; provide at least one protocol with a matching inbound configured on the panel. | |
| inbounds | No | Protocol name -> inbound tags to restrict this user to. Omit for all inbounds. | |
| username | Yes | ||
| dataLimit | No | e.g. "10GB". Omit or 0 for unlimited. | |
| templateId | No | Create from a user template instead of specifying proxies/inbounds by hand. | |
| onHoldExpireDuration | No | Seconds the user may stay on_hold before expiring, counted from their first connection. Only meaningful when status is on_hold. | |
| dataLimitResetStrategy | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| admin | No | ||
| links | No | ||
| expire | No | ||
| status | Yes | ||
| proxies | Yes | ||
| inbounds | No | ||
| username | Yes | ||
| next_plan | No | ||
| online_at | No | ||
| created_at | Yes | ||
| data_limit | No | data_limit can be 0 or greater | |
| used_traffic | Yes | ||
| sub_updated_at | No | ||
| on_hold_timeout | No | ||
| subscription_url | No | ||
| excluded_inbounds | No | ||
| auto_delete_in_days | No | ||
| sub_last_user_agent | No | ||
| lifetime_used_traffic | No | ||
| on_hold_expire_duration | No | ||
| data_limit_reset_strategy | No | no_reset |