Update an agent integration
Update which integration a link points to (by integration identifier, not the internal _id).
using Novu;
using Novu.Models.Components;
var sdk = new NovuSDK(secretKey: "YOUR_SECRET_KEY_HERE");
var res = await sdk.Agents.Integrations.UpdateAsync(
identifier: "<value>",
agentIntegrationId: "<id>",
updateAgentIntegrationRequestDto: new UpdateAgentIntegrationRequestDto() {
IntegrationIdentifier = "<value>",
}
);
// handle responsedeclare(strict_types=1);
require 'vendor/autoload.php';
use novu;
use novu\Models\Components;
$sdk = novu\Novu::builder()
->setSecurity(
'YOUR_SECRET_KEY_HERE'
)
->build();
$updateAgentIntegrationRequestDto = new Components\UpdateAgentIntegrationRequestDto(
integrationIdentifier: '<value>',
);
$response = $sdk->agents->integrations->update(
identifier: '<value>',
agentIntegrationId: '<id>',
updateAgentIntegrationRequestDto: $updateAgentIntegrationRequestDto
);
if ($response->agentIntegrationResponseDto !== null) {
// handle response
}from novu_py import Novu
with Novu(
secret_key="YOUR_SECRET_KEY_HERE",
) as novu:
res = novu.agents.integrations.update(identifier="<value>", agent_integration_id="<id>", update_agent_integration_request_dto={
"integration_identifier": "<value>",
})
# Handle response
print(res)package main
import(
"context"
"github.com/novuhq/novu-go/v3"
"github.com/novuhq/novu-go/v3/models/components"
"log"
)
func main() {
ctx := context.Background()
s := v3.New(
v3.WithSecurity("YOUR_SECRET_KEY_HERE"),
)
res, err := s.Agents.Integrations.Update(ctx, "<value>", "<id>", components.UpdateAgentIntegrationRequestDto{
IntegrationIdentifier: "<value>",
}, nil)
if err != nil {
log.Fatal(err)
}
if res.AgentIntegrationResponseDto != nil {
// handle response
}
}import { Novu } from "@novu/api";
const novu = new Novu({
secretKey: "YOUR_SECRET_KEY_HERE",
});
async function run() {
const result = await novu.agents.integrations.update({
identifier: "<value>",
agentIntegrationId: "<id>",
updateAgentIntegrationRequestDto: {
integrationIdentifier: "<value>",
},
});
console.log(result);
}
run();curl --request PATCH \
--url https://api.novu.co/v1/agents/{identifier}/integrations/{agentIntegrationId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"integrationIdentifier": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({integrationIdentifier: '<string>'})
};
fetch('https://api.novu.co/v1/agents/{identifier}/integrations/{agentIntegrationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.patch("https://api.novu.co/v1/agents/{identifier}/integrations/{agentIntegrationId}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"integrationIdentifier\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.novu.co/v1/agents/{identifier}/integrations/{agentIntegrationId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"integrationIdentifier\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"_id": "<string>",
"_agentId": "<string>",
"integration": {
"_id": "<string>",
"identifier": "<string>",
"name": "<string>",
"providerId": "<string>",
"active": true,
"sharedInboundAddress": "<string>",
"defaultSenderName": "<string>",
"sharedInboxDisabled": true
},
"_environmentId": "<string>",
"_organizationId": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"connectedAt": {},
"exceedsPlanLimit": true
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"errors": {
"fieldName1": {
"messages": [
"Field is required",
"Must be a valid email address"
],
"value": "invalidEmail"
},
"fieldName2": {
"messages": [
"Must be at least 18 years old"
],
"value": 17
},
"fieldName3": {
"messages": [
"Must be a boolean value"
],
"value": true
},
"fieldName4": {
"messages": [
"Must be a valid object"
],
"value": {
"key": "value"
}
},
"fieldName5": {
"messages": [
"Field is missing"
],
"value": null
},
"fieldName6": {
"messages": [
"Undefined value"
]
}
},
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}"API rate limit exceeded"{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}"Please wait some time, then try again."Authorizations
API key authentication. Allowed headers-- "Authorization: ApiKey <novu_secret_key>".
Headers
A header for idempotency purposes
Body
The integration identifier this link should point to (not the internal document _id).
Response
OK
Agent–integration link document id.
Show child attributes
Show child attributes
Set when the agent–integration link received its first inbound webhook delivery.
Cloud only. true when this channel type (provider) falls outside the organization plan active-channel limit (by connection order). Active channels are counted per channel type, so multiple integrations of the same provider (e.g. several Slack workspaces) count as a single active channel. Over-limit channels keep their configuration but the agent will not respond on them until the plan is upgraded or older channel types are disconnected.
Was this page helpful?
using Novu;
using Novu.Models.Components;
var sdk = new NovuSDK(secretKey: "YOUR_SECRET_KEY_HERE");
var res = await sdk.Agents.Integrations.UpdateAsync(
identifier: "<value>",
agentIntegrationId: "<id>",
updateAgentIntegrationRequestDto: new UpdateAgentIntegrationRequestDto() {
IntegrationIdentifier = "<value>",
}
);
// handle responsedeclare(strict_types=1);
require 'vendor/autoload.php';
use novu;
use novu\Models\Components;
$sdk = novu\Novu::builder()
->setSecurity(
'YOUR_SECRET_KEY_HERE'
)
->build();
$updateAgentIntegrationRequestDto = new Components\UpdateAgentIntegrationRequestDto(
integrationIdentifier: '<value>',
);
$response = $sdk->agents->integrations->update(
identifier: '<value>',
agentIntegrationId: '<id>',
updateAgentIntegrationRequestDto: $updateAgentIntegrationRequestDto
);
if ($response->agentIntegrationResponseDto !== null) {
// handle response
}from novu_py import Novu
with Novu(
secret_key="YOUR_SECRET_KEY_HERE",
) as novu:
res = novu.agents.integrations.update(identifier="<value>", agent_integration_id="<id>", update_agent_integration_request_dto={
"integration_identifier": "<value>",
})
# Handle response
print(res)package main
import(
"context"
"github.com/novuhq/novu-go/v3"
"github.com/novuhq/novu-go/v3/models/components"
"log"
)
func main() {
ctx := context.Background()
s := v3.New(
v3.WithSecurity("YOUR_SECRET_KEY_HERE"),
)
res, err := s.Agents.Integrations.Update(ctx, "<value>", "<id>", components.UpdateAgentIntegrationRequestDto{
IntegrationIdentifier: "<value>",
}, nil)
if err != nil {
log.Fatal(err)
}
if res.AgentIntegrationResponseDto != nil {
// handle response
}
}import { Novu } from "@novu/api";
const novu = new Novu({
secretKey: "YOUR_SECRET_KEY_HERE",
});
async function run() {
const result = await novu.agents.integrations.update({
identifier: "<value>",
agentIntegrationId: "<id>",
updateAgentIntegrationRequestDto: {
integrationIdentifier: "<value>",
},
});
console.log(result);
}
run();curl --request PATCH \
--url https://api.novu.co/v1/agents/{identifier}/integrations/{agentIntegrationId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"integrationIdentifier": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({integrationIdentifier: '<string>'})
};
fetch('https://api.novu.co/v1/agents/{identifier}/integrations/{agentIntegrationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.patch("https://api.novu.co/v1/agents/{identifier}/integrations/{agentIntegrationId}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"integrationIdentifier\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.novu.co/v1/agents/{identifier}/integrations/{agentIntegrationId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"integrationIdentifier\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"_id": "<string>",
"_agentId": "<string>",
"integration": {
"_id": "<string>",
"identifier": "<string>",
"name": "<string>",
"providerId": "<string>",
"active": true,
"sharedInboundAddress": "<string>",
"defaultSenderName": "<string>",
"sharedInboxDisabled": true
},
"_environmentId": "<string>",
"_organizationId": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"connectedAt": {},
"exceedsPlanLimit": true
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"errors": {
"fieldName1": {
"messages": [
"Field is required",
"Must be a valid email address"
],
"value": "invalidEmail"
},
"fieldName2": {
"messages": [
"Must be at least 18 years old"
],
"value": 17
},
"fieldName3": {
"messages": [
"Must be a boolean value"
],
"value": true
},
"fieldName4": {
"messages": [
"Must be a valid object"
],
"value": {
"key": "value"
}
},
"fieldName5": {
"messages": [
"Field is missing"
],
"value": null
},
"fieldName6": {
"messages": [
"Undefined value"
]
}
},
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}"API rate limit exceeded"{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}"Please wait some time, then try again."