Skip to main content

Token API Reference

Pigi (1.0)

Download OpenAPI specification:Download

Pigi API Specification

Upload

Upload a file to Bitcoin

Upload file.

If no pigi-* headers are supplied, no additional verification is done. When they are supplied the server validates whether they match the uploaded file.

Use response.identifiers.transaction[0] if it is present, otherwise use response.identifiers.file[0]

Authorizations:
API Access Token
header Parameters
pigi-file-id-hex
string

SHA256 of the uploaded file encoded in hex

pigi-file-secret-hex
string

First 32 bytes of the SHA512 of the uploaded file encoded in hex

Request Body schema: multipart/form-data
file
string <binary>

Responses

Request samples

Content type
multipart/form-data
No sample

Response samples

Content type
application/json
Example
{}

Download

Download file by File ID

The content type header will be set to the mimetype of the file

path Parameters
fileId
required
string

File ID encoded in hex

query Parameters
s
string

Secret encoded in base62

Responses

Download file by Transaction ID

The content type header will be set to the mimetype of the file

path Parameters
txId
required
string

Transaction ID encoded in hex

query Parameters
s
string

Secret encoded in base62

Responses

Status

Get transaction status by File ID

Transaction status contains information about the transaction

path Parameters
fileId
required
string

Responses

Response samples

Content type
application/json
null

Get transaction status by Transaction ID

Transaction status contains information about the transaction

path Parameters
txId
required
string

Responses

Response samples

Content type
application/json
null