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
Header | Value | Required |
---|---|---|
content-type | multipart/form-data | Yes |
x-iyk-api-key | API key for user | Yes |
Body
Field | Description | Type |
---|---|---|
city | City where event takes place | string |
country | Country where event takes place | string |
description | Description of event | string |
endDate | End date of event (YYYY-MM-DD ) | string |
eventURL | URL of a website attendees should visit | string |
expiryDate | Date when POAPs are no longer claimable for event (YYYY-MM-DD ) | string |
image | Image for the event (must be a GIF or PNG under 4 MB ) | file |
name | Name of event | string |
privateEvent | If true , the event will be filtered out in POAP's frontend | boolean |
requestedCodes | Number of codes for the event | number |
startDate | Start date of event (YYYY-MM-DD ) | string |
virtualEvent | Whether the event is virtual | boolean |
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
}
}
Field | Description | Type |
---|---|---|
id | IYK ID of the POAP event | number |
poapResponse | Create event response from POAP | POAPCreateEventResponse |
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
Header | Value | Required |
---|---|---|
content-type | application/json | Yes |
x-iyk-api-key | API key for user | Yes |
Body
Field | Description | Type |
---|---|---|
poapEventId | IYK ID of the POAP event | number |
startsAt | Start date and time of the event (YYYY-MM-DDTHH:mm:ssZ ) (optional) | string |
endsAt | End date and time of the event (YYYY-MM-DDTHH:mm:ssZ ) (optional) | string |
title | Custom title for the event on the tap UI | string |
description | Custom description for the event on the tap UI | string |
contractAddress | Contract address of the token linked to the tag (optional if tagUID is provided) | string |
chainId | Chain ID of the token linked to the tag (optional if tagUID is provided) | number |
tokenId | Token ID of the token linked to the tag (optional if tagUID is provided) | string |
tagUID | UniversalID 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
}
Field | Description | Type |
---|---|---|
success | Indicates if the assignment was successful | boolean |
Mint a POAP
Claim a POAP using a valid OTP code from an iykRef.
Request
POST /poap-events/mint
Headers
Header | Value | Required |
---|---|---|
content-type | application/json | Yes |
x-iyk-code | OTP code | Yes |
Body
Field | Description | Type |
---|---|---|
recipient | The collector’s Ethereum address, ENS, or email | string |
poapEventId | IYK ID of the POAP event | number |
deviceId | Unique 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
}
Field | Description | Type |
---|---|---|
success | Indicates if the mint was successful | boolean |
Error
{
"statusCode": 400,
"message": "Unsupported code type",
"error": "Bad Request"
}
Field | Description | Type |
---|---|---|
statusCode | HTTP status code | number |
message | Error message (forwarded from POAP /claim-qr (opens in a new tab) if available) | string |
error | Error type | string |