Create Message

POST /drivers/{driver_id}/chats

Create new chat message.

Roles

Users with the following roles may access this endoint:

Admin
CrmUser
Dispatcher
Driver
ThirdPartyAdmin
ThirdPartyCrmUser
ThirdPartyDispatcher
ThirdPartyDriver

Request

Path Parameters

driver_id String, Required

Driver identifier.

Query Parameters

note

No query parameters.

Request Headers

Refer to StandardRequestHeadersModel for more details.

Authorization String, Required

Authorization header (bearer with access token). See the Authentication Guide to get started.

  • Matches ^bearer [a-z0-9-_=]+.[a-z0-9-_=]+.?[a-z0-9-_.+/=]*$
  • No longer than 256 characters.
  • At least 1 characters long.

Content-Type String, Optional

Default Value: application/json

One of the following MIME types:


x-tenant-id Integer, Required

Tenant identifier. Contact CRO Software for more info if you don't already have this id. See list tenant ids for info on listing the tenants you have access to.

Request Body

Refer to CreateDriverChatMessageModel for more details.

receiver Object, Required

DriverChatUserModel

Driver chat user profile.


text String, Required

Message text.

  • At least 1 and no more than 1024 characters.

Response

Response Headers

Refer to StandardResponseHeadersModel for more details.

Accept String

Mime type (e.g. application/json).

  • At least 1 and no more than 256 characters.

Content-Type String, Optional

Default Value: application/json

One of the following MIME types:


x-request-id String

Request identifier.

  • Valid UUID.

Response Body

Refer to DriverChatMessageModel for more details.

id Integer

Driver chat message identifier.


is_edited Boolean

True if message has been changed.

  • One of 0, 1, True, False (case insensitive).

is_read Boolean

True if message has been changed.

  • One of 0, 1, True, False (case insensitive).

last_edited_on String

Message last edit date.

  • Date in an ISO 8601 compatible format.

receiver Object

DriverChatUserModel

Driver chat user profile.


sender Object

DriverChatUserModel

Driver chat user profile.


sent_on String

Message sent date.

  • Date in an ISO 8601 compatible format.

text String

Message text.

  • At least 1 and no more than 1024 characters.

Code Samples