Using the API
Authentication
Unless otherwise noted, all calls to the Spreedly API use HTTP basic authentication over HTTPS. Spreedly requires TLS 1.2.
Use the environment key of the Spreedly environment you wish to execute against as the HTTP basic user
, and one of your organization’s access secrets as the HTTP basic password
.
HTTP basic authentication can be set when using curl
in the -u
option as environment-key:access-secret
.
$ curl https://core.spreedly.com/v1/gateways.json -u 'env_key:secret'
JSON endpoints
To make a request for the JSON version of an endpoint, send the Content-Type: application/json
header to the endpoint with the .json
URL suffix.
JSON endpoint examples are contained within the json
tab of the code column here in the docs. If some part of the documentation is ambiguous to the format, it will be displayed in all code tabs.
XML endpoints
To make a request for the XML version of an endpoint, send the Content-Type: application/xml
header to the endpoint with the .xml
URL suffix.
XML endpoint examples are contained within the xml
tab of the code column here in the docs. If some part of the documentation is ambiguous to the format, it will be displayed in all code tabs.