Modules
POAP Events

POAP Events

POAPs (opens in a new tab) allow you to mint memories as digital mementos.

Create a POAP Event

Create a POAP Event. The resulting POAP event will be owned by your API key.

Request

POST /poap-events

Headers

HeaderValueRequired
content-typemultipart/form-dataYes
x-iyk-api-keyAPI key for userYes

Body

FieldDescriptionType
cityCity where event takes placestring
countryCountry where event takes placestring
descriptionDescription of eventstring
endDateEnd date of event (YYYY-MM-DD)string
eventURLURL of a website attendees should visitstring
expiryDateDate when POAPs are no longer claimable for event (YYYY-MM-DD)string
imageImage for the event (must be a GIF or PNG under 4 MB )file
nameName of eventstring
privateEventIf true, the event will be filtered out in POAP's frontendboolean
requestedCodesNumber of codes for the eventnumber
startDateStart date of event (YYYY-MM-DD)string
virtualEventWhether the event is virtualboolean

Response

{
  "id": 80,
  "poapResponse": {
    "id": 16947,
    "fancy_id": "example-event-2022",
    "name": "Example event 2022",
    "description": "This is an example event description",
    "city": "Buenos Aires",
    "country": "Argentina",
    "event_url": "https://poap.xyz",
    "image_url": "https://poap.xyz/image.png",
    "animation_url": "string",
    "year": 2022,
    "start_date": "07-18-2022",
    "end_date": "07-20-2022",
    "expiry_date": "08-31-2022",
    "from_admin": true,
    "virtual_event": true,
    "event_template_id": 1,
    "private_event": true
  }
}
FieldDescriptionType
idIYK ID of the POAP eventnumber
poapResponseCreate event response from POAPPOAPCreateEventResponse

Make sure you save the IYK ID of the POAP event you created! You'll need this to use the event across our platform.

Assign a POAP Event

Assign a POAP event to a tag or token. Any future taps of the chip will have a poapEvents object on the iykRef.

Your API key must be an owner of the POAP event, as well as the tag or token.

Request

POST /poap-events/assign

Headers

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

Body

FieldDescriptionType
poapEventIdIYK ID of the POAP eventnumber
startsAtStart date and time of the event (YYYY-MM-DDTHH:mm:ssZ) (optional)string
endsAtEnd date and time of the event (YYYY-MM-DDTHH:mm:ssZ) (optional)string
titleCustom title for the event on the tap UIstring
descriptionCustom description for the event on the tap UIstring
contractAddressContract address of the token linked to the tag (optional if tagUID is provided)string
chainIdChain ID of the token linked to the tag (optional if tagUID is provided)number
tokenIdToken ID of the token linked to the tag (optional if tagUID is provided)string
tagUIDUniversalID for the tag (optional if contractAddress, chainId, and tokenId are provided)string

*Note: If startsAt and endsAt are not provided, the start_date and end_date of the POAP event must be set. To identify the tag, either provide tagUID or a token reference (a combination of contractAddress, chainId, and tokenId).

Response

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

Mint a POAP

Claim a POAP using a valid OTP code from an iykRef.

Request

POST /poap-events/mint

Headers

HeaderValueRequired
content-typeapplication/jsonYes
x-iyk-codeOTP codeYes

Body

FieldDescriptionType
recipientThe collector’s Ethereum address, ENS, or emailstring
poapEventIdIYK ID of the POAP eventnumber
deviceIdUnique device ID, prevents a device from minting a POAP for the same event more than once (optional)string

*Note: The x-iyk-code header's value can be obtained from the GET /refs/:id response under the otp field in the poapEvents object.

Response

Success

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

Error

{
  "statusCode": 400,
  "message": "Unsupported code type",
  "error": "Bad Request"
}
FieldDescriptionType
statusCodeHTTP status codenumber
messageError message (forwarded from POAP /claim-qr (opens in a new tab) if available)string
errorError typestring