RevelDigital REST Service API

This page describes the resources that make up the official RevelDigital REST API. If you have any problems or requests please contact support.

API Endpoint

All API access is from http://api.reveldigital.com.

RESTful

The RevelDigital Service API is a RESTful API.

Authentication

A valid API key is required for each request. Get your API key by clicking the 'Generate New API Key' on your Account Dashboard.

Every request requires an api_key query string parameter.

$curl -i http://api.reveldigital.com/account?api_key=<your key here>"

Passing Request Data

API methods requiring POSTed data support both XML and JSON data formats.

To POST XML data use the following Content-Type header

Content-Type: application/xml

To POST JSON data use the following Content-Type header

Content-Type: application/json

Output Formats

The API supports three output formats. To use any of them, simply use the appropriate format query string.

  • json (default) format=json
  • xml format=xml
  • rss (available for playlists only) format=rss

All timestamps are returned in ISO 8601 format:

YYYY-MM-DDTHH:MM:SSZ

Cross Origin Resource Sharing

The API supports Cross Origin Resource Sharing (CORS) for AJAX requests. You can read the CORS W3C working draft, or this intro from the HTML5 Security Guide.

JSON-P Callbacks

You can send a callback query string parameter to any GET call to have the results wrapped in a JSON function. This is typically used when browsers want to embed RevelDigital content in web pages by getting around cross domain issues. The response contains the same data ouput as the regular API.

$curl -i http://api.reveldigital.com/account?api_key=xxxxxx&format=json&callback=foo

foo({
  "name": "Absolute Marketing",
  "business_name": "absolute marketing",
  "address_1": null,
  "address_2": null,
  "city": "Moorhead",
  "state": "MN",
  "postal_code": "56560",
  "country": "US",
  "phone": "2182841111",
  "fax": null,
  "primary_contact_id": "",
  "secondary_contact_id": "",
  "created_on": "2010-05-19T12:11:49Z",
  "timezone": "Central Standard Time"
})