Before getting stuck in with the technical implementation, be sure to read the introduction.
SSL
The Litmus API is available in http or https depending on your preference, obviously https would be best to ensure the security of your api credentials but vanilla http might lead to an increase in the performance of your connection.
http://api.litmusapp.com/<resource>.xml
https://api.litmusapp.com/<resource>.xml
Sandbox
The Litmus API features a sandbox mode which will simulate creating new tests without charging your account. This is ideal during the implementation stage of your integration. To access the sandbox just replace "api" with "sandbox" in the API url.
e.g. https://api.litmusapp.com/<resource>.xml
-> https://sandbox.litmusapp.com/<resource>.xml
Headers
Every request you make to the Litmus API must include the two HTTP headers listed below - otherwise it will not be recognised as an API request and you may receive a HTML error message that could confuse your API implementation if it is expecting only XML.
Accept: application/xml
Content-Type: application/xml
You can set these using cURL for example, like so:
curl -u user:password -H "Accept: application/xml" -H "Content-Type: application/xml" http://sandbox.litmusapp.com/test_sets/1.xml
Authentication
You will need to authenticate every request to the Litmus API using HTTP basic authentication. If practical we recommend using SSL (see above) to avoid revealing your credentials.
Resources
Error Handling
See the REST API Errors page.