HumHub - Mail API (1.0.0)

Download OpenAPI specification:Download

E-mail: info@humhub.com License: AGPLv2

Welcome to the HumHub user module API reference.

Mail

API to access and manage mail conversations.

Conversation

Find all conversations

query Parameters
page
string >= 0

The number of page of the result set.

limit
string [ 1 .. 50 ]
Default: 20

The numbers of items to return per page.

Responses

Response samples

Content type
{
  • "total": 76,
  • "page": 1,
  • "pages": 8,
  • "links": {
    },
  • "results": [
    ]
}

Create conversation

Request Body schema: application/json

Data for new conversation

title
required
string

Conversation title

message
required
string

First entry content

recipient
required
Array of any

Guid of users

Responses

Request samples

Content type
application/json
{
  • "title": "Conversation from API",
  • "message": "First message from API",
  • "recipient": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 23,
  • "title": "Hi guys!",
  • "created_at": "2021-03-10T08:54:47.724Z",
  • "created_by": 1,
  • "updated_at": "2021-03-10T08:54:47.724Z",
  • "updated_by": 2
}

Get conversation by id

path Parameters
messageId
required
integer

The id of conversation

Responses

Response samples

Content type
application/json
{
  • "id": 23,
  • "title": "Hi guys!",
  • "created_at": "2021-03-10T08:54:47.724Z",
  • "created_by": 1,
  • "updated_at": "2021-03-10T08:54:47.724Z",
  • "updated_by": 2
}

Entry

Find entries of the conversation

path Parameters
messageId
required
integer

The id of conversation

query Parameters
page
string >= 0

The number of page of the result set.

limit
string [ 1 .. 50 ]
Default: 20

The numbers of items to return per page.

Responses

Response samples

Content type
{
  • "total": 76,
  • "page": 1,
  • "pages": 8,
  • "links": {
    },
  • "results": [
    ]
}

Create entry

path Parameters
messageId
required
integer

The id of conversation

Request Body schema: application/json

Data for new conversation entry

message
required
string

Conversation entry content

Responses

Request samples

Content type
application/json
{
  • "message": "Sample entry content from API"
}

Response samples

Content type
application/json
{
  • "id": 23,
  • "user_id": 1,
  • "file_id": null,
  • "content": "Sample message",
  • "created_at": "2021-03-10T08:54:47.724Z",
  • "created_by": 1,
  • "updated_at": "2021-03-10T08:54:47.724Z",
  • "updated_by": 2
}

Get entry

path Parameters
messageId
required
integer

The id of conversation

entryId
required
integer

The id of entry

Responses

Response samples

Content type
application/json
{
  • "id": 23,
  • "user_id": 1,
  • "file_id": null,
  • "content": "Sample message",
  • "created_at": "2021-03-10T08:54:47.724Z",
  • "created_by": 1,
  • "updated_at": "2021-03-10T08:54:47.724Z",
  • "updated_by": 2
}

Update entry

path Parameters
messageId
required
integer

The id of conversation

entryId
required
integer

The id of entry

Request Body schema: application/json

Data to update conversation entry

content
required
string

Conversation entry content

Responses

Request samples

Content type
application/json
{
  • "content": "Updated sample entry content from API"
}

Response samples

Content type
application/json
{
  • "id": 23,
  • "user_id": 1,
  • "file_id": null,
  • "content": "Sample message",
  • "created_at": "2021-03-10T08:54:47.724Z",
  • "created_by": 1,
  • "updated_at": "2021-03-10T08:54:47.724Z",
  • "updated_by": 2
}

Delete entry

path Parameters
messageId
required
integer

The id of conversation

entryId
required
integer

The id of entry

Responses

Recipient

Find recipients of the conversation

path Parameters
messageId
required
integer

The id of conversation

Responses

Response samples

Content type
[
  • {
    }
]

Add recipient to conversation

path Parameters
messageId
required
integer

The id of conversation

userId
required
integer

The id of user

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Remove recipient from conversation

path Parameters
messageId
required
integer

The id of conversation

userId
required
integer

The id of user

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Tag

Find tags of the conversation

path Parameters
messageId
required
integer

The id of conversation

query Parameters
page
string >= 0

The number of page of the result set.

limit
string [ 1 .. 50 ]
Default: 20

The numbers of items to return per page.

Responses

Response samples

Content type
application/json
{
  • "total": 76,
  • "page": 1,
  • "pages": 8,
  • "links": {
    },
  • "results": [
    ]
}

Update tags

path Parameters
messageId
required
integer

The id of conversation

Request Body schema: application/json

Data to update conversation tags

tags
required
Array of any

Conversation tags

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "total": 76,
  • "page": 1,
  • "pages": 8,
  • "links": {
    },
  • "results": [
    ]
}