Create a message

POST /api/v1/conversation/{conversation_uuid}/messages

Headers

Path parameters

application/json

Body Required

  • contents string Required

    Contents of the message.

  • files array[string] Required

    File UUIDs which are uploading, or has been uploaded but not yet been assigned to a model.

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • uuid string

      The UUID of the resource.

    • The timestamp of when the resource was created.

    • The timestamp of when the resource was updated.

    • The timestamp of when the resource was deleted.

    • contents string

      The message contents

    • edited boolean

      Whether the message has been edited or not

    • files array[object]

      Message file attachments

      Additional properties are allowed.

    • author object

      Message author

      Additional properties are allowed.

    • user object

      Message user

      Additional properties are allowed.

    • reactions array[object]

      Array of reactions to the message

      Additional properties are allowed.

POST /api/v1/conversation/{conversation_uuid}/messages
curl \
 -X POST https://api.plannrcrm.com/api/v1/conversation/conversation_uuid/messages \
 -H "Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}" \
 -H "Content-Type: application/json" \
 -H "Accept: application/json" \
 -d '{"contents":"Hello, welcome to Plannr.","files":[null,null]}'
Request examples
# Headers
Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}
Content-Type: application/json
Accept: application/json

# Payload
{
  "contents": "Hello, welcome to Plannr.",
  "files": [
    null,
    null
  ]
}
Response examples (200)
{
  "user": {
    "name": "Gareth Thompson",
    "type": "standard",
    "uuid": "e90dfe32-6704-4504-b087-e08e8163c445",
    "email": "gareth@codepotato.co.uk",
    "last_name": "Thompson",
    "photo_url": "https://eu.ui-avatars.com/api/?name=Gareth+Thompson",
    "created_at": "2024-11-20T13:24:01+00:00",
    "first_name": "Gareth",
    "updated_at": "2024-11-20T13:24:01+00:00",
    "otp_pending": false,
    "current_login": "App\\Http\\Resources\\LoginResource",
    "current_account": "App\\Http\\Resources\\AccountResource",
    "two_factor_type": "sms",
    "otp_confirmed_at": "2024-11-20T13:24:01+00:00",
    "two_factor_mobile": true,
    "current_time_entry": "App\\Http\\Resources\\TimeEntryResource",
    "session_expires_at": "2024-11-20T13:24:01+00:00",
    "two_factor_enabled": true,
    "should_auto_save_notes": true,
    "sms_two_factor_enabled": true,
    "two_factor_mobile_meta": {
      "country": "GB",
      "formatted": "0333 090 3630"
    }
  },
  "uuid": "42569f93-3dd3-48a8-b909-9580b4041309",
  "files": [
    {
      "firm": "App\\Http\\Resources\\FirmResource",
      "name": "Welcome to Plannr",
      "size": "21691783",
      "tags": "App\\Http\\Resources\\TagResource",
      "type": "type",
      "uuid": "2220e078-74e4-46d8-ab53-8adfeaf03d43",
      "parent": "Object",
      "status": "uploaded",
      "account": "App\\Http\\Resources\\AccountResource",
      "filename": "Welcome to Plannr.pdf",
      "progress": "100",
      "extension": "pdf",
      "created_at": "2024-11-20T13:24:01+00:00",
      "updated_at": "2024-11-20T13:24:01+00:00",
      "folder_name": "folder 2",
      "uploaded_at": "2024-11-20T13:24:01+00:00",
      "download_url": "https://plannr.valet/file/e71bee17-33d7-41e6-94f3-f4a9a0113a2d/download",
      "last_modified": "2024-11-20T13:24:01+00:00",
      "original_created_at": "2024-11-20T13:24:01+00:00"
    }
  ],
  "author": {
    "firm": "App\\Http\\Resources\\FirmResource",
    "name": "Gareth Thompson",
    "role": "client",
    "tags": "App\\Http\\Resources\\TagResource",
    "type": "client",
    "uuid": "6742472c-3392-45e2-af2b-572af8e0114a",
    "email": "gareth@codepotato.co.uk",
    "groups": "App\\Http\\Resources\\GroupResource",
    "owners": "App\\Http\\Resources\\AccountResource",
    "last_name": "Thompson",
    "created_at": "2024-11-20T13:24:01+00:00",
    "first_name": "Gareth",
    "updated_at": "2024-11-20T13:24:01+00:00",
    "with_login": true,
    "custom_fields": "App\\Http\\Resources\\CustomFieldValueResource",
    "introduced_by": "App\\Http\\Resources\\AccountResource",
    "primary_email": "App\\Http\\Resources\\ContactDetailResource",
    "can_be_deleted": "false",
    "assigned_adviser": "App\\Http\\Resources\\AccountResource",
    "next_review_date": "2024-11-20T13:24:01+00:00",
    "has_joint_account": true,
    "current_time_entry": "App\\Http\\Resources\\TimeEntryResource",
    "first_contact_date": "2024-11-20T13:24:01+00:00",
    "external_references": "App\\Http\\Resources\\ExternalReferenceResource",
    "assigned_paraplanner": "App\\Http\\Resources\\AccountResource",
    "previous_review_date": "2024-11-20T13:24:01+00:00",
    "primary_phone_number": "App\\Http\\Resources\\ContactDetailResource",
    "assigned_administrator": "App\\Http\\Resources\\AccountResource",
    "anniversary_review_date": "2024-11-20T13:24:01+00:00"
  },
  "edited": true,
  "contents": "Welcome to Plannr!",
  "reactions": [
    {
      "uuid": "122985b7-bdce-4281-a68c-a94984152727",
      "reaction": "like",
      "reactions": "App\\Http\\Resources\\ReactionResource",
      "created_at": "2024-11-20T13:24:01+00:00",
      "updated_at": "2024-11-20T13:24:01+00:00",
      "account_name": "Gareth Thompson",
      "account_uuid": "f56c9868-1aa0-43b8-be8f-d44bb4942c5a"
    }
  ],
  "created_at": "2024-11-20T13:24:01+00:00",
  "deleted_at": "2024-11-20T13:24:01+00:00",
  "updated_at": "2024-11-20T13:24:01+00:00"
}