Core System API (1.0.0)

Download OpenAPI specification:

Healthz

Healthz_checkHealthz

Responses

Auth

Auth_loginGoogle

path Parameters
provider
required
string (Auth.OAuthProviders)
Value: "google"

The OAuth2 provider to use for login.

query Parameters
c
required
string

The callback URL of the OAuth2 login. See details

r
string

The redirect URL for login callback.

Responses

Auth_refreshToken

path Parameters
refreshToken
required
string

The refresh token to use for refreshing the access token.

Responses

Response samples

Content type
application/json
{
  • "accessToken": "string",
  • "expirationTime": 0,
  • "refreshToken": "string"
}

User

User_getMe

Get the current user's information.

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "username": "string",
  • "name": "string",
  • "avatarUrl": "string",
  • "roles": [
    ]
}

Unit

Unit_getAllOrganizations

Get all organizations

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Unit_createOrg

Create a new organization

Request Body schema: application/json
required
name
required
string

The name of the unit or organization

description
required
string

A brief description of the unit or organization

required
object

Metadata for the unit or organization, can include additional information like contact details, address, etc.

slug
required
string

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "metadata": { },
  • "slug": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": "string",
  • "metadata": { },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "slug": "string"
}

Unit_addParentChild

Create a new parent-child relationship between units by linking them

Request Body schema: application/json
required
parentId
string <uuid> (uuid)
childId
required
string <uuid> (uuid)
orgId
required
string <uuid> (uuid)

Responses

Request samples

Content type
application/json
{
  • "parentId": "70850378-7d3c-4f45-91b7-942d4dfbbd43",
  • "childId": "da54978f-5a21-4efd-948e-3959f61b037a",
  • "orgId": "25b2c2d5-a7fc-47d0-89e4-8709a1560bfa"
}

Response samples

Content type
application/json
{
  • "parentId": "70850378-7d3c-4f45-91b7-942d4dfbbd43",
  • "childId": "da54978f-5a21-4efd-948e-3959f61b037a",
  • "orgId": "25b2c2d5-a7fc-47d0-89e4-8709a1560bfa"
}

Unit_removeParentChild

Remove a parent-child relationship between units by unlinking them

path Parameters
child_id
required
string <uuid> (uuid)

Responses

Unit_getOrgById

Get a specific unit with the slug of its organization by its unique identifier

path Parameters
slug
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": "string",
  • "metadata": { },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "slug": "string"
}

Unit_updateOrg

Update an existing unit or organization by its unique identifier

path Parameters
slug
required
string
Request Body schema: application/json
required
name
required
string

The name of the unit or organization

description
required
string

A brief description of the unit or organization

required
object

Metadata for the unit or organization, can include additional information like contact details, address, etc.

slug
required
string

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "metadata": { },
  • "slug": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": "string",
  • "metadata": { },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "slug": "string"
}

Unit_deleteOrg

Delete a specific organization by its unique identifier

path Parameters
slug
required
string

Responses

Unit_addOrgMember

Add a member to an organization

path Parameters
slug
required
string
Request Body schema: application/json
required
memberId
required
string <uuid> (uuid)

Responses

Request samples

Content type
application/json
{
  • "memberId": "92983ab9-49c8-444b-85ae-6e40402cf72e"
}

Response samples

Content type
application/json
{
  • "orgId": "25b2c2d5-a7fc-47d0-89e4-8709a1560bfa",
  • "memberId": "92983ab9-49c8-444b-85ae-6e40402cf72e"
}

Unit_listOrgMembers

List all members of an organization

path Parameters
slug
required
string

Responses

Response samples

Content type
application/json
[ ]

Unit_removeOrgMember

Remove an organization-member relationship

path Parameters
slug
required
string
member_id
required
string <uuid> (uuid)

Responses

Unit_listOrgSubUnitIds

List all unit IDs, optionally filtered by parent organization ID

path Parameters
slug
required
string
query Parameters
parentId
string <uuid> (uuid)

The parent unit ID used to filter subunits by their parent-child relationship

Responses

Response samples

Content type
application/json
[
  • "497f6eca-6276-4993-bfeb-53cbbbba6f08"
]

Unit_listOrgSubUnits

List all units, optionally filtered by parent organization ID

path Parameters
slug
required
string
query Parameters
parentId
string <uuid> (uuid)

The parent unit ID used to filter subunits by their parent-child relationship

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Unit_createUnit

Create a new unit

path Parameters
slug
required
string
Request Body schema: application/json
required
name
required
string

The name of the unit or organization

description
required
string

A brief description of the unit or organization

required
object

Metadata for the unit or organization, can include additional information like contact details, address, etc.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "metadata": { }
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": "string",
  • "metadata": { },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Unit_getUnitById

Get a specific unit with the slug of its organization by its unique identifier

path Parameters
slug
required
string
id
required
string <uuid> (uuid)

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": "string",
  • "metadata": { },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Unit_updateUnit

Update an existing unit or organization by its unique identifier

path Parameters
slug
required
string
id
required
string <uuid> (uuid)
Request Body schema: application/json
required
name
required
string

The name of the unit or organization

description
required
string

A brief description of the unit or organization

required
object

Metadata for the unit or organization, can include additional information like contact details, address, etc.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "metadata": { }
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": "string",
  • "metadata": { },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Unit_deleteUnit

Delete a specific unit of an organization by its unique identifier

path Parameters
slug
required
string
id
required
string <uuid> (uuid)

Responses

Unit_addUnitMember

Add a member to an unit

path Parameters
slug
required
string
id
required
string <uuid> (uuid)
Request Body schema: application/json
required
memberId
required
string <uuid> (uuid)

Responses

Request samples

Content type
application/json
{
  • "memberId": "92983ab9-49c8-444b-85ae-6e40402cf72e"
}

Response samples

Content type
application/json
{
  • "unitId": "b3eb5f92-604a-46b9-9881-9d84000fd7ed",
  • "memberId": "92983ab9-49c8-444b-85ae-6e40402cf72e"
}

Unit_listUnitMembers

List all members of a specific unit

path Parameters
slug
required
string
id
required
string <uuid> (uuid)

Responses

Response samples

Content type
application/json
[ ]

Unit_removeUnitMember

Remove an unit-member relationship

path Parameters
slug
required
string
id
required
string <uuid> (uuid)
member_id
required
string <uuid> (uuid)

Responses

Unit_listUnitSubUnitIds

List all unit IDs, optionally filtered by parent unit ID

path Parameters
slug
required
string
id
required
string <uuid> (uuid)
query Parameters
parentId
string <uuid> (uuid)

The parent unit ID used to filter subunits by their parent-child relationship

Responses

Response samples

Content type
application/json
[
  • "497f6eca-6276-4993-bfeb-53cbbbba6f08"
]

Unit_listUnitSubUnits

List all units, optionally filtered by parent unit ID

path Parameters
slug
required
string
id
required
string <uuid> (uuid)
query Parameters
parentId
string <uuid> (uuid)

The parent unit ID used to filter subunits by their parent-child relationship

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Unit_createUnitForm

Create a new form under a unit.

path Parameters
slug
required
string
unitId
required
string <uuid> (uuid)
Request Body schema: application/json
required
title
required
string

The title of the form.

description
required
string

The description of the form.

previewMessage
string

(Optional) Preview text for the form. If not provided, fallback to first 25 characters of description.

deadline
string <date-time>

(Optional) Deadline for form completion.

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "description": "string",
  • "previewMessage": "string",
  • "deadline": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "title": "string",
  • "description": "string",
  • "previewMessage": "string",
  • "status": "draft",
  • "unitId": "b3eb5f92-604a-46b9-9881-9d84000fd7ed",
  • "lastEditor": "36717201-0d72-4dee-86ae-b634e48b6033",
  • "deadline": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Unit_listFormsByUnit

List forms under a specific unit.

path Parameters
slug
required
string
unitId
required
string <uuid> (uuid)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Forms

Forms_listForms

List all existing forms.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Forms_previewRecipients

Preview recipients by orgIds/unitIds (no duplicated).

Request Body schema: application/json
required
orgId
string <uuid>

Target organization ID to collect users from.

unitIds
Array of strings <uuid> (uuid) [ items <uuid > ]

Target unit IDs to collect users from.

Responses

Request samples

Content type
application/json
{
  • "orgId": "25b2c2d5-a7fc-47d0-89e4-8709a1560bfa",
  • "unitIds": [
    ]
}

Response samples

Content type
application/json
{
  • "recipients": [
    ]
}

Forms_createQuestion

Create a new question for a specific form.

path Parameters
formId
required
string <uuid> (uuid)
Request Body schema: application/json
required
required
required
boolean

Whether the question is required to answer or not.

type
required
string
Enum: "short_text" "long_text" "single_choice" "multiple_choice" "date"

The type of the question.

title
required
string

What is the question.

description
required
string

More details of this question.

order
required
integer <int32>

What is the number of this question in the form.

Array of objects (Forms.ChoiceOption)

Available choice options for single_choice and multiple_choice questions.

Responses

Request samples

Content type
application/json
{
  • "required": true,
  • "type": "short_text",
  • "title": "string",
  • "description": "string",
  • "order": 0,
  • "choices": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "formId": "126460ed-49b2-4c69-849a-bd8904ec5d8f",
  • "required": true,
  • "type": "short_text",
  • "title": "string",
  • "description": "string",
  • "order": 0,
  • "choices": [
    ],
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Forms_listQuestions

List all the questions of a specific form.

path Parameters
formId
required
string <uuid> (uuid)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Forms_updateQuestion

Update an existing question by its unique identifier.

path Parameters
formId
required
string <uuid> (uuid)
questionId
required
string <uuid> (uuid)
Request Body schema: application/json
required
required
required
boolean

Whether the question is required to answer or not.

type
required
string
Enum: "short_text" "long_text" "single_choice" "multiple_choice" "date"

The type of the question.

title
required
string

What is the question.

description
required
string

More details of this question.

order
required
integer <int32>

What is the number of this question in the form.

Array of objects (Forms.ChoiceOption)

Available choice options for single_choice and multiple_choice questions.

Responses

Request samples

Content type
application/json
{
  • "required": true,
  • "type": "short_text",
  • "title": "string",
  • "description": "string",
  • "order": 0,
  • "choices": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "formId": "126460ed-49b2-4c69-849a-bd8904ec5d8f",
  • "required": true,
  • "type": "short_text",
  • "title": "string",
  • "description": "string",
  • "order": 0,
  • "choices": [
    ],
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Forms_deleteQuestion

Delete an existing question by its unique identifier.

path Parameters
formId
required
string <uuid> (uuid)
questionId
required
string <uuid> (uuid)

Responses

Forms_updateForm

Update an existing form by its unique identifier.

path Parameters
id
required
string <uuid> (uuid)
Request Body schema: application/json
required
title
required
string

The title of the form.

description
required
string

The description of the form.

previewMessage
string

(Optional) Preview text for the form. If not provided, fallback to first 25 characters of description.

deadline
string <date-time>

(Optional) Deadline for form completion.

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "description": "string",
  • "previewMessage": "string",
  • "deadline": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "title": "string",
  • "description": "string",
  • "previewMessage": "string",
  • "status": "draft",
  • "unitId": "b3eb5f92-604a-46b9-9881-9d84000fd7ed",
  • "lastEditor": "36717201-0d72-4dee-86ae-b634e48b6033",
  • "deadline": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Forms_deleteForm

Delete an existing form by its unique identifier.

path Parameters
id
required
string <uuid> (uuid)

Responses

Forms_getFormById

Get a specific form by its unique identifier.

path Parameters
id
required
string <uuid> (uuid)

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "title": "string",
  • "description": "string",
  • "previewMessage": "string",
  • "status": "draft",
  • "unitId": "b3eb5f92-604a-46b9-9881-9d84000fd7ed",
  • "lastEditor": "36717201-0d72-4dee-86ae-b634e48b6033",
  • "deadline": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Forms_publishForm

Publish a form. Set status to 'published', compute recipients, update inbox threads.

path Parameters
id
required
string <uuid> (uuid)
Request Body schema: application/json
required
orgId
string <uuid>

Target organization ID to collect users from.

unitIds
Array of strings <uuid> (uuid) [ items <uuid > ]

Target unit IDs to collect users from.

Responses

Request samples

Content type
application/json
{
  • "orgId": "25b2c2d5-a7fc-47d0-89e4-8709a1560bfa",
  • "unitIds": [
    ]
}

Responses

Responses_getQuestionAnswers

Get all answers for a specific question across all form responses.

path Parameters
formId
required
string <uuid> (uuid)
questionId
required
string <uuid> (uuid)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Responses_submitFormResponse

Submit a new response to a form.

path Parameters
formId
required
string <uuid> (uuid)
Request Body schema: application/json
required
required
Array of objects (Responses.AnswerRequest)

All answers for this form submission.

Responses

Request samples

Content type
application/json
{
  • "answers": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "formId": "126460ed-49b2-4c69-849a-bd8904ec5d8f",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Responses_listFormResponses

List all responses for a specific form.

path Parameters
formId
required
string <uuid> (uuid)

Responses

Response samples

Content type
application/json
{
  • "formId": "126460ed-49b2-4c69-849a-bd8904ec5d8f",
  • "responses": [
    ]
}

Responses_getFormResponse

Get a specific response by ID.

path Parameters
formId
required
string <uuid> (uuid)
responseId
required
string <uuid> (uuid)

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "formId": "126460ed-49b2-4c69-849a-bd8904ec5d8f",
  • "submittedBy": "a641a425-2470-49a5-92c2-5825c2833a34",
  • "questionAnswerPairs": [
    ],
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Responses_deleteFormResponse

Delete a response and all its associated data.

path Parameters
formId
required
string <uuid> (uuid)
responseId
required
string <uuid> (uuid)

Responses

Response samples

Content type
application/json
{}

Inbox

Inbox_getInboxMessages

Get all the preview of the inbox messages with pagination.

query Parameters
isRead
boolean
Default: false
isStarred
boolean
Default: false
isArchived
boolean
Default: false
page
integer <int32>
Default: 1
size
integer <int32>
Default: 10

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalPages": 0,
  • "totalItems": 0,
  • "currentPage": 0,
  • "pageSize": 0,
  • "hasNextPage": true
}

Inbox_getInboxMessage

Get the user inbox message by its unique identifier.

path Parameters
id
required
string <uuid> (uuid)

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "message": {
    },
  • "content": {
    },
  • "isRead": false,
  • "isStarred": false,
  • "isArchived": false
}

Inbox_updateInboxMessageFlag

Update flags for the user inbox message.

path Parameters
id
required
string <uuid> (uuid)
Request Body schema: application/json
required
isRead
boolean
Default: false
isStarred
boolean
Default: false
isArchived
boolean
Default: false

Responses

Request samples

Content type
application/json
{
  • "isRead": false,
  • "isStarred": false,
  • "isArchived": false
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "message": {
    },
  • "isRead": false,
  • "isStarred": false,
  • "isArchived": false
}