Creating a New Push

Creates a new push (secret URL) containing the provided payload. The payload can be:

  • Text/password (default)

  • File attachments (requires authentication & subscription)

  • URLs

  • QR codes

Required Parameters

The push must be created with a payload parameter containing the secret content. All other parameters are optional and will use system defaults if not specified.

Expiration Settings

Pushes can be configured to expire after:

  • A number of views (expire_after_views)

  • A number of days (expire_after_days)

  • Both views and days (first trigger wins)

Security Options

  • Passphrase protection requires viewers to enter a secret phrase

  • Retrieval step helps prevent automated URL scanners from burning views

  • Deletable by viewer allows recipients to manually expire the push

Account Association

Language Specific Examples

See language specific examples in the docs: docs.pwpush.com/docs/json-api/

Example Request

curl -X POST \
  -H "X-User-Email: user@example.com" \
  -H "X-User-Token: MyAPIToken" \
  -H "Content-Type: application/json" \
  -d '{"password": {"payload": "secret_text"}}' \
  https://pwpush.com/p.json

Example Response

{
  "url_token": "fkwjfvhall92",
  "html_url": "https://pwpush.com/p/fkwjfvhall92",
  "json_url": "https://pwpush.com/p/fkwjfvhall92.json",
  "created_at": "2023-10-20T15:32:01Z",
  "expires_at": "2023-10-20T15:32:01Z",
  "views_remaining": 10,
  "views_total": 10,
  "files": [],
  "passphrase": null,
  "name": null,
  "note": null,
  "expire_after_days": null,
}

Supported Formats

JSON

Params

Param name Description
password
required

Push details

Validations:

  • Must be a Hash

password[payload]
required

The URL encoded password or secret text to share.

Validations:

  • Must be a String

password[files]
optional

File(s) to upload and attach to the push.

Validations:

  • Must be an array of any type

password[passphrase]
optional

Require recipients to enter this passphrase to view the created push.

Validations:

  • Must be a String

password[name]
optional , blank allowed

A name shown in the dashboard, notifications and emails.

Validations:

  • Must be a String

password[note]
optional , blank allowed

If authenticated, the URL encoded note for this push. Visible only to the push creator.

Validations:

  • Must be a String

password[expire_after_days]
optional

Expire secret link and delete after this many days.

Validations:

  • Must be a Integer

password[expire_after_views]
optional

Expire secret link and delete after this many views.

Validations:

  • Must be a Integer

password[deletable_by_viewer]
optional

Allow users to delete passwords once retrieved.

Validations:

  • Must be one of: true, false.

password[retrieval_step]
optional

Helps to avoid chat systems and URL scanners from eating up views.

Validations:

  • Must be one of: true, false.

password[kind]
optional

The kind of push to create. Defaults to ‘text’.

Validations:

  • Must be one of: text, file, url, qr.

account_id
optional

The account ID to associate the push with. See: docs.pwpush.com/docs/json-api/#multiple-accounts

Validations:

  • Must be a Integer