Appearance
White Label API
The White Label API allows you to manage users within your white label instance. The Base URL of the API endpoint is:
https://app.webinice.net/api
Authentication
All API requests must be authenticated with an API key. The API key must be included in the Authorization header of your request as a Bearer token.
Authorization: Bearer <YourApiKey>
You can find your API key in the white label configuration.
Endpoints
Create or Update a User
Creates a new user or updates an existing user if they already exist for the given email address.
POST /whitelabel/:whiteLabelId/user
Parameters
:whiteLabelId(string, required): The ID of your white label instance.
Body
email(string, required): The email address of the user.displayName(string, optional): The display name of the user.externalId(string, optional): An external ID you can use to reference the user in your own system.
Example Request
json
{
"email": "user@example.com",
"displayName": "John Doe",
"externalId": "your-internal-id-123"
}Response
Returns the user object.
json
{
"uid": "some-firebase-uid",
"email": "user@example.com",
"displayName": "John Doe",
"externalId": "your-internal-id-123"
}List Users
Retrieves a list of all users for your white label instance.
GET /whitelabel/:whiteLabelId/user
Parameters
:whiteLabelId(string, required): The ID of your white label instance.
Response
Returns an array of user objects.
json
[
{
"uid": "some-firebase-uid",
"email": "user@example.com",
"displayName": "John Doe",
"externalId": "your-internal-id-123"
}
]Count Users
Retrieves the total number of users for your white label instance.
GET /whitelabel/:whiteLabelId/user/count
Parameters
:whiteLabelId(string, required): The ID of your white label instance.
Response
Returns an object with the total count of users.
json
{
"count": 42
}Get a single User
Retrieves a single user by their user ID.
GET /whitelabel/:whiteLabelId/user/:userId
Parameters
:whiteLabelId(string, required): The ID of your white label instance.:userId(string, required): The ID of the user to retrieve.
Response
Returns the user object.
json
{
"uid": "some-firebase-uid",
"email": "user@example.com",
"displayName": "John Doe",
"externalId": "your-internal-id-123"
}Delete a User
Deletes a user from your white label instance.
DELETE /whitelabel/:whiteLabelId/user/:userId
Parameters
:whiteLabelId(string, required): The ID of your white label instance.:userId(string,required): The ID of the user to delete.
Response
Returns a confirmation message.
json
{
"deleted": true,
"user": {
"uid": "some-firebase-uid",
"email": "user@example.com"
}
}Create a User Login Link
Generates a one-time login link for a specific user.
POST /whitelabel/:whiteLabelId/user/:userId/loginLink
Parameters
:whiteLabelId(string, required): The ID of your white label instance.:userId(string, required): The ID of the user for whom to create the login link.
Response
Returns an object containing the login link.
json
{
"link": "https://your-whitelabel-url.com/auth/action?apiKey=...&mode=signIn&oobCode=..."
}Create a Site for a User
Creates a new site for a specific user in your white label instance.
POST /whitelabel/:whiteLabelId/user/:userId/site
Parameters
:whiteLabelId(string, required): The ID of your white label instance.:userId(string, required): The ID of the user who will own the site.
Body
title(string, optional): Site title. Defaults to"Site".baseUrl(string, optional): Public base URL of the site (for canonical links etc.).externalId(string, optional): External site identifier (for mapping of external systems like Plesk).sftp(object, optional): SFTP deployment configuration.host(string, required ifsftpprovided): SFTP host.port(number, optional): SFTP port.username(string, required ifhostprovided): SFTP username.password(string, required ifhostprovided): SFTP password. Stored securely in a vault and not returned in clear text.baseDir(string, optional): Base directory on the server (e.g./public_html).
ftp(object, optional): FTP/FTPS deployment configuration.host(string, required ifftpprovided): FTP host.port(number, optional): FTP port (e.g. 21, or 990 for implicit TLS).username(string, required ifhostprovided): FTP username.password(string, required ifhostprovided): FTP password. Stored securely in a vault and not returned in clear text.baseDir(string, optional): Base directory on the server (e.g./public_html).secure(boolean | "implicit", optional):true= explicit FTPS (AUTH TLS),false= plain FTP,"implicit"= FTPS implicit mode.
Notes:
- If
sftp.passwordis sent, the value is stored securely and the response will include"password": "set"as a placeholder. - If
ftp.passwordis sent, the value is stored securely and the response will include"password": "set"as a placeholder. - You can send both
sftpandftpconfigs; only the provided ones are stored. - The created site is flagged with
whitelabelanduninitialized, owned by:userId, and added to their team.
Example Request
json
{
"title": "New Site 1",
"baseUrl": "https://example.com",
"externalId": "123",
"ftp": {
"host": "ftp.example.com",
"port": 21,
"username": "deploy",
"password": "super-secret",
"baseDir": "/public_html",
"secure": true
},
"sftp": {
"host": "sftp.example.com",
"port": 22,
"username": "deploy",
"password": "super-secret",
"baseDir": "/public_html"
}
}Response
Returns the created site object.
json
{
"id": "site_abc123",
"type": "site",
"author": "<userId>",
"team": ["<userId>"],
"created": 1710000000000,
"updated": 1710000000000,
"externalId": "123",
"flags": ["whitelabel", "uninitialized"],
"properties": { "whiteLabelId": "<whiteLabelId>" },
"title": "New Site 1",
"baseUrl": "https://example.com",
"ftp": {
"host": "ftp.example.com",
"port": 21,
"username": "deploy",
"password": "set",
"baseDir": "/public_html",
"secure": true
},
"sftp": {
"host": "sftp.example.com",
"port": 22,
"username": "deploy",
"password": "set",
"baseDir": "/public_html"
}
}Sync Sites for a User
Creates or updates multiple sites for a specific user in your white label instance. Sites are matched by externalId.
POST /whitelabel/:whiteLabelId/user/:userId/sites
Parameters
:whiteLabelId(string, required): The ID of your white label instance.:userId(string, required): The ID of the user who will own the sites.
Body
sites(array, required): List of sites to create or update.title(string, required): Site title.externalId(string, required): External site identifier (used for matching).baseUrl(string, optional): Public base URL of the site (for canonical links etc.).
Notes:
- Existing sites are looked up by
externalId. If found,title,baseUrl, andupdatedare changed. - If no matching site exists, a new one is created (same flags/properties as the single-site create endpoint).
- If any item fails validation, the response includes an entry in
errorsand the endpoint responds with status500.
Example Request
json
{
"sites": [
{
"title": "Company Site",
"externalId": "plesk-1001",
"baseUrl": "https://company.example.com"
},
{
"title": "Portfolio",
"externalId": "plesk-1002"
}
]
}Response
Returns a map keyed by externalId and a list of errors (if any).
json
{
"result": {
"plesk-1001": {
"id": "site_abc123",
"type": "site",
"author": "<userId>",
"team": ["<userId>"],
"created": 1710000000000,
"updated": 1710000000000,
"externalId": "plesk-1001",
"flags": ["whitelabel", "uninitialized"],
"properties": { "whiteLabelId": "<whiteLabelId>" },
"title": "Company Site",
"baseUrl": "https://company.example.com"
},
...
},
"errors": []
}