cURL
curl --request DELETE \
--url http://base.url.com/profiles/{smtp_id} \
--header 'x-phishy-api-key: <api-key>'import requests
url = "http://base.url.com/profiles/{smtp_id}"
headers = {"x-phishy-api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-phishy-api-key': '<api-key>'}};
fetch('http://base.url.com/profiles/{smtp_id}', 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 => "http://base.url.com/profiles/{smtp_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-phishy-api-key: <api-key>"
],
]);
$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 := "http://base.url.com/profiles/{smtp_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-phishy-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("http://base.url.com/profiles/{smtp_id}")
.header("x-phishy-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://base.url.com/profiles/{smtp_id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Delete.new(url)
request["x-phishy-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"name": "<string>",
"method": "<string>",
"fromAddress": "<string>",
"mailServer": "<string>",
"mailServerPort": 123,
"customPort": false,
"useSSLTLS": false,
"lastUpdatedBy": "<string>",
"lastModified": "<string>"
}
]{
"error": 123,
"message": "<string>"
}{
"error": 403,
"message": "You do not have permission to access this resource."
}SMTP Profiles
Delete Profile By Id
Deletes a profile based on the ID supplied
DELETE
/
profiles
/
{smtp_id}
cURL
curl --request DELETE \
--url http://base.url.com/profiles/{smtp_id} \
--header 'x-phishy-api-key: <api-key>'import requests
url = "http://base.url.com/profiles/{smtp_id}"
headers = {"x-phishy-api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-phishy-api-key': '<api-key>'}};
fetch('http://base.url.com/profiles/{smtp_id}', 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 => "http://base.url.com/profiles/{smtp_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-phishy-api-key: <api-key>"
],
]);
$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 := "http://base.url.com/profiles/{smtp_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-phishy-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("http://base.url.com/profiles/{smtp_id}")
.header("x-phishy-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://base.url.com/profiles/{smtp_id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Delete.new(url)
request["x-phishy-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"name": "<string>",
"method": "<string>",
"fromAddress": "<string>",
"mailServer": "<string>",
"mailServerPort": 123,
"customPort": false,
"useSSLTLS": false,
"lastUpdatedBy": "<string>",
"lastModified": "<string>"
}
]{
"error": 123,
"message": "<string>"
}{
"error": 403,
"message": "You do not have permission to access this resource."
}Authorizations
Path Parameters
Response
Profile deleted
Name of the user
Method used for the profile
Originating address of the profile
Mail server address used for the profile
Port used by the mail server
Indicates if a custom port is used
Indicates if SSL/TLS is used for the connection
User who last updated the profile
Date and time when the profile was last modified
