Quest Platform
  • Welcome to Heymint Quest Platform
  • Setting Up Your Domain
  • Dashboard Main Tabs
    • Admin
      • Quest Management
      • Customization
      • Widget
      • Subscription
  • Developers
    • API key
    • Step-by-Step Guide to Enable In-App Actions
    • API
    • Widget
Powered by GitBook
On this page
  1. Developers

API

PreviousStep-by-Step Guide to Enable In-App ActionsNextWidget

Last updated 6 months ago

Identities

Create identity

Create identity association URL

Events

Create an event

Log an event

List event logs

post

Generates a url that can be shared with a user to associate an identity with their account on the platform

Authorizations
Path parameters
identityIdstringRequired
Header parameters
x-api-keystringRequired

Your platform API key

Responses
200
200 OK
application/json
400
400 Bad Request
application/json
401
401 Unauthorized
application/json
405
405 Method Unsupported
application/json
500
500 Internal Server Error
application/json
post
POST /api/v1/identities/{identityId}/association HTTP/1.1
Host: {your-subdomain}.heymint.quest
x-api-key: text
Accept: */*
{
  "identityId": "48d0e4d6-ebeb-492d-a4c5-643864db18fb",
  "url": "https://quest.heymint.xyz/claim-identity/0cd929f4-8420-4d99-845d-fa4a24cfb32f:48d0e4d6-ebeb-492d-a4c5-643864db18fb:abcd1234"
}
get

List event logs

Authorizations
Query parameters
eventIdstringOptional

An event ID (or a comma-separated list of IDs) to filter by

identityIdstringOptional

An identity ID (or a comma-separated list of IDs) to filter by

afterstringOptional

For cursor-based pagination, specify the id of the last log entry you've seen

limitnumber · min: 1 · max: 200Optional

The maximum number of log entries to return

Default: 100
Header parameters
x-api-keystringRequired

Your platform API key

Responses
200
200 OK
application/json
400
400 Bad Request
application/json
401
401 Unauthorized
application/json
405
405 Method Unsupported
application/json
500
500 Internal Server Error
application/json
get
post

Creates an event log for the occurance of an event

Authorizations
Header parameters
x-api-keystringRequired

Your platform API key

Body
identityIdstringRequired

The identity ID corresponding to the user

Example: 48d0e4d6-ebeb-492d-a4c5-643864db18fb
eventIdstringRequired

The ID of the event to log

Example: 37aff86c-fb50-40cb-8785-0629c38c4f4c
uniqueIdentifierstringOptional

Your own unique identitier for this particular instance of the event taking place. If the same unique identifier is used multiple times for the same event, it will not create additional logs. This can be useful to ensure that you do not accidentally log the same event occurance more than once.

Example: abcd1234
Responses
200
200 OK
application/json
400
400 Bad Request
application/json
401
401 Unauthorized
application/json
405
405 Method Unsupported
application/json
500
500 Internal Server Error
application/json
post
POST /api/v1/events/logs HTTP/1.1
Host: {your-subdomain}.heymint.quest
x-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 132

{
  "identityId": "48d0e4d6-ebeb-492d-a4c5-643864db18fb",
  "eventId": "37aff86c-fb50-40cb-8785-0629c38c4f4c",
  "uniqueIdentifier": "abcd1234"
}
{
  "logId": "cf35edb3-5567-4701-9720-3e48831d0dc0",
  "identityClaimed": true
}
GET /api/v1/events/logs HTTP/1.1
Host: {your-subdomain}.heymint.quest
x-api-key: text
Accept: */*
{
  "data": [
    {
      "id": "text",
      "createdAt": "text",
      "event": {
        "id": "text",
        "name": "text"
      },
      "identity": {
        "id": "text"
      }
    }
  ]
}
  • Identities
  • Create identity
  • POSTv1/identities
  • Create identity association URL
  • POSTv1/identities/{identityId}/association
  • Events
  • Create an event
  • POSTv1/events
  • Log an event
  • POSTv1/events/logs
  • POSTv1/events/logs
  • List event logs
  • GETv1/events/logs
post

Creates a new identity

Authorizations
Header parameters
x-api-keystringRequired

Your platform API key

Body
uniqueIdentifierstringOptional

Your own unique identitier for the identity. If the same unique identifier is used multiple times, the same identity will be returned.

Example: abcd1234
Responses
200
200 OK
application/json
400
400 Bad Request
application/json
401
401 Unauthorized
application/json
405
405 Method Unsupported
application/json
500
500 Internal Server Error
application/json
post
POST /api/v1/identities HTTP/1.1
Host: {your-subdomain}.heymint.quest
x-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 152

{
  "uniqueIdentifier": "abcd1234",
  "providerInfo": {
    "ethAddress": "text",
    "twitterUsername": "text",
    "discordId": "text",
    "googleId": "text",
    "emailAddress": "text"
  }
}
{
  "id": "48d0e4d6-ebeb-492d-a4c5-643864db18fb"
}
post

Creates a new event for an action that will take place outside of the platform

Authorizations
Header parameters
x-api-keystringRequired

Your platform API key

Body
namestring · min: 1Required

Name of the event

Example: Level Up
slugstring · min: 1 · max: 60Required

Event slug (used to call the event log api)

Example: level_up
Responses
200
200 OK
application/json
400
400 Bad Request
application/json
401
401 Unauthorized
application/json
405
405 Method Unsupported
application/json
500
500 Internal Server Error
application/json
post
POST /api/v1/events HTTP/1.1
Host: {your-subdomain}.heymint.quest
x-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 37

{
  "name": "Level Up",
  "slug": "level_up"
}
{
  "slug": "17f8124a-08eb-499c-bf40-0779ef8fa6a6"
}
post

Creates an event log for the occurance of an event

Authorizations
Header parameters
x-api-keystringRequired

Your platform API key

Body
all ofOptional
and
any ofOptional
or
Responses
200
200 OK
application/json
400
400 Bad Request
application/json
401
401 Unauthorized
application/json
405
405 Method Unsupported
application/json
500
500 Internal Server Error
application/json
post
POST /api/v1/events/logs HTTP/1.1
Host: {your-subdomain}.heymint.quest
x-api-key: text
Content-Type: application/json
Accept: */*
{
  "logId": "cf35edb3-5567-4701-9720-3e48831d0dc0",
  "createdAt": "text",
  "identityClaimed": true
}