Publish one message and its prepared or existing files in one transaction.
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://example.com/api/workspace/collaboration/send"), Headers = { { "Authorization", "Bearer <token>" }, }, Content = new StringContent("{ \"OperationKey\": \"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0\", \"Owner\": { \"ModuleKey\": \"example\", \"ResourceKind\": \"example\", \"ContextResourceId\": \"example\", \"ResourceObjectId\": \"example\" }, \"CommentText\": \"example\", \"QuotedCommentId\": \"example\", \"PreparedFileReferenceIds\": [ \"example\" ], \"DeferredUploadSessionIds\": [ \"example\" ], \"ExistingFileReferenceIds\": [ \"example\" ], \"Mentions\": [ { \"UserId\": \"example\", \"StartIndex\": 1, \"Length\": 1, \"DisplayText\": \"example\" } ], \"MentionSurface\": { \"ModuleKey\": \"example\", \"ResourceKind\": \"example\", \"ContextResourceId\": \"example\", \"ResourceObjectId\": \"example\" }, \"Relations\": [ { \"Target\": { \"ModuleKey\": \"example\", \"ResourceKind\": \"example\", \"ContextResourceId\": \"example\", \"ResourceObjectId\": \"example\" }, \"RelationKind\": 0, \"Source\": { \"ModuleKey\": \"example\", \"ResourceKind\": \"example\", \"ContextResourceId\": \"example\", \"ResourceObjectId\": \"example\" }, \"PolicyCode\": \"example\", \"CorrelationId\": \"example\" } ], \"Origin\": { \"Source\": { \"ModuleKey\": \"example\", \"ResourceKind\": \"example\", \"ContextResourceId\": \"example\", \"ResourceObjectId\": \"example\" }, \"PolicyCode\": \"example\", \"CorrelationId\": \"example\" } }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}const url = 'https://example.com/api/workspace/collaboration/send';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"OperationKey":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","Owner":{"ModuleKey":"example","ResourceKind":"example","ContextResourceId":"example","ResourceObjectId":"example"},"CommentText":"example","QuotedCommentId":"example","PreparedFileReferenceIds":["example"],"DeferredUploadSessionIds":["example"],"ExistingFileReferenceIds":["example"],"Mentions":[{"UserId":"example","StartIndex":1,"Length":1,"DisplayText":"example"}],"MentionSurface":{"ModuleKey":"example","ResourceKind":"example","ContextResourceId":"example","ResourceObjectId":"example"},"Relations":[{"Target":{"ModuleKey":"example","ResourceKind":"example","ContextResourceId":"example","ResourceObjectId":"example"},"RelationKind":0,"Source":{"ModuleKey":"example","ResourceKind":"example","ContextResourceId":"example","ResourceObjectId":"example"},"PolicyCode":"example","CorrelationId":"example"}],"Origin":{"Source":{"ModuleKey":"example","ResourceKind":"example","ContextResourceId":"example","ResourceObjectId":"example"},"PolicyCode":"example","CorrelationId":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/workspace/collaboration/send \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "OperationKey": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "Owner": { "ModuleKey": "example", "ResourceKind": "example", "ContextResourceId": "example", "ResourceObjectId": "example" }, "CommentText": "example", "QuotedCommentId": "example", "PreparedFileReferenceIds": [ "example" ], "DeferredUploadSessionIds": [ "example" ], "ExistingFileReferenceIds": [ "example" ], "Mentions": [ { "UserId": "example", "StartIndex": 1, "Length": 1, "DisplayText": "example" } ], "MentionSurface": { "ModuleKey": "example", "ResourceKind": "example", "ContextResourceId": "example", "ResourceObjectId": "example" }, "Relations": [ { "Target": { "ModuleKey": "example", "ResourceKind": "example", "ContextResourceId": "example", "ResourceObjectId": "example" }, "RelationKind": 0, "Source": { "ModuleKey": "example", "ResourceKind": "example", "ContextResourceId": "example", "ResourceObjectId": "example" }, "PolicyCode": "example", "CorrelationId": "example" } ], "Origin": { "Source": { "ModuleKey": "example", "ResourceKind": "example", "ContextResourceId": "example", "ResourceObjectId": "example" }, "PolicyCode": "example", "CorrelationId": "example" } }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Optional access token for clients that cannot set Authorization headers. Prefer Authorization: Bearer <token> when possible.
Request Body
Section titled “Request Body”Atomically publishes one collaboration message and its prepared file placements.
object
Stable identity of one Moltaro resource instance.
object
Stable user mention embedded in comment text.
object
Mentioned user identifier.
Zero-based UTF-16 token start.
UTF-16 token length.
Readable token stored in the comment text.
Stable identity of one Moltaro resource instance.
object
Request to relate content to a resource.
object
Stable identity of one Moltaro resource instance.
object
Relation kind between content and a resource.
Stable identity of one Moltaro resource instance.
object
Technical origin metadata for content created through another resource context.
object
Stable identity of one Moltaro resource instance.
object
Atomically publishes one collaboration message and its prepared file placements.
object
Stable identity of one Moltaro resource instance.
object
Stable user mention embedded in comment text.
object
Mentioned user identifier.
Zero-based UTF-16 token start.
UTF-16 token length.
Readable token stored in the comment text.
Stable identity of one Moltaro resource instance.
object
Request to relate content to a resource.
object
Stable identity of one Moltaro resource instance.
object
Relation kind between content and a resource.
Stable identity of one Moltaro resource instance.
object
Technical origin metadata for content created through another resource context.
object
Stable identity of one Moltaro resource instance.
object
Atomically publishes one collaboration message and its prepared file placements.
object
Stable identity of one Moltaro resource instance.
object
Stable user mention embedded in comment text.
object
Mentioned user identifier.
Zero-based UTF-16 token start.
UTF-16 token length.
Readable token stored in the comment text.
Stable identity of one Moltaro resource instance.
object
Request to relate content to a resource.
object
Stable identity of one Moltaro resource instance.
object
Relation kind between content and a resource.
Stable identity of one Moltaro resource instance.
object
Technical origin metadata for content created through another resource context.
object
Stable identity of one Moltaro resource instance.
object
Responses
Section titled “Responses”OK
object
object
object
object
object
Example
{ "Data": null, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Invalid request. Service validation returns this error envelope; a missing request/file can return no body.
object
object
object
object
object
Example
{ "Data": null, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Forbidden. An authenticated policy refusal can contain this error envelope; Forbid() returns no body.
object
object
object
object
object
Example
{ "Data": null, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Not Found
object
object
object
object
object
Example
{ "Data": null, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}The operation was refused; inspect Errors. Data may be null.
object
object
object
object
object
Example
{ "Data": null, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}