Projects
Create Project
Creates a new project under the organization. The number of projects is limited by the organization’s plan. Requires an organization admin API key (ASA_ prefix).
POST
/
account
/
projects
curl --request POST \
--url https://api.autosend.com/v1/account/projects \
--header 'Authorization: Bearer ASA_your-admin-api-key' \
--header 'Content-Type: application/json' \
--data '{
"name": "My New Project",
"domain": "example.com",
"regionKey": "us-east-1"
}'
import requests
url = "https://api.autosend.com/v1/account/projects"
headers = {
"Authorization": "Bearer ASA_your-admin-api-key",
"Content-Type": "application/json"
}
payload = {
"name": "My New Project",
"domain": "example.com",
"regionKey": "us-east-1"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
fetch('https://api.autosend.com/v1/account/projects', {
method: 'POST',
headers: {
'Authorization': 'Bearer ASA_your-admin-api-key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'My New Project',
domain: 'example.com',
regionKey: 'us-east-1'
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
<?php
$url = 'https://api.autosend.com/v1/account/projects';
$data = [
'name' => 'My New Project',
'domain' => 'example.com',
'regionKey' => 'us-east-1'
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ASA_your-admin-api-key',
'Content-Type: application/json'
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.autosend.com/v1/account/projects"
payload := map[string]interface{}{
"name": "My New Project",
"domain": "example.com",
"regionKey": "us-east-1",
}
jsonData, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("Authorization", "Bearer ASA_your-admin-api-key")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error:", err)
return
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
public class CreateProject {
public static void main(String[] args) {
try {
URL url = new URL("https://api.autosend.com/v1/account/projects");
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("Authorization", "Bearer ASA_your-admin-api-key");
con.setRequestProperty("Content-Type", "application/json");
con.setDoOutput(true);
String jsonInputString = "{\n" +
" \"name\": \"My New Project\",\n" +
" \"domain\": \"example.com\",\n" +
" \"regionKey\": \"us-east-1\"\n" +
"}";
try (OutputStream os = con.getOutputStream()) {
byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
os.write(input, 0, input.length);
}
int status = con.getResponseCode();
System.out.println("Response Status: " + status);
} catch (Exception e) {
e.printStackTrace();
}
}
}
require 'net/http'
require 'json'
require 'uri'
uri = URI('https://api.autosend.com/v1/account/projects')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri.path)
request['Authorization'] = 'Bearer ASA_your-admin-api-key'
request['Content-Type'] = 'application/json'
request.body = {
name: 'My New Project',
domain: 'example.com',
regionKey: 'us-east-1'
}.to_json
response = http.request(request)
puts response.body
{
"success": true,
"data": {
"id": "60d5ec49f1b2c72d9c8b1234",
"name": "My New Project",
"domain": "example.com",
"domains": [],
"regionKey": "us-east-1",
"trackingOpen": false,
"trackingClick": false
}
}
This endpoint requires an organization admin API key (
ASA_ prefix). Standard project API keys cannot access this endpoint.curl --request POST \
--url https://api.autosend.com/v1/account/projects \
--header 'Authorization: Bearer ASA_your-admin-api-key' \
--header 'Content-Type: application/json' \
--data '{
"name": "My New Project",
"domain": "example.com",
"regionKey": "us-east-1"
}'
import requests
url = "https://api.autosend.com/v1/account/projects"
headers = {
"Authorization": "Bearer ASA_your-admin-api-key",
"Content-Type": "application/json"
}
payload = {
"name": "My New Project",
"domain": "example.com",
"regionKey": "us-east-1"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
fetch('https://api.autosend.com/v1/account/projects', {
method: 'POST',
headers: {
'Authorization': 'Bearer ASA_your-admin-api-key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'My New Project',
domain: 'example.com',
regionKey: 'us-east-1'
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
<?php
$url = 'https://api.autosend.com/v1/account/projects';
$data = [
'name' => 'My New Project',
'domain' => 'example.com',
'regionKey' => 'us-east-1'
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ASA_your-admin-api-key',
'Content-Type: application/json'
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.autosend.com/v1/account/projects"
payload := map[string]interface{}{
"name": "My New Project",
"domain": "example.com",
"regionKey": "us-east-1",
}
jsonData, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("Authorization", "Bearer ASA_your-admin-api-key")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error:", err)
return
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
public class CreateProject {
public static void main(String[] args) {
try {
URL url = new URL("https://api.autosend.com/v1/account/projects");
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("Authorization", "Bearer ASA_your-admin-api-key");
con.setRequestProperty("Content-Type", "application/json");
con.setDoOutput(true);
String jsonInputString = "{\n" +
" \"name\": \"My New Project\",\n" +
" \"domain\": \"example.com\",\n" +
" \"regionKey\": \"us-east-1\"\n" +
"}";
try (OutputStream os = con.getOutputStream()) {
byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
os.write(input, 0, input.length);
}
int status = con.getResponseCode();
System.out.println("Response Status: " + status);
} catch (Exception e) {
e.printStackTrace();
}
}
}
require 'net/http'
require 'json'
require 'uri'
uri = URI('https://api.autosend.com/v1/account/projects')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri.path)
request['Authorization'] = 'Bearer ASA_your-admin-api-key'
request['Content-Type'] = 'application/json'
request.body = {
name: 'My New Project',
domain: 'example.com',
regionKey: 'us-east-1'
}.to_json
response = http.request(request)
puts response.body
{
"success": true,
"data": {
"id": "60d5ec49f1b2c72d9c8b1234",
"name": "My New Project",
"domain": "example.com",
"domains": [],
"regionKey": "us-east-1",
"trackingOpen": false,
"trackingClick": false
}
}
Authorizations
Organization admin API key header of the form Bearer
ASA_<key>. Standard project API keys (AS_ prefix) will receive a 403 error.Body
Name of the project (max 100 characters).Maximum length:
100Example: "My New Project"Domain name through which you plan to send emails, without the
https:// prefix. Accepts a root domain (e.g., example.com) or a subdomain (e.g., mail.example.com).Example: "example.com"Account region where the project data will be stored.Allowed values:
us-east-1, us-east-2, ap-south-1, eu-central-1Example: "us-east-1"Response
Project created successfully (201)Indicates if the request was successfulExample:
trueThe created project object
Show child attributes
Show child attributes
Unique project identifierExample:
"60d5ec49f1b2c72d9c8b1234"Project nameExample:
"My New Project"Primary domain set for the project, or
null if none was providedList of verified email domains (empty for new projects)
Account region for the project. One of
us-east-1, us-east-2, ap-south-1, or eu-central-1Whether open tracking is enabledExample:
falseWhether click tracking is enabledExample:
falseError Responses
Returned when using a standard project API key instead of an organization admin API key.
{
"success": false,
"error": {
"message": "This endpoint requires an organization admin API key (ASA_ prefix)",
}
}
Returned when the organization has reached its plan’s project limit.
{
"success": false,
"error": {
"message": "Plan upgrade required"
}
}
Was this page helpful?
⌘I
curl --request POST \
--url https://api.autosend.com/v1/account/projects \
--header 'Authorization: Bearer ASA_your-admin-api-key' \
--header 'Content-Type: application/json' \
--data '{
"name": "My New Project",
"domain": "example.com",
"regionKey": "us-east-1"
}'
import requests
url = "https://api.autosend.com/v1/account/projects"
headers = {
"Authorization": "Bearer ASA_your-admin-api-key",
"Content-Type": "application/json"
}
payload = {
"name": "My New Project",
"domain": "example.com",
"regionKey": "us-east-1"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
fetch('https://api.autosend.com/v1/account/projects', {
method: 'POST',
headers: {
'Authorization': 'Bearer ASA_your-admin-api-key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'My New Project',
domain: 'example.com',
regionKey: 'us-east-1'
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
<?php
$url = 'https://api.autosend.com/v1/account/projects';
$data = [
'name' => 'My New Project',
'domain' => 'example.com',
'regionKey' => 'us-east-1'
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ASA_your-admin-api-key',
'Content-Type: application/json'
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.autosend.com/v1/account/projects"
payload := map[string]interface{}{
"name": "My New Project",
"domain": "example.com",
"regionKey": "us-east-1",
}
jsonData, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("Authorization", "Bearer ASA_your-admin-api-key")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error:", err)
return
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
public class CreateProject {
public static void main(String[] args) {
try {
URL url = new URL("https://api.autosend.com/v1/account/projects");
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("Authorization", "Bearer ASA_your-admin-api-key");
con.setRequestProperty("Content-Type", "application/json");
con.setDoOutput(true);
String jsonInputString = "{\n" +
" \"name\": \"My New Project\",\n" +
" \"domain\": \"example.com\",\n" +
" \"regionKey\": \"us-east-1\"\n" +
"}";
try (OutputStream os = con.getOutputStream()) {
byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
os.write(input, 0, input.length);
}
int status = con.getResponseCode();
System.out.println("Response Status: " + status);
} catch (Exception e) {
e.printStackTrace();
}
}
}
require 'net/http'
require 'json'
require 'uri'
uri = URI('https://api.autosend.com/v1/account/projects')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri.path)
request['Authorization'] = 'Bearer ASA_your-admin-api-key'
request['Content-Type'] = 'application/json'
request.body = {
name: 'My New Project',
domain: 'example.com',
regionKey: 'us-east-1'
}.to_json
response = http.request(request)
puts response.body
{
"success": true,
"data": {
"id": "60d5ec49f1b2c72d9c8b1234",
"name": "My New Project",
"domain": "example.com",
"domains": [],
"regionKey": "us-east-1",
"trackingOpen": false,
"trackingClick": false
}
}