NAV
bash javascript

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.

We have language bindings in Shell, and JavaScript! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.

Get Postman Collection

Authentication

AnonAddy uses API access tokens to allow access to the API. You can generate a new API access token at your account settings.

AnonAddy expects for the API key to be included in all API requests to the server in a header that looks like the following:

Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImExYT...

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));

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,
            "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,
            "created_at": "2019-10-01 09:00:00",
            "updated_at": "2019-10-01 09:00:00"
        }
    ]
}

HTTP 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));

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,
        "created_at": "2019-10-01 09:00:00",
        "updated_at": "2019-10-01 09:00:00"
    }
}

HTTP Request

GET https://app.anonaddy.com/api/v1/usernames/{id}

URL Parameters

Parameter Status Description
id required 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));

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,
        "created_at": "2019-10-01 09:00:00",
        "updated_at": "2019-10-01 09:00:00"
    }
}

HTTP Request

POST https://app.anonaddy.com/api/v1/usernames

Body Parameters

Parameter Type Status Description
username string required 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));

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,
        "created_at": "2019-10-01 09:00:00",
        "updated_at": "2019-10-01 09:00:00"
    }
}

HTTP Request

PATCH https://app.anonaddy.com/api/v1/usernames/{id}

URL Parameters

Parameter Status Description
id required The id of the additional username to update

Body Parameters

Parameter Type Status Description
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));

Example response (204):

{}

HTTP Request

DELETE https://app.anonaddy.com/api/v1/usernames/{id}

URL Parameters

Parameter Status Description
id required 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));

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,
        "created_at": "2019-10-01 09:00:00",
        "updated_at": "2019-10-01 09:00:00"
    }
}

HTTP Request

PATCH https://app.anonaddy.com/api/v1/usernames/{id}/default-recipient

URL Parameters

Parameter Status Description
id required The id of the additional username to update

Body Parameters

Parameter Type Status Description
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));

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,
        "created_at": "2019-10-01 09:00:00",
        "updated_at": "2019-10-01 09:00:00"
    }
}

HTTP Request

POST https://app.anonaddy.com/api/v1/active-usernames

Body Parameters

Parameter Type Status Description
id string required 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));

Example response (204):

{}

HTTP Request

DELETE https://app.anonaddy.com/api/v1/active-usernames/{id}

URL Parameters

Parameter Status Description
id required The id of the additional username to deactivate

Aliases

Get All Aliases

This endpoint retrieves all aliases.

Example request:

curl -X GET \
    -G "https://app.anonaddy.com/api/v1/aliases" \
    -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 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));

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,
            "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,
            "recipients": [],
            "created_at": "2019-10-01 09:00:00",
            "updated_at": "2019-10-01 09:00:00"
        }
    ]
}

HTTP Request

GET https://app.anonaddy.com/api/v1/aliases

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));

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,
        "recipients": [],
        "created_at": "2019-10-01 09:00:00",
        "updated_at": "2019-10-01 09:00:00"
    }
}

HTTP Request

GET https://app.anonaddy.com/api/v1/aliases/{id}

URL Parameters

Parameter Status Description
id required The id of the alias to retrieve

Create New Alias

This endpoint creates a new UUID 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"}'
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"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(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,
        "recipients": [],
        "created_at": "2019-10-01 09:00:00",
        "updated_at": "2019-10-01 09:00:00"
    }
}

HTTP Request

POST https://app.anonaddy.com/api/v1/aliases

Body Parameters

Parameter Type Status Description
domain string required The domain of the alias
description string optional The description of the alias

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));

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,
        "recipients": [],
        "created_at": "2019-10-01 09:00:00",
        "updated_at": "2019-10-01 09:00:00"
    }
}

HTTP Request

PATCH https://app.anonaddy.com/api/v1/aliases/{id}

URL Parameters

Parameter Status Description
id required The id of the alias to update

Body Parameters

Parameter Type Status Description
description string optional The description of the alias

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));

Example response (204):

{}

HTTP Request

DELETE https://app.anonaddy.com/api/v1/aliases/{id}

URL Parameters

Parameter Status Description
id required 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));

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,
        "recipients": [],
        "created_at": "2019-10-01 09:00:00",
        "updated_at": "2019-10-01 09:00:00"
    }
}

HTTP Request

POST https://app.anonaddy.com/api/v1/active-aliases

Body Parameters

Parameter Type Status Description
id string required 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));

Example response (204):

{}

HTTP Request

DELETE https://app.anonaddy.com/api/v1/active-aliases/{id}

URL Parameters

Parameter Status Description
id required 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));

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,
        "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"
    }
}

HTTP Request

POST https://app.anonaddy.com/api/v1/alias-recipients

Body Parameters

Parameter Type Status Description
alias_id string required The id of the alias
recipient_ids array optional An array of recipient ids to add

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));

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,
            "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,
            "domain_verified_at": null,
            "created_at": "2019-10-01 09:00:00",
            "updated_at": "2019-10-01 09:00:00"
        }
    ]
}

HTTP 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));

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,
        "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"
    }
}

HTTP Request

GET https://app.anonaddy.com/api/v1/domains/{id}

URL Parameters

Parameter Status Description
id required 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));

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,
        "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"
    }
}

HTTP Request

POST https://app.anonaddy.com/api/v1/domains

Body Parameters

Parameter Type Status Description
domain string required 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));

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,
        "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"
    }
}

HTTP Request

PATCH https://app.anonaddy.com/api/v1/domains/{id}

URL Parameters

Parameter Status Description
id required The id of the domain to update

Body Parameters

Parameter Type Status Description
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));

Example response (204):

{}

HTTP Request

DELETE https://app.anonaddy.com/api/v1/domains/{id}

URL Parameters

Parameter Status Description
id required 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));

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,
        "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"
    }
}

HTTP Request

PATCH https://app.anonaddy.com/api/v1/domains/{id}/default-recipient

URL Parameters

Parameter Status Description
id required The id of the domain to update

Body Parameters

Parameter Type Status Description
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));

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,
        "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"
    }
}

HTTP Request

POST https://app.anonaddy.com/api/v1/active-domains

Body Parameters

Parameter Type Status Description
id string required 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));

Example response (204):

{}

HTTP Request

DELETE https://app.anonaddy.com/api/v1/active-domains/{id}

URL Parameters

Parameter Status Description
id required The id of the domain to deactivate

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));

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"
        }
    ]
}

HTTP 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));

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"
    }
}

HTTP Request

GET https://app.anonaddy.com/api/v1/recipients/{id}

URL Parameters

Parameter Status Description
id required 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));

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"
    }
}

HTTP Request

POST https://app.anonaddy.com/api/v1/recipients

Body Parameters

Parameter Type Status Description
email string required 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));

Example response (204):

{}

HTTP Request

DELETE https://app.anonaddy.com/api/v1/recipients/{id}

URL Parameters

Parameter Status Description
id required The id of the recipient to delete

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));

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"
    }
}

HTTP Request

PATCH https://app.anonaddy.com/api/v1/recipient-keys/{id}

URL Parameters

Parameter Status Description
id required The id of the recipient to add the key for

Body Parameters

Parameter Type Status Description
key_data string required 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));

Example response (204):

{}

HTTP Request

DELETE https://app.anonaddy.com/api/v1/recipient-keys/{id}

URL Parameters

Parameter Status Description
id required 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));

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"
    }
}

HTTP Request

POST https://app.anonaddy.com/api/v1/encrypted-recipients

Body Parameters

Parameter Type Status Description
id string required 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));

Example response (204):

{}

HTTP Request

DELETE https://app.anonaddy.com/api/v1/encrypted-recipients/{id}

URL Parameters

Parameter Status Description
id required The id of the recipient to disable encryption for

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