Phygitals

Phygitals

A Phygital is a reference to an IYK-managed NFT connected to an NFC chip.

Transfer Ownership with API key

Allows token transfers via API key and valid phygital (linkedToken) token reference (from GET /refs/:id).

Request

POST /phygitals/transfer

Headers

HeaderValueRequired
content-typeapplication/jsonYes
x-iyk-api-keyAPI key for userYes

Body

FieldDescriptionType
contractAddressContract address of the tokenstring
chainIdChain ID of the network where the token residesnumber
tokenIdID of the tokenstring
recipientETH address or ENS name to transfer ownership tostring

Response

{
  "success": true,
  "initialTxHash": "0x07d1953bc13656004bf407b93f65b6a3d178b473ccc74594e2780bbd62f920d6"
}
FieldDescriptionType
successIndicates if the request was successfulboolean
initialTxHashThe transaction hash for the ownership transfer. In rare cases this hash may change as the transaction is resubmitted by the relayer.string

Transfer Ownership with OTP code

Allows token transfers via OTP code. For tokens using 2-Tap claim (opens in a new tab), please refer to the claim-registration endpoints for setting up ownership transfer.

Request

POST /phygitals/transfer/pullable

Headers

HeaderValueRequired
content-typeapplication/jsonYes
x-iyk-codeOTP code for tokenYes

Body

FieldDescriptionType
recipientETH address or ENS name to transfer ownership tostring

Response

{
  "success": true,
  "initialTxHash": "0x07d1953bc13656004bf407b93f65b6a3d178b473ccc74594e2780bbd62f920d6"
}
FieldDescriptionType
successIndicates if the request was successfulboolean
initialTxHashThe transaction hash for the ownership transfer. In rare cases this hash may change as the transaction is resubmitted by the relayer.string

Get Transfer Signature with API Key

Generates a transfer signature using an API key. This signature can be passed into mintNFT or claimNFT to transfer the associated token to the given recipient.

Request

GET /phygitals/transfer-signature

Headers

HeaderValueRequired
content-typeapplication/jsonYes
x-iyk-api-keyAPI key for userYes

Request Body

ParameterDescriptionTypeRequired
contractAddressContract address of the tokenstringYes
chainIdChain ID of the network where the token residesnumberYes
tokenIdID of the tokenstringYes
recipientETH address or ENS name to transfer ownership tostringYes

Response

{
  "signature": "0xSignature",
  "blockExpiry": "12345678",
  "tokenRef": {
    "contractAddress": "0xContractAddress",
    "tokenId": "1234",
    "chainId": "1"
  }
}
FieldDescriptionType
signatureThe signature generated for the transferstring
blockExpiryBlock number when the signature expiresstring

Get Transfer Signature with OTP Code

Generates a transfer signature using an OTP code. This signature can be passed into mintNFT or claimNFT to transfer the associated token to the given recipient.

Request

GET /phygitals/transfer-signature/pullable

Headers

HeaderValueRequired
content-typeapplication/jsonYes
x-iyk-codeOTP code for tokenYes

Request Body

ParameterDescriptionTypeRequired
recipientETH address or ENS name to transfer ownership tostringYes

Response

{
  "signature": "0xSignature",
  "blockExpiry": "12345678",
  "tokenRef": {
    "contractAddress": "0xContractAddress",
    "tokenId": "1234",
    "chainId": "1"
  }
}
FieldDescriptionType
signatureThe signature generated for the transferstring
blockExpiryBlock number when the signature expiresstring
tokenRef.contractAddressContract address of the tokenstring
tokenRef.tokenIdID of the tokenstring
tokenRef.chainIdChain ID of the network where the token residesstring

Get Linked Chip

Get the chip linked to a token.

Request

GET /phygitals/chip

Query Params

ParameterDescriptionRequired
contractAddressContract address of the tokenYes
chainIdChain ID of the network where the token residesYes
tokenIdID of the tokenYes

Response

{
  "uid": "1111111111144444"
}
FieldDescriptionType
uidUID of the chipstring

Get Claim Registration

Get the claim registration status for a token.

Request

GET /phygitals/claim-registration

Query Params

ParameterDescriptionRequired
contractAddressContract address of the tokenYes
chainIdChain ID of the network where the token residesYes
tokenIdID of the tokenYes
recipientETH address or ENS name to transfer ownership toYes

Response

{
  "recipient": "0xRecipientAddress",
  "linkedToken": {
    "contractAddress": "0xContractAddress",
    "tokenId": "1234",
    "chainId": "1"
  },
  "isRequired": true,
  "isValid": false,
  "allowedAt": "2023-01-01T00:00:00Z",
  "expiresAt": "2023-01-02T00:00:00Z",
  "createdAt": "2023-01-01T00:00:00Z"
}
FieldDescriptionType
recipientETH address or ENS name of the recipientstring
linkedTokenObject containing details about the linked tokenobject
linkedToken.contractAddressContract address of the tokenstring
linkedToken.tokenIdID of the tokenstring
linkedToken.chainIdChain ID of the network where the token residesstring
isRequiredIndicates if claim registration is required. If false, proceed with transfer.boolean
isValidIndicates if the claim registration is valid. If true, proceed with transfer.boolean
allowedAtDate and time when the claim registration is allowedstring (ISO 8601)
expiresAtDate and time when the claim registration expiresstring (ISO 8601)
createdAtDate and time when the claim registration was createdstring (ISO 8601)

Add Claim Registration with API key

Create a claim registration for a token via API key.

Request

POST /phygitals/claim-registration

Headers

HeaderValueRequired
content-typeapplication/jsonYes
x-iyk-api-keyAPI key for userYes

Request Body

FieldDescriptionTypeRequired
contractAddressContract address of the tokenstringYes
chainIdChain ID of the network where the token residesnumberYes
tokenIdID of the tokenstringYes
recipientETH address or ENS name to transfer ownership tostringYes

Example Request Body

{
  "contractAddress": "0x17827126bda4a649b578191ff17275fdd6a20167",
  "chainId": 137,
  "tokenId": "3",
  "recipient": "0xRecipientAddressOrENS"
}

Response

{
  "recipient": "0xRecipientAddressOrENS",
  "linkedToken": {
    "contractAddress": "0xContractAddress",
    "tokenId": "1234",
    "chainId": "1"
  },
  "allowedAt": "2023-01-01T00:00:00Z",
  "expiresAt": "2023-01-02T00:00:00Z",
  "createdAt": "2023-01-01T00:00:00Z"
}
FieldDescriptionType
recipientETH address or ENS name of the recipientstring
linkedTokenObject containing details about the linked tokenobject
linkedToken.contractAddressContract address of the tokenstring
linkedToken.tokenIdID of the tokenstring
linkedToken.chainIdChain ID of the network where the token residesstring
allowedAtDate and time when the claim registration is allowedstring (ISO 8601)
expiresAtDate and time when the claim registration expiresstring (ISO 8601)
createdAtDate and time when the claim registration was createdstring (ISO 8601)

Add Claim Registration with OTP code

Create a claim registration for a token using a claim code.

Request

POST /phygitals/claim-registration/pullable

Headers

HeaderValueRequired
content-typeapplication/jsonYes
x-iyk-codeOTP code for tokenYes

Request Body

FieldDescriptionTypeRequired
recipientETH address or ENS name to transfer ownership tostringYes

Example Request Body

{
  "recipient": "0xRecipientAddressOrENS"
}

Response

{
  "recipient": "0xRecipientAddressOrENS",
  "linkedToken": {
    "contractAddress": "0xContractAddress",
    "tokenId": "1234",
    "chainId": "1"
  },
  "allowedAt": "2023-01-01T00:00:00Z",
  "expiresAt": "2023-01-02T00:00:00Z",
  "createdAt": "2023-01-01T00:00:00Z"
}
FieldDescriptionType
recipientETH address or ENS name of the recipientstring
linkedTokenObject containing details about the linked tokenobject
linkedToken.contractAddressContract address of the tokenstring
linkedToken.tokenIdID of the tokenstring
linkedToken.chainIdChain ID of the network where the token residesstring
allowedAtDate and time when the claim registration is allowedstring (ISO 8601)
expiresAtDate and time when the claim registration expiresstring (ISO 8601)
createdAtDate and time when the claim registration was createdstring (ISO 8601)

Delete Claim Registration with API key

Deletes a claim registration for a token and recipient via API key.

Request

DELETE /phygitals/claim-registration

Headers

HeaderValueRequired
content-typeapplication/jsonYes
x-iyk-api-keyAPI key for userYes

Request Body

FieldDescriptionTypeRequired
contractAddressContract address of the tokenstringYes
chainIdChain ID of the network where the token residesnumberYes
tokenIdID of the tokenstringYes
recipientETH address or ENS name to transfer ownership tostringYes

Example Request Body

{
  "contractAddress": "0x17827126bda4a649b578191ff17275fdd6a20167",
  "chainId": 137,
  "tokenId": "3",
  "recipient": "0xRecipientAddressOrENS"
}

Response

{
  "success": true
}

Update Metadata

Replaces the metadata for the requested token and refreshes the OpenSea cache.

Request

PATCH /phygitals/metadata

Headers

HeaderValueRequired
content-typeapplication/jsonYes
x-iyk-api-keyAPI key for userYes

Request Body

FieldDescriptionType
contractAddressContract address of the tokenstring
chainIdChain ID of the network where the token residesnumber
tokenIdID of the tokenstring
metadataJSON string for the updated metadatastring

Metadata JSON Format

Refer to OpenSea's metadata structure (opens in a new tab) for more information. Any additional fields will be preserved and added to the token metadata.

Required strings can be empty strings, and required arrays can be empty arrays.

FieldDescriptionTypeRequired
nameToken namestringYes
collectionCollection name (subheading of the tap screen)stringYes
descriptionToken descriptionstringYes
imageURL for token imagestringYes
attributesJSON string of updated metadata{ trait_type: string, value: string | number, display_type?: string }[]Yes
media_galleryJSON string of updated metadata{ media: <URL string>, type: <MIME type string> }[]Yes

Example Request Body

{
  "chainId": 137,
  "contractAddress": "0x17827126bda4a649b578191ff17275fdd6a20167",
  "tokenId": "3",
  "metadata": "{\"name\":\"MacDaddy Beanie #3\",\"description\":\"Swaggggy beanie for mac and cheeasy\",\"image\":\"https://files.iyk.app/beanie.png\",\"attributes\":[{\"trait_type\":\"Item Type\",\"value\":\"Beanie\"},{\"trait_type\":\"Size\",\"value\":\"M\"}],\"collection\":\"MacDaddy TEST METADATA UPDATE\",\"media_gallery\":[{\"media\":\"https://files.iyk.app/gallery-1.png\",\"type\":\"image/png\"},{\"media\":\"https://files.iyk.app/gallery-2.jpg\",\"type\":\"image/jpeg\"}],\"customField\":\"TEST 2\"}"
}

Response

{
  "success": true
}
FieldDescriptionType
successIndicates if the request was successfulboolean

Error Response

{
  "success": false,
  "errors": {
    "metadata.image": "Required"
  }
}