Get Email Accounts
curl --request GET \
--url https://app.cardclan.io/api/integration/email-accounts \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.cardclan.io/api/integration/email-accounts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.cardclan.io/api/integration/email-accounts', 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://app.cardclan.io/api/integration/email-accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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://app.cardclan.io/api/integration/email-accounts"
req, _ := http.NewRequest("GET", 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.get("https://app.cardclan.io/api/integration/email-accounts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.cardclan.io/api/integration/email-accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"key": "email-account",
"choices": [
{
"key": "60f7b2b5b8f4a20015a4f5a6",
"value": "hello@company.com",
"label": "Email account",
"id": "60f7b2b5b8f4a20015a4f5a6",
"name": "hello@company.com"
}
]
}
]{
"error": "Bad Request",
"message": "Card ID is required",
"statusCode": 400,
"timestamp": "2024-01-15T10:30:00.000Z"
}Integration API
Get Email Accounts
Retrieves all email accounts configured for the user’s workspaces
GET
/
integration
/
email-accounts
Get Email Accounts
curl --request GET \
--url https://app.cardclan.io/api/integration/email-accounts \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.cardclan.io/api/integration/email-accounts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.cardclan.io/api/integration/email-accounts', 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://app.cardclan.io/api/integration/email-accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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://app.cardclan.io/api/integration/email-accounts"
req, _ := http.NewRequest("GET", 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.get("https://app.cardclan.io/api/integration/email-accounts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.cardclan.io/api/integration/email-accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"key": "email-account",
"choices": [
{
"key": "60f7b2b5b8f4a20015a4f5a6",
"value": "hello@company.com",
"label": "Email account",
"id": "60f7b2b5b8f4a20015a4f5a6",
"name": "hello@company.com"
}
]
}
]{
"error": "Bad Request",
"message": "Card ID is required",
"statusCode": 400,
"timestamp": "2024-01-15T10:30:00.000Z"
}Retrieves all email accounts configured for the user’s workspaces. Email accounts determine which “From” address will be used when sending cards via email.
Response Details
Returns an array containing email account choices formatted for integration platforms:- key: Always “email-account” to identify the data type
- choices: Array of configured email accounts
- id: Unique email account identifier
- name: Email address (e.g., “hello@company.com”)
- value: Same as name/email address
- key: Same as ID
- label: Description of the field type
Default Email Option
If you don’t want to use a specific email account, you can use"CardClan" as the emailAccount value in the Send Card endpoint to use CardClan’s default sending email.
Use Cases
- Professional Sending: Send cards from your company’s email addresses
- Brand Consistency: Maintain consistent sender identity across communications
- Email Authentication: Improve deliverability with properly configured domains
- User Choice: Let integration users select their preferred sending email
Example Response
[
{
"key": "email-account",
"choices": [
{
"key": "60f7b2b5b8f4a20015a4f5a6",
"value": "hello@company.com",
"label": "Email account",
"id": "60f7b2b5b8f4a20015a4f5a6",
"name": "hello@company.com"
},
{
"key": "60f7b2b5b8f4a20015a4f5a7",
"value": "support@company.com",
"label": "Email account",
"id": "60f7b2b5b8f4a20015a4f5a7",
"name": "support@company.com"
}
]
}
]
Configuration Requirements
Email accounts must be configured in your CardClan dashboard before they appear in this endpoint. The accounts need:- Verified Domain: Email domain must be verified
- SMTP Configuration: Proper sending credentials configured
- Workspace Access: Account must be associated with accessible workspaces
Was this page helpful?