3jam API Overview

(API updated December 6, 2006)

The 3jam API is a set of callable methods and some API endpoints.

To perform an action using the 3jam API, you send a request to its endpoint specifying a method and some arguments. You will then get a formatted response.

All request formats take a set of named parameters

The REQUIRED parameter api_key is used to specify your API Key.

The REQUIRED parameter api_version is used to specify the API version you are requesting. The current API version is 1.03.

The arguments, responses and error codes for each method are detailed on the method's specification page. The complete list of methods is available from the API Methods index page.

The 3jam API Request Format is REST

REST is simple to use. It's a simple HTTP GET or POST (preferred) action.

The REST endpoint URL is https://api.3jam.com/webapi.php

To request the 3jam.conversations.startNew service, submit a request like this:

https://api.3jam.com/webapi.php?method=3jam.conversations.startNew

NOTE: https should be used to ensure security for user numbers and passwords passed from your application to 3jam's API servers. However, if https is not present in your environment (for example, on some mobile phones), you may use http instead (i.e. http://api.3jam.com/webapi.php). If using http, it is strongly advised that parameters be submitted using POST instead of GET so data is not easily viewable / modifiable.

The 3jam API Response Format is REST

A REST response is a simple XML block

A method call returns this

<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
  <conversation id="60" />
</rsp>

If an error occurs, the following is returned:

<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="fail">
  <err code="98" msg="Login failed" />
</rsp>