Introduction
Welcome to the AnonAddy API! You can use our API to access API endpoints, which can get information on your aliases, recipients, domains and additional usernames.
Authenticating requests
This API is authenticated by sending an Authorization
header with the value "Bearer {YOUR_AUTH_KEY}"
.
All authenticated endpoints are marked with a requires authentication
badge in the documentation below.
You can retrieve your token by visiting your account settings and clicking Generate New Token.
Account Details
Get All Account Details
This endpoint retrieves all account details.
Example request:
curl -X GET \
-G "https://app.anonaddy.com/api/v1/account-details" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://app.anonaddy.com/api/v1/account-details"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://app.anonaddy.com/api/v1/account-details',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/account-details'
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": [
{
"id": "50c9e585-e7f5-41c4-9016-9014c15454bc",
"username": "johndoe",
"from_name": "John Doe",
"email_subject": "Private Subject",
"banner_location": "off",
"bandwidth": 10485760,
"username_count": 2,
"username_limit": 3,
"default_recipient_id": "46eebc50-f7f8-46d7-beb9-c37f04c29a84",
"default_alias_domain": "anonaddy.me",
"default_alias_format": "random_words",
"subscription": "pro",
"subscription_ends_at": null,
"bandwidth_limit": 0,
"recipient_count": 12,
"recipient_limit": 20,
"active_domain_count": 4,
"active_domain_limit": 10,
"active_shared_domain_alias_count": 50,
"active_shared_domain_alias_limit": 0,
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
}
]
}
Request
GET
https://app.anonaddy.com/api/v1/account-details
Additional Usernames
Get All Additional Usernames
This endpoint retrieves all additional usernames.
Example request:
curl -X GET \
-G "https://app.anonaddy.com/api/v1/usernames" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://app.anonaddy.com/api/v1/usernames"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://app.anonaddy.com/api/v1/usernames',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/usernames'
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": [
{
"id": "2777dee6-1721-45c0-8d01-698b6be2335f",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"username": "johndoe",
"description": null,
"aliases": [],
"default_recipient": null,
"active": true,
"catch_all": true,
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
},
{
"id": "ede18c01-9de2-40f4-8cce-c1e9f623ef2d",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"username": "janedoe",
"description": null,
"aliases": [],
"default_recipient": null,
"active": true,
"catch_all": true,
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
}
]
}
Request
GET
https://app.anonaddy.com/api/v1/usernames
Get a Specific Additional Username
This endpoint retrieves a specific additional username.
Example request:
curl -X GET \
-G "https://app.anonaddy.com/api/v1/usernames/2777dee6-1721-45c0-8d01-698b6be2335f" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://app.anonaddy.com/api/v1/usernames/2777dee6-1721-45c0-8d01-698b6be2335f"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://app.anonaddy.com/api/v1/usernames/2777dee6-1721-45c0-8d01-698b6be2335f',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/usernames/2777dee6-1721-45c0-8d01-698b6be2335f'
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": {
"id": "2777dee6-1721-45c0-8d01-698b6be2335f",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"username": "johndoe",
"description": null,
"aliases": [],
"default_recipient": null,
"active": true,
"catch_all": true,
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
}
}
Request
GET
https://app.anonaddy.com/api/v1/usernames/{id}
URL Parameters
id
string
The id of the additional username to retrieve
Create New Additional Username
This endpoint creates a new additional username.
Example request:
curl -X POST \
"https://app.anonaddy.com/api/v1/usernames" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}" \
-d '{"username":"johndoe"}'
const url = new URL(
"https://app.anonaddy.com/api/v1/usernames"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
let body = {
"username": "johndoe"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://app.anonaddy.com/api/v1/usernames',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
'json' => [
'username' => 'johndoe',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/usernames'
payload = {
"username": "johndoe"
}
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (201):
{
"data": {
"id": "2777dee6-1721-45c0-8d01-698b6be2335f",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"username": "johndoe",
"description": null,
"aliases": [],
"default_recipient": null,
"active": true,
"catch_all": true,
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
}
}
Request
POST
https://app.anonaddy.com/api/v1/usernames
Body Parameters
username
string
The username for the additional username
Update a Specific Additional Username
This endpoint updates a specific additional username.
Example request:
curl -X PATCH \
"https://app.anonaddy.com/api/v1/usernames/2777dee6-1721-45c0-8d01-698b6be2335f" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}" \
-d '{"description":"New description"}'
const url = new URL(
"https://app.anonaddy.com/api/v1/usernames/2777dee6-1721-45c0-8d01-698b6be2335f"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
let body = {
"description": "New description"
}
fetch(url, {
method: "PATCH",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://app.anonaddy.com/api/v1/usernames/2777dee6-1721-45c0-8d01-698b6be2335f',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
'json' => [
'description' => 'New description',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/usernames/2777dee6-1721-45c0-8d01-698b6be2335f'
payload = {
"description": "New description"
}
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('PATCH', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"data": {
"id": "2777dee6-1721-45c0-8d01-698b6be2335f",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"username": "johndoe",
"description": "New description",
"aliases": [],
"default_recipient": null,
"active": true,
"catch_all": true,
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
}
}
Request
PATCH
https://app.anonaddy.com/api/v1/usernames/{id}
URL Parameters
id
string
The id of the additional username to update
Body Parameters
description
string optional
The description of the additional username
Delete a Specific Additional Username
This endpoint deletes a specific additional username.
Example request:
curl -X DELETE \
"https://app.anonaddy.com/api/v1/usernames/2777dee6-1721-45c0-8d01-698b6be2335f" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://app.anonaddy.com/api/v1/usernames/2777dee6-1721-45c0-8d01-698b6be2335f"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://app.anonaddy.com/api/v1/usernames/2777dee6-1721-45c0-8d01-698b6be2335f',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/usernames/2777dee6-1721-45c0-8d01-698b6be2335f'
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Example response (204):
{}
Request
DELETE
https://app.anonaddy.com/api/v1/usernames/{id}
URL Parameters
id
string
The id of the additional username to delete
Update Default Recipient for a Specific Additional Username
This endpoint updates the default recipient for a specific additional username.
Example request:
curl -X PATCH \
"https://app.anonaddy.com/api/v1/usernames/2777dee6-1721-45c0-8d01-698b6be2335f/default-recipient" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}" \
-d '{"default_recipient":"46eebc50-f7f8-46d7-beb9-c37f04c29a84"}'
const url = new URL(
"https://app.anonaddy.com/api/v1/usernames/2777dee6-1721-45c0-8d01-698b6be2335f/default-recipient"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
let body = {
"default_recipient": "46eebc50-f7f8-46d7-beb9-c37f04c29a84"
}
fetch(url, {
method: "PATCH",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://app.anonaddy.com/api/v1/usernames/2777dee6-1721-45c0-8d01-698b6be2335f/default-recipient',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
'json' => [
'default_recipient' => '46eebc50-f7f8-46d7-beb9-c37f04c29a84',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/usernames/2777dee6-1721-45c0-8d01-698b6be2335f/default-recipient'
payload = {
"default_recipient": "46eebc50-f7f8-46d7-beb9-c37f04c29a84"
}
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('PATCH', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"data": {
"id": "2777dee6-1721-45c0-8d01-698b6be2335f",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"username": "johndoe",
"description": null,
"aliases": [],
"default_recipient": {
"id": "46eebc50-f7f8-46d7-beb9-c37f04c29a84",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"email": "me@example.com",
"should_encrypt": false,
"fingerprint": null,
"email_verified_at": "2019-10-01 09:00:00",
"aliases": [],
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
},
"active": true,
"catch_all": true,
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
}
}
Request
PATCH
https://app.anonaddy.com/api/v1/usernames/{id}/default-recipient
URL Parameters
id
string
The id of the additional username to update
Body Parameters
default_recipient
string optional
The id of the recipient
Activate a Specific Additional Username
This endpoint activates a specific additional username.
Example request:
curl -X POST \
"https://app.anonaddy.com/api/v1/active-usernames" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}" \
-d '{"id":"2777dee6-1721-45c0-8d01-698b6be2335f"}'
const url = new URL(
"https://app.anonaddy.com/api/v1/active-usernames"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
let body = {
"id": "2777dee6-1721-45c0-8d01-698b6be2335f"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://app.anonaddy.com/api/v1/active-usernames',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
'json' => [
'id' => '2777dee6-1721-45c0-8d01-698b6be2335f',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/active-usernames'
payload = {
"id": "2777dee6-1721-45c0-8d01-698b6be2335f"
}
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"data": {
"id": "2777dee6-1721-45c0-8d01-698b6be2335f",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"username": "johndoe",
"description": null,
"aliases": [],
"default_recipient": null,
"active": true,
"catch_all": true,
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
}
}
Request
POST
https://app.anonaddy.com/api/v1/active-usernames
Body Parameters
id
string
The id for the additional username
Deactivate a Specific Additional Username
This endpoint deactivates a specific additional username.
Example request:
curl -X DELETE \
"https://app.anonaddy.com/api/v1/active-usernames/2777dee6-1721-45c0-8d01-698b6be2335f" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://app.anonaddy.com/api/v1/active-usernames/2777dee6-1721-45c0-8d01-698b6be2335f"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://app.anonaddy.com/api/v1/active-usernames/2777dee6-1721-45c0-8d01-698b6be2335f',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/active-usernames/2777dee6-1721-45c0-8d01-698b6be2335f'
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Example response (204):
{}
Request
DELETE
https://app.anonaddy.com/api/v1/active-usernames/{id}
URL Parameters
id
string
The id of the additional username to deactivate
Enable catch-all for a Specific Additional Username
This endpoint enables catch-all a specific additional username.
Example request:
curl -X POST \
"https://app.anonaddy.com/api/v1/catch-all-usernames" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}" \
-d '{"id":"2777dee6-1721-45c0-8d01-698b6be2335f"}'
const url = new URL(
"https://app.anonaddy.com/api/v1/catch-all-usernames"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
let body = {
"id": "2777dee6-1721-45c0-8d01-698b6be2335f"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://app.anonaddy.com/api/v1/catch-all-usernames',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
'json' => [
'id' => '2777dee6-1721-45c0-8d01-698b6be2335f',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/catch-all-usernames'
payload = {
"id": "2777dee6-1721-45c0-8d01-698b6be2335f"
}
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"data": {
"id": "2777dee6-1721-45c0-8d01-698b6be2335f",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"username": "johndoe",
"description": null,
"aliases": [],
"default_recipient": null,
"active": true,
"catch_all": true,
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
}
}
Request
POST
https://app.anonaddy.com/api/v1/catch-all-usernames
Body Parameters
id
string
The id for the additional username
Disable catch-all for a Specific Additional Username
This endpoint disables catch-all for a specific additional username.
Example request:
curl -X DELETE \
"https://app.anonaddy.com/api/v1/catch-all-usernames/2777dee6-1721-45c0-8d01-698b6be2335f" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://app.anonaddy.com/api/v1/catch-all-usernames/2777dee6-1721-45c0-8d01-698b6be2335f"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://app.anonaddy.com/api/v1/catch-all-usernames/2777dee6-1721-45c0-8d01-698b6be2335f',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/catch-all-usernames/2777dee6-1721-45c0-8d01-698b6be2335f'
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Example response (204):
{}
Request
DELETE
https://app.anonaddy.com/api/v1/catch-all-usernames/{id}
URL Parameters
id
string
The id of the additional username to disable catch-all
Aliases
Get All Aliases
This endpoint retrieves all aliases.
Example request:
curl -X GET \
-G "https://app.anonaddy.com/api/v1/aliases?deleted=with" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://app.anonaddy.com/api/v1/aliases"
);
let params = {
"deleted": "with",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://app.anonaddy.com/api/v1/aliases',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
'query' => [
'deleted'=> 'with',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/aliases'
params = {
'deleted': 'with',
}
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
Example response (200):
{
"data": [
{
"id": "50c9e585-e7f5-41c4-9016-9014c15454bc",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"aliasable_id": null,
"aliasable_type": null,
"local_part": "first",
"extension": null,
"domain": "johndoe.anonaddy.com",
"email": "first@johndoe.anonaddy.com",
"active": true,
"description": null,
"emails_forwarded": 5,
"emails_blocked": 0,
"emails_replied": 0,
"emails_sent": 0,
"recipients": [],
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
},
{
"id": "c549db7d-5fac-4b09-9443-9e47f644d29f",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"domain_id": null,
"local_part": "second",
"extension": null,
"domain": "johndoe.anonaddy.com",
"email": "second@johndoe.anonaddy.com",
"active": true,
"description": null,
"emails_forwarded": 2,
"emails_blocked": 1,
"emails_replied": 0,
"emails_sent": 0,
"recipients": [],
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
}
]
}
Request
GET
https://app.anonaddy.com/api/v1/aliases
Query Parameters
deleted
string optional
Choose to return alias with deleted or only deleted - options with, only.
Get a Specific Alias
This endpoint retrieves a specific alias.
Example request:
curl -X GET \
-G "https://app.anonaddy.com/api/v1/aliases/50c9e585-e7f5-41c4-9016-9014c15454bc" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://app.anonaddy.com/api/v1/aliases/50c9e585-e7f5-41c4-9016-9014c15454bc"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://app.anonaddy.com/api/v1/aliases/50c9e585-e7f5-41c4-9016-9014c15454bc',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/aliases/50c9e585-e7f5-41c4-9016-9014c15454bc'
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": {
"id": "50c9e585-e7f5-41c4-9016-9014c15454bc",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"aliasable_id": null,
"aliasable_type": null,
"local_part": "first",
"extension": null,
"domain": "johndoe.anonaddy.com",
"email": "first@johndoe.anonaddy.com",
"active": true,
"description": null,
"emails_forwarded": 5,
"emails_blocked": 0,
"emails_replied": 0,
"emails_sent": 0,
"recipients": [],
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
}
}
Request
GET
https://app.anonaddy.com/api/v1/aliases/{id}
URL Parameters
id
string
The id of the alias to retrieve
Create New Alias
This endpoint creates a new alias.
Example request:
curl -X POST \
"https://app.anonaddy.com/api/v1/aliases" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}" \
-d '{"domain":"anonaddy.me","description":"For example.com","format":"uuid","local_part":"hello","recipient_ids":["46eebc50-f7f8-46d7-beb9-c37f04c29a84"]}'
const url = new URL(
"https://app.anonaddy.com/api/v1/aliases"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
let body = {
"domain": "anonaddy.me",
"description": "For example.com",
"format": "uuid",
"local_part": "hello",
"recipient_ids": [
"46eebc50-f7f8-46d7-beb9-c37f04c29a84"
]
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://app.anonaddy.com/api/v1/aliases',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
'json' => [
'domain' => 'anonaddy.me',
'description' => 'For example.com',
'format' => 'uuid',
'local_part' => 'hello',
'recipient_ids' => [
'46eebc50-f7f8-46d7-beb9-c37f04c29a84',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/aliases'
payload = {
"domain": "anonaddy.me",
"description": "For example.com",
"format": "uuid",
"local_part": "hello",
"recipient_ids": [
"46eebc50-f7f8-46d7-beb9-c37f04c29a84"
]
}
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (201):
{
"data": {
"id": "50c9e585-e7f5-41c4-9016-9014c15454bc",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"aliasable_id": null,
"aliasable_type": null,
"local_part": "50c9e585-e7f5-41c4-9016-9014c15454bc",
"extension": null,
"domain": "anonaddy.me",
"email": "50c9e585-e7f5-41c4-9016-9014c15454bc@anonaddy.me",
"active": true,
"description": "For example.com",
"emails_forwarded": 5,
"emails_blocked": 0,
"emails_replied": 0,
"emails_sent": 0,
"recipients": [],
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
}
}
Request
POST
https://app.anonaddy.com/api/v1/aliases
Body Parameters
domain
string
The domain of the alias
description
string optional
The description of the alias
format
string optional
The chosen format for the alias, options - random_characters, uuid, random_words, custom (the custom format is not available for shared domains)
local_part
string optional
The chosen local part for the alias (only required if you have the format as custom)
recipient_ids
string[] optional
An array of recipient ids to add (the default recipient will be used if none provided)
Update a Specific Alias
This endpoint updates a specific alias.
Example request:
curl -X PATCH \
"https://app.anonaddy.com/api/v1/aliases/50c9e585-e7f5-41c4-9016-9014c15454bc" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}" \
-d '{"description":"New description"}'
const url = new URL(
"https://app.anonaddy.com/api/v1/aliases/50c9e585-e7f5-41c4-9016-9014c15454bc"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
let body = {
"description": "New description"
}
fetch(url, {
method: "PATCH",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://app.anonaddy.com/api/v1/aliases/50c9e585-e7f5-41c4-9016-9014c15454bc',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
'json' => [
'description' => 'New description',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/aliases/50c9e585-e7f5-41c4-9016-9014c15454bc'
payload = {
"description": "New description"
}
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('PATCH', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"data": {
"id": "50c9e585-e7f5-41c4-9016-9014c15454bc",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"aliasable_id": null,
"aliasable_type": null,
"local_part": "first",
"extension": null,
"domain": "johndoe.anonaddy.com",
"email": "first@johndoe.anonaddy.com",
"active": true,
"description": "New description",
"emails_forwarded": 5,
"emails_blocked": 0,
"emails_replied": 0,
"emails_sent": 0,
"recipients": [],
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
}
}
Request
PATCH
https://app.anonaddy.com/api/v1/aliases/{id}
URL Parameters
id
string
The id of the alias to update
Body Parameters
description
string optional
The description of the alias
Restore a Specific Deleted Alias
This endpoint restores a specific deleted alias.
Example request:
curl -X PATCH \
"https://app.anonaddy.com/api/v1/aliases/50c9e585-e7f5-41c4-9016-9014c15454bc/restore" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://app.anonaddy.com/api/v1/aliases/50c9e585-e7f5-41c4-9016-9014c15454bc/restore"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://app.anonaddy.com/api/v1/aliases/50c9e585-e7f5-41c4-9016-9014c15454bc/restore',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/aliases/50c9e585-e7f5-41c4-9016-9014c15454bc/restore'
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('PATCH', url, headers=headers)
response.json()
Example response (200):
{
"data": {
"id": "50c9e585-e7f5-41c4-9016-9014c15454bc",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"aliasable_id": null,
"aliasable_type": null,
"local_part": "first",
"extension": null,
"domain": "johndoe.anonaddy.com",
"email": "first@johndoe.anonaddy.com",
"active": true,
"description": "New description",
"emails_forwarded": 5,
"emails_blocked": 0,
"emails_replied": 0,
"emails_sent": 0,
"recipients": [],
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00",
"deleted_at": null
}
}
Request
PATCH
https://app.anonaddy.com/api/v1/aliases/{id}/restore
URL Parameters
id
string
The id of the alias to restore
Delete a Specific Alias
This endpoint deletes a specific alias.
Example request:
curl -X DELETE \
"https://app.anonaddy.com/api/v1/aliases/50c9e585-e7f5-41c4-9016-9014c15454bc" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://app.anonaddy.com/api/v1/aliases/50c9e585-e7f5-41c4-9016-9014c15454bc"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://app.anonaddy.com/api/v1/aliases/50c9e585-e7f5-41c4-9016-9014c15454bc',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/aliases/50c9e585-e7f5-41c4-9016-9014c15454bc'
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Example response (204):
{}
Request
DELETE
https://app.anonaddy.com/api/v1/aliases/{id}
URL Parameters
id
string
The id of the alias to delete
Activate a Specific Alias
This endpoint activates a specific alias.
Example request:
curl -X POST \
"https://app.anonaddy.com/api/v1/active-aliases" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}" \
-d '{"id":"50c9e585-e7f5-41c4-9016-9014c15454bc"}'
const url = new URL(
"https://app.anonaddy.com/api/v1/active-aliases"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
let body = {
"id": "50c9e585-e7f5-41c4-9016-9014c15454bc"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://app.anonaddy.com/api/v1/active-aliases',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
'json' => [
'id' => '50c9e585-e7f5-41c4-9016-9014c15454bc',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/active-aliases'
payload = {
"id": "50c9e585-e7f5-41c4-9016-9014c15454bc"
}
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"data": {
"id": "50c9e585-e7f5-41c4-9016-9014c15454bc",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"aliasable_id": null,
"aliasable_type": null,
"local_part": "50c9e585-e7f5-41c4-9016-9014c15454bc",
"extension": null,
"domain": "anonaddy.me",
"email": "50c9e585-e7f5-41c4-9016-9014c15454bc@anonaddy.me",
"active": true,
"description": null,
"emails_forwarded": 5,
"emails_blocked": 0,
"emails_replied": 0,
"emails_sent": 0,
"recipients": [],
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
}
}
Request
POST
https://app.anonaddy.com/api/v1/active-aliases
Body Parameters
id
string
The id for the alias
Deactivate a Specific Alias
This endpoint deactivates a specific alias.
Example request:
curl -X DELETE \
"https://app.anonaddy.com/api/v1/active-aliases/50c9e585-e7f5-41c4-9016-9014c15454bc" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://app.anonaddy.com/api/v1/active-aliases/50c9e585-e7f5-41c4-9016-9014c15454bc"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://app.anonaddy.com/api/v1/active-aliases/50c9e585-e7f5-41c4-9016-9014c15454bc',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/active-aliases/50c9e585-e7f5-41c4-9016-9014c15454bc'
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Example response (204):
{}
Request
DELETE
https://app.anonaddy.com/api/v1/active-aliases/{id}
URL Parameters
id
string
The id of the alias to deactivate
Update Recipients for a Specific Alias
This endpoint updates the recipients for a specific alias.
Example request:
curl -X POST \
"https://app.anonaddy.com/api/v1/alias-recipients" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}" \
-d '{"alias_id":"50c9e585-e7f5-41c4-9016-9014c15454bc","recipient_ids":["46eebc50-f7f8-46d7-beb9-c37f04c29a84"]}'
const url = new URL(
"https://app.anonaddy.com/api/v1/alias-recipients"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
let body = {
"alias_id": "50c9e585-e7f5-41c4-9016-9014c15454bc",
"recipient_ids": [
"46eebc50-f7f8-46d7-beb9-c37f04c29a84"
]
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://app.anonaddy.com/api/v1/alias-recipients',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
'json' => [
'alias_id' => '50c9e585-e7f5-41c4-9016-9014c15454bc',
'recipient_ids' => [
'46eebc50-f7f8-46d7-beb9-c37f04c29a84',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/alias-recipients'
payload = {
"alias_id": "50c9e585-e7f5-41c4-9016-9014c15454bc",
"recipient_ids": [
"46eebc50-f7f8-46d7-beb9-c37f04c29a84"
]
}
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"data": {
"id": "50c9e585-e7f5-41c4-9016-9014c15454bc",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"aliasable_id": null,
"aliasable_type": null,
"local_part": "first",
"extension": null,
"domain": "johndoe.anonaddy.com",
"email": "first@johndoe.anonaddy.com",
"active": true,
"description": null,
"emails_forwarded": 5,
"emails_blocked": 0,
"emails_replied": 0,
"emails_sent": 0,
"recipients": [
{
"id": "46eebc50-f7f8-46d7-beb9-c37f04c29a84",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"email": "me@example.com",
"should_encrypt": false,
"fingerprint": null,
"email_verified_at": "2019-10-01 09:00:00",
"aliases": [],
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
}
],
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
}
}
Request
POST
https://app.anonaddy.com/api/v1/alias-recipients
Body Parameters
alias_id
string
The id of the alias
recipient_ids
string[]
An array of recipient ids to add
App Version
Get The Current AnonAddy App Version
This endpoint retrieves details about the current AnonAddy version (only available for self-hosted instances).
Example request:
curl -X GET \
-G "https://app.anonaddy.com/api/v1/app-version" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://app.anonaddy.com/api/v1/app-version"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://app.anonaddy.com/api/v1/app-version',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/app-version'
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"version": "0.1.4",
"major": 0,
"minor": 1,
"patch": 4
}
Request
GET
https://app.anonaddy.com/api/v1/app-version
Domain Options
Get All Domain Options
This endpoint retrieves all domain options.
Example request:
curl -X GET \
-G "https://app.anonaddy.com/api/v1/domain-options" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://app.anonaddy.com/api/v1/domain-options"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://app.anonaddy.com/api/v1/domain-options',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/domain-options'
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": [
"anonaddy.me",
"johndoe.anonaddy.com",
"johndoe.anonaddy.me"
],
"defaultAliasDomain": "anonaddy.me",
"defaultAliasFormat": "random_words"
}
Request
GET
https://app.anonaddy.com/api/v1/domain-options
Domains
Get All Domains
This endpoint retrieves all domains.
Example request:
curl -X GET \
-G "https://app.anonaddy.com/api/v1/domains" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://app.anonaddy.com/api/v1/domains"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://app.anonaddy.com/api/v1/domains',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/domains'
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": [
{
"id": "0ad7a75a-1517-4b86-bb8a-9443d4965e60",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"domain": "example.com",
"description": null,
"aliases": [],
"default_recipient": null,
"active": true,
"catch_all": true,
"domain_verified_at": "2019-10-01 09:00:00",
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
},
{
"id": "9a7308d9-fcde-4510-b853-6b09e87b42af",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"domain": "example.me",
"description": null,
"aliases": [],
"default_recipient": null,
"active": true,
"catch_all": true,
"domain_verified_at": null,
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
}
]
}
Request
GET
https://app.anonaddy.com/api/v1/domains
Get a Specific Domain
This endpoint retrieves a specific domain.
Example request:
curl -X GET \
-G "https://app.anonaddy.com/api/v1/domains/0ad7a75a-1517-4b86-bb8a-9443d4965e60" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://app.anonaddy.com/api/v1/domains/0ad7a75a-1517-4b86-bb8a-9443d4965e60"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://app.anonaddy.com/api/v1/domains/0ad7a75a-1517-4b86-bb8a-9443d4965e60',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/domains/0ad7a75a-1517-4b86-bb8a-9443d4965e60'
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": {
"id": "0ad7a75a-1517-4b86-bb8a-9443d4965e60",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"domain": "example.com",
"description": null,
"aliases": [],
"default_recipient": null,
"active": true,
"catch_all": true,
"domain_verified_at": "2019-10-01 09:00:00",
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
}
}
Request
GET
https://app.anonaddy.com/api/v1/domains/{id}
URL Parameters
id
string
The id of the domain to retrieve
Create New Domain
This endpoint creates a new domain.
Example request:
curl -X POST \
"https://app.anonaddy.com/api/v1/domains" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}" \
-d '{"domain":"example.com"}'
const url = new URL(
"https://app.anonaddy.com/api/v1/domains"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
let body = {
"domain": "example.com"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://app.anonaddy.com/api/v1/domains',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
'json' => [
'domain' => 'example.com',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/domains'
payload = {
"domain": "example.com"
}
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (201):
{
"data": {
"id": "0ad7a75a-1517-4b86-bb8a-9443d4965e60",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"domain": "example.com",
"description": null,
"aliases": [],
"default_recipient": null,
"active": true,
"catch_all": true,
"domain_verified_at": "2019-10-01 09:00:00",
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
}
}
Request
POST
https://app.anonaddy.com/api/v1/domains
Body Parameters
domain
string
The domain name of the domain
Update a Specific Domain
This endpoint updates a specific domain.
Example request:
curl -X PATCH \
"https://app.anonaddy.com/api/v1/domains/0ad7a75a-1517-4b86-bb8a-9443d4965e60" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}" \
-d '{"description":"New description"}'
const url = new URL(
"https://app.anonaddy.com/api/v1/domains/0ad7a75a-1517-4b86-bb8a-9443d4965e60"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
let body = {
"description": "New description"
}
fetch(url, {
method: "PATCH",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://app.anonaddy.com/api/v1/domains/0ad7a75a-1517-4b86-bb8a-9443d4965e60',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
'json' => [
'description' => 'New description',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/domains/0ad7a75a-1517-4b86-bb8a-9443d4965e60'
payload = {
"description": "New description"
}
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('PATCH', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"data": {
"id": "0ad7a75a-1517-4b86-bb8a-9443d4965e60",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"domain": "example.com",
"description": "New description",
"aliases": [],
"default_recipient": null,
"active": true,
"catch_all": true,
"domain_verified_at": "2019-10-01 09:00:00",
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
}
}
Request
PATCH
https://app.anonaddy.com/api/v1/domains/{id}
URL Parameters
id
string
The id of the domain to update
Body Parameters
description
string optional
The description of the domain
Delete a Specific Domain
This endpoint deletes a specific domain.
Example request:
curl -X DELETE \
"https://app.anonaddy.com/api/v1/domains/0ad7a75a-1517-4b86-bb8a-9443d4965e60" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://app.anonaddy.com/api/v1/domains/0ad7a75a-1517-4b86-bb8a-9443d4965e60"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://app.anonaddy.com/api/v1/domains/0ad7a75a-1517-4b86-bb8a-9443d4965e60',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/domains/0ad7a75a-1517-4b86-bb8a-9443d4965e60'
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Example response (204):
{}
Request
DELETE
https://app.anonaddy.com/api/v1/domains/{id}
URL Parameters
id
string
The id of the domain to delete
Update Default Recipient for a Specific Domain
This endpoint updates the default recipient for a specific domain.
Example request:
curl -X PATCH \
"https://app.anonaddy.com/api/v1/domains/0ad7a75a-1517-4b86-bb8a-9443d4965e60/default-recipient" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}" \
-d '{"default_recipient":"46eebc50-f7f8-46d7-beb9-c37f04c29a84"}'
const url = new URL(
"https://app.anonaddy.com/api/v1/domains/0ad7a75a-1517-4b86-bb8a-9443d4965e60/default-recipient"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
let body = {
"default_recipient": "46eebc50-f7f8-46d7-beb9-c37f04c29a84"
}
fetch(url, {
method: "PATCH",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://app.anonaddy.com/api/v1/domains/0ad7a75a-1517-4b86-bb8a-9443d4965e60/default-recipient',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
'json' => [
'default_recipient' => '46eebc50-f7f8-46d7-beb9-c37f04c29a84',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/domains/0ad7a75a-1517-4b86-bb8a-9443d4965e60/default-recipient'
payload = {
"default_recipient": "46eebc50-f7f8-46d7-beb9-c37f04c29a84"
}
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('PATCH', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"data": {
"id": "0ad7a75a-1517-4b86-bb8a-9443d4965e60",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"domain": "example.com",
"description": null,
"aliases": [],
"default_recipient": {
"id": "46eebc50-f7f8-46d7-beb9-c37f04c29a84",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"email": "me@example.com",
"should_encrypt": false,
"fingerprint": null,
"email_verified_at": "2019-10-01 09:00:00",
"aliases": [],
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
},
"active": true,
"catch_all": true,
"domain_verified_at": "2019-10-01 09:00:00",
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
}
}
Request
PATCH
https://app.anonaddy.com/api/v1/domains/{id}/default-recipient
URL Parameters
id
string
The id of the domain to update
Body Parameters
default_recipient
string optional
The id of the recipient
Activate a Specific Domain
This endpoint activates a specific domain.
Example request:
curl -X POST \
"https://app.anonaddy.com/api/v1/active-domains" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}" \
-d '{"id":"0ad7a75a-1517-4b86-bb8a-9443d4965e60"}'
const url = new URL(
"https://app.anonaddy.com/api/v1/active-domains"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
let body = {
"id": "0ad7a75a-1517-4b86-bb8a-9443d4965e60"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://app.anonaddy.com/api/v1/active-domains',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
'json' => [
'id' => '0ad7a75a-1517-4b86-bb8a-9443d4965e60',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/active-domains'
payload = {
"id": "0ad7a75a-1517-4b86-bb8a-9443d4965e60"
}
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"data": {
"id": "0ad7a75a-1517-4b86-bb8a-9443d4965e60",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"domain": "example.com",
"description": null,
"aliases": [],
"default_recipient": null,
"active": true,
"catch_all": true,
"domain_verified_at": "2019-10-01 09:00:00",
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
}
}
Request
POST
https://app.anonaddy.com/api/v1/active-domains
Body Parameters
id
string
The id for the domain
Deactivate a Specific Domain
This endpoint deactivates a specific domain.
Example request:
curl -X DELETE \
"https://app.anonaddy.com/api/v1/active-domains/0ad7a75a-1517-4b86-bb8a-9443d4965e60" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://app.anonaddy.com/api/v1/active-domains/0ad7a75a-1517-4b86-bb8a-9443d4965e60"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://app.anonaddy.com/api/v1/active-domains/0ad7a75a-1517-4b86-bb8a-9443d4965e60',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/active-domains/0ad7a75a-1517-4b86-bb8a-9443d4965e60'
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Example response (204):
{}
Request
DELETE
https://app.anonaddy.com/api/v1/active-domains/{id}
URL Parameters
id
string
The id of the domain to deactivate
Enable catch-all for a Specific Domain
This endpoint enables catch-all a specific domain.
Example request:
curl -X POST \
"https://app.anonaddy.com/api/v1/catch-all-domains" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}" \
-d '{"id":"0ad7a75a-1517-4b86-bb8a-9443d4965e60"}'
const url = new URL(
"https://app.anonaddy.com/api/v1/catch-all-domains"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
let body = {
"id": "0ad7a75a-1517-4b86-bb8a-9443d4965e60"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://app.anonaddy.com/api/v1/catch-all-domains',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
'json' => [
'id' => '0ad7a75a-1517-4b86-bb8a-9443d4965e60',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/catch-all-domains'
payload = {
"id": "0ad7a75a-1517-4b86-bb8a-9443d4965e60"
}
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"data": {
"id": "0ad7a75a-1517-4b86-bb8a-9443d4965e60",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"domain": "example.com",
"description": null,
"aliases": [],
"default_recipient": null,
"active": true,
"catch_all": true,
"domain_verified_at": "2019-10-01 09:00:00",
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
}
}
Request
POST
https://app.anonaddy.com/api/v1/catch-all-domains
Body Parameters
id
string
The id for the domain
Disable catch-all for a Specific Domain
This endpoint disables catch-all for a specific domain.
Example request:
curl -X DELETE \
"https://app.anonaddy.com/api/v1/catch-all-domains/0ad7a75a-1517-4b86-bb8a-9443d4965e60" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://app.anonaddy.com/api/v1/catch-all-domains/0ad7a75a-1517-4b86-bb8a-9443d4965e60"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://app.anonaddy.com/api/v1/catch-all-domains/0ad7a75a-1517-4b86-bb8a-9443d4965e60',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/catch-all-domains/0ad7a75a-1517-4b86-bb8a-9443d4965e60'
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Example response (204):
{}
Request
DELETE
https://app.anonaddy.com/api/v1/catch-all-domains/{id}
URL Parameters
id
string
The id of the domain to disable catch-all
Recipients
Get All Recipients
This endpoint retrieves all recipients.
Example request:
curl -X GET \
-G "https://app.anonaddy.com/api/v1/recipients" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://app.anonaddy.com/api/v1/recipients"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://app.anonaddy.com/api/v1/recipients',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/recipients'
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": [
{
"id": "46eebc50-f7f8-46d7-beb9-c37f04c29a84",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"email": "me@example.com",
"should_encrypt": false,
"fingerprint": null,
"email_verified_at": null,
"aliases": [],
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
},
{
"id": "8f515035-efed-4daa-b708-9692a155fa14",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"email": "hello@example.com",
"should_encrypt": false,
"fingerprint": null,
"email_verified_at": "2019-10-01 09:00:00",
"aliases": [],
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
}
]
}
Request
GET
https://app.anonaddy.com/api/v1/recipients
Get a Specific Recipient
This endpoint retrieves a specific recipient.
Example request:
curl -X GET \
-G "https://app.anonaddy.com/api/v1/recipients/46eebc50-f7f8-46d7-beb9-c37f04c29a84" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://app.anonaddy.com/api/v1/recipients/46eebc50-f7f8-46d7-beb9-c37f04c29a84"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://app.anonaddy.com/api/v1/recipients/46eebc50-f7f8-46d7-beb9-c37f04c29a84',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/recipients/46eebc50-f7f8-46d7-beb9-c37f04c29a84'
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": {
"id": "46eebc50-f7f8-46d7-beb9-c37f04c29a84",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"email": "me@example.com",
"should_encrypt": false,
"fingerprint": null,
"email_verified_at": null,
"aliases": [],
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
}
}
Request
GET
https://app.anonaddy.com/api/v1/recipients/{id}
URL Parameters
id
string
The id of the recipient to retrieve
Create New Recipient
This endpoint creates a new recipient.
Example request:
curl -X POST \
"https://app.anonaddy.com/api/v1/recipients" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}" \
-d '{"email":"me@example.com"}'
const url = new URL(
"https://app.anonaddy.com/api/v1/recipients"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
let body = {
"email": "me@example.com"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://app.anonaddy.com/api/v1/recipients',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
'json' => [
'email' => 'me@example.com',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/recipients'
payload = {
"email": "me@example.com"
}
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (201):
{
"data": {
"id": "46eebc50-f7f8-46d7-beb9-c37f04c29a84",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"email": "me@example.com",
"should_encrypt": false,
"fingerprint": null,
"email_verified_at": null,
"aliases": [],
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
}
}
Request
POST
https://app.anonaddy.com/api/v1/recipients
Body Parameters
email
string
The email of the recipient
Delete a Specific Recipient
This endpoint deletes a specific recipient.
Example request:
curl -X DELETE \
"https://app.anonaddy.com/api/v1/recipients/46eebc50-f7f8-46d7-beb9-c37f04c29a84" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://app.anonaddy.com/api/v1/recipients/46eebc50-f7f8-46d7-beb9-c37f04c29a84"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://app.anonaddy.com/api/v1/recipients/46eebc50-f7f8-46d7-beb9-c37f04c29a84',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/recipients/46eebc50-f7f8-46d7-beb9-c37f04c29a84'
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Example response (204):
{}
Request
DELETE
https://app.anonaddy.com/api/v1/recipients/{id}
URL Parameters
id
string
The id of the recipient to delete
Resend the verification email for a recipient
This endpoint can be used to resend the verification email when adding a new recipient
Example request:
curl -X POST \
"https://app.anonaddy.com/api/v1/recipients/email/resend" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}" \
-d '{"recipient_id":"46eebc50-f7f8-46d7-beb9-c37f04c29a84"}'
const url = new URL(
"https://app.anonaddy.com/api/v1/recipients/email/resend"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
let body = {
"recipient_id": "46eebc50-f7f8-46d7-beb9-c37f04c29a84"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://app.anonaddy.com/api/v1/recipients/email/resend',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
'json' => [
'recipient_id' => '46eebc50-f7f8-46d7-beb9-c37f04c29a84',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/recipients/email/resend'
payload = {
"recipient_id": "46eebc50-f7f8-46d7-beb9-c37f04c29a84"
}
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{}
Request
POST
https://app.anonaddy.com/api/v1/recipients/email/resend
Body Parameters
recipient_id
string
The ID of the recipient
Add Public Key for a Specific Recipient
This endpoint adds a public GPG/OpenPGP key for a specific recipient. Make sure to escape the json using something like - https://jsonformatter.org/json-escape
Example request:
curl -X PATCH \
"https://app.anonaddy.com/api/v1/recipient-keys/46eebc50-f7f8-46d7-beb9-c37f04c29a84" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}" \
-d '{"key_data":"-----BEGIN PGP PUBLIC KEY BLOCK-----"}'
const url = new URL(
"https://app.anonaddy.com/api/v1/recipient-keys/46eebc50-f7f8-46d7-beb9-c37f04c29a84"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
let body = {
"key_data": "-----BEGIN PGP PUBLIC KEY BLOCK-----"
}
fetch(url, {
method: "PATCH",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://app.anonaddy.com/api/v1/recipient-keys/46eebc50-f7f8-46d7-beb9-c37f04c29a84',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
'json' => [
'key_data' => '-----BEGIN PGP PUBLIC KEY BLOCK-----',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/recipient-keys/46eebc50-f7f8-46d7-beb9-c37f04c29a84'
payload = {
"key_data": "-----BEGIN PGP PUBLIC KEY BLOCK-----"
}
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('PATCH', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"data": {
"id": "46eebc50-f7f8-46d7-beb9-c37f04c29a84",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"email": "me@example.com",
"should_encrypt": true,
"fingerprint": "70E400B5064061EB84181DABEDADE14D67325B36",
"email_verified_at": "2019-10-01 09:00:00",
"aliases": [],
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
}
}
Request
PATCH
https://app.anonaddy.com/api/v1/recipient-keys/{id}
URL Parameters
id
string
The id of the recipient to add the key for
Body Parameters
key_data
string
The public key data for the recipient
Remove Public Key for a Specific Recipient
This endpoint remnoves a public GPG/OpenPGP key for a specific recipient.
Example request:
curl -X DELETE \
"https://app.anonaddy.com/api/v1/recipient-keys/46eebc50-f7f8-46d7-beb9-c37f04c29a84" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://app.anonaddy.com/api/v1/recipient-keys/46eebc50-f7f8-46d7-beb9-c37f04c29a84"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://app.anonaddy.com/api/v1/recipient-keys/46eebc50-f7f8-46d7-beb9-c37f04c29a84',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/recipient-keys/46eebc50-f7f8-46d7-beb9-c37f04c29a84'
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Example response (204):
{}
Request
DELETE
https://app.anonaddy.com/api/v1/recipient-keys/{id}
URL Parameters
id
string
The id of the recipient to remove the key for
Enable Encryption for a Specific Recipient
This endpoint enables encryption for a specific recipient.
Example request:
curl -X POST \
"https://app.anonaddy.com/api/v1/encrypted-recipients" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}" \
-d '{"id":"46eebc50-f7f8-46d7-beb9-c37f04c29a84"}'
const url = new URL(
"https://app.anonaddy.com/api/v1/encrypted-recipients"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
let body = {
"id": "46eebc50-f7f8-46d7-beb9-c37f04c29a84"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://app.anonaddy.com/api/v1/encrypted-recipients',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
'json' => [
'id' => '46eebc50-f7f8-46d7-beb9-c37f04c29a84',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/encrypted-recipients'
payload = {
"id": "46eebc50-f7f8-46d7-beb9-c37f04c29a84"
}
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"data": {
"id": "46eebc50-f7f8-46d7-beb9-c37f04c29a84",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"email": "me@example.com",
"should_encrypt": true,
"fingerprint": "70E400B5064061EB84181DABEDADE14D67325B36",
"email_verified_at": "2019-10-01 09:00:00",
"aliases": [],
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
}
}
Request
POST
https://app.anonaddy.com/api/v1/encrypted-recipients
Body Parameters
id
string
The id for the recipient
Disable Encryption for a Specific Recipient
This endpoint disables encryption for a specific recipient.
Example request:
curl -X DELETE \
"https://app.anonaddy.com/api/v1/encrypted-recipients/46eebc50-f7f8-46d7-beb9-c37f04c29a84" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://app.anonaddy.com/api/v1/encrypted-recipients/46eebc50-f7f8-46d7-beb9-c37f04c29a84"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://app.anonaddy.com/api/v1/encrypted-recipients/46eebc50-f7f8-46d7-beb9-c37f04c29a84',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/encrypted-recipients/46eebc50-f7f8-46d7-beb9-c37f04c29a84'
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Example response (204):
{}
Request
DELETE
https://app.anonaddy.com/api/v1/encrypted-recipients/{id}
URL Parameters
id
string
The id of the recipient to disable encryption for
Rules
Get All Rules
This endpoint retrieves all rules.
Example request:
curl -X GET \
-G "https://app.anonaddy.com/api/v1/rules" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://app.anonaddy.com/api/v1/rules"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://app.anonaddy.com/api/v1/rules',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/rules'
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": [
{
"id": "50c9e585-e7f5-41c4-9016-9014c15454bc",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"name": "First Rule",
"order": 0,
"conditions": [
{
"type": "sender",
"match": "is not",
"values": [
"will@anonaddy.com"
]
}
],
"actions": [
{
"type": "subject",
"value": "New Subject"
}
],
"operator": "AND",
"active": true,
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
},
{
"id": "c549db7d-5fac-4b09-9443-9e47f644d29f",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"name": "Second Rule",
"order": 0,
"conditions": [
{
"type": "sender",
"match": "is exactly",
"values": [
"will@anonaddy.com"
]
}
],
"actions": [
{
"type": "subject",
"value": "Another Subject"
}
],
"operator": "OR",
"active": true,
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
}
]
}
Request
GET
https://app.anonaddy.com/api/v1/rules
Get a Specific Rule
This endpoint retrieves a specific rule.
Example request:
curl -X GET \
-G "https://app.anonaddy.com/api/v1/rules/50c9e585-e7f5-41c4-9016-9014c15454bc" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://app.anonaddy.com/api/v1/rules/50c9e585-e7f5-41c4-9016-9014c15454bc"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://app.anonaddy.com/api/v1/rules/50c9e585-e7f5-41c4-9016-9014c15454bc',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/rules/50c9e585-e7f5-41c4-9016-9014c15454bc'
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": {
"id": "50c9e585-e7f5-41c4-9016-9014c15454bc",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"name": "First Rule",
"order": 0,
"conditions": [
{
"type": "sender",
"match": "is exactly",
"values": [
"will@anonaddy.com"
]
}
],
"actions": [
{
"type": "subject",
"value": "New Subject!"
}
],
"operator": "AND",
"active": true,
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
}
}
Request
GET
https://app.anonaddy.com/api/v1/rules/{id}
URL Parameters
id
string
The id of the rule to retrieve
Create New Rule
This endpoint creates a new rule.
Example request:
curl -X POST \
"https://app.anonaddy.com/api/v1/rules" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}" \
-d '{"name":"First Rule","conditions":[{"type":"sender","match":"is exactly","values":["will@anonaddy.com"]}],"actions":[{"type":"subject","value":"New Subject!"}],"operator":"AND"}'
const url = new URL(
"https://app.anonaddy.com/api/v1/rules"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
let body = {
"name": "First Rule",
"conditions": [
{
"type": "sender",
"match": "is exactly",
"values": [
"will@anonaddy.com"
]
}
],
"actions": [
{
"type": "subject",
"value": "New Subject!"
}
],
"operator": "AND"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://app.anonaddy.com/api/v1/rules',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
'json' => [
'name' => 'First Rule',
'conditions' => [
[
'type' => 'sender',
'match' => 'is exactly',
'values' => [
'will@anonaddy.com',
],
],
],
'actions' => [
[
'type' => 'subject',
'value' => 'New Subject!',
],
],
'operator' => 'AND',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/rules'
payload = {
"name": "First Rule",
"conditions": [
{
"type": "sender",
"match": "is exactly",
"values": [
"will@anonaddy.com"
]
}
],
"actions": [
{
"type": "subject",
"value": "New Subject!"
}
],
"operator": "AND"
}
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (201):
{
"data": {
"id": "50c9e585-e7f5-41c4-9016-9014c15454bc",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"name": "First Rule",
"order": 0,
"conditions": [
{
"type": "sender",
"match": "is exactly",
"values": [
"will@anonaddy.com"
]
}
],
"actions": [
{
"type": "subject",
"value": "New Subject!"
}
],
"operator": "AND",
"active": true,
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
}
}
Request
POST
https://app.anonaddy.com/api/v1/rules
Body Parameters
name
string
The name of the rule
conditions
object[]
The conditions for the rule.
conditions[].type
string
The type for the condition, options - sender, subject, alias.
conditions[].match
string optional
The match type for the condition, options - is exactly, is not, contains, does not contain, starts with, does not start with, ends with, does not end with.
conditions[].values
string[]
The array of values you would like to match.
actions
object[]
The actions for the rule.
actions[].type
string
The type for the action, options - subject, displayFrom, encryption, banner, block.
actions[].value
string
The value for the action.
operator
string optional
The chosen operator for the rule, options - AND, OR
Update a Specific Rule
This endpoint updates a specific rule.
Example request:
curl -X PATCH \
"https://app.anonaddy.com/api/v1/rules/50c9e585-e7f5-41c4-9016-9014c15454bc" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}" \
-d '{"name":"New Name","conditions":[{"type":"sender","match":"is exactly","values":["will@anonaddy.com"]}],"actions":[{"type":"subject","value":"New Subject!"}],"operator":"AND"}'
const url = new URL(
"https://app.anonaddy.com/api/v1/rules/50c9e585-e7f5-41c4-9016-9014c15454bc"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
let body = {
"name": "New Name",
"conditions": [
{
"type": "sender",
"match": "is exactly",
"values": [
"will@anonaddy.com"
]
}
],
"actions": [
{
"type": "subject",
"value": "New Subject!"
}
],
"operator": "AND"
}
fetch(url, {
method: "PATCH",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://app.anonaddy.com/api/v1/rules/50c9e585-e7f5-41c4-9016-9014c15454bc',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
'json' => [
'name' => 'New Name',
'conditions' => [
[
'type' => 'sender',
'match' => 'is exactly',
'values' => [
'will@anonaddy.com',
],
],
],
'actions' => [
[
'type' => 'subject',
'value' => 'New Subject!',
],
],
'operator' => 'AND',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/rules/50c9e585-e7f5-41c4-9016-9014c15454bc'
payload = {
"name": "New Name",
"conditions": [
{
"type": "sender",
"match": "is exactly",
"values": [
"will@anonaddy.com"
]
}
],
"actions": [
{
"type": "subject",
"value": "New Subject!"
}
],
"operator": "AND"
}
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('PATCH', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"data": {
"id": "50c9e585-e7f5-41c4-9016-9014c15454bc",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"name": "New Name",
"order": 0,
"conditions": [
{
"type": "sender",
"match": "is exactly",
"values": [
"will@anonaddy.com"
]
}
],
"actions": [
{
"type": "subject",
"value": "New Subject!"
}
],
"operator": "AND",
"active": true,
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
}
}
Request
PATCH
https://app.anonaddy.com/api/v1/rules/{id}
URL Parameters
id
string
The id of the rule to update
Body Parameters
name
string
The name of the rule
conditions
object[]
The conditions for the rule.
conditions[].type
string
The type for the condition, options - sender, subject, alias.
conditions[].match
string optional
The match type for the condition, options - is exactly, is not, contains, does not contain, starts with, does not start with, ends with, does not end with.
conditions[].values
string[]
The array of values you would like to match.
actions
object[]
The actions for the rule.
actions[].type
string
The type for the action, options - subject, displayFrom, encryption, banner, block.
actions[].value
string
The value for the action.
operator
string optional
The chosen operator for the rule, options - AND, OR
Delete a Specific Rule
This endpoint deletes a specific rule.
Example request:
curl -X DELETE \
"https://app.anonaddy.com/api/v1/rules/50c9e585-e7f5-41c4-9016-9014c15454bc" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://app.anonaddy.com/api/v1/rules/50c9e585-e7f5-41c4-9016-9014c15454bc"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://app.anonaddy.com/api/v1/rules/50c9e585-e7f5-41c4-9016-9014c15454bc',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/rules/50c9e585-e7f5-41c4-9016-9014c15454bc'
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Example response (204):
{}
Request
DELETE
https://app.anonaddy.com/api/v1/rules/{id}
URL Parameters
id
string
The id of the rule to delete
Update the order of the Rules
This endpoint updates the order of the rules.
Example request:
curl -X POST \
"https://app.anonaddy.com/api/v1/reorder-rules" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}" \
-d '{"ids":["c549db7d-5fac-4b09-9443-9e47f644d29f","50c9e585-e7f5-41c4-9016-9014c15454bc"]}'
const url = new URL(
"https://app.anonaddy.com/api/v1/reorder-rules"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
let body = {
"ids": [
"c549db7d-5fac-4b09-9443-9e47f644d29f",
"50c9e585-e7f5-41c4-9016-9014c15454bc"
]
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://app.anonaddy.com/api/v1/reorder-rules',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
'json' => [
'ids' => [
'c549db7d-5fac-4b09-9443-9e47f644d29f',
'50c9e585-e7f5-41c4-9016-9014c15454bc',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/reorder-rules'
payload = {
"ids": [
"c549db7d-5fac-4b09-9443-9e47f644d29f",
"50c9e585-e7f5-41c4-9016-9014c15454bc"
]
}
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{}
Request
POST
https://app.anonaddy.com/api/v1/reorder-rules
Body Parameters
ids
string[]
The new order of the rules
Activate a Specific Rule
This endpoint activates a specific Rule.
Example request:
curl -X POST \
"https://app.anonaddy.com/api/v1/active-rules" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}" \
-d '{"id":"50c9e585-e7f5-41c4-9016-9014c15454bc"}'
const url = new URL(
"https://app.anonaddy.com/api/v1/active-rules"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
let body = {
"id": "50c9e585-e7f5-41c4-9016-9014c15454bc"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://app.anonaddy.com/api/v1/active-rules',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
'json' => [
'id' => '50c9e585-e7f5-41c4-9016-9014c15454bc',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/active-rules'
payload = {
"id": "50c9e585-e7f5-41c4-9016-9014c15454bc"
}
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"data": {
"id": "50c9e585-e7f5-41c4-9016-9014c15454bc",
"user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
"name": "First Rule",
"order": 0,
"conditions": [
{
"type": "sender",
"match": "is exactly",
"values": [
"will@anonaddy.com"
]
}
],
"actions": [
{
"type": "subject",
"value": "New Subject!"
}
],
"operator": "AND",
"active": true,
"created_at": "2019-10-01 09:00:00",
"updated_at": "2019-10-01 09:00:00"
}
}
Request
POST
https://app.anonaddy.com/api/v1/active-rules
Body Parameters
id
string
The id for the rule
Deactivate a Specific Rule
This endpoint deactivates a specific rule.
Example request:
curl -X DELETE \
"https://app.anonaddy.com/api/v1/active-rules/50c9e585-e7f5-41c4-9016-9014c15454bc" \
-H "Content-Type: application/json" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://app.anonaddy.com/api/v1/active-rules/50c9e585-e7f5-41c4-9016-9014c15454bc"
);
let headers = {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest",
"Authorization": "Bearer {token}",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://app.anonaddy.com/api/v1/active-rules/50c9e585-e7f5-41c4-9016-9014c15454bc',
[
'headers' => [
'Content-Type' => 'application/json',
'X-Requested-With' => 'XMLHttpRequest',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.anonaddy.com/api/v1/active-rules/50c9e585-e7f5-41c4-9016-9014c15454bc'
headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
'Authorization': 'Bearer {token}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Example response (204):
{}
Request
DELETE
https://app.anonaddy.com/api/v1/active-rules/{id}
URL Parameters
id
string
The id of the rule to deactivate
Errors
The AnonAddy API uses the following error codes:
Error Code | Meaning |
---|---|
400 | Bad Request -- Your request sucks |
401 | Unauthenticated -- Your API key is wrong |
403 | Forbidden -- You do not have permission to access the requested resource |
404 | Not Found -- The specified resource could not be found |
405 | Method Not Allowed -- You tried to access an endpoint with an invalid method |
422 | Validation Error -- The given data was invalid |
429 | Too Many Requests -- You're sending too many requests or have reached your limit for new aliases |
500 | Internal Server Error -- We had a problem with our server. Try again later |
503 | Service Unavailable -- We're temporarially offline for maintanance. Please try again later |