Domain Whitelisting API

Instructions on how to use our RESTful API for whitelisting your domains.

GET:

v1/Login/{customer_email}/{customer_key}/{api_private_key}

This endpoint creates a customer token for next API calls. The token is dynamically created server side and it has an expiration of 5 minutes. The token must be added to the apitoken field of headers of the following calls.

Reply:

{"ApiToken":"token"}

Example:

curl -X GET \
  https://api.tryfigment.com/v1/Login/{customer_email}/{customer_key}/{api_private_key} \
  -H 'cache-control: no-cache'

v1/Domains/List

This endpoint returns a list of all domains linked to the account.

Reply:

{
    "status":"success", 
    "result":[
        {"domain":"example.domain1.com"},
        {"domain":"example.domain2.com"}
    ]
}

Example:

curl -X GET \
  https://api.tryfigment.com/v1/Domains/List \
  -H 'apitoken: token' \
  -H 'cache-control: no-cache' 

v1/ApiStatus/{customer_email}/{customer_key}/{api_private_key}

This endpoint returns the current status of the API.

Reply:

{"status":"success"}

Example:

curl -X GET \
  https://api.tryfigment.com/v1/ApiStatus/{customer_email}/{customer_key}/{api_private_key} \
  -H 'cache-control: no-cache'

POST:

v1/Domains/Add

This endpoint adds a new whitelisted domain to the account.

Reply:

{
    "status":"success",
    "result":"Domain \"example.domain.com\" added successfully"

Example:

curl -X POST \
  https://api.tryfigment.com/v1/Domains/Add \
  -H 'apitoken: token' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d name=example.domain.com

DELETE:

v1/Domains/{domain}

This endpoint deletes a whitelisted domain from the account.

Reply:

{
    "status": "success", 
    "result": "Domain \"example.domain.com\" deleted successfully."
}

Example:

curl -X DELETE \
  https://api.tryfigment.com/v1/Domains/example.domain.com \
  -H 'apitoken: token' \
  -H 'cache-control: no-cache'

Last updated