Create Event
Overview Creates a new event in the system. Endpoint - Method: POST - URL: https://api.nizu.dev/v2/ Authentication - Type: Bearer token - Source: {{client_token}} - How to send: Set Authoriz
Body parameters
module
|
string |
Example: events
|
data
|
array |
Example:
|
Overview
Creates a new event in the system.
Endpoint
- Method: POST
- URL: https://api.nizu.dev/v2/
Authentication
- Type: Bearer token
- Source: {{client_token}}
- How to send: Set Authorization type to "Bearer Token" and use the value of {{client_token}}.
Headers
- Content-Type: application/json (required)
- Authorization: Bearer {{client_token}}
Request Body
- Content type: application/json
- Shape: An object with module and data fields.
Schema (informal)
``` json
{
"module": "events", // string, required, must be "events"
"data": [ // array of field/value pairs, required
{ "field": "title", "value": "string" }, // required
{ "field": "description", "value": "string" }, // optional
{ "field": "start_date", "value": "YYYY-MM-DD" }, // required
{ "field": "end_date", "value": "YYYY-MM-DD" }, // optional/required per business rules
{ "field": "start_time", "value": "HH:mm:ss" }, // optional
{ "field": "end_time", "value": "HH:mm:ss" }, // optional
{ "field": "created_by", "value": "numeric-string" }, // user id
{ "field": "location", "value": "string" }, // optional
{ "field": "client_id", "value": "numeric-string" }, // optional
{ "field": "labels", "value": "string" } // optional
]
}
Example Request Bodyjson
{
"module": "events",
"data": [
{"field":"title", "value":"test event"},
{"field":"description", "value":"My event description"},
{"field":"start_date", "value":"2025-01-01"},
{"field":"end_date", "value":"2025-01-05"},
{"field":"start_time", "value":"10:00:00"},
{"field":"end_time", "value":"11:00:00"},
{"field":"created_by", "value":"1"},
{"field":"location", "value":"Retiesebaan 7/1"},
{"field":"client_id", "value":"0"},
{"field":"labels", "value":"0"}
]
}
Successful Response
- Status: 200 OK
- Body example (most recent):json
{
"success": true,
"data": { "id": 4677 }
}
```
Response Schema (informal)
{
"success": boolean,
"data": {
"id": number // newly created event id
}
}
Testing Notes
- Assert HTTP 2xx: pm.expect(pm.response.code).to.be.oneOf(\[200, 201\]);
- Validate success flag exists and is true.
- Validate data.id is a number.
- Optionally capture id for downstream requests: pm.collectionVariables.set("event_id", json.data.id);
- When running in a collection, ensure {{client_token}} is set in the active environment and https://api.nizu.dev/v2/ points to the correct host.