Spamty Logo


Spamty API


This is the API for Spamty.eu.

You can use it to generate a Spamty link (Encryption API) and to view an email address from a Spamty link (Decryption API).

Support

You can contact us if you need help or if you have any questions. Please look at our statuspage to find out if there are any problems with our servers.

Authentication

You need to authenticate with an username and an API key to use our API. Please request them via our contact form.

Information


This is the version API that gives you some general information about all Spamty APIs.

Versions and API info /version/{api}


With this API you can get some information about the latest version of any Spamty API.

GET https://api.spamty.eu/version/{api}

The API is located here: https://api.spamty.eu/version.php. Use HTTPS and send a GET request.

Request

Method: GET
Location:

https://api.spamty.eu/version/{api}

Parameters

Required Parameter Type Description
required api string

The API type (values: shorturl, decryption, encryption)

Response

This is an example for a successful response. The HTTP status code will be 200. If there was an error the status code will be 400. Please look at the value for “statusDetails” to indentify the problem.

Headers

Header Description
Status Code 200
Content Type application/json

Response Body

{
"status": 1,
"statusDetails": "ok",
"info": "https://dev.spamty.eu/decryption/",
"url": "https://api.spamty.eu/decryption/v4.php",
"version": "4.2"
}

Response Schema

{
"title": "Response /version API",
"type": "object",
"properties": {
    "status": {
        "description": "Value 1 if successful, 0 for errors",
        "type": "integer"
    },
    "statusDetails": {
        "description": "Description of the error, if there was one",
        "type": "string"
    },
    "info": {
        "description": "URL with API documentation",
        "type": "string"
    },
    "url": {
        "description": "URL for the API",
        "type": "string"
    },
    "version": {
        "description": "Current API version",
        "type": "string"
    }
},
"required": ["status", "statusDetails"],
}

Encryption


This is the API to generate a new Spamty link with your email address.

The current version is v5. Notice that the link that will be created contains the version. A v5 link can be used only with our decryption API v5. Older versions of our encryption API are not available anymore.

Encryption v5 /encryption


This is the API to generate a new Spamty link with your email address.

POST https://api.spamty.eu/encryption

You need to do a post request.

Request

Method: POST
Location:

https://api.spamty.eu/encryption

Headers

Header Description
Content-Type application/x-www-form-urlencoded

Response

This is an example for a successful response. The HTTP status code will be 200. If there was an error with your data the status code will be 400. Please look at the value for “statusDetails” to indentify the problem. If there was a problem with our server or database the status code will be 500. Contact the support and report this problem.

Headers

Header Description
Content-Type application/x-www-form-urlencoded
Status Code 200
Content Type application/json

Response Body

{
"status": 1,
"statusDetails": "ok",
"info": "https://dev.spamty.eu/decryption/",
"version": "v4",
"apiM": "20",
"apiK": "869656557u8375992c",
"urlPublic": "https://spamty.eu/mail/v4/20/869656557u8375992c/",
"mailCheck": "50fbf5f7"
}

Response Schema

{
"title": "Response /encryption API",
"type": "object",
"properties": {
    "status": {
        "description": "Value 1 for OK and 0 if an error occurred.",
        "type": "integer"
    },
    "statusDetails": {
        "description": "A description if there were any errors. Otherwise the value is ok.",
        "type": "string"
    },
    "info": {
        "description": "The URL where you can get some additional information about the API (this page).",
        "type": "string"
    },
    "version": {
        "description": "The version number.",
        "type": "string"
    },
    "apiM": {
        "description": "The m parameter for the decryption request.",
        "type": "integer"
    },
    "apiK": {
        "description": "The k parameter for the decryption request. A string with no special chars.",
        "type": "string"
    },
    "urlPublic": {
        "description": "The public decryption url which can be shared.",
        "type": "string"
    },
    "mailCheck": {
        "description": "crc32b hash of the email address",
        "type": "string"
    }
},
"required": ["status", "statusDetails", "info", "version"],
}

Decryption


This is the API to get an email address from a Spamty link. You need to use the API that corresponds to the encryption API that was used. For example if your Spamty link was created with the encryption API version 4 (“v4” is contained in the URL: https://spamty.eu/mail/v4/20/869656557u8375992c/) then you are required to use the decryption API version 4. Otherwise you will get an error. All decryption APIs are only for internal use. You need an additional authentication with HTTP Basic Auth header to use them.

Decryption v4 /decryption/v4


With this API you can get an email address from a Spamty link.

POST https://api.spamty.eu/decryption/v4

You need to send a POST request.

Request

Method: POST
Location:

https://api.spamty.eu/decryption/v4

Headers

Header Description
Content-Type application/x-www-form-urlencoded
Authentication HTTP Basic

Response

This is an example for a successful response. The HTTP status code will be 200. If there was an error with your parameters the status code will be 400. Please look at the value for “statusDetails” to indentify the problem. If there was a problem with our server or database the status code will be 500. Contact the support and report this problem.

Headers

Header Description
Content-Type application/x-www-form-urlencoded
Authentication HTTP Basic
Status Code 200
Content Type application/json

Response Body

{
"status": 1,
"statusDetails": "ok",
"info": "https://dev.spamty.eu/decryption/",
"version": "4.2",
"email": "demo@spamty.eu",
"mailCheck": "50fbf5f7"
}

Response Schema

{
"title": "Response /decryption API v4",
"type": "object",
"properties": {
    "status": {
        "description": "Value 1 for OK and 0 if an error occurred.",
        "type": "integer"
    },
    "statusDetails": {
        "description": "A description if there were any errors. Otherwise the value is ok.",
        "type": "string"
    },
    "info": {
        "description": "The URL where you can get some additional information about the API (this page).",
        "type": "string"
    },
    "version": {
        "description": "The version number.",
        "type": "string"
    },
    "email": {
        "description": "The email address.",
        "type": "string"
    },
    "mailCheck": {
        "description": "A crc32b hash of the email address",
        "type": "string"
    }
},
"required": ["status", "statusDetails", "info", "version"],
}

Decryption v3 /decryption/v3


With this API you can get an email address from a Spamty link. It is only for internal use. You need an additional authentication with HTTP Basic Auth.

POST https://api.spamty.eu/decryption/v3

You need to send a POST request.

Request

Method: POST
Location:

https://api.spamty.eu/decryption/v3

Headers

Header Description
Content-Type application/x-www-form-urlencoded
Authentication HTTP Basic

Response

This is an example for a successful response. The HTTP status code will be 200. If there was an error with your parameters the status code will be 400. Please look at the value for “statusDetails” to indentify the problem. If there was a problem with our server or database the status code will be 500. Contact the support and report this problem.

Headers

Header Description
Content-Type application/x-www-form-urlencoded
Authentication HTTP Basic
Status Code 200
Content Type application/json

Response Body

{
"status": 1,
"statusDetails": "ok",
"info": "https://dev.spamty.eu/decryption/",
"version": "v3",
"email": "demo@spamty.eu",
"mailCheck": "50fbf5f7"
}

Response Schema

{
"title": "Response /decryption API v3",
"type": "object",
"properties": {
    "status": {
        "description": "Value 1 for OK and 0 if an error occurred.",
        "type": "integer"
    },
    "statusDetails": {
        "description": "A description if there were any errors. Otherwise the value is ok.",
        "type": "string"
    },
    "info": {
        "description": "The URL where you can get some additional information about the API (this page).",
        "type": "string"
    },
    "version": {
        "description": "The version.",
        "type": "string"
    },
    "email": {
        "description": "The email address.",
        "type": "string"
    },
    "mailCheck": {
        "description": "A crc32b hash of the email address",
        "type": "string"
    }
},
"required": ["status", "statusDetails", "info", "version"],
}

Decryption v2 /decryption/v2


POST https://api.spamty.eu/decryption/v2

Request

Method: POST
Location:

https://api.spamty.eu/decryption/v2

Headers

Header Description
Content-Type application/x-www-form-urlencoded
Authentication HTTP Basic

Response

This is an example for a successful response. The HTTP status code will be 200. If there was an error with your parameters the status code will be 400. Please look at the value for “statusDetails” to indentify the problem. If there was a problem with our server or database the status code will be 500. Contact the support and report this problem.

Headers

Header Description
Content-Type application/x-www-form-urlencoded
Authentication HTTP Basic
Status Code 200
Content Type application/json

Response Body

{
"status": 1,
"statusDetails": "ok",
"info": "https://dev.spamty.eu/decryption/",
"version": "v2",
"email": "demo@spamty.eu",
"mailCheck": "50fbf5f7"
}

Response Schema

{
"title": "Response /decryption API v2",
"type": "object",
"properties": {
    "status": {
        "description": "Value 1 for OK and 0 if an error occurred.",
        "type": "integer"
    },
    "statusDetails": {
        "description": "A description if there were any errors. Otherwise the value is ok.",
        "type": "string"
    },
    "info": {
        "description": "The URL where you can get some additional information about the API (this page).",
        "type": "string"
    },
    "version": {
        "description": "The version.",
        "type": "string"
    },
    "email": {
        "description": "The email address.",
        "type": "string"
    },
    "mailCheck": {
        "description": "A crc32b hash of the email address",
        "type": "string"
    }
},
"required": ["status", "statusDetails", "info", "version"],
}

Decryption v1 /decryption/v1


POST https://api.spamty.eu/decryption/v1

Request

Method: POST
Location:

https://api.spamty.eu/decryption/v1

Headers

Header Description
Content-Type application/x-www-form-urlencoded
Authentication HTTP Basic

Response

This is an example for a successful response. The HTTP status code will be 200. If there was an error with your parameters the status code will be 400. Please look at the value for “statusDetails” to indentify the problem. If there was a problem with our server or database the status code will be 500. Contact the support and report this problem.

Headers

Header Description
Content-Type application/x-www-form-urlencoded
Authentication HTTP Basic
Status Code 200
Content Type application/json

Response Body

{
"status": 1,
"statusDetails": "ok",
"info": "https://dev.spamty.eu/decryption/",
"version": "v1",
"email": "demo@spamty.eu",
"mailCheck": "50fbf5f7"
}

Response Schema

{
"title": "Response /decryption API v1",
"type": "object",
"properties": {
    "status": {
        "description": "Value 1 for OK and 0 if an error occurred.",
        "type": "integer"
    },
    "statusDetails": {
        "description": "A description if there were any errors. Otherwise the value is ok.",
        "type": "string"
    },
    "info": {
        "description": "The URL where you can get some additional information about the API (this page).",
        "type": "string"
    },
    "version": {
        "description": "The version.",
        "type": "string"
    },
    "email": {
        "description": "The email address.",
        "type": "string"
    },
    "mailCheck": {
        "description": "A crc32b hash of the email address",
        "type": "string"
    }
},
"required": ["status", "statusDetails", "info", "version"],
}