Provision Account
Creates everything a newly verified person needs: the account, their membership, the sample MCP, then a Polar customer and the billing row carrying its id — the customer before the row, so a billing row is never written without one.
An invitation short-circuits all of it: an address somebody already invited joins that account instead, with the role it was given.
Called by the dashboard the moment a magic link produces a session, which is the only moment a verified user exists and has not yet been settled. Supabase has no “email verified” hook, and this is the closest honest thing to one: nothing can reach it without a verified session.
Idempotent. Somebody who already has an account gets their context back unchanged, so a second link, a refresh or a stale tab costs one query.
curl --request POST \
--url https://api.getmcpulse.com/v1/account/provisionimport requests
url = "https://api.getmcpulse.com/v1/account/provision"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.getmcpulse.com/v1/account/provision', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getmcpulse.com/v1/account/provision",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.getmcpulse.com/v1/account/provision"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.getmcpulse.com/v1/account/provision")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getmcpulse.com/v1/account/provision")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodynullResponse
OK
The response is of type unknown.
curl --request POST \
--url https://api.getmcpulse.com/v1/account/provisionimport requests
url = "https://api.getmcpulse.com/v1/account/provision"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.getmcpulse.com/v1/account/provision', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getmcpulse.com/v1/account/provision",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.getmcpulse.com/v1/account/provision"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.getmcpulse.com/v1/account/provision")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getmcpulse.com/v1/account/provision")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodynull