GET /f/:url_token.json
Retrieve a file push.

File Push Retrieval

Retrieves a file 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/f/fk27vnslkd.json

Example Response

{
  "expire_after_days": 2,
  "expire_after_views": 5,
  "expired": false,
  "url_token": "quyul5r5w18",
  "files": '{"file1.extension":"/pfb/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MywicHVyIjoiYmxvYl9pZCJ9fQ==--acf3b59f1884a16ef5d178848c32af856338064f/file1.extension","file2.extension":"/pfb/redirect/eyJfcmFpbHMiOnsiZGF0YSI6NCwicHVyIjoiYmxvYl9pZCJ9fQ==--34b10a5eca9026f8cc41bbd71c4d684abbe607bf/file2.extension"}'
  ...
}

Note: The files attached to the push are listed as a string of JSON with filenames and paths only.  This will be improved in v2 of the API.

{
  "file1.extension": "/pfb/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MywicHVyIjoiYmxvYl9pZCJ9fQ==--acf3b59f1884a16ef5d178848c32af856338064f/file1.extension",
  "file2.extension": "/pfb/redirect/eyJfcmFpbHMiOnsiZGF0YSI6NCwicHVyIjoiYmxvYl9pZCJ9fQ==--34b10a5eca9026f8cc41bbd71c4d684abbe607bf/file2.extension"
}

Supported Formats

JSON

Params

Param name Description
url_token
required

Secret URL token of a previously created push.

Validations:

  • Must be a String


POST /f.json
Create a new file push.

File Push Creation

Creates a new file push with the given payload and files.

Example Request

curl -X POST \
  -H "Authorization: Bearer MyAPIToken" \
  -F "file_push[files][]=@/path/to/file/file1.extension" \
  -F "file_push[files][]=@/path/to/file/file2.extension" \
  https://pwpush.com/f.json

Example Response

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

Supported Formats

JSON

Params

Param name Description
file_push
required

Push details

Validations:

  • Must be a Hash

file_push[payload]
required

The URL encoded secret text to share.

Validations:

  • Must be a String

file_push[passphrase]
optional

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

Validations:

  • Must be a String

file_push[note]
optional , blank allowed

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

Validations:

  • Must be a String

file_push[expire_after_days]
optional

Expire secret link and delete after this many days.

Validations:

  • Must be a Integer

file_push[expire_after_views]
optional

Expire secret link and delete after this many views.

Validations:

  • Must be a Integer

file_push[deletable_by_viewer]
optional

Allow users to delete the push once retrieved.

Validations:

  • Must be one of: true, false.

file_push[retrieval_step]
optional

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

Validations:

  • Must be one of: true, false.


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

File Push Preview

Retrieves the fully qualified secret URL of a push.

Example Request

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

Example Response

{
  "url": "https://pwpush.com/f/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 /f/:url_token/audit.json
Retrieve the audit log for a push.

File Push Audit

Retrieves the audit log for a push.

Example Request

curl -X GET \
  -H "Authorization: Bearer MyAPIToken" \
  https://pwpush.com/f/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 /f/:url_token.json
Expire a push: delete the files, payload and expire the secret URL.

File 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/f/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 /f/active.json
Retrieve your active file pushes.

Active File Pushes Retrieval

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

Example Request

curl -X GET \
  -H "Authorization: Bearer MyAPIToken" \
  https://pwpush.com/f/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 /f/expired.json
Retrieve your expired file pushes.

Expired File Pushes Retrieval

Returns the list of expired file pushes.

Example Request

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

Example Response

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

Supported Formats

JSON