Password Pusher API v2
ベータ統合のための包括的なREST APIドキュメント Password Pusher アプリケーションに
ベータ版のお知らせ: API v2は現在ベータ版です。安定性を確保するためにあらゆる努力をしていますが、最終リリースまでに変更される可能性があります。フィードバックをお待ちしております!
プッシュ
プッシュを使用すると、受信者に機密データを安全に一方的に送信できます。テキスト、ファイル、QRコード、URLを含む秘密のURLでプッシュを作成し、電子メール、チャット、ログで機密データを公開することなく、誰とでも共有できます。
従業員のオンボーディング、アカウント認証情報の送信、機密文書の送信、機密情報の共有に最適です。プッシュは、指定した期間または閲覧回数が経過すると自動的に期限切れとなり、各プッシュの監査ログでライフサイクルの完全な追跡が可能です。
POST /api/v2/pushes
指定されたペイロードで新しいプッシュを作成します。
リクエスト・ボディ(JSON)
{
"push": {
"payload": "secret_password_123",
"expire_after_duration": 6,
"expire_after_views": 5,
"passphrase": "optional_passphrase",
"name": "Database Credentials",
"note": "Internal note",
"deletable_by_viewer": true,
"retrieval_step": true,
"kind": "text"
},
"account_id": 123
}
ファイルを含むリクエストボディ (multipart/form-data)
curl -X POST https://eu.pwpush.com/api/v2/pushes \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-F "push[payload]=secret_password_123" \
-F "push[expire_after_duration]=6" \
-F "push[expire_after_views]=5" \
-F "push[name]=Database Credentials" \
-F "push[files][]=@/path/to/file1.pdf" \
-F "push[files][]=@/path/to/file2.txt"
注: ファイルを添付する場合は multipart/form-data フォーマットとセット kind: "file". を使用して複数のファイルを添付することができます。 push[files][].
パラメータ
| パラメータ | タイプ | 説明 |
|---|---|---|
payload
必要
|
string | 共有すべき秘密のテキスト |
expire_after_duration
オプション
|
integer (0-17) | 持続時間列挙型 (0-17) |
expire_after_views
オプション
|
integer (1-100) | 期限切れまでの視聴回数 |
passphrase
オプション
|
string | 閲覧にはパスフレーズが必要 |
name
オプション
|
string | プッシュの名前 |
note
オプション
|
string | 内部メモ(作成者のみ閲覧可能) |
deletable_by_viewer
オプション
|
boolean | 視聴者がプッシュを削除できるようにする |
retrieval_step
オプション
|
boolean | 検索に余分なステップが必要 |
kind
オプション
|
string | タイプ:「text"、"file"、"url"、または "qr"(デフォルトは "text")。 |
notify_emails_to
オプション
|
string | プッシュが作成されたときに通知されるメールアドレス (カンマ区切り) |
notify_emails_to_locale
オプション
|
string | Eメール通知を送信するロケール(言語 |
account_id
オプション
|
integer | プッシュを関連付けるアカウントID(複数のアカウントを持つユーザーの場合) |
期間 expire_after_duration
応答フィールド
プッシュを作成すると、以下のフィールドがレスポンスに返されます。注: ペイロードとファイルは作成時には返されません。
| フィールド | タイプ | 例 | 説明 |
|---|---|---|---|
| account_id | integer or null | 1 | オーナーアカウントID |
| created_at | string | "2025-02-17T10:00:00.000Z" | ISO 8601作成時間 |
| days_remaining | integer | 1 | 非推奨 残り日数 (1日未満の場合は0); expires_at / expires_in が望ましい。 |
| deletable_by_viewer | boolean | true | 受信者がプッシュを削除できるかどうか |
| deleted | boolean | false | プッシュが明示的に削除されたかどうか |
| expire_after_days | integer | 1 | 非推奨 おおよその日数(期間から算出) |
| expire_after_duration | integer | 6 | 持続時間 enum (0-17); 上表参照 |
| expire_after_views | integer | 5 | 有効期限内の最大閲覧数 |
| expired | boolean | false | プッシュが期限切れかどうか |
| expired_on | string or null | null | プッシュが期限切れの場合はISO 8601、期限切れでない場合はNULL |
| expires_at | string or null | "2025-02-18T10:00:00.000Z" | プッシュの有効期限が切れるISO 8601の時刻。 |
| expires_in | number | 86400 | 期限切れまでの秒数(期限切れの場合は 0) |
| html_url | string | "https://.../p/abc" | ブラウザでプッシュを開くためのURL |
| json_url | string | "https://.../p/abc.json" | プッシュをJSONで取得するためのURL |
| name | string or null | "Database credentials" | プッシュのオプション名 |
| note | string or null | null | オプションのプライベートノート |
| notify_emails_to | string or null | null | 作成時に通知するメール(プレミアムのみ) |
| passphrase | string or null | null | プッシュがパスフレーズを持っている場合のみ表示(値は非表示) |
| retrieval_step | boolean | false | 検索に余分なステップが必要かどうか |
| updated_at | string | "2025-02-17T10:00:00.000Z" | ISO 8601最終更新時刻 |
| url_token | string | "fkwjfvhall92" | プッシュの一意の秘密識別子 |
| views_remaining | integer | 5 | 有効期限内に残ったビュー |
回答例
{
"expire_after_duration": 6,
"expire_after_views": 5,
"expired": false,
"url_token": "fkwjfvhall92",
"deletable_by_viewer": true,
"retrieval_step": false,
"expired_on": null,
"passphrase": null,
"created_at": "2025-02-17T10:00:00.000Z",
"updated_at": "2025-02-17T10:00:00.000Z",
"expire_after_days": 1,
"views_remaining": 5,
"deleted": false,
"days_remaining": 1,
"expires_at": "2025-02-18T10:00:00.000Z",
"expires_in": 86400,
"json_url": "https://example.com/p/fkwjfvhall92.json",
"html_url": "https://example.com/p/fkwjfvhall92",
"account_id": 1,
"note": null,
"name": "Database Credentials"
}
リクエスト例
curl -X POST https://eu.pwpush.com/api/v2/pushes \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"push": {
"payload": "MySecretPassword123",
"expire_after_duration": 6,
"expire_after_views": 3
}
}'
require 'net/http'
require 'json'
require 'uri'
uri = URI('https://eu.pwpush.com/api/v2/pushes')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri.path)
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request['Content-Type'] = 'application/json'
request.body = {
push: {
payload: 'MySecretPassword123',
expire_after_duration: 6,
expire_after_views: 3
}
}.to_json
response = http.request(request)
puts response.body
import requests
import json
url = 'https://eu.pwpush.com/api/v2/pushes'
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json'
}
data = {
'push': {
'payload': 'MySecretPassword123',
'expire_after_duration': 6,
'expire_after_views': 3
}
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
$headers = @{
'Authorization' = 'Bearer YOUR_API_TOKEN'
'Content-Type' = 'application/json'
}
$body = @{
push = @{
payload = 'MySecretPassword123'
expire_after_duration = 6
expire_after_views = 3
}
} | ConvertTo-Json -Depth 10
$response = Invoke-RestMethod -Uri 'https://eu.pwpush.com/api/v2/pushes' `
-Method Post `
-Headers $headers `
-Body $body
$response | ConvertTo-Json
GET /api/v2/pushes/:url_token
プッシュのシークレットペイロードを取得します。これによりビューカウントが増加し、プッシュが期限切れになることがあります。
応答フィールド
プッシュを取得すると、以下のフィールドが返される。このエンドポイントは、他のエンドポイントでは利用できないペイロードとファイルを返します。
| フィールド | タイプ | 例 | 説明 |
|---|---|---|---|
| created_at | string | "2025-02-17T10:00:00.000Z" | ISO 8601作成時間 |
| days_remaining | integer | 1 | 非推奨 残り日数 (1日未満の場合は0); expires_at / expires_in が望ましい。 |
| deletable_by_viewer | boolean | true | 受信者がプッシュを削除できるかどうか |
| deleted | boolean | false | プッシュが明示的に削除されたかどうか |
| expire_after_days | integer | 1 | 非推奨 おおよその日数(期間から算出) |
| expire_after_duration | integer | 6 | 持続時間列挙型 (0-17) |
| expire_after_views | integer | 5 | 有効期限内の最大閲覧数 |
| expired | boolean | false | プッシュが期限切れかどうか |
| expired_on | string or null | null | プッシュが期限切れの場合はISO 8601、期限切れでない場合はNULL |
| expires_at | string or null | "2025-02-18T10:00:00.000Z" | プッシュの有効期限が切れるISO 8601の時刻。 |
| expires_in | number | 86400 | 期限切れまでの秒数(期限切れの場合は 0) |
| files | array | [{ filename, content_type, url }] | 添付ファイルのメタデータとダウンロードURL |
| html_url | string | "https://.../p/abc" | ブラウザでプッシュを開くためのURL |
| json_url | string | "https://.../p/abc.json" | プッシュをJSONで取得するためのURL |
| passphrase | string or null | null | プッシュがパスフレーズを持っている場合のみ表示(値は非表示) |
| payload | string or null | "secret123" | 秘密の内容。 |
| retrieval_step | boolean | false | 検索に余分なステップが必要かどうか |
| updated_at | string | "2025-02-17T10:00:00.000Z" | ISO 8601最終更新時刻 |
| url_token | string | "fkwjfvhall92" | プッシュの一意の秘密識別子 |
| views_remaining | integer | 2 | 有効期限内に残ったビュー |
リクエスト例
curl -X GET https://eu.pwpush.com/api/v2/pushes/fkwjfvhall92
パスフレーズ付きリクエスト例
curl -X GET "https://eu.pwpush.com/api/v2/pushes/fkwjfvhall92?passphrase=your_passphrase"
回答例
{
"expire_after_duration": 6,
"expire_after_views": 3,
"expired": false,
"url_token": "fkwjfvhall92",
"deletable_by_viewer": false,
"retrieval_step": false,
"expired_on": null,
"passphrase": null,
"created_at": "2025-02-17T10:00:00.000Z",
"updated_at": "2025-02-17T10:00:00.000Z",
"expire_after_days": 1,
"views_remaining": 2,
"deleted": false,
"days_remaining": 1,
"expires_at": "2025-02-18T10:00:00.000Z",
"expires_in": 86400,
"json_url": "https://eu.pwpush.com/p/fkwjfvhall92.json",
"html_url": "https://eu.pwpush.com/p/fkwjfvhall92",
"payload": "MySecretPassword123",
"files": []
}
注: プッシュにパスフレーズがある場合は、それをクエリーパラメーターとして含める: ?passphrase=your_passphrase. プッシュの取得はビューとしてカウントされ、ビューの上限に達するとプッシュが失効する可能性があります。
GET /api/v2/pushes/:url_token/preview
ペイロードを取得せずに、プッシュの完全修飾された秘密のURLを返します。
リクエスト例
curl -X GET https://eu.pwpush.com/api/v2/pushes/fkwjfvhall92/preview
回答例
{
"url": "https://eu.pwpush.com/p/fkwjfvhall92"
}
GET /api/v2/pushes/:url_token/audit
プッシュの監査ログを返します。認証と所有権が必要です。
クエリーパラメーター
page (オプション): ページネーション用のページ番号。
- デフォルト:
1(最初のページ) - 範囲:
1への200 - 1ページあたり最大50件の監査ログエントリを返します。
- 例
?page=22ページ目を取得する
リクエスト例
curl -X GET https://eu.pwpush.com/api/v2/pushes/fkwjfvhall92/audit \
-H "Authorization: Bearer YOUR_API_TOKEN"
回答例
{
"logs": [
{
"ip": "192.168.1.100",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
"referrer": null,
"kind": "creation",
"created_at": "2023-10-27T10:00:00.000Z",
"updated_at": "2023-10-27T10:00:00.000Z"
},
{
"ip": "192.168.1.101",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36",
"referrer": "https://example.com",
"kind": "view",
"created_at": "2023-10-27T10:05:00.000Z",
"updated_at": "2023-10-27T10:05:00.000Z"
}
]
}
注: について kind フィールドは、ログに記録されるアクションのタイプを示す。一般的な値は以下の通り: creation, view, expire, failed_passphrase, と failed_view.
DELETE /api/v2/pushes/:url_token
プッシュを直ちに失効させ、ペイロードと添付ファイルを含むすべての機密データを永久に削除します。このアクションは不可逆的であり、元に戻すことはできません。認証と所有権が必要です。 deletable_by_viewer: true.
リクエスト例
curl -X DELETE https://eu.pwpush.com/api/v2/pushes/fkwjfvhall92 \
-H "Authorization: Bearer YOUR_API_TOKEN"
回答例
{
"expire_after_duration": 7,
"expire_after_views": 5,
"expired": true,
"url_token": "fkwjfvhall92",
"deletable_by_viewer": false,
"retrieval_step": false,
"expired_on": "2023-10-27T10:15:00.000Z",
"passphrase": null,
"created_at": "2023-10-27T10:00:00.000Z",
"updated_at": "2023-10-27T10:15:00.000Z",
"expire_after_days": 7,
"days_remaining": 0,
"expires_at": null,
"expires_in": 0,
"views_remaining": 0,
"deleted": true,
"json_url": "https://eu.pwpush.com/p/fkwjfvhall92.json",
"html_url": "https://eu.pwpush.com/p/fkwjfvhall92",
"account_id": 1,
"note": null,
"name": null
}
GET /api/v2/pushes/active
有効な(期限切れでない)プッシュのページ付きリストを返します。認証が必要です。
GET /api/v2/pushes/expired
期限切れのプッシュの一覧をページ分割して返します。認証が必要です。
クエリーパラメーター
page (オプション): ページネーション用のページ番号。
- デフォルト:
1(最初のページ) - 範囲:
1への200 - 1ページあたり最大50プッシュを返す
- 例
?page=22ページ目を取得する
リクエスト例(アクティブ)
curl -X GET https://eu.pwpush.com/api/v2/pushes/active \
-H "Authorization: Bearer YOUR_API_TOKEN"
リクエスト例(期限切れ)
curl -X GET https://eu.pwpush.com/api/v2/pushes/expired \
-H "Authorization: Bearer YOUR_API_TOKEN"
回答例
[
{
"expire_after_duration": 7,
"expire_after_views": 5,
"expired": false,
"url_token": "abc123xyz789",
"deletable_by_viewer": false,
"retrieval_step": false,
"expired_on": null,
"passphrase": null,
"created_at": "2023-10-27T10:00:00.000Z",
"updated_at": "2023-10-27T10:00:00.000Z",
"expire_after_days": 7,
"days_remaining": 7,
"expires_at": "2023-10-29T10:00:00.000Z",
"expires_in": 172800,
"views_remaining": 5,
"deleted": false,
"json_url": "https://eu.pwpush.com/p/abc123xyz789.json",
"html_url": "https://eu.pwpush.com/p/abc123xyz789",
"account_id": 1,
"note": null,
"name": null
},
{
"expire_after_duration": 1,
"expire_after_views": 3,
"expired": false,
"url_token": "def456uvw012",
"deletable_by_viewer": true,
"retrieval_step": false,
"expired_on": null,
"passphrase": null,
"created_at": "2023-10-26T15:30:00.000Z",
"updated_at": "2023-10-26T15:30:00.000Z",
"expire_after_days": 1,
"days_remaining": 0,
"expires_at": "2023-10-26T16:00:00.000Z",
"expires_in": 1200,
"views_remaining": 2,
"deleted": false,
"json_url": "https://eu.pwpush.com/p/def456uvw012.json",
"html_url": "https://eu.pwpush.com/p/def456uvw012",
"account_id": 1,
"note": null,
"name": null
}
]
最終更新日 July 12, 2026