POST api/Messages

Creates a new thread

Request Information

URI Parameters

None.

Body Parameters

Message
NameDescriptionTypeAdditional information
MessageId

integer

None.

MessageThreadId

integer

Required

MessageThread

MessageThread

None.

AuthorId

integer

Required

Author

UserInt

None.

Text

string

Required

Max length: 65365

Status

MessageStatus

Required

MessageReceivers

Collection of MessageReceiver

None.

CreatedAt

date

None.

CreatedBy

string

Max length: 256

UpdatedAt

date

None.

UpdatedBy

string

Max length: 256

Request Formats

application/json, text/json

Sample:
{
  "messageId": 1,
  "messageThreadId": 2,
  "messageThread": {
    "$id": "2",
    "messageThreadId": 1,
    "authorId": 2,
    "author": {
      "$id": "3",
      "id": 1,
      "email": "sample string 2",
      "emailConfirmed": true,
      "passwordHash": "sample string 4",
      "securityStamp": "sample string 5",
      "phoneNumber": "sample string 6",
      "phoneNumberConfirmed": true,
      "twoFactorEnabled": true,
      "lockoutEndDateUtc": "2024-05-02T15:06:10.881Z",
      "lockoutEnabled": true,
      "accessFailedCount": 10,
      "userName": "sample string 11",
      "firstName": "sample string 12",
      "lastName": "sample string 13",
      "firstLastName": "sample string 12 sample string 13",
      "lastFirstName": "sample string 13 sample string 12",
      "claims": [
        {
          "$id": "4",
          "id": 1,
          "userId": 2,
          "user": {
            "$ref": "3"
          },
          "claimType": "sample string 3",
          "claimValue": "sample string 4"
        },
        {
          "$ref": "4"
        }
      ],
      "logins": [
        {
          "$id": "5",
          "loginProvider": "sample string 1",
          "providerKey": "sample string 2",
          "userId": 3,
          "user": {
            "$ref": "3"
          }
        },
        {
          "$ref": "5"
        }
      ],
      "roles": [
        {
          "$id": "6",
          "userId": 1,
          "user": {
            "$ref": "3"
          },
          "roleId": 2,
          "role": {
            "$id": "7",
            "id": 1,
            "name": "sample string 2",
            "users": [
              {
                "$ref": "6"
              },
              {
                "$ref": "6"
              }
            ]
          }
        },
        {
          "$ref": "6"
        }
      ],
      "createdAt": "2024-05-02T15:06:10.881Z",
      "createdBy": "sample string 15",
      "updatedAt": "2024-05-02T15:06:10.881Z",
      "updatedBy": "sample string 17"
    },
    "title": "sample string 3",
    "messageThreadReceivers": [
      {
        "$id": "8",
        "messageThreadReceiverId": 1,
        "userId": 2,
        "user": {
          "$ref": "3"
        },
        "messageThreadId": 3,
        "messageThread": {
          "$ref": "2"
        },
        "createdAt": "2024-05-02T15:06:10.881Z",
        "createdBy": "sample string 5",
        "updatedAt": "2024-05-02T15:06:10.881Z",
        "updatedBy": "sample string 7"
      },
      {
        "$ref": "8"
      }
    ],
    "createdAt": "2024-05-02T15:06:10.881Z",
    "createdBy": "sample string 5",
    "updatedAt": "2024-05-02T15:06:10.881Z",
    "updatedBy": "sample string 7"
  },
  "authorId": 3,
  "author": {
    "$ref": "3"
  },
  "text": "sample string 4",
  "status": 0,
  "messageReceivers": [
    {
      "$id": "9",
      "messageReceiverId": 1,
      "userId": 2,
      "user": {
        "$ref": "3"
      },
      "messageId": 3,
      "message": {
        "$ref": "1"
      },
      "createdAt": "2024-05-02T15:06:10.881Z",
      "createdBy": "sample string 5",
      "updatedAt": "2024-05-02T15:06:10.881Z",
      "updatedBy": "sample string 7"
    },
    {
      "$ref": "9"
    }
  ],
  "createdAt": "2024-05-02T15:06:10.881Z",
  "createdBy": "sample string 6",
  "updatedAt": "2024-05-02T15:06:10.881Z",
  "updatedBy": "sample string 8"
}

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.