WLI: Brand creation endpoint — example on a custom backend proxy
Updated today
🔗Creating a new brand/profile by using the API
This example is shown over a button that activates the call, but it can operate automatically without adding any buttons.
Endpoint overview
The GET /admin/add-profile endpoint creates a new brand/profile in a Metricool account from your own web app, without your end user ever visiting Metricool directly.
This guide is split into the same parts as the rest of the following White Label Integration (WLI) examples:
A button in your frontend that triggers the brand creation.
A backend proxy that holds your Metricool API credentials and forwards the request.
This example uses plain HTML/JavaScript and a Python http.server proxy (standard library only, no frameworks), so it can be adapted to any stack.
Prerequisites
You'll need two values from your Metricool account:
Value | Where to find it |
|---|---|
| Menu → Account Settings → API → "REST API Access token" |
| Your Metricool user identifier |
Both are sent on every call: userToken in the X-Mc-Auth request header & userId as a query parameter.
Unlike the other endpoints, this call does not require a blogId — the brand doesn't exist yet when you make the request, so there's nothing to scope it to.
Anyway, if you have an automation that adds automatically the blogId, you can use the one associated with the brand already created when registered in your Metricool account.
Basically, this endpoint works with or without the blogId added in the call.
The following example will continue without adding the blogId, as other sample calls will show that architecture.
— Understand the endpoint —
GET https://app.metricool.com/api/admin/add-profile?userId={userId}Header | Value |
|---|---|
| your |
There's no request body — this is a
GETcall.
In Metricool's Swagger spec (tag Admin Service with description "Creates new profile"), this endpoint is listed with no parameters at all.
The userId requirement comes from the API's general authentication rules, which apply to every call, not from anything specific to this endpoint's own definition.
As mentioned before, blogId query parameter can be included without causing an error, but Metricool ignores it either way.
On success, the endpoint returns 200 with a PublicBlog JS object describing the new brand.
This is a GET request with a side effect — it creates a resource, so it isn't idempotent the way a GET normally is.
A browser prefetch, a crawler following the link, or an accidental double click can create duplicated brands.
Always keep a confirmation step before firing this call, and never expose the route as a plain, unguarded link.
— Call it from the frontend —
A button collects the confirmation and calls your own backend route — not Metricool directly.
Because userId isn't a secret (it's visible in Metricool's own URL as you browse your account), it's safe to include directly in the request your frontend sends:
<button onclick="crearNuevaMarca()">Create new brand</button>
<script>
async function crearNuevaMarca() {
if (!confirm('Create a new brand/profile in Metricool?')) return;
const userId = '${YOUR_METRICOOL_USER_ID}';
const response = await fetch(`/api/admin/add-profile?userId=${userId}`);
// Read as text first: error responses aren't guaranteed to be valid JSON.
const rawText = await response.text();
let details;
try { details = JSON.stringify(JSON.parse(rawText), null, 2); }
catch { details = rawText; }
alert(response.ok ? `Brand created:\n${details}` : `Error (${response.status}):\n${details}`);
}
</script>"crearNuevaMarca" means -createNewBrand-, translated from Spanish.
Proxy configuration is discussed in the first reference below.
— Security checklist —
userTokennever appears in any file served to the browser.Credentials are read from environment variables, not hardcoded.
The button that triggers this call sits behind a confirmation step and isn't reachable as a plain, crawlable link.
If a token was ever committed or exposed client-side, regenerate it immediately from Metricool → Account Settings → API.
— Troubleshooting —
Table B
Sympton | Cause | Fix |
|---|---|---|
| Missing access key | Add the access token ( |
| There's no more room for another brand or a collab is trying to create a new one | Check the maximum number of brands isn't reached yet. |