The Password Pusher JSON API is a RESTful API that allows developers to interact with the Password Pusher service programmatically. The API provides a simple and intuitive way to manage, create and expire pushes making it easy to integrate with your existing applications and workflows.

API Endpoints

The Password Pusher JSON API is organized into several endpoints, each responsible for a specific task. The main endpoints are:

  • /p.json: manages text based pushes
  • /f.json: manages file based pushes
  • /r.json: manages URL based pushes

API Parameters

The Password Pusher JSON API uses standard HTTP parameters, such as Authorization: Bearer <token> headers and query parameters, to pass data between the client and server.

API Responses

The Password Pusher JSON API returns data in JSON format, with each response containing a status field indicating the success or failure of the request.

Self-Hosted

If you are running your own private instance of Password Pusher, these API calls are available on your instance too.

Just point these calls to your own instance. by changing the https://pwpush.com part to where you host your private instance such as https://pwpush.mycompany.org/p.json

Getting Started

To get started with the Password Pusher JSON API, simply visit the API documentation at https://pwpush.com/api. From there, you can explore the available endpoints, methods, and parameters, and start building your own applications using the Password Pusher JSON API.

Example

Curl

To create a Push

curl -X POST --data "password[payload]=mypassword&password[expire_after_days]=2&password[expire_after_views]=10" https://pwpush.com/p.json

To retrieve a Push

curl -X GET https://pwpush.com/p/<ID>.json

To expire a Push

curl -X DELETE https://pwpush.com/p/<ID>.json

Javascript

Paste this into your browser console for the pwpush.com page:

fetch(
  "https://pwpush.com/p.json", {
    method: "POST",
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      password: {
        payload: "mypassword",
        expire_after_days: 2,
        expire_after_views: 10
      }
    })
  })
  .then(response => response.json())
  .then(data => { console.log("Share this secret URL: https://pwpush.com/p/" + data.url_token); });

Swift

See this issue where @broadwaycodez provides a Swift example for accessing the JSON API.

Full JSON API Documentation

For full documentation on the Password Pusher JSON API, including detailed endpoint descriptions, method parameters, and response formats, please visit the API documentation at https://pwpush.com/api.

See Also

Updated: