Agents
Upsert agent integration
Create or update an agent integration
POST
/
api
/
v1
/
agents
/
{id}
/
integrations
{
"success": true,
"data": {
"id": "your-integration-id",
"account_id": "your-account-id",
"agent_id": "your-agent-id",
"provider": "whatsapp",
"config": {
"phone_number": "+5511999999999",
"instance_name": "my-instance"
},
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z"
}
}{
"success": false,
"error": {
"code": "BAD_REQUEST",
"message": "Invalid input data"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/agents/{id}/integrations",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing authentication token"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/agents/{id}/integrations",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "Insufficient permissions to perform this action"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/agents/{id}/integrations",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Agent not found"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/agents/{id}/integrations",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/agents/{id}/integrations",
"method": "POST"
}
}⌘I
{
"success": true,
"data": {
"id": "your-integration-id",
"account_id": "your-account-id",
"agent_id": "your-agent-id",
"provider": "whatsapp",
"config": {
"phone_number": "+5511999999999",
"instance_name": "my-instance"
},
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z"
}
}{
"success": false,
"error": {
"code": "BAD_REQUEST",
"message": "Invalid input data"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/agents/{id}/integrations",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing authentication token"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/agents/{id}/integrations",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "Insufficient permissions to perform this action"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/agents/{id}/integrations",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Agent not found"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/agents/{id}/integrations",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/agents/{id}/integrations",
"method": "POST"
}
}