Email manager
Assign multiple emails to an admin
PUT
/
admin
/
emails
/
assign_admin
Assign multiple emails to an admin
curl --request PUT \
--url https://api.helpyousponsor.com/v1/admin/emails/assign_admin \
--header 'Content-Type: application/json' \
--header 'X-HYS-API-Key: <api-key>' \
--data '
{
"email_ids": [
"1,2,3"
],
"admin": {
"id": 542,
"email": "dev@helpyousponsor.com",
"permissions": {},
"activated": 1,
"activation_code": "<string>",
"activated_at": "2017-02-23 04:41:10",
"last_login": "2023-11-22 20:43:34",
"reset_password_code": "<string>",
"first_name": "Leslie",
"last_name": "Jobs",
"created_at": "2017-02-23T04:40:21.000000Z",
"updated_at": "2023-11-22T20:43:34.000000Z",
"client_id": "207",
"group_id": 301,
"email_verified_at": "<string>",
"__hevo__database_name": "apphys_new",
"__hevo__ingested_at": 1678920545435,
"__hevo__marked_deleted": 0,
"__hevo__source_modified_at": 1678920204000,
"onboarding_status": true,
"phone": "<string>"
}
}
'import requests
url = "https://api.helpyousponsor.com/v1/admin/emails/assign_admin"
payload = {
"email_ids": ["1,2,3"],
"admin": {
"id": 542,
"email": "dev@helpyousponsor.com",
"permissions": {},
"activated": 1,
"activation_code": "<string>",
"activated_at": "2017-02-23 04:41:10",
"last_login": "2023-11-22 20:43:34",
"reset_password_code": "<string>",
"first_name": "Leslie",
"last_name": "Jobs",
"created_at": "2017-02-23T04:40:21.000000Z",
"updated_at": "2023-11-22T20:43:34.000000Z",
"client_id": "207",
"group_id": 301,
"email_verified_at": "<string>",
"__hevo__database_name": "apphys_new",
"__hevo__ingested_at": 1678920545435,
"__hevo__marked_deleted": 0,
"__hevo__source_modified_at": 1678920204000,
"onboarding_status": True,
"phone": "<string>"
}
}
headers = {
"X-HYS-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-HYS-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email_ids: ['1,2,3'],
admin: {
id: 542,
email: 'dev@helpyousponsor.com',
permissions: {},
activated: 1,
activation_code: '<string>',
activated_at: '2017-02-23 04:41:10',
last_login: '2023-11-22 20:43:34',
reset_password_code: '<string>',
first_name: 'Leslie',
last_name: 'Jobs',
created_at: '2017-02-23T04:40:21.000000Z',
updated_at: '2023-11-22T20:43:34.000000Z',
client_id: '207',
group_id: 301,
email_verified_at: '<string>',
__hevo__database_name: 'apphys_new',
__hevo__ingested_at: 1678920545435,
__hevo__marked_deleted: 0,
__hevo__source_modified_at: 1678920204000,
onboarding_status: true,
phone: '<string>'
}
})
};
fetch('https://api.helpyousponsor.com/v1/admin/emails/assign_admin', 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.helpyousponsor.com/v1/admin/emails/assign_admin",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'email_ids' => [
'1,2,3'
],
'admin' => [
'id' => 542,
'email' => 'dev@helpyousponsor.com',
'permissions' => [
],
'activated' => 1,
'activation_code' => '<string>',
'activated_at' => '2017-02-23 04:41:10',
'last_login' => '2023-11-22 20:43:34',
'reset_password_code' => '<string>',
'first_name' => 'Leslie',
'last_name' => 'Jobs',
'created_at' => '2017-02-23T04:40:21.000000Z',
'updated_at' => '2023-11-22T20:43:34.000000Z',
'client_id' => '207',
'group_id' => 301,
'email_verified_at' => '<string>',
'__hevo__database_name' => 'apphys_new',
'__hevo__ingested_at' => 1678920545435,
'__hevo__marked_deleted' => 0,
'__hevo__source_modified_at' => 1678920204000,
'onboarding_status' => true,
'phone' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-HYS-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.helpyousponsor.com/v1/admin/emails/assign_admin"
payload := strings.NewReader("{\n \"email_ids\": [\n \"1,2,3\"\n ],\n \"admin\": {\n \"id\": 542,\n \"email\": \"dev@helpyousponsor.com\",\n \"permissions\": {},\n \"activated\": 1,\n \"activation_code\": \"<string>\",\n \"activated_at\": \"2017-02-23 04:41:10\",\n \"last_login\": \"2023-11-22 20:43:34\",\n \"reset_password_code\": \"<string>\",\n \"first_name\": \"Leslie\",\n \"last_name\": \"Jobs\",\n \"created_at\": \"2017-02-23T04:40:21.000000Z\",\n \"updated_at\": \"2023-11-22T20:43:34.000000Z\",\n \"client_id\": \"207\",\n \"group_id\": 301,\n \"email_verified_at\": \"<string>\",\n \"__hevo__database_name\": \"apphys_new\",\n \"__hevo__ingested_at\": 1678920545435,\n \"__hevo__marked_deleted\": 0,\n \"__hevo__source_modified_at\": 1678920204000,\n \"onboarding_status\": true,\n \"phone\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-HYS-API-Key", "<api-key>")
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.put("https://api.helpyousponsor.com/v1/admin/emails/assign_admin")
.header("X-HYS-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email_ids\": [\n \"1,2,3\"\n ],\n \"admin\": {\n \"id\": 542,\n \"email\": \"dev@helpyousponsor.com\",\n \"permissions\": {},\n \"activated\": 1,\n \"activation_code\": \"<string>\",\n \"activated_at\": \"2017-02-23 04:41:10\",\n \"last_login\": \"2023-11-22 20:43:34\",\n \"reset_password_code\": \"<string>\",\n \"first_name\": \"Leslie\",\n \"last_name\": \"Jobs\",\n \"created_at\": \"2017-02-23T04:40:21.000000Z\",\n \"updated_at\": \"2023-11-22T20:43:34.000000Z\",\n \"client_id\": \"207\",\n \"group_id\": 301,\n \"email_verified_at\": \"<string>\",\n \"__hevo__database_name\": \"apphys_new\",\n \"__hevo__ingested_at\": 1678920545435,\n \"__hevo__marked_deleted\": 0,\n \"__hevo__source_modified_at\": 1678920204000,\n \"onboarding_status\": true,\n \"phone\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.helpyousponsor.com/v1/admin/emails/assign_admin")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-HYS-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email_ids\": [\n \"1,2,3\"\n ],\n \"admin\": {\n \"id\": 542,\n \"email\": \"dev@helpyousponsor.com\",\n \"permissions\": {},\n \"activated\": 1,\n \"activation_code\": \"<string>\",\n \"activated_at\": \"2017-02-23 04:41:10\",\n \"last_login\": \"2023-11-22 20:43:34\",\n \"reset_password_code\": \"<string>\",\n \"first_name\": \"Leslie\",\n \"last_name\": \"Jobs\",\n \"created_at\": \"2017-02-23T04:40:21.000000Z\",\n \"updated_at\": \"2023-11-22T20:43:34.000000Z\",\n \"client_id\": \"207\",\n \"group_id\": 301,\n \"email_verified_at\": \"<string>\",\n \"__hevo__database_name\": \"apphys_new\",\n \"__hevo__ingested_at\": 1678920545435,\n \"__hevo__marked_deleted\": 0,\n \"__hevo__source_modified_at\": 1678920204000,\n \"onboarding_status\": true,\n \"phone\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
API key generated from Developer Settings. Format: hys_...
Body
application/json
Admin id and email id to assign
Response
Successful operation
The status of the operation
⌘I
Assign multiple emails to an admin
curl --request PUT \
--url https://api.helpyousponsor.com/v1/admin/emails/assign_admin \
--header 'Content-Type: application/json' \
--header 'X-HYS-API-Key: <api-key>' \
--data '
{
"email_ids": [
"1,2,3"
],
"admin": {
"id": 542,
"email": "dev@helpyousponsor.com",
"permissions": {},
"activated": 1,
"activation_code": "<string>",
"activated_at": "2017-02-23 04:41:10",
"last_login": "2023-11-22 20:43:34",
"reset_password_code": "<string>",
"first_name": "Leslie",
"last_name": "Jobs",
"created_at": "2017-02-23T04:40:21.000000Z",
"updated_at": "2023-11-22T20:43:34.000000Z",
"client_id": "207",
"group_id": 301,
"email_verified_at": "<string>",
"__hevo__database_name": "apphys_new",
"__hevo__ingested_at": 1678920545435,
"__hevo__marked_deleted": 0,
"__hevo__source_modified_at": 1678920204000,
"onboarding_status": true,
"phone": "<string>"
}
}
'import requests
url = "https://api.helpyousponsor.com/v1/admin/emails/assign_admin"
payload = {
"email_ids": ["1,2,3"],
"admin": {
"id": 542,
"email": "dev@helpyousponsor.com",
"permissions": {},
"activated": 1,
"activation_code": "<string>",
"activated_at": "2017-02-23 04:41:10",
"last_login": "2023-11-22 20:43:34",
"reset_password_code": "<string>",
"first_name": "Leslie",
"last_name": "Jobs",
"created_at": "2017-02-23T04:40:21.000000Z",
"updated_at": "2023-11-22T20:43:34.000000Z",
"client_id": "207",
"group_id": 301,
"email_verified_at": "<string>",
"__hevo__database_name": "apphys_new",
"__hevo__ingested_at": 1678920545435,
"__hevo__marked_deleted": 0,
"__hevo__source_modified_at": 1678920204000,
"onboarding_status": True,
"phone": "<string>"
}
}
headers = {
"X-HYS-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-HYS-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email_ids: ['1,2,3'],
admin: {
id: 542,
email: 'dev@helpyousponsor.com',
permissions: {},
activated: 1,
activation_code: '<string>',
activated_at: '2017-02-23 04:41:10',
last_login: '2023-11-22 20:43:34',
reset_password_code: '<string>',
first_name: 'Leslie',
last_name: 'Jobs',
created_at: '2017-02-23T04:40:21.000000Z',
updated_at: '2023-11-22T20:43:34.000000Z',
client_id: '207',
group_id: 301,
email_verified_at: '<string>',
__hevo__database_name: 'apphys_new',
__hevo__ingested_at: 1678920545435,
__hevo__marked_deleted: 0,
__hevo__source_modified_at: 1678920204000,
onboarding_status: true,
phone: '<string>'
}
})
};
fetch('https://api.helpyousponsor.com/v1/admin/emails/assign_admin', 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.helpyousponsor.com/v1/admin/emails/assign_admin",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'email_ids' => [
'1,2,3'
],
'admin' => [
'id' => 542,
'email' => 'dev@helpyousponsor.com',
'permissions' => [
],
'activated' => 1,
'activation_code' => '<string>',
'activated_at' => '2017-02-23 04:41:10',
'last_login' => '2023-11-22 20:43:34',
'reset_password_code' => '<string>',
'first_name' => 'Leslie',
'last_name' => 'Jobs',
'created_at' => '2017-02-23T04:40:21.000000Z',
'updated_at' => '2023-11-22T20:43:34.000000Z',
'client_id' => '207',
'group_id' => 301,
'email_verified_at' => '<string>',
'__hevo__database_name' => 'apphys_new',
'__hevo__ingested_at' => 1678920545435,
'__hevo__marked_deleted' => 0,
'__hevo__source_modified_at' => 1678920204000,
'onboarding_status' => true,
'phone' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-HYS-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.helpyousponsor.com/v1/admin/emails/assign_admin"
payload := strings.NewReader("{\n \"email_ids\": [\n \"1,2,3\"\n ],\n \"admin\": {\n \"id\": 542,\n \"email\": \"dev@helpyousponsor.com\",\n \"permissions\": {},\n \"activated\": 1,\n \"activation_code\": \"<string>\",\n \"activated_at\": \"2017-02-23 04:41:10\",\n \"last_login\": \"2023-11-22 20:43:34\",\n \"reset_password_code\": \"<string>\",\n \"first_name\": \"Leslie\",\n \"last_name\": \"Jobs\",\n \"created_at\": \"2017-02-23T04:40:21.000000Z\",\n \"updated_at\": \"2023-11-22T20:43:34.000000Z\",\n \"client_id\": \"207\",\n \"group_id\": 301,\n \"email_verified_at\": \"<string>\",\n \"__hevo__database_name\": \"apphys_new\",\n \"__hevo__ingested_at\": 1678920545435,\n \"__hevo__marked_deleted\": 0,\n \"__hevo__source_modified_at\": 1678920204000,\n \"onboarding_status\": true,\n \"phone\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-HYS-API-Key", "<api-key>")
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.put("https://api.helpyousponsor.com/v1/admin/emails/assign_admin")
.header("X-HYS-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email_ids\": [\n \"1,2,3\"\n ],\n \"admin\": {\n \"id\": 542,\n \"email\": \"dev@helpyousponsor.com\",\n \"permissions\": {},\n \"activated\": 1,\n \"activation_code\": \"<string>\",\n \"activated_at\": \"2017-02-23 04:41:10\",\n \"last_login\": \"2023-11-22 20:43:34\",\n \"reset_password_code\": \"<string>\",\n \"first_name\": \"Leslie\",\n \"last_name\": \"Jobs\",\n \"created_at\": \"2017-02-23T04:40:21.000000Z\",\n \"updated_at\": \"2023-11-22T20:43:34.000000Z\",\n \"client_id\": \"207\",\n \"group_id\": 301,\n \"email_verified_at\": \"<string>\",\n \"__hevo__database_name\": \"apphys_new\",\n \"__hevo__ingested_at\": 1678920545435,\n \"__hevo__marked_deleted\": 0,\n \"__hevo__source_modified_at\": 1678920204000,\n \"onboarding_status\": true,\n \"phone\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.helpyousponsor.com/v1/admin/emails/assign_admin")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-HYS-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email_ids\": [\n \"1,2,3\"\n ],\n \"admin\": {\n \"id\": 542,\n \"email\": \"dev@helpyousponsor.com\",\n \"permissions\": {},\n \"activated\": 1,\n \"activation_code\": \"<string>\",\n \"activated_at\": \"2017-02-23 04:41:10\",\n \"last_login\": \"2023-11-22 20:43:34\",\n \"reset_password_code\": \"<string>\",\n \"first_name\": \"Leslie\",\n \"last_name\": \"Jobs\",\n \"created_at\": \"2017-02-23T04:40:21.000000Z\",\n \"updated_at\": \"2023-11-22T20:43:34.000000Z\",\n \"client_id\": \"207\",\n \"group_id\": 301,\n \"email_verified_at\": \"<string>\",\n \"__hevo__database_name\": \"apphys_new\",\n \"__hevo__ingested_at\": 1678920545435,\n \"__hevo__marked_deleted\": 0,\n \"__hevo__source_modified_at\": 1678920204000,\n \"onboarding_status\": true,\n \"phone\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>"
}{
"message": "<string>"
}
