Create a teammate's key
curl --request POST \
--url https://agent.lanesurf.com/v1/keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Lee Park",
"email": "lee@acmefreight.example.com"
}
'import requests
url = "https://agent.lanesurf.com/v1/keys"
payload = {
"name": "Lee Park",
"email": "lee@acmefreight.example.com"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Lee Park', email: 'lee@acmefreight.example.com'})
};
fetch('https://agent.lanesurf.com/v1/keys', 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://agent.lanesurf.com/v1/keys",
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([
'name' => 'Lee Park',
'email' => 'lee@acmefreight.example.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://agent.lanesurf.com/v1/keys"
payload := strings.NewReader("{\n \"name\": \"Lee Park\",\n \"email\": \"lee@acmefreight.example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://agent.lanesurf.com/v1/keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Lee Park\",\n \"email\": \"lee@acmefreight.example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://agent.lanesurf.com/v1/keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Lee Park\",\n \"email\": \"lee@acmefreight.example.com\"\n}"
response = http.request(request)
puts response.read_body{
"api_key": "ls_live_...",
"key": {
"key_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key_prefix": "ls_live_1a2b",
"role": "broker",
"source": "signup",
"created_at": "2023-11-07T05:31:56Z",
"current": true,
"name": "<string>",
"email": "<string>",
"last_used_at": "2023-11-07T05:31:56Z"
},
"next_step": "<string>"
}{
"error": "invalid API key",
"code": "invalid_api_key",
"missing": [
"<string>"
],
"next_step": "<string>",
"current_rate": 123,
"request_id": "req_0192f3a4-7b1c-7d2e-9f00-1a2b3c4d5e6f"
}{
"error": "invalid API key",
"code": "invalid_api_key"
}{
"error": "invalid API key",
"code": "invalid_api_key",
"missing": [
"<string>"
],
"next_step": "<string>",
"current_rate": 123,
"request_id": "req_0192f3a4-7b1c-7d2e-9f00-1a2b3c4d5e6f"
}{
"error": "invalid API key",
"code": "invalid_api_key",
"missing": [
"<string>"
],
"next_step": "<string>",
"current_rate": 123,
"request_id": "req_0192f3a4-7b1c-7d2e-9f00-1a2b3c4d5e6f"
}{
"error": "too many requests for this API key; slow down",
"code": "rate_limited"
}{
"error": "a Lanesurf system behind the API failed; try again later",
"code": "upstream_error"
}Sign-up, keys and setup API
Create a teammate's key
Make an API key for someone else at your brokerage.
POST
/
v1
/
keys
Create a teammate's key
curl --request POST \
--url https://agent.lanesurf.com/v1/keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Lee Park",
"email": "lee@acmefreight.example.com"
}
'import requests
url = "https://agent.lanesurf.com/v1/keys"
payload = {
"name": "Lee Park",
"email": "lee@acmefreight.example.com"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Lee Park', email: 'lee@acmefreight.example.com'})
};
fetch('https://agent.lanesurf.com/v1/keys', 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://agent.lanesurf.com/v1/keys",
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([
'name' => 'Lee Park',
'email' => 'lee@acmefreight.example.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://agent.lanesurf.com/v1/keys"
payload := strings.NewReader("{\n \"name\": \"Lee Park\",\n \"email\": \"lee@acmefreight.example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://agent.lanesurf.com/v1/keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Lee Park\",\n \"email\": \"lee@acmefreight.example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://agent.lanesurf.com/v1/keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Lee Park\",\n \"email\": \"lee@acmefreight.example.com\"\n}"
response = http.request(request)
puts response.read_body{
"api_key": "ls_live_...",
"key": {
"key_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key_prefix": "ls_live_1a2b",
"role": "broker",
"source": "signup",
"created_at": "2023-11-07T05:31:56Z",
"current": true,
"name": "<string>",
"email": "<string>",
"last_used_at": "2023-11-07T05:31:56Z"
},
"next_step": "<string>"
}{
"error": "invalid API key",
"code": "invalid_api_key",
"missing": [
"<string>"
],
"next_step": "<string>",
"current_rate": 123,
"request_id": "req_0192f3a4-7b1c-7d2e-9f00-1a2b3c4d5e6f"
}{
"error": "invalid API key",
"code": "invalid_api_key"
}{
"error": "invalid API key",
"code": "invalid_api_key",
"missing": [
"<string>"
],
"next_step": "<string>",
"current_rate": 123,
"request_id": "req_0192f3a4-7b1c-7d2e-9f00-1a2b3c4d5e6f"
}{
"error": "invalid API key",
"code": "invalid_api_key",
"missing": [
"<string>"
],
"next_step": "<string>",
"current_rate": 123,
"request_id": "req_0192f3a4-7b1c-7d2e-9f00-1a2b3c4d5e6f"
}{
"error": "too many requests for this API key; slow down",
"code": "rate_limited"
}{
"error": "a Lanesurf system behind the API failed; try again later",
"code": "upstream_error"
}Only for a brokerage that signed up through the API, and only with the key that signed it up. A
brokerage Lanesurf onboarded adds teammates in the Lanesurf dashboard (an owner or admin), and they
sign in from their AI app with their dashboard login. Give the teammate’s name and their work email
at your brokerage’s email domain. The key comes back once.
Authorizations
One key per broker rep or per carrier signup. Keep it secret.
Body
application/json