Figment
Search…
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:
1
{"ApiToken":"token"}
Copied!
Example:
1
curl -X GET \
2
https://api.tryfigment.com/v1/Login/{customer_email}/{customer_key}/{api_private_key} \
3
-H 'cache-control: no-cache'
Copied!

v1/Domains/List

This endpoint returns a list of all domains linked to the account.
Reply:
1
{
2
"status":"success",
3
"result":[
4
{"domain":"example.domain1.com"},
5
{"domain":"example.domain2.com"}
6
]
7
}
Copied!
Example:
1
curl -X GET \
2
https://api.tryfigment.com/v1/Domains/List \
3
-H 'apitoken: token' \
4
-H 'cache-control: no-cache'
Copied!

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

This endpoint returns the current status of the API.
Reply:
1
{"status":"success"}
Copied!
Example:
1
curl -X GET \
2
https://api.tryfigment.com/v1/ApiStatus/{customer_email}/{customer_key}/{api_private_key} \
3
-H 'cache-control: no-cache'
Copied!

POST:

v1/Domains/Add

This endpoint adds a new whitelisted domain to the account.
Reply:
1
{
2
"status":"success",
3
"result":"Domain \"example.domain.com\" added successfully"
Copied!
Example:
1
curl -X POST \
2
https://api.tryfigment.com/v1/Domains/Add \
3
-H 'apitoken: token' \
4
-H 'cache-control: no-cache' \
5
-H 'content-type: application/x-www-form-urlencoded' \
6
-d name=example.domain.com
Copied!

DELETE:

v1/Domains/{domain}

This endpoint deletes a whitelisted domain from the account.
Reply:
1
{
2
"status": "success",
3
"result": "Domain \"example.domain.com\" deleted successfully."
4
}
Copied!
Example:
1
curl -X DELETE \
2
https://api.tryfigment.com/v1/Domains/example.domain.com \
3
-H 'apitoken: token' \
4
-H 'cache-control: no-cache'
Copied!
Last modified 10mo ago