The following endpoints provide integration support for your Rocket.Chat workspaces:
The integration object
Integration endpoints return an integration object. A trimmed example from Get Integration:
{
"integration": {
"_id": "659ea5e42dd9f928ada3e451",
"type": "webhook-outgoing",
"name": "test.cat",
"enabled": true,
"event": "sendMessage",
"channel": ["#general"],
"urls": ["https://text2gif.guggy.com/guggify"],
"username": "test.cat",
"scriptEnabled": true,
"_createdAt": "2024-01-10T14:12:52.201Z"
},
"success": true
}Fields you use most often:
_id: The integration ID. Pass it asintegrationIdwhen updating, removing, or reading history.type:webhook-incoming(external systems post into Rocket.Chat) orwebhook-outgoing(Rocket.Chat calls external URLs).event: The trigger for outgoing integrations, such assendMessage.channelandurls: Where the integration listens and where it delivers.
Integration API
Create and manage incoming and outgoing integrations through the integration endpoints.
You can refer to the Integrations user guide for further details.
Notify an external system when something happens
Create an outgoing integration with the trigger event, channel, and target URLs.
Check the integration history to confirm deliveries.
Replay a delivery from history if the target system missed it.
Maintain existing integrations
Update an integration to change its channels, script, or state, or remove it.
WebDAV API
View and remove WebDAV integrations associated with your workspace.
Note that the WebDAV integration feature is deprecated and will be removed in the
8.0.0release.
OAuth Apps API
You can create and manage OAuth apps to authenticate users using the endpoints.
See the OAuth user guide for more details.
Set up an OAuth app
Create the OAuth app with its redirect URI.
Read the app to retrieve its client ID and secret.
Delete the app when it is retired.
Conventions
Integration endpoints require the integration admin permissions, such as
manage-incoming-integrationsandmanage-outgoing-integrations; limited*-own-*variants scope access to integrations you created.Integration scripts run in the
isolated-vmscript engine.List endpoints support
count,offset,sort, andqueryquery parameters.