Messaging
The Messaging operations of the Hub REST API (15 operations).
Generated from Synap-core/backend main at 24fabe7, which can be newer than the stable release self-hosters install.
bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
application/json- body
provider*string1 <= lengthtext?stringlength <= 50000""messageId*string1 <= lengthexternalId?string1 <= lengthparticipantEmail?stringemailparticipant?string1 <= lengthparticipantExternalId?string1 <= lengthsubject?stringlength <= 2000sentAt?stringworkspaceId?stringuuidprojectId?stringuuiduserId?stringuuidattachments?array<>items <= 8headerMessageId?stringlength <= 998inReplyTo?stringlength <= 998references?array<>items <= 50Record result
application/json- response
recorded*booleanchannelId*stringdeduped*booleancurl -X POST 'https://pod.example.com/api/hub/messaging/inbound' \ -H 'Content-Type: application/json' \ -d '{ "provider": "string", "messageId": "string"}'{ "recorded": true, "channelId": "string", "deduped": true}bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
List of connected accounts
application/json- response
[index: integer]?curl -X GET 'https://pod.example.com/api/hub/messaging/accounts'[ { "id": "string", "externalId": "string", "provider": "string", "displayName": "string", "status": "connected" }]bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
redirectUrl*stringprovider?stringAuth URL
application/json- response
url*stringcurl -X GET 'https://pod.example.com/api/hub/messaging/auth-url?redirectUrl=string'{ "url": "string"}bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
Sync result
application/json- response
synced*numbercurl -X POST 'https://pod.example.com/api/hub/messaging/accounts/sync'{ "synced": 0}bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
Connection state
application/json- response
configured*booleancapabilityKey*stringcapabilityId*string|nullproblem*|"not-installed""no-key""unreadable"nullmessage*string|nullwebhook*curl -X GET 'https://pod.example.com/api/hub/messaging/service-config'{ "configured": true, "capabilityKey": "string", "capabilityId": "string", "problem": "not-installed", "message": "string", "webhook": { "state": "registered", "url": "string", "missingEvents": [ "string" ], "error": "string", "checkedAt": "string" }}bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
accountId*stringImport queued — or, for an agent, proposed for the person's review ({ status: 'proposed', proposalId, reviewUrl })
application/json- response
queued*booleanaccountId*stringprogress*|nullcurl -X POST 'https://pod.example.com/api/hub/messaging/accounts/string/import-history'{ "queued": true, "accountId": "string", "progress": { "status": "running", "cursor": "string", "updatedAt": "string", "chatsImported": 0, "messagesRecorded": 0, "reason": "string" }}bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
accountId*stringAccount disconnected
application/json- response
success*booleancurl -X DELETE 'https://pod.example.com/api/hub/messaging/accounts/string'{ "success": true}bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
entityId?stringcontactEntityId?stringConversations
application/json- response
conversations*array<|>curl -X GET 'https://pod.example.com/api/hub/messaging/conversations'{ "conversations": [ { "channelId": "string", "externalThreadId": "string", "provider": "string", "participantName": "string", "participantExternalId": "string", "lastMessageAt": "string", "lastMessagePreview": "string", "unread": true, "accountId": "string", "readOnly": true } ]}bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
application/json- body
entityId?stringexternalThreadId*stringaccountId*stringprovider*stringparticipantName?stringChannel created, upgraded, or already exists
application/json- response
channelId*stringcurl -X POST 'https://pod.example.com/api/hub/messaging/channels/connect' \ -H 'Content-Type: application/json' \ -d '{ "externalThreadId": "string", "accountId": "string", "provider": "string"}'{ "channelId": "string"}bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
channelId*stringChannel unlinked
application/json- response
success*booleancurl -X DELETE 'https://pod.example.com/api/hub/messaging/channels/string'{ "success": true}bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
channelId*stringMarked as read
application/json- response
success*booleancurl -X POST 'https://pod.example.com/api/hub/messaging/channels/string/mark-read'{ "success": true}bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
Unread linked conversations
application/json- response
items*array<>curl -X GET 'https://pod.example.com/api/hub/messaging/linked-unread'{ "items": [ { "entityId": "string", "channelId": "string", "externalThreadId": "string", "provider": "string", "participantName": "string", "lastMessagePreview": "string", "lastMessageAt": "string" } ]}bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
threadId*stringaccountId*stringMessages
application/json- response
[index: integer]?curl -X GET 'https://pod.example.com/api/hub/messaging/conversations/string/messages?accountId=string'[ { "externalMessageId": "string", "threadId": "string", "senderName": "string", "body": "string", "sentAt": "string", "direction": "inbound", "attachments": [ { "name": "string", "url": "string" } ] }]bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
threadId*stringapplication/json- body
accountId*stringbody*stringMessage sent
application/json- response
success*booleancurl -X POST 'https://pod.example.com/api/hub/messaging/conversations/string/send' \ -H 'Content-Type: application/json' \ -d '{ "accountId": "string", "body": "string"}'{ "success": true}bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
provider?stringunreadOnly?string"true""false"External channels list
application/json- response
channels*array<>curl -X GET 'https://pod.example.com/api/hub/messaging/channels'{ "channels": [ { "channelId": "string", "provider": "string", "threadId": "string", "title": "string", "participantName": "string", "lastMessageAt": "string", "lastMessagePreview": "string", "unread": true, "entityId": "string", "messageCount": 0 } ]}