Base URL
All billing endpoints are prefixed with:Authentication
All endpoints require admin authentication.Endpoints
Get Monthly Usage
Retrieve monthly billing usage data for a service for a specific year.Parameters
The unique identifier of the service
The year for which to retrieve monthly usage (e.g., 2024)
Response
Returns an array of monthly usage records (excludes email notifications):Response Fields
month- Month name (January, February, etc.)notification_type- Type of notification (sms, letter)chargeable_units- Total number of chargeable unitsnotifications_sent- Total number of notifications sentrate- Rate per unit in GBPpostage- Postage class for letters (first, second, europe, rest-of-world) or null for SMScost- Total cost in GBPfree_allowance_used- Number of units from free allowancecharged_units- Number of units charged (after free allowance)
Error Responses
Get Yearly Usage Summary
Retrieve annual billing usage summary for a service.Parameters
The unique identifier of the service
The year for which to retrieve the annual summary (e.g., 2024)
Response
Returns an array of yearly totals by notification type:Response Fields
notification_type- Type of notification (sms, letter, email)chargeable_units- Total chargeable units for the yearnotifications_sent- Total notifications sent for the yearrate- Average rate per unit in GBPcost- Total cost for the year in GBPfree_allowance_used- Total free allowance units usedcharged_units- Total units charged (after free allowance)
Error Responses
Get Free SMS Fragment Limit
Retrieve the free SMS fragment limit for a service for a specific financial year.Parameters
The unique identifier of the service
The start year of the financial year (e.g., 2024). Defaults to current financial year if not provided.
Response
Response Fields
free_sms_fragment_limit- The free SMS fragment allowance for the servicefinancial_year_start- The financial year this allowance applies tohas_custom_allowance- Whether this is a custom allowance or the default for the organisation type
If no annual billing record exists for the specified year, the system automatically creates one with the default allowance based on the service’s organisation type.
Error Responses
Invalid financial year format
Update Free SMS Fragment Limit
Create or update the free SMS fragment limit for a service.Parameters
The unique identifier of the service
Request Body
The new free SMS fragment limit (must be >= 0)
Response
This endpoint updates the free allowance for the current financial year. If the new allowance matches the default for the organisation type,
has_custom_allowance is set to false. Otherwise, it’s set to true.Error Responses
Invalid request body or free_sms_fragment_limit value
Data Models
Billing Record
Each billing record represents usage for a specific notification type and period:- SMS: Charged per fragment after free allowance is exhausted
- Letters: Charged per sheet based on postage class and sheet count
- Email: Free, not charged
Financial Year
GOV.UK Notify uses the UK government financial year:- Starts: April 1st
- Ends: March 31st
- Referenced by the start year (e.g., FY 2024 = April 1, 2024 - March 31, 2025)
Free Allowance
Services receive a free SMS fragment allowance based on their organisation type. This allowance:- Resets each financial year
- Can be customized per service
- Is tracked separately from chargeable usage