Skip to content

RemoveUserFromDocumentSubscribers API

Removes a specified user from the subscription list of a document. After removal, the user will no longer receive email notifications for any events on that document. Use this API to clean up subscriptions when a user no longer needs to track a document, or as part of a user offboarding workflow.

Endpoint

/srv.asmx/RemoveUserFromDocumentSubscribers

Methods

  • GET /srv.asmx/RemoveUserFromDocumentSubscribers?authenticationTicket=...&documentPath=...&userName=...

  • POST /srv.asmx/RemoveUserFromDocumentSubscribers (form data)

  • SOAP Action: http://tempuri.org/RemoveUserFromDocumentSubscribers

Parameters

Parameter Type Required Description
authenticationTicket string Yes Authentication ticket obtained from AuthenticateUser.
documentPath string Yes Full infoRouter path to the document (e.g. /Finance/Reports/Q1-Report.pdf). Supports short document ID paths (~D{id} or ~D{id}.ext).
userName string Yes Login name of the user to remove from the subscription list.

Response

Success Response

<response success="true" error="" />

Error Response

<response success="false" error="Document not found." />

Required Permissions

The calling user must be authenticated. To remove another user from the subscription list, the calling user must have write access or manage access to the document. A user may remove themselves if they have read access.


Example

GET Request

GET /srv.asmx/RemoveUserFromDocumentSubscribers

  ?authenticationTicket=3f2504e0-4f89-11d3-9a0c-0305e82c3301

  &documentPath=/Finance/Reports/Q1-2024-Report.pdf

  &userName=jsmith

HTTP/1.1

POST Request

POST /srv.asmx/RemoveUserFromDocumentSubscribers HTTP/1.1

Content-Type: application/x-www-form-urlencoded

authenticationTicket=3f2504e0-4f89-11d3-9a0c-0305e82c3301

&documentPath=/Finance/Reports/Q1-2024-Report.pdf

&userName=jsmith

SOAP Request

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

               xmlns:tns="http://tempuri.org/">

  <soap:Body>

    <tns:RemoveUserFromDocumentSubscribers>

      <tns:AuthenticationTicket>3f2504e0-4f89-11d3-9a0c-0305e82c3301</tns:AuthenticationTicket>

      <tns:DocumentPath>/Finance/Reports/Q1-2024-Report.pdf</tns:DocumentPath>

      <tns:UserName>jsmith</tns:UserName>

    </tns:RemoveUserFromDocumentSubscribers>

  </soap:Body>

</soap:Envelope>

JavaScript

Every call answers XML with HTTP 200, success or not, so success is the thing to branch on and errorCode is the number to report.

async function call(action, params) {
  const response = await fetch(`/srv.asmx/${action}?${new URLSearchParams(params)}`);
  const root = new DOMParser()
    .parseFromString(await response.text(), 'text/xml')
    .documentElement;

  if (root.getAttribute('success') !== 'true') {
    throw new Error(`${root.getAttribute('errorCode')}: ${root.getAttribute('error')}`);
  }
  return root;
}

Unsubscribes one user from one document.

await call('RemoveUserFromDocumentSubscribers', {
  authenticationTicket: ticket,
  DocumentPath: '/Public/Reports/q3.pdf',
  UserName: 'jsmith',
});

Safe to repeat: removing a subscription that is not there is a success, not an error.

Notes

  • Not Subscribed: If the specified user is not currently subscribed to the document, the API returns success="true" -" it does not treat this as an error.

  • User Must Exist: The userName must match an existing infoRouter user account. If the user does not exist, an error is returned.

  • Group Subscriptions Not Affected: This API only removes individual user subscriptions. If the user receives notifications because they are a member of a subscribed group, removing their individual subscription will not stop group-based notifications. Use RemoveUsergroupFromDocumentSubscribers to remove a group subscription.

  • Short Path Support: The documentPath parameter supports short document ID notation: ~D123 or ~D123.pdf.

  • Folder Subscriptions: This API operates on document subscriptions only. To manage folder subscriptions, use RemoveUserFromFolderSubscribers (currently listed separately). Note: the underlying RemoveSubscriber implementation also supports folders but this endpoint is intended for documents.



Error Codes

The errorCode values this operation returns, checked against a running server:

errorCode When
4010 the ticket is expired or unknown, or there is no ticket at all
4041 no document at that path, including one the caller may not see
4041 no user by that name
HTTP 400 a required string parameter was empty; refused by model binding, so there is no error document