ReferenceInbox API
Block the contact
POST
No body. Incoming messages from this contact are rejected. Writes a SYSTEM message. Blocking an already blocked contact returns 409.
bearerheader
AuthorizationBearer <token>Key issued in Settings → Developer → API key. Inbox methods need the Inbox scope. Campaigns methods need the Campaigns scope.
conversationId*stringConversation id
application/json- response
id*stringchannelId*stringChannel id, for example QAF261225002
contactId*stringstatus*stringThe key sets only OPEN or CLOSED. Other values can appear on older rows.
Value in
"OPEN""CLOSED""ASSIGNED""RESOLVED""BLOCKED"assignedTo?|User id of the assignee. Null when unassigned.
assignedUser?|nulllastMessageAt?|Format
date-timeisUnread*booleantags*array<string>lastMessagePreview?string|nulllastMessageType?string|nulllastMessageDirection?|Value in
"INBOUND""OUTBOUND"lastMessageStatus?string|nullunreadCount*numberisBlocked*booleantitle?|Custom title. Null until renamed.
lastCustomerMessageAt?|Last inbound customer message. Used for the WhatsApp service window.
Format
date-timecreatedAt*stringFormat
date-timeupdatedAt*stringFormat
date-timecontact?|Present on GET conversation, list, and search. Absent on block, title, and status writes.
channelType?stringPresent on reads.
customerPhone?|Customer phone taken from the contact.
curl -X POST 'https://api.1msg.io/api/v1/inbox/conversations/string/block'{ "id": "string", "channelId": "string", "contactId": "string", "status": "OPEN", "assignedTo": "string", "assignedUser": { "id": "b2bb82f0-2253-4e05-b955-a21f3d699caa", "name": "QA Stage", "avatar": null }, "lastMessageAt": "2019-08-24T14:15:22Z", "isUnread": true, "tags": [ "string" ], "lastMessagePreview": "string", "lastMessageType": "string", "lastMessageDirection": "INBOUND", "lastMessageStatus": "string", "unreadCount": 0, "isBlocked": true, "title": "string", "lastCustomerMessageAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "contact": { "id": "string", "phoneNumber": "79001234567", "name": "string", "avatar": "string" }, "channelType": "WABA", "customerPhone": "string"}