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.).sftp
(object, optional): SFTP deployment configuration.host
(string, required ifsftp
provided): SFTP host.port
(number, optional): SFTP port.username
(string, required ifhost
provided): SFTP username.password
(string, required ifhost
provided): 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
).
Notes:
- If
sftp.password
is sent, the value is stored securely and the response will include"password": "set"
as a placeholder. - The created site is flagged with
whitelabel
anduninitialized
, owned by:userId
, and added to their team.
Example Request
json
{
"title": "New Site 1",
"baseUrl": "https://example.com",
"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,
"flags": ["whitelabel", "uninitialized"],
"properties": { "whiteLabelId": "<whiteLabelId>" },
"title": "New Site 1",
"baseUrl": "https://example.com",
"sftp": {
"host": "sftp.example.com",
"port": 22,
"username": "deploy",
"password": "set",
"baseDir": "/public_html"
}
}