Push Inbox API

Getting Started

Push Inbox provides a public API that allows your program to send messages and perform other tasks.

RESTful Web Service

The API provided by Push Inbox is in REST-style (Representational State Transfer). All calls to the API must perform over secured HTTPS connection, all data submitted must be in UTF-8 encoding.

HTTP Basic Authentication

Some API calls may require authentication, your program should use HTTP basic authentication over HTTPS in order to access protected API functions.

Sending Message

In order to send a message to a Push Inbox user, you must provide either the user's PIN, or a valid user key. To send a message, submit a HTTP Post request to this collection URL

https://www.getpushinbox.com/messages

Authentication
Authentication is optional

Parameters
The Post request must provides these 4 parameters

message[from] Sender's email address, or sender's key
message[to] Recipient's key or PIN
message[subject] Subject of the message
message[body] Body of the message

Response Format
The message resource collection provides 3 formats

html, xml, json

Sending Message - Examples

curl

curl -d "message[from]=email@host.domain&message[to]=recipient&message[subject]=subject&message[body]=body" https://www.getpushinbox.com/messages.xml

PHP

<?php
  $_resource = 'https://www.getpushinbox.com/messages.xml';

  $_params = array (
    'message[from]' => 'email@host.domain',   //Sender's email
    'message[to]' => 'recipient key or pin',  //Recipient's PIN or Key
    'message[subject]' => 'hello',
    'message[body]' => 'hello from php'
  );

  $ch = curl_init($_resource);

  curl_setopt($ch, CURLOPT_POST, TRUE);
  curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Expect:' ) );
  curl_setopt($ch, CURLOPT_POSTFIELDS, $_params);

  $response = curl_exec($ch);

  curl_close($ch);
?>

Ruby on Rails

class Message < ActiveResource::Base
  self.site = "https://www.getpushinbox.com/"

  # Optional
  self.user = "your_push_inbox_username"
  self.password = "your_push_inbox_password"
end

Message.create(
  :from => 'email@host.domain',   #Sender's email
  :to => 'recipient key or pin',  #Recipient's PIN or Key
  :subject => 'Subject',
  :body => 'Body'
)

Coming Soon

More API specifications coming soon.

Icon_ssl