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.
curl -X GET \ -H "Authorization: Bearer MyAPIToken" \ https://pwpush.com/f/fk27vnslkd.json
{ "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" }
Param name | Description |
---|---|
url_token
required |
Secret URL token of a previously created push. Validations:
|
Creates a new file push with the given payload and files.
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
{ "url_token": "quyul5r5w18", "created_at": "2023-10-20T15:32:01Z", "expire_after_days": 2, "expire_after_views": 5, ... }
Param name | Description |
---|---|
file_push
required |
Push details Validations:
|
file_push[payload]
required |
The URL encoded secret text to share. Validations:
|
file_push[passphrase]
optional |
Require recipients to enter this passphrase to view the created push. Validations:
|
file_push[note]
optional , blank allowed |
If authenticated, the URL encoded note for this push. Visible only to the push creator. Validations:
|
file_push[expire_after_days]
optional |
Expire secret link and delete after this many days. Validations:
|
file_push[expire_after_views]
optional |
Expire secret link and delete after this many views. Validations:
|
file_push[deletable_by_viewer]
optional |
Allow users to delete the push once retrieved. Validations:
|
file_push[retrieval_step]
optional |
Helps to avoid chat systems and URL scanners from eating up views. Validations:
|
Retrieves the fully qualified secret URL of a push.
curl -X GET \ -H "Authorization: Bearer MyAPIToken" \ https://pwpush.com/f/fk27vnslkd/preview.json
{ "url": "https://pwpush.com/f/fk27vnslkd" }
Param name | Description |
---|---|
url_token
required |
Secret URL token of a previously created push. Validations:
|
Retrieves the audit log for a push.
curl -X GET \ -H "Authorization: Bearer MyAPIToken" \ https://pwpush.com/f/fk27vnslkd/audit.json
[ { "ip": "127.0.0.1", "referrer": "https://example.com", "created_at": "2023-10-20T15:32:01Z", "successful": true, ... }, ... ]
Param name | Description |
---|---|
url_token
required |
Secret URL token of a previously created push. Validations:
|
Expires a push immediately. Must be authenticated & owner of the push or the push must have been created with deleteable_by_viewer.
curl -X DELETE \ -H "Authorization: Bearer MyAPIToken" \ https://pwpush.com/f/fkwjfvhall92.json
{ "expired": true, "expired_on": "2023-10-23T15:32:01Z", ... }
Param name | Description |
---|---|
url_token
required |
Secret URL token of a previously created push. Validations:
|
Returns the list of file pushes that you previously pushed which are still active.
curl -X GET \ -H "Authorization: Bearer MyAPIToken" \ https://pwpush.com/f/active.json
[ { "url_token": "fkwjfvhall92", "created_at": "2023-10-20T15:32:01Z", "expires_on": "2023-10-23T15:32:01Z", ... }, ... ]
Returns the list of expired file pushes.
curl -X GET \ -H "Authorization: Bearer MyAPIToken" \ https://pwpush.com/f/expired.json
[ { "url_token": "fkwjfvhall92", "created_at": "2023-10-20T15:32:01Z", "expires_on": "2023-10-23T15:32:01Z", ... }, ]