The Preview API for this resource is deprecated. To migrate from Preview to V1, refer to the Marketplace API migration guide for users or publishers.
The Installed Add-ons Usage subresource allows Twilio Marketplace Partners to manually report customer usage on Add-ons that they own.
If you already have a published Add-on and would like access to this API resource, reach out to Twilio.
The Installed Add-ons Usage subresource requires Twilio to turn on manual usage reporting for an Add-on that you own. To verify that manual usage reporting is turned on, go to Marketplace > Catalog > Add-on (select your add-on) in the Twilio Console. Check that "Manual Usage Reporting" is included as a category.
Parameter | Description |
---|---|
Quantity | Required. A number greater than or less than zero that represents usage of a specific add-on installation. When set to a value greater than zero, the update is reported as usage on the customer account, and the customer will be charged. See Charging a customer for Add-on Usage as an example. When set to a value less than zero, the update is reported as a credit on the customer account. Credits should only be used to correct a reporting error with a previous API call. |
1curl -X POST "https://preview.twilio.com/marketplace/InstalledAddOns/XExxxxxxxxxxxxxxxxxxxxxxx/Usage" \2--data-urlencode "Quantity=10" \3-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
Response
202 Accepted
1curl -X POST "https://preview.twilio.com/marketplace/InstalledAddOns/XExxxxxxxxxxxxxxxxxxxxxxx/Usage" \2--data-urlencode "Quantity=-10" \3-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
Response
202 Accepted