GET /r/:url_token.json
Retrieve a URL push.

URL Push Retrieval

Retrieves a push including it’s payload and details. If the push is still active, this will burn a view and the transaction will be logged in the push audit log.

Example Request

curl -X GET \
  -H "Authorization: Bearer MyAPIToken" \
  https://pwpush.com/r/fk27vnslkd.json

Example Response

{
  "expire_after_days": 2,
  "expire_after_views": 5,
  "expired": false,
  "url_token": "quyul5r5w18",
  "payload": "https://example.com",
  ...
}

Supported Formats

json

Params

Param name Description
url_token
required

Secret URL token of a previously created push.

Validations:

  • Must be a String


POST /r.json
Create a new URL push.

URL Push Creation

Creates a new URL push with the given payload and details.

Example Request

curl -X POST \

-H "Authorization: Bearer MyAPIToken" \
-d "url[payload]=https://example.com" \
-d "url[expire_after_days]=2" \
-d "url[expire_after_views]=10" \
https://pwpush.com/r.json

Example Response

{
  "url_token": "quyul5r5w18",
  "created_at": "2023-10-20T15:32:01Z",
  "expire_after_days": 2,
  "expire_after_views": 10,
  ...
}

Supported Formats

json

Params

Param name Description
url
required

Push details

Validations:

  • Must be a Hash

url[payload]
required

The URL encoded URL to redirect to.

Validations:

  • Must be a String

url[passphrase]
optional

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

Validations:

  • Must be a String

url[note]
optional , blank allowed

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

Validations:

  • Must be a String

url[expire_after_days]
optional

Expire secret link and delete after this many days.

Validations:

  • Must be a Integer

url[expire_after_views]
optional

Expire secret link and delete after this many views.

Validations:

  • Must be a Integer

url[retrieval_step]
optional

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

Validations:

  • Must be one of: true, false.


GET /r/:url_token/preview.json
Helper endpoint to retrieve the fully qualified secret URL of a push.

URL Push Preview

Retrieves the fully qualified secret URL of a push.

Example Request

curl -X GET \
  -H "Authorization: Bearer MyAPIToken" \
  https://pwpush.com/r/fk27vnslkd/preview.json

Example Response

{
  "url": "https://pwpush.com/r/fk27vnslkd"
}

Supported Formats

json

Params

Param name Description
url_token
required

Secret URL token of a previously created push.

Validations:

  • Must be a String


GET /r/:url_token/audit.json
Retrieve the audit log for a push.

URL Push Audit

Retrieves the audit log for a push.

Example Request

curl -X GET \
  -H "Authorization: Bearer MyAPIToken" \
  https://pwpush.com/r/fk27vnslkd/audit.json

Example Response

[
  {
    "ip": "127.0.0.1",
    "referrer": "https://example.com",
    "created_at": "2023-10-20T15:32:01Z",
    "successful": true,
    ...
  },
  ...
]

Supported Formats

json

Params

Param name Description
url_token
required

Secret URL token of a previously created push.

Validations:

  • Must be a String


DELETE /r/:url_token.json
Expire a push: delete the payload and expire the secret URL.

URL Push Expiration

Expires a push immediately. Must be authenticated & owner of the push or the push must have been created with deleteable_by_viewer.

Example Request

curl -X DELETE \
  -H "Authorization: Bearer MyAPIToken" \
  https://pwpush.com/r/fkwjfvhall92.json

Example Response

{
  "expired": true,
  "expired_on": "2023-10-23T15:32:01Z",
  ...
}

Supported Formats

json

Params

Param name Description
url_token
required

Secret URL token of a previously created push.

Validations:

  • Must be a String


GET /r/active.json
Retrieve your active URL pushes.

Active URL Pushes Retrieval

Returns the list of URL pushes that you previously pushed which are still active.

Example Request

curl -X GET \
  -H "Authorization: Bearer MyAPIToken" \
  https://pwpush.com/r/active.json

Example Response

[
  {
    "url_token": "fkwjfvhall92",
    "created_at": "2023-10-20T15:32:01Z",
    "expires_on": "2023-10-23T15:32:01Z",
    ...
  },
  ...
]

Supported Formats

json

GET /r/expired.json
Retrieve your expired URL pushes.

Expired URL Pushes Retrieval

Returns the list of URL pushes that you previously pushed which have expired.

Example Request

curl -X GET \
  -H "Authorization: Bearer MyAPIToken" \
  https://pwpush.com/r/expired.json

Example Response

[
  {
    "url_token": "fkwjfvhall92",
    "created_at": "2023-10-20T15:32:01Z",
    "expires_on": "2023-10-23T15:32:01Z",
    ...
  },
  ...
]

Supported Formats

json