Inbox API
WhatsApp Inbox API is an HTTP API for 1MSG Inbox. Your code does in Inbox what an operator does on the Platform: list conversations, assign them, open and close them, and block a contact. Your team keeps working in Inbox as usual and sees every change your code makes. Each action leaves a system message in the chat.
The two APIs split the work. The WhatsApp Business API sends and receives messages. Inbox API manages who handles a conversation, what state it is in, and what has changed. You still reply to customers through the WhatsApp Business API. Incoming messages and delivery statuses still arrive at your channel webhook. Inbox events go to their own webhook, and each one is signed.
API key
Sign in at platform.1msg.io. Open Settings → Developer → API Settings, generate a key, and copy it. The full key is shown once.
Send it on every request:
Authorization: Bearer 1msg_live_••••••••
The key belongs to a user and has that user's permissions. It sees the same channels, and every action is made on that user's behalf. For all channels, the account owner creates a key for themselves. To work within a teammate's permissions, create a key for that teammate.
An account key sees every channel. A user key sees only channels that user can open.
bearerAuthorizationBearer <token>Key issued in the cabinet: Settings → Developer → API Settings.
application/json- response
[index: integer]?curl -X GET 'https://api.1msg.io/api/v1/inbox/channels'[ { "id": "QAF261225002", "name": "QA FMF", "status": "ACTIVE" }]The account owner, plus operators who already have this channel. Use the returned id as userId when assigning a conversation.
bearerAuthorizationBearer <token>Key issued in the cabinet: Settings → Developer → API Settings.
channelId*stringChannel id from GET /inbox/channels
application/json- response
[index: integer]?curl -X GET 'https://api.1msg.io/api/v1/inbox/channels/QAF261225002/assignees'[ { "id": "b2bb82f0-2253-4e05-b955-a21f3d699caa", "name": "QA Stage", "avatar": null, "role": "OPERATOR" }]Newest lastMessageAt first. Pass pagination.nextCursor as cursor for the next page.
bearerAuthorizationBearer <token>Key issued in the cabinet: Settings → Developer → API Settings.
limit?numberPage size. Default 50.
cursor?stringpagination.nextCursor from the previous page (ISO lastMessageAt).
channelId?stringLimit to one channel.
status?stringConversation status.
"OPEN""CLOSED"unread?booleantrue keeps only conversations with unread messages.
tab?stringmine_open: open and assigned to this key. unassigned: open and nobody assigned. all: no extra tab filter.
"mine_open""unassigned""all"assigneeId?stringOnly conversations assigned to this user id.
application/json- response
data*array<>pagination*curl -X GET 'https://api.1msg.io/api/v1/inbox/conversations'{ "data": [ { "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" } ], "pagination": { "hasMore": true, "nextCursor": "2019-08-24T14:15:22Z", "limit": 50 }}Matches contact name, phone, and message text in one channel. channelId is required. query must be at least 3 characters; a shorter query returns two empty lists.
bearerAuthorizationBearer <token>Key issued in the cabinet: Settings → Developer → API Settings.
query*stringAt least 3 characters.
channelId*stringChannel to search. Required.
application/json- response
contacts*array<>Conversations matched by contact name or phone.
messages*array<>Conversations matched by message text. A conversation already listed in contacts is not repeated here.
curl -X GET 'https://api.1msg.io/api/v1/inbox/conversations/search?query=7900&channelId=QAF261225002'{ "contacts": [ { "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" } ], "messages": [ { "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" } ]}mine_open and unassigned count only OPEN conversations. all counts every visible conversation.
bearerAuthorizationBearer <token>Key issued in the cabinet: Settings → Developer → API Settings.
channelId?stringLimit the counts to one channel.
application/json- response
mine_open*numberOpen conversations assigned to the key actor.
unassigned*numberOpen conversations with no assignee.
all*numberAll conversations visible to the key, any status.
curl -X GET 'https://api.1msg.io/api/v1/inbox/conversations/counts'{ "mine_open": 0, "unassigned": 0, "all": 1}Includes the contact, assignee, and customer phone.
bearerAuthorizationBearer <token>Key issued in the cabinet: Settings → Developer → API Settings.
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.
"OPEN""CLOSED""ASSIGNED""RESOLVED""BLOCKED"assignedTo?|User id of the assignee. Null when unassigned.
assignedUser?|nulllastMessageAt?|date-timeisUnread*booleantags*array<string>lastMessagePreview?string|nulllastMessageType?string|nulllastMessageDirection?|"INBOUND""OUTBOUND"lastMessageStatus?string|nullunreadCount*numberisBlocked*booleantitle?|Custom title. Null until renamed.
lastCustomerMessageAt?|Last inbound customer message. Used for the WhatsApp service window.
date-timecreatedAt*stringdate-timeupdatedAt*stringdate-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 GET 'https://api.1msg.io/api/v1/inbox/conversations/string'{ "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"}Newest first. Omit kind, or pass kind=all, to include SYSTEM events (status, assignee, block, title) together with messages. kind=messages hides SYSTEM events. kind=system returns only SYSTEM events. Notes stay with messages. Pass nextCursor as cursor to load older rows of the same kind.
bearerAuthorizationBearer <token>Key issued in the cabinet: Settings → Developer → API Settings.
conversationId*stringConversation id
limit?numberPage size. Default 50.
cursor?stringnextCursor from the previous page (ISO createdAt). Returns rows older than that instant, still filtered by kind.
kind?stringall (default when omitted): every row. messages: everything except SYSTEM. system: only SYSTEM.
"all""messages""system"application/json- response
messages*array<>Newest first. Includes SYSTEM events.
nextCursor?|Pass back as cursor to load older messages. Null on the last page.
date-timehasMore*booleancurl -X GET 'https://api.1msg.io/api/v1/inbox/conversations/string/messages'{ "messages": [ { "id": "string", "conversationId": "string", "channelId": "string", "direction": "INBOUND", "type": "TEXT", "content": "string", "mediaUrl": "string", "mediaType": "string", "fileName": "string", "fileSize": 0, "mediaDuration": 0, "thumbnailUrl": "string", "templateName": "string", "templateLanguage": "string", "status": "PENDING", "externalId": "string", "sentAt": "2019-08-24T14:15:22Z", "deliveredAt": "2019-08-24T14:15:22Z", "readAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "systemEventSource": "string", "systemEventOperatorName": "string", "systemEventOperatorEmail": "string", "assignmentEvent": { "kind": "assign", "actor": { "id": "b2bb82f0-2253-4e05-b955-a21f3d699caa", "name": "QA Stage", "avatar": null }, "target": { "id": "b2bb82f0-2253-4e05-b955-a21f3d699caa", "name": "QA Stage", "avatar": null } }, "author": { "id": "b2bb82f0-2253-4e05-b955-a21f3d699caa", "name": "QA Stage", "avatar": null }, "quotedMessage": { "id": "string", "content": "string", "type": "string", "direction": "INBOUND", "contactName": "string", "contactPhone": "string", "mediaUrl": "string", "fileName": "string" }, "latitude": 0, "longitude": 0 } ], "nextCursor": "2019-08-24T14:15:22Z", "hasMore": true}userId is the id from GET /api/v1/inbox/channels/{channelId}/assignees. That person must already be able to open this channel. null clears the assignee. Setting the same assignee does nothing and writes no system message. A real change writes one SYSTEM message.
bearerAuthorizationBearer <token>Key issued in the cabinet: Settings → Developer → API Settings.
conversationId*stringConversation id
application/json- body
userId*|User id from GET /api/v1/inbox/channels/{channelId}/assignees. Null clears the assignee. The same assignee is a no-op.
Updated conversation row.
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.
"OPEN""CLOSED""ASSIGNED""RESOLVED""BLOCKED"assignedTo?|User id of the assignee. Null when unassigned.
assignedUser?|nulllastMessageAt?|date-timeisUnread*booleantags*array<string>lastMessagePreview?string|nulllastMessageType?string|nulllastMessageDirection?|"INBOUND""OUTBOUND"lastMessageStatus?string|nullunreadCount*numberisBlocked*booleantitle?|Custom title. Null until renamed.
lastCustomerMessageAt?|Last inbound customer message. Used for the WhatsApp service window.
date-timecreatedAt*stringdate-timeupdatedAt*stringdate-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 PATCH 'https://api.1msg.io/api/v1/inbox/conversations/string/assignee' \ -H 'Content-Type: application/json' \ -d '{ "userId": "66c21609-01ed-4f83-8058-9b6ac090db3f"}'{ "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"}Send status OPEN or CLOSED in the JSON body. The conversation id alone does not change anything. A change writes a SYSTEM message. The same status again returns 409.
bearerAuthorizationBearer <token>Key issued in the cabinet: Settings → Developer → API Settings.
conversationId*stringConversation id
application/json- body
status*stringOPEN reopens the conversation. CLOSED closes it. Repeating the current value returns 409.
"OPEN""CLOSED"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.
"OPEN""CLOSED""ASSIGNED""RESOLVED""BLOCKED"assignedTo?|User id of the assignee. Null when unassigned.
assignedUser?|nulllastMessageAt?|date-timeisUnread*booleantags*array<string>lastMessagePreview?string|nulllastMessageType?string|nulllastMessageDirection?|"INBOUND""OUTBOUND"lastMessageStatus?string|nullunreadCount*numberisBlocked*booleantitle?|Custom title. Null until renamed.
lastCustomerMessageAt?|Last inbound customer message. Used for the WhatsApp service window.
date-timecreatedAt*stringdate-timeupdatedAt*stringdate-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 PATCH 'https://api.1msg.io/api/v1/inbox/conversations/string/status' \ -H 'Content-Type: application/json' \ -d '{ "status": "CLOSED"}'{ "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"}No body. Incoming messages from this contact are rejected. Writes a SYSTEM message. Blocking an already blocked contact returns 409.
bearerAuthorizationBearer <token>Key issued in the cabinet: Settings → Developer → API Settings.
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.
"OPEN""CLOSED""ASSIGNED""RESOLVED""BLOCKED"assignedTo?|User id of the assignee. Null when unassigned.
assignedUser?|nulllastMessageAt?|date-timeisUnread*booleantags*array<string>lastMessagePreview?string|nulllastMessageType?string|nulllastMessageDirection?|"INBOUND""OUTBOUND"lastMessageStatus?string|nullunreadCount*numberisBlocked*booleantitle?|Custom title. Null until renamed.
lastCustomerMessageAt?|Last inbound customer message. Used for the WhatsApp service window.
date-timecreatedAt*stringdate-timeupdatedAt*stringdate-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"}No body. Messages can be sent and received again. Writes a SYSTEM message. Unblocking a contact that is not blocked returns 409.
bearerAuthorizationBearer <token>Key issued in the cabinet: Settings → Developer → API Settings.
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.
"OPEN""CLOSED""ASSIGNED""RESOLVED""BLOCKED"assignedTo?|User id of the assignee. Null when unassigned.
assignedUser?|nulllastMessageAt?|date-timeisUnread*booleantags*array<string>lastMessagePreview?string|nulllastMessageType?string|nulllastMessageDirection?|"INBOUND""OUTBOUND"lastMessageStatus?string|nullunreadCount*numberisBlocked*booleantitle?|Custom title. Null until renamed.
lastCustomerMessageAt?|Last inbound customer message. Used for the WhatsApp service window.
date-timecreatedAt*stringdate-timeupdatedAt*stringdate-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/unblock'{ "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"}Body title replaces the conversation title and writes a SYSTEM message.
bearerAuthorizationBearer <token>Key issued in the cabinet: Settings → Developer → API Settings.
conversationId*stringConversation id
application/json- body
title*stringReplaces the dialog title. A system message records the change.
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.
"OPEN""CLOSED""ASSIGNED""RESOLVED""BLOCKED"assignedTo?|User id of the assignee. Null when unassigned.
assignedUser?|nulllastMessageAt?|date-timeisUnread*booleantags*array<string>lastMessagePreview?string|nulllastMessageType?string|nulllastMessageDirection?|"INBOUND""OUTBOUND"lastMessageStatus?string|nullunreadCount*numberisBlocked*booleantitle?|Custom title. Null until renamed.
lastCustomerMessageAt?|Last inbound customer message. Used for the WhatsApp service window.
date-timecreatedAt*stringdate-timeupdatedAt*stringdate-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 PATCH 'https://api.1msg.io/api/v1/inbox/conversations/string/title' \ -H 'Content-Type: application/json' \ -d '{ "title": "Billing question"}'{ "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"}One HTTPS URL per account. The owner sets it here or in Settings → Developer → API Settings. A user key cannot. When inbox state changes, 1MSG POSTs InboxWebhookEnvelope to that URL. Headers: Content-Type application/json, X-1msg-Event (the type), X-1msg-Delivery (the id), X-1msg-Signature sha256=. Compare the signature with HMAC-SHA256 over the exact request body. Reject a mismatch. This is not the channel webhook. Incoming messages and delivery statuses stay on the channel URL. Delivery does not change the API response. A failed POST is stored as lastDeliveryStatus and lastDeliveryError. Events: inbox.conversation.status_changed — Conversation opened or closed. status is OPEN or CLOSED. data fields: conversationId, channelId, status, previousStatus, actorUserId. inbox.conversation.assigned — An assignee was set. assigneeUserId is the new assignee. data fields: conversationId, channelId, assigneeUserId, previousAssigneeUserId, actorUserId. inbox.conversation.unassigned — The assignee was cleared. assigneeUserId is null. data fields: conversationId, channelId, assigneeUserId, previousAssigneeUserId, actorUserId. inbox.conversation.blocked — The contact was blocked. Incoming messages are rejected. data fields: conversationId, channelId, actorUserId. inbox.conversation.unblocked — The contact was unblocked. data fields: conversationId, channelId, actorUserId. inbox.conversation.title_changed — The conversation title was renamed. data fields: conversationId, channelId, title, previousTitle, actorUserId. inbox.user.invited — The owner invited a user. They are not a member until they accept. data fields: inviteId, email, channelIds, actorUserId. inbox.user.added — The invited person accepted and is now an operator. data fields: memberId, userId, email, channelIds. inbox.user.removed — An operator was removed from the account. data fields: memberId, userId, actorUserId. inbox.user.channels_changed — The channels an operator can open were replaced. data fields: memberId, userId, channelIds, actorUserId. inbox.user.invite_revoked — A pending invite was cancelled before it was accepted. data fields: inviteId, email, actorUserId.
bearerAuthorizationBearer <token>Key issued in the cabinet: Settings → Developer → API Settings.
application/json- response
url?|HTTPS URL that receives POST deliveries. Null when no webhook is saved.
secretPrefix?|First 12 characters of the signing secret. The full secret is not returned here.
createdAt?|date-timeupdatedAt?|date-timelastDeliveryAt?|When the last delivery attempt finished.
date-timelastDeliveryStatus?|HTTP status from the last delivery. Null when the request did not get a response.
lastDeliveryError?|Short error from the last failed delivery.
events*array<>Every event this webhook can send. Message and delivery-status events stay on the channel webhook.
envelope*Example of the JSON body 1MSG POSTs. data matches events[].example for the type in the body.
curl -X GET 'https://api.1msg.io/api/v1/inbox/webhook'{ "url": "https://example.com/1msg/inbox", "secretPrefix": "whsec_abc123", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "lastDeliveryAt": "2019-08-24T14:15:22Z", "lastDeliveryStatus": 200, "lastDeliveryError": "string", "events": [ { "type": "inbox.conversation.status_changed", "description": "Conversation opened or closed. status is OPEN or CLOSED.", "example": { "conversationId": "d94a047f-5984-42af-9f89-0f26c7e70ef1", "channelId": "QAF261225002", "status": "CLOSED", "previousStatus": "OPEN", "actorUserId": "b2bb82f0-2253-4e05-b955-a21f3d699caa" } } ], "envelope": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "type": "inbox.conversation.status_changed", "createdAt": "2019-08-24T14:15:22Z", "data": {} }}Later inbox changes are not delivered until a URL is saved again.
bearerAuthorizationBearer <token>Key issued in the cabinet: Settings → Developer → API Settings.
application/json- response
removed*booleancurl -X DELETE 'https://api.1msg.io/api/v1/inbox/webhook'{ "removed": true}Creates the webhook and returns the signing secret once, or updates the URL and keeps the existing secret.
bearerAuthorizationBearer <token>Key issued in the cabinet: Settings → Developer → API Settings.
application/json- body
url*stringHTTPS endpoint. 1MSG POSTs a JSON event here. Credentials in the URL are rejected.
application/json- response
url?|HTTPS URL that receives POST deliveries. Null when no webhook is saved.
secretPrefix?|First 12 characters of the signing secret. The full secret is not returned here.
createdAt?|date-timeupdatedAt?|date-timelastDeliveryAt?|When the last delivery attempt finished.
date-timelastDeliveryStatus?|HTTP status from the last delivery. Null when the request did not get a response.
lastDeliveryError?|Short error from the last failed delivery.
events*array<>Every event this webhook can send. Message and delivery-status events stay on the channel webhook.
envelope*Example of the JSON body 1MSG POSTs. data matches events[].example for the type in the body.
secret?|Full signing secret. Present only when the webhook is created or the secret is rotated. Store it. Later reads return secretPrefix only.
created*booleanTrue when this call created the webhook. False when it updated the URL or rotated the secret.
curl -X PUT 'https://api.1msg.io/api/v1/inbox/webhook' \ -H 'Content-Type: application/json' \ -d '{ "url": "https://example.com/1msg/inbox"}'{ "url": "https://example.com/1msg/inbox", "secretPrefix": "whsec_abc123", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "lastDeliveryAt": "2019-08-24T14:15:22Z", "lastDeliveryStatus": 200, "lastDeliveryError": "string", "events": [ { "type": "inbox.conversation.status_changed", "description": "Conversation opened or closed. status is OPEN or CLOSED.", "example": { "conversationId": "d94a047f-5984-42af-9f89-0f26c7e70ef1", "channelId": "QAF261225002", "status": "CLOSED", "previousStatus": "OPEN", "actorUserId": "b2bb82f0-2253-4e05-b955-a21f3d699caa" } } ], "envelope": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "type": "inbox.conversation.status_changed", "createdAt": "2019-08-24T14:15:22Z", "data": {} }, "secret": "whsec_example_secret", "created": true}Returns the new secret once. The previous secret stops verifying deliveries immediately. 404 when no URL is saved.
bearerAuthorizationBearer <token>Key issued in the cabinet: Settings → Developer → API Settings.
application/json- response
url?|HTTPS URL that receives POST deliveries. Null when no webhook is saved.
secretPrefix?|First 12 characters of the signing secret. The full secret is not returned here.
createdAt?|date-timeupdatedAt?|date-timelastDeliveryAt?|When the last delivery attempt finished.
date-timelastDeliveryStatus?|HTTP status from the last delivery. Null when the request did not get a response.
lastDeliveryError?|Short error from the last failed delivery.
events*array<>Every event this webhook can send. Message and delivery-status events stay on the channel webhook.
envelope*Example of the JSON body 1MSG POSTs. data matches events[].example for the type in the body.
secret?|Full signing secret. Present only when the webhook is created or the secret is rotated. Store it. Later reads return secretPrefix only.
created*booleanTrue when this call created the webhook. False when it updated the URL or rotated the secret.
curl -X POST 'https://api.1msg.io/api/v1/inbox/webhook/secret'{ "url": "https://example.com/1msg/inbox", "secretPrefix": "whsec_abc123", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "lastDeliveryAt": "2019-08-24T14:15:22Z", "lastDeliveryStatus": 200, "lastDeliveryError": "string", "events": [ { "type": "inbox.conversation.status_changed", "description": "Conversation opened or closed. status is OPEN or CLOSED.", "example": { "conversationId": "d94a047f-5984-42af-9f89-0f26c7e70ef1", "channelId": "QAF261225002", "status": "CLOSED", "previousStatus": "OPEN", "actorUserId": "b2bb82f0-2253-4e05-b955-a21f3d699caa" } } ], "envelope": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "type": "inbox.conversation.status_changed", "createdAt": "2019-08-24T14:15:22Z", "data": {} }, "secret": "whsec_example_secret", "created": true}