Creating a new subscription by posting to the /subscriptions endpoint under a list appears to require the body of the request contain "__metadata": {"type":"Microsoft.SharePoint.Webhooks.Subscription"} in addition to values for resource, notificationUrl, and expirationDateTime. Otherwise, SharePoint returns:
"{"error":{"code":"-1, Microsoft.SharePoint.Client.InvalidClientQueryException","message":{"lang":"en-US","value":"
An entry without a type name was found, but no expected type was specified.
To allow entries without type information, the expected type must also be specified when the model is specified."}}}"
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Creating a new subscription by posting to the /subscriptions endpoint under a list appears to require the body of the request contain "__metadata": {"type":"Microsoft.SharePoint.Webhooks.Subscription"} in addition to values for resource, notificationUrl, and expirationDateTime. Otherwise, SharePoint returns:
"{"error":{"code":"-1, Microsoft.SharePoint.Client.InvalidClientQueryException","message":{"lang":"en-US","value":"
An entry without a type name was found, but no expected type was specified.
To allow entries without type information, the expected type must also be specified when the model is specified."}}}"
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.