Configure Email Delivery
curl --request POST \
--url https://api.lobstr.io/v1/delivery \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"email": "<string>",
"notifications": true
}
'import requests
url = "https://api.lobstr.io/v1/delivery"
payload = {
"email": "<string>",
"notifications": True
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({email: '<string>', notifications: true})
};
fetch('https://api.lobstr.io/v1/delivery', 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.lobstr.io/v1/delivery",
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' => '<string>',
'notifications' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$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.lobstr.io/v1/delivery"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"notifications\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
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.lobstr.io/v1/delivery")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"email\": \"<string>\",\n \"notifications\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lobstr.io/v1/delivery")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"email\": \"<string>\",\n \"notifications\": true\n}"
response = http.request(request)
puts response.read_body{
"email": "<string>",
"notifications": true,
"notifications_activation_date": "<string>"
}Delivery
Configure Email Delivery
Set up email notifications for squid run completions
POST
/
v1
/
delivery
Configure Email Delivery
curl --request POST \
--url https://api.lobstr.io/v1/delivery \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"email": "<string>",
"notifications": true
}
'import requests
url = "https://api.lobstr.io/v1/delivery"
payload = {
"email": "<string>",
"notifications": True
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({email: '<string>', notifications: true})
};
fetch('https://api.lobstr.io/v1/delivery', 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.lobstr.io/v1/delivery",
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' => '<string>',
'notifications' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$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.lobstr.io/v1/delivery"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"notifications\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
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.lobstr.io/v1/delivery")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"email\": \"<string>\",\n \"notifications\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lobstr.io/v1/delivery")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"email\": \"<string>\",\n \"notifications\": true\n}"
response = http.request(request)
puts response.read_body{
"email": "<string>",
"notifications": true,
"notifications_activation_date": "<string>"
}Configure email delivery to receive notifications when your squid runs complete. You can choose to receive immediate notifications or attach results for later use.
Headers
string
required
Your API authentication token. Value:
Token YOUR_API_KEYstring
required
Must be application/json. Value:
application/jsonQuery Parameters
string
required
The unique identifier (hash) of the squid for which to configure email delivery. Example:
c106a44a98044ef18acc59986ae10967Request Body
string
required
The email address to receive notifications. Example:
"user@example.com"boolean
required
Set to true to send email immediately upon completion, or false to attach it for later use. Example:
trueResponse Field Explanations
string
The configured email address. Example:
"user@example.com"boolean
Whether immediate notifications are enabled. Example:
truestring
ISO timestamp when notifications were activated. Example:
"2025-02-26T15:48:48.538226"Set notifications to false if you want to manage email delivery manually rather than receiving automatic notifications.
The notifications_activation_date is automatically set when you enable notifications for the first time.
Make sure the email address is valid and can receive emails. Invalid addresses will cause delivery failures.
Use the Test Email endpoint to verify your email configuration before activating notifications.
Code Examples
curl -X POST "https://api.lobstr.io/v1/delivery?squid=YOUR_SQUID_HASH" \
-H "Authorization: Token YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"notifications": true
}'
import requests
url = "https://api.lobstr.io/v1/delivery"
headers = {
"Authorization": "Token YOUR_API_KEY",
"Content-Type": "application/json"
}
params = {
"squid": "YOUR_SQUID_HASH"
}
payload = {
"email": "user@example.com",
"notifications": True
}
response = requests.post(url, headers=headers, params=params, json=payload)
result = response.json()
print("Email delivery configured successfully!")
print(f"Email: {result['email']}")
print(f"Notifications: {result['notifications']}")
if 'notifications_activation_date' in result:
print(f"Activated on: {result['notifications_activation_date']}")
Response
201
{
"email": "user@example.com",
"notifications": true,
"notifications_activation_date": "2025-02-26T15:48:48.538226"
}