Skip to main content
DELETE
https://sandbox.getcollate.io/api
/
v1
/
services
/
messagingServices
/
{id}
DELETE /v1/services/messagingServices/{id}
import requests

base_url = "https://your-company.getcollate.io/api"
headers = {"Authorization": "Bearer your-jwt-token"}

# Soft delete by ID
requests.delete(
    f"{base_url}/v1/services/messagingServices/469ef25e-9bdf-4d5f-8553-eb0ce8581f30",
    headers=headers
)

# Hard delete with recursive (deletes all topics)
requests.delete(
    f"{base_url}/v1/services/messagingServices/469ef25e-9bdf-4d5f-8553-eb0ce8581f30",
    params={"recursive": True, "hardDelete": True},
    headers=headers
)

# Delete by name
requests.delete(
    f"{base_url}/v1/services/messagingServices/name/sample_kafka",
    headers=headers
)

# Restore a soft-deleted messaging service
requests.put(
    f"{base_url}/v1/services/messagingServices/restore",
    json={"id": "469ef25e-9bdf-4d5f-8553-eb0ce8581f30"},
    headers={**headers, "Content-Type": "application/json"}
)
{
  "id": "469ef25e-9bdf-4d5f-8553-eb0ce8581f30",
  "name": "sample_kafka",
  "fullyQualifiedName": "sample_kafka",
  "serviceType": "Kafka",
  "connection": {
    "config": {
      "type": "Kafka",
      "bootstrapServers": "localhost:9092",
      "securityProtocol": "PLAINTEXT",
      "saslMechanism": "PLAIN",
      "supportsMetadataExtraction": true
    }
  },
  "version": 0.2,
  "updatedAt": 1769982750000,
  "updatedBy": "admin",
  "href": "http://localhost:8585/api/v1/services/messagingServices/469ef25e-9bdf-4d5f-8553-eb0ce8581f30",
  "owners": [],
  "tags": [],
  "deleted": true,
  "domains": []
}

Delete a Messaging Service

Delete a messaging service by ID or fully qualified name. Supports soft delete (default), hard delete, and restore operations.

Delete by ID

id
string
required
UUID of the messaging service to delete.
recursive
boolean
default:"false"
Recursively delete all child topics.
hardDelete
boolean
default:"false"
Permanently delete the messaging service. If false, the service is soft-deleted and can be restored.

Delete by Name

Use DELETE /v1/services/messagingServices/name/{fqn} to delete by fully qualified name.
fqn
string
required
Fully qualified name of the messaging service (e.g., sample_kafka).
recursive
boolean
default:"false"
Recursively delete all child topics.
hardDelete
boolean
default:"false"
Permanently delete the messaging service.

Restore a Soft-Deleted Messaging Service

Use PUT /v1/services/messagingServices/restore to restore a soft-deleted messaging service.
id
string
required
UUID of the soft-deleted messaging service to restore.
DELETE /v1/services/messagingServices/{id}
import requests

base_url = "https://your-company.getcollate.io/api"
headers = {"Authorization": "Bearer your-jwt-token"}

# Soft delete by ID
requests.delete(
    f"{base_url}/v1/services/messagingServices/469ef25e-9bdf-4d5f-8553-eb0ce8581f30",
    headers=headers
)

# Hard delete with recursive (deletes all topics)
requests.delete(
    f"{base_url}/v1/services/messagingServices/469ef25e-9bdf-4d5f-8553-eb0ce8581f30",
    params={"recursive": True, "hardDelete": True},
    headers=headers
)

# Delete by name
requests.delete(
    f"{base_url}/v1/services/messagingServices/name/sample_kafka",
    headers=headers
)

# Restore a soft-deleted messaging service
requests.put(
    f"{base_url}/v1/services/messagingServices/restore",
    json={"id": "469ef25e-9bdf-4d5f-8553-eb0ce8581f30"},
    headers={**headers, "Content-Type": "application/json"}
)
{
  "id": "469ef25e-9bdf-4d5f-8553-eb0ce8581f30",
  "name": "sample_kafka",
  "fullyQualifiedName": "sample_kafka",
  "serviceType": "Kafka",
  "connection": {
    "config": {
      "type": "Kafka",
      "bootstrapServers": "localhost:9092",
      "securityProtocol": "PLAINTEXT",
      "saslMechanism": "PLAIN",
      "supportsMetadataExtraction": true
    }
  },
  "version": 0.2,
  "updatedAt": 1769982750000,
  "updatedBy": "admin",
  "href": "http://localhost:8585/api/v1/services/messagingServices/469ef25e-9bdf-4d5f-8553-eb0ce8581f30",
  "owners": [],
  "tags": [],
  "deleted": true,
  "domains": []
}

Returns

Soft delete returns the messaging service object with deleted: true. Hard delete returns no content (204). Restore returns the restored messaging service object.

Error Handling

CodeError TypeDescription
401UNAUTHORIZEDInvalid or missing authentication token
403FORBIDDENUser lacks permission to delete this messaging service
404NOT_FOUNDMessaging service with given ID or FQN does not exist