Update Comm
Updates the identifier or status of an existing communication channel.
Endpoint
PUT /v2/comms/update
Request Body
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
commId | integer | Yes | Must be an existing Comm ID | Unique identifier of the communication channel to update |
identifier | string | No | — | New channel-specific identifier (AS2 ID, FTP username, etc.) |
status | Status | No | See ENUMs | New status for the channel (e.g., Active, Suspended) |
{
"commId": 5001,
"identifier": "MYCOMPANY-AS2-NEW",
"status": "Active"
}
Response
Returns the updated CommIDInfo object.
{
"success": true,
"data": {
"commId": 5001,
"mailboxId": 101,
"commType": "as2",
"identifier": "MYCOMPANY-AS2-NEW",
"status": "Active",
"useType": "Production",
"privateKeyRequired": true,
"withCerts": true
}
}
ENUMs
This endpoint uses the Status ENUM. See ENUMs Reference for all valid values.
Code Examples
- cURL
- C#
- Java
- Node.js
- Python
curl -X PUT "https://rest.ecgrid.io/v2/comms/update" \
-H "X-API-Key: $ECGRID_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "commId": 5001, "identifier": "MYCOMPANY-AS2-NEW", "status": "Active" }'
// .NET 10 — Update the AS2 identifier on an existing comm channel
var request = new
{
commId = 5001,
identifier = "MYCOMPANY-AS2-NEW"
};
using var response = await httpClient.PutAsJsonAsync(
"https://rest.ecgrid.io/v2/comms/update",
request);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<ApiResponse<CommIdInfo>>();
Console.WriteLine($"Comm {result.Data.CommId} updated — Identifier: {result.Data.Identifier}, Status: {result.Data.Status}");
import java.net.URI;
import java.net.http.*;
String apiKey = System.getenv("ECGRID_API_KEY");
String body = "{ \"commId\": 5001, \"identifier\": \"MYCOMPANY-AS2-NEW\", \"status\": \"Active\" }";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://rest.ecgrid.io/v2/comms/update"))
.header("X-API-Key", apiKey)
.header("Content-Type", "application/json")
.PUT(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpClient client = HttpClient.newHttpClient();
HttpResponse<String> response = client.send(
request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
const apiKey = process.env.ECGRID_API_KEY;
const url = 'https://rest.ecgrid.io/v2/comms/update';
const response = await fetch(url, {
method: 'PUT',
headers: {
'X-API-Key': apiKey,
'Content-Type': 'application/json',
},
body: JSON.stringify({ "commId": 5001, "identifier": "MYCOMPANY-AS2-NEW", "status": "Active" }),
});
const data = await response.json();
console.log(data);
import os, requests
api_key = os.environ["ECGRID_API_KEY"]
headers = {"X-API-Key": api_key}
url = "https://rest.ecgrid.io/v2/comms/update"
response = requests.put(
url,
json={ "commId": 5001, "identifier": "MYCOMPANY-AS2-NEW", "status": "Active" },
headers=headers,
)
response.raise_for_status()
print(response.json())