JavaScript
import Surge from '@surgeapi/node';
const client = new Surge({
apiKey: process.env['SURGE_API_KEY'], // This is the default and can be omitted
});
const response = await client.campaigns.resendBrandVerificationMessage(
'acct_01j9a43avnfqzbjfch6pygv1td',
);
console.log(response.status);import os
from surge import Surge
client = Surge(
api_key=os.environ.get("SURGE_API_KEY"), # This is the default and can be omitted
)
response = client.campaigns.resend_brand_verification_message(
"acct_01j9a43avnfqzbjfch6pygv1td",
)
print(response.status)require "surge_api"
surge = SurgeAPI::Client.new(api_key: "My API Key")
response = surge.campaigns.resend_brand_verification_message("acct_01j9a43avnfqzbjfch6pygv1td")
puts(response)curl --request POST \
--url https://api.surge.app/accounts/{account_id}/brand_verification_messages \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.surge.app/accounts/{account_id}/brand_verification_messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.surge.app/accounts/{account_id}/brand_verification_messages"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.surge.app/accounts/{account_id}/brand_verification_messages")
.header("Authorization", "Bearer <token>")
.asString();{
"status": "enqueued"
}{
"error": {
"message": "The requested resource could not be found.",
"type": "not_found"
}
}Campaigns
Resend brand verification OTP
Enqueues an SMS OTP for a sole proprietor brand awaiting identity verification.
POST
/
accounts
/
{account_id}
/
brand_verification_messages
JavaScript
import Surge from '@surgeapi/node';
const client = new Surge({
apiKey: process.env['SURGE_API_KEY'], // This is the default and can be omitted
});
const response = await client.campaigns.resendBrandVerificationMessage(
'acct_01j9a43avnfqzbjfch6pygv1td',
);
console.log(response.status);import os
from surge import Surge
client = Surge(
api_key=os.environ.get("SURGE_API_KEY"), # This is the default and can be omitted
)
response = client.campaigns.resend_brand_verification_message(
"acct_01j9a43avnfqzbjfch6pygv1td",
)
print(response.status)require "surge_api"
surge = SurgeAPI::Client.new(api_key: "My API Key")
response = surge.campaigns.resend_brand_verification_message("acct_01j9a43avnfqzbjfch6pygv1td")
puts(response)curl --request POST \
--url https://api.surge.app/accounts/{account_id}/brand_verification_messages \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.surge.app/accounts/{account_id}/brand_verification_messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.surge.app/accounts/{account_id}/brand_verification_messages"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.surge.app/accounts/{account_id}/brand_verification_messages")
.header("Authorization", "Bearer <token>")
.asString();{
"status": "enqueued"
}{
"error": {
"message": "The requested resource could not be found.",
"type": "not_found"
}
}