GET

Description

Retrieve a list of all trusted email domains, or a single domain.

URL structure

https://api.fortnox.se/3/emailtrusteddomains/{id}

Method

GET

Version

3

Response

The domains register can return a list of records or a single record. By specifying a id in the URL, a single record will be returned. Not specifying a id will return a list of records.

<?xml version="1.0" encoding="UTF-8"?>
<TrustedDomains>
    <TrustedDomain>
        <Id>23</Id>
        <Domain>fortnox.se</Domain>
    </TrustedDomain>
    <TrustedDomain>
        <Id>17</Id>
        <Domain>onemore.se</Domain>
    </TrustedDomain>
</TrustedDomains>
<?xml version="1.0" encoding="UTF-8"?>
<TrustedDomain>
    <Id>23</Id>
    <Domain>fortnox.se</Domain>
</TrustedDomain>
{
    "TrustedDomains": [
        {
            "Id": 23,
            "Domain": "fortnox.se"
        },
        {
            "Id": 17,
            "Domain": "onemore.se"
        }
    ]
}
{
    "TrustedDomain": [
        {
            "Id": 23,
            "Domain": "fortnox.se"
        }
    ]
}

POST – Save new trusted domain

Description

Add a new domain as trusted.

URL structure

https://api.fortnox.se/3/emailtrusteddomains/

Method

POST

Version

3

Request

The request body should contain a structure of a domain, either in JSON or XML.

<?xml version="1.0" encoding="utf-8"?>
<TrustedDomain>
    <Domain>noreply@domain.se</Domain>
</TrustedDomain>
{
    "TrustedDomain": { 
        "Domain": "fortnox.se" 
    }
}

Response

The same data, including an id, is returned if all went well, otherwise an error message is returned.

<?xml version="1.0" encoding="UTF-8"?>
<TrustedDomain>
    <Id>23</Id>
    <Domain>fortnox.se</Domain>
</TrustedDomain>
{
    "TrustedDomain": [
        {
            "Id": 23,
            "Domain": "fortnox.se"
        }
    ]
}

DELETE

Description

Delete a domain from the trusted domains list. Provide an id matching a domain to delete.

URL structure

https://api.fortnox.se/3/emailtrusteddomains/{id}

Method

DELETE

Version

3

Request

The request body should be empty.

Respons

No content (204 No Content) is returned on success.

Fields

Trusted domains

Field Description Limits Type Searchable Sortable Required R/W
Id Id of the record Integer R
Domain Domain address of trusted String R/W