Create Magic Link
curl --request POST \
--url https://api.rampartcorporation.com/v2/magic-link \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-client-id: <x-client-id>' \
--data '
{
"email": "test@example.com",
"first_name": "John",
"last_name": "Doe",
"client_name": "Acme Inc"
}
'import requests
url = "https://api.rampartcorporation.com/v2/magic-link"
payload = {
"email": "test@example.com",
"first_name": "John",
"last_name": "Doe",
"client_name": "Acme Inc"
}
headers = {
"x-client-id": "<x-client-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-client-id': '<x-client-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
email: 'test@example.com',
first_name: 'John',
last_name: 'Doe',
client_name: 'Acme Inc'
})
};
fetch('https://api.rampartcorporation.com/v2/magic-link', 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.rampartcorporation.com/v2/magic-link",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'test@example.com',
'first_name' => 'John',
'last_name' => 'Doe',
'client_name' => 'Acme Inc'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-client-id: <x-client-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.rampartcorporation.com/v2/magic-link"
payload := strings.NewReader("{\n \"email\": \"test@example.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"client_name\": \"Acme Inc\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-client-id", "<x-client-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.rampartcorporation.com/v2/magic-link")
.header("x-client-id", "<x-client-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"test@example.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"client_name\": \"Acme Inc\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rampartcorporation.com/v2/magic-link")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-client-id"] = '<x-client-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"test@example.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"client_name\": \"Acme Inc\"\n}"
response = http.request(request)
puts response.read_body{
"url": "https://partner.rampartcorporation.com/magic-link?token=1234567890"
}Magic Link
Create Magic Link
Create a magic link for the given email address.
Create Magic Link
curl --request POST \
--url https://api.rampartcorporation.com/v2/magic-link \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-client-id: <x-client-id>' \
--data '
{
"email": "test@example.com",
"first_name": "John",
"last_name": "Doe",
"client_name": "Acme Inc"
}
'import requests
url = "https://api.rampartcorporation.com/v2/magic-link"
payload = {
"email": "test@example.com",
"first_name": "John",
"last_name": "Doe",
"client_name": "Acme Inc"
}
headers = {
"x-client-id": "<x-client-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-client-id': '<x-client-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
email: 'test@example.com',
first_name: 'John',
last_name: 'Doe',
client_name: 'Acme Inc'
})
};
fetch('https://api.rampartcorporation.com/v2/magic-link', 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.rampartcorporation.com/v2/magic-link",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'test@example.com',
'first_name' => 'John',
'last_name' => 'Doe',
'client_name' => 'Acme Inc'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-client-id: <x-client-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.rampartcorporation.com/v2/magic-link"
payload := strings.NewReader("{\n \"email\": \"test@example.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"client_name\": \"Acme Inc\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-client-id", "<x-client-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.rampartcorporation.com/v2/magic-link")
.header("x-client-id", "<x-client-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"test@example.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"client_name\": \"Acme Inc\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rampartcorporation.com/v2/magic-link")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-client-id"] = '<x-client-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"test@example.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"client_name\": \"Acme Inc\"\n}"
response = http.request(request)
puts response.read_body{
"url": "https://partner.rampartcorporation.com/magic-link?token=1234567890"
}Authorizations
Bearer authentication header of the form Bearer <API_KEY>.
Headers
Client ID for authentication
Body
application/json
Response
200 - application/json
Successfully created magic link
The URL of the magic link.
Example:
"https://partner.rampartcorporation.com/magic-link?token=1234567890"
⌘I
