---
updatedAt: 2026-07-28T13:53:28.000Z
---

# Remove an association between an messaging service and the requested entity

Use this API to remove the association between a messaging service and either of EVENT_MESH or EVENT_MANAGEMENT_AGENT.<br><br><a href="https://api.solace.dev/cloud/reference/authentication">Token Permissions</a>: [ `modeled_event_broker:update:*` **or** `messaging_service:write` ]

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Event Portal - Runtime",
    "description": "REST API Concepts\n\nSolace Event Portal provides REST APIs that you can use to manage your data in Solace Cloud. \nThe REST APIs allow you to model your event-driven architectures from your own client applications.\n\nThe following document describes the public REST APIs available for use in Event Portal 2.0. Objects created in this \nversion will not be available in Event Portal 1.0. APIs that display (Beta) in their summary are provided as-is and \nare subject to change or removal. They may not be of the quality expected for generally available APIs and have no \nguaranteed forward compatibility with the generally available version of the API.\n\n",
    "version": "2.13.2"
  },
  "servers": [
    {
      "url": "https://api.solace.cloud",
      "description": "Solace PubSub+ Cloud US EAST Region"
    },
    {
      "url": "https://api.solacecloud.com.au",
      "description": "Solace PubSub+ Cloud AU Region"
    },
    {
      "url": "https://api.solacecloud.eu",
      "description": "Solace PubSub+ Cloud EU Region"
    },
    {
      "url": "https://api.solacecloud.sg",
      "description": "Solace PubSub+ Cloud SG Region"
    }
  ],
  "security": [
    {
      "APIToken": []
    }
  ],
  "tags": [
    {
      "name": "Messaging Services"
    }
  ],
  "paths": {
    "/api/v2/architecture/messagingServices/{id}/removeAssociation": {
      "put": {
        "tags": [
          "Messaging Services"
        ],
        "summary": "Remove an association between an messaging service and the requested entity",
        "description": "Use this API to remove the association between a messaging service and either of EVENT_MESH or EVENT_MANAGEMENT_AGENT.<br><br><a href=\"https://api.solace.dev/cloud/reference/authentication\">Token Permissions</a>: [ `modeled_event_broker:update:*` **or** `messaging_service:write` ]",
        "operationId": "removeAssociationMessagingService",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The ID of the messaging service.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The association object with the value matching either EVENT_MESH or EVENT_MANAGEMENT_AGENT.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessagingServiceRemoveAssociation"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The updated messaging service, e.g. if the API request body had {\"association\": \"EVENT_MESH\"} then the resulting object would not have eventMeshId attribute.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagingServiceResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "501": {
            "description": "Not Implemented",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "discriminator": {
          "propertyName": "errorType"
        },
        "properties": {
          "message": {
            "type": "string",
            "description": "A user-friendly message that describes the error.",
            "example": "An error occurred."
          },
          "errorId": {
            "type": "string",
            "description": "The UUID (Universally Unique Identifier) that is logged with an appropriate stack trace for a WARN or ERROR log that allows support to better determine what cause the error.",
            "example": "123e4567-e89b-12d3-a456-426655440000"
          },
          "meta": {
            "type": "object",
            "additionalProperties": {},
            "example": "'object': { 'field': 'description' }"
          },
          "validationDetails": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "When applicable, these are the details of issues with the fields provided for the REST call.",
            "example": "'name': ['Not unique']"
          },
          "errorType": {
            "type": "string",
            "writeOnly": true
          }
        }
      },
      "MessagingService": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "createdTime": {
            "type": "string",
            "description": "The time the entity was created",
            "example": "2021-12-31T20:30:57.920Z",
            "readOnly": true
          },
          "updatedTime": {
            "type": "string",
            "description": "The time the entity was last updated",
            "example": "2021-12-31T20:30:57.920Z",
            "readOnly": true
          },
          "createdBy": {
            "type": "string",
            "description": "The user who created the entity",
            "example": 12345678,
            "readOnly": true
          },
          "changedBy": {
            "type": "string",
            "description": "The user who last updated the entity",
            "example": 12345678,
            "readOnly": true
          },
          "id": {
            "type": "string",
            "description": "Primary key set by the server.",
            "example": "asdkl234x",
            "readOnly": true
          },
          "eventMeshId": {
            "type": "string",
            "description": "The eventMeshId associated to the messaging service.",
            "example": "67890x23vh"
          },
          "runtimeAgentId": {
            "type": "string",
            "description": "The runtimeAgentId associated to the messaging service.",
            "example": "vh1234y14"
          },
          "solaceCloudMessagingServiceId": {
            "type": "string",
            "description": "The solaceCloudMessagingServiceId associated to the messaging service.",
            "example": "abcd1234x"
          },
          "datacenterId": {
            "type": "string",
            "description": "The datacenterId associated to the messaging service.",
            "example": "dasglk213x"
          },
          "messagingServiceType": {
            "type": "string",
            "description": "The type of the messaging service.",
            "enum": [
              "solace",
              "kafka"
            ],
            "example": "solace"
          },
          "name": {
            "type": "string",
            "description": "The name of the messaging service.",
            "example": "first messagingService"
          },
          "messagingServiceConnections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MessagingServiceConnection"
            }
          },
          "eventManagementAgentId": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "readOnly": true
          }
        }
      },
      "MessagingServiceAuthentication": {
        "type": "object",
        "properties": {
          "createdTime": {
            "type": "string",
            "description": "The time the entity was created",
            "example": "2021-12-31T20:30:57.920Z",
            "readOnly": true
          },
          "updatedTime": {
            "type": "string",
            "description": "The time the entity was last updated",
            "example": "2021-12-31T20:30:57.920Z",
            "readOnly": true
          },
          "createdBy": {
            "type": "string",
            "description": "The user who created the entity",
            "example": 12345678,
            "readOnly": true
          },
          "changedBy": {
            "type": "string",
            "description": "The user who last updated the entity",
            "example": 12345678,
            "readOnly": true
          },
          "id": {
            "type": "string",
            "description": "Primary key set by the server.",
            "example": "kjsfg32ds",
            "readOnly": true
          },
          "messagingServiceConnectionId": {
            "type": "string",
            "description": "The ID of the connection object associated to the authentication object.",
            "example": "sdafgj23",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "The name of the authentication object.",
            "example": "https auth details"
          },
          "authenticationType": {
            "type": "string",
            "description": "The type of the authentication object.",
            "example": "basicAuthentication"
          },
          "authenticationDetails": {
            "type": "object",
            "additionalProperties": {},
            "description": "A JSON map containing a map of extra details for the authentication.",
            "example": {
              "broker owner": "Solace PE team"
            }
          },
          "messagingServiceCredentials": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MessagingServiceCredentials"
            }
          },
          "type": {
            "type": "string",
            "readOnly": true
          }
        },
        "required": [
          "authenticationType",
          "name"
        ]
      },
      "MessagingServiceConnection": {
        "type": "object",
        "properties": {
          "createdTime": {
            "type": "string",
            "description": "The time the entity was created",
            "example": "2021-12-31T20:30:57.920Z",
            "readOnly": true
          },
          "updatedTime": {
            "type": "string",
            "description": "The time the entity was last updated",
            "example": "2021-12-31T20:30:57.920Z",
            "readOnly": true
          },
          "createdBy": {
            "type": "string",
            "description": "The user who created the entity",
            "example": 12345678,
            "readOnly": true
          },
          "changedBy": {
            "type": "string",
            "description": "The user who last updated the entity",
            "example": 12345678,
            "readOnly": true
          },
          "id": {
            "type": "string",
            "description": "Primary key set by the server.",
            "example": "5432dfg3",
            "readOnly": true
          },
          "messagingServiceId": {
            "type": "string",
            "description": "The messagingServiceId associated to the connection object.",
            "example": "sdkjhg21948",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "The name of the connection object.",
            "example": "my https connection"
          },
          "url": {
            "type": "string",
            "description": "The url of the connection object.",
            "example": "https://abcd.messaging.solace.cloud:943"
          },
          "protocol": {
            "type": "string",
            "description": "The protocol of the connection object.",
            "example": "https"
          },
          "protocolVersion": {
            "type": "string",
            "description": "The protocolVersion of the connection object.",
            "example": 2
          },
          "bindings": {
            "type": "object",
            "additionalProperties": {},
            "description": "A JSON map containing a map of connection-specific values. ",
            "example": {
              "msgVpn": "myVPN"
            }
          },
          "messagingServiceAuthentications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MessagingServiceAuthentication"
            }
          },
          "type": {
            "type": "string",
            "readOnly": true
          }
        }
      },
      "MessagingServiceCredentials": {
        "type": "object",
        "properties": {
          "createdTime": {
            "type": "string",
            "description": "The time the entity was created",
            "example": "2021-12-31T20:30:57.920Z",
            "readOnly": true
          },
          "updatedTime": {
            "type": "string",
            "description": "The time the entity was last updated",
            "example": "2021-12-31T20:30:57.920Z",
            "readOnly": true
          },
          "createdBy": {
            "type": "string",
            "description": "The user who created the entity",
            "example": 12345678,
            "readOnly": true
          },
          "changedBy": {
            "type": "string",
            "description": "The user who last updated the entity",
            "example": 12345678,
            "readOnly": true
          },
          "id": {
            "type": "string",
            "description": "Primary key set by the server.",
            "example": "lkjdsfgew2",
            "readOnly": true
          },
          "messagingServiceAuthenticationId": {
            "type": "string",
            "description": "The ID of the authentication object associated to the credentials object.",
            "example": "sdafgj23",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "The name of the credentials object.",
            "example": "basic auth credentials"
          },
          "credentials": {
            "type": "object",
            "additionalProperties": {},
            "description": "A JSON map containing the credentials information.",
            "example": {
              "username": "User1",
              "password": "secretPass"
            }
          },
          "type": {
            "type": "string",
            "readOnly": true
          }
        },
        "required": [
          "credentials",
          "name"
        ]
      },
      "MessagingServiceRemoveAssociation": {
        "type": "object",
        "properties": {
          "association": {
            "type": "string",
            "description": "The target association to be removed from the messaging service.",
            "enum": [
              "RUNTIME_AGENT",
              "EVENT_MESH",
              "EVENT_MANAGEMENT_AGENT"
            ],
            "example": "EVENT_MANAGEMENT_AGENT"
          }
        }
      },
      "MessagingServiceResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MessagingService"
          },
          "meta": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      }
    },
    "securitySchemes": {
      "APIToken": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```