Matchai Docs

Edit a messageComing soon

Changes the text of a message the account sent. Everyone sees that it was edited. A message that went out by text cannot be edited.

Coming soon. This is documented ahead of launch so you can plan your integration; it is not available yet.
PATCH
/conversations/{conversation_id}/messages/{message_id}

Coming soon. Changes the text of a message the account sent. Everyone sees that it was edited. A message that went out by text cannot be edited.

Final action. When the connection is set to Ask me, this call returns 202 with an approval_url and does nothing until the account holder approves it in Matchai; Matchai then performs it exactly as sent and sends approval.resolved. When the connection is set to Allowed, it runs straight away.

Scopes: messages:send

Pricing: Included with the connection.

Authorization

headerAuthorizationBearer <matchai_<base62>>

A personal API key, sent as Authorization: Bearer matchai_…. Create keys in Matchai under Settings → Connectors → Advanced (for developers). A key starts with matchai_ followed by letters and digits, carries the scopes chosen when it was created, and can be revoked at any time. Keys reach only the account that created them: to serve other professionals, use Connect with Matchai.

Scope: messages:send

Path Parameters

conversation_id*string

Conversation id.

Length1 <= length <= 64
message_id*string

Message id.

Length1 <= length <= 64

Request Body

application/json
  1. body
text*string

New text for a message you sent.

Length1 <= length <= 4000

Response Body

The message.

application/json
  1. response
id*string

Message id.

Length1 <= length <= 64
conversation_id*string

Conversation id.

Length1 <= length <= 64
type*string
Value in"text""image""file""audio""video""location""gif""system"
text*string

The text. Empty for a message that is only an attachment.

sender*

A person as they appear in a conversation or on an appointment.

from_you*boolean

Sent by the account this connection acts for.

sent_via*
reply_to_message_id?|

The message this replies to.

Length1 <= length <= 64
attachments*array<>

Files sent with it.

delivery*
sent_at*string

Sent.

Formatdate-time
edited_at?|

Last edited.

Formatdate-time
Example Request
curl -X PATCH 'https://api.matchai.co/v1/conversations/string/messages/string' \  -H 'Content-Type: application/json' \  -d '{  "text": "string"}'
Example Response
{  "id": "string",  "conversation_id": "string",  "type": "text",  "text": "string",  "sender": {    "user_id": "string",    "contact_id": "string",    "display_name": "string",    "avatar_url": "http://example.com"  },  "from_you": true,  "sent_via": {    "kind": "person",    "app_name": "string"  },  "reply_to_message_id": "string",  "attachments": [    {      "document_id": "string",      "name": "string",      "mime_type": "string",      "size_bytes": 0    }  ],  "delivery": {    "channel": "matchai",    "state": "sent"  },  "sent_at": "2019-08-24T14:15:22Z",  "edited_at": "2019-08-24T14:15:22Z"}