# /app/events

This API is for fetching list of events associated with particular app.

**URL**

* Prod: <https://api.fyre.hypersign.id/ext/api/v1/app/events>
* Stage: <https://stage.hypermine.in/whitelist/ext/api/v1/app/events>

#### Method

POST

**Headers**

```
"Content-Type": 'application/json',
"Origin": <base URL> // Registered Base URl 
```

#### Request Body

Every request body must contain three properties: `message`, `fyresign` and `messageHash`.

Sample request body:

```javascript
{
  "message": {  
       "appId": "6274a30fc43e35144642u484", 
       "iat":1651813605, 
       "exp": 1651900005,  
       "metaData":{
          "page":1,
          "limit":2
         }
    },
  "fyresign": "0x04b681aa455ae90948cd94ae8474c12c7ba9e1efd2f08473f75194b87ccdd01f44706f3c6b5a2708882957f5569af821bdc308b827d3b3ee28df3f6a044979421c",
  "messageHash":"0x45f4b7343aad31ac28961666ee06d4930456995699f16d6a2ae17a318390da0f"
}
```

* **message**
  * **appId**: Id that you will get after creating app in Fyre Admin Dashboard.
  * **iat**: Timestamp at which the message was signed.
  * **exp**: Timestamp upto which the signature is valid.
  * **metaData**: This field is to send extra parameter like `limit`, `page` values.
* **fyresign**: Signature generated by signing `message` using app's private key. Send generated signature in this field.
* **messageHash**: Hash of the message.

#### Response Body

```javascript
{
  "message": "Successfully fetched AppEvents",
  "data": [
    {
      "_id": "6274b4cde7556226721e620c",               // Id of an event
      "projectName": "Test Event",                     // Name of the event
      "logoUrl": "http://localhost:3000/img/logo.png", // Banner url
      "fromDate": "2022-05-06T05:40:00.000Z",          // Event start date
      "toDate": "2023-05-18T05:40:00.000Z",            // Event end date
      "projectStatus": true,                           // Event status; Closed | Open
      "slug": "test-event",
      "actions":[                                      // Event action list
        {
          "_id":"6294df13b253e14768a95561",            // Action id
          "eventId":"6274b4cde7556226721e620c",        // Id of an event
          "order":0,
          "type":"HYPERSIGN_AUTH",                     // Action type
          "title":"Hypersign Authentication",          // Action title 
          "score":5,                                   // Action score
          "isManadatory":true,                         // Is this a mandatory action
          "value":"Hypersign Authentication",          // Action value
          "placeHolder":"Hypersign Authentication",    // Action placeholder
          "__v":0
        }
      ]
    },
  ],
  "success": true,
  "error": false
}
```

**NOTE:** See the full list of supported action types in  [Event Action Types](https://docs.fyre.hypersign.id/developer/apis/event-action-types) page;
