List Services
GET /service
Retrieve a list of all services, optionally filtered by user or with detailed statistics.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
only_active | boolean | Filter to only active services (default: false) |
detailed | boolean | Include statistics with each service (default: false) |
user_id | uuid | Filter services by user ID |
include_from_test_key | boolean | Include notifications from test keys in statistics (default: true) |
start_date | date | Start date for statistics (YYYY-MM-DD format) |
end_date | date | End date for statistics (YYYY-MM-DD format) |
Response
Get Service by ID
GET /service/{service_id}
Retrieve details for a specific service.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
service_id | uuid | The service ID |
Query Parameters
| Parameter | Type | Description |
|---|---|---|
detailed | boolean | Include statistics (default: false) |
today_only | boolean | Only include today’s statistics (default: false) |
Response
Create Service
POST /service
Create a new service.
Request Body
Response
201 Created
Update Service
POST /service/{service_id}
Update an existing service.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
service_id | uuid | The service ID |
Request Body
Response
Archive Service
POST /service/{service_id}/archive
Archive a service. This makes the service inactive, archives templates, and revokes API keys. This operation cannot be reversed.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
service_id | uuid | The service ID |
Response
Status Code:204 No Content
Find Services by Name
GET /service/find-services-by-name
Search for services by partial name match.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
service_name | string | Partial service name to search for (required) |
Response
Get Service Users
GET /service/{service_id}/users
Retrieve all users associated with a service.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
service_id | uuid | The service ID |
Response
Add User to Service
POST /service/{service_id}/users/{user_id}
Add a user to a service with specified permissions.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
service_id | uuid | The service ID |
user_id | uuid | The user ID |
Request Body
Response
201 Created
Remove User from Service
DELETE /service/{service_id}/users/{user_id}
Remove a user from a service.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
service_id | uuid | The service ID |
user_id | uuid | The user ID |
Response
Status Code:204 No Content
Errors
- 400 Bad Request: Cannot remove the only user from a service
- 404 Not Found: User not found in service
Get Service History
GET /service/{service_id}/history
Retrieve historical changes to a service, including service updates, API key changes, and template modifications.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
service_id | uuid | The service ID |
Response
Get Guest List
GET /service/{service_id}/guest-list
Retrieve the guest list for a restricted service. The guest list contains email addresses and phone numbers that can receive notifications in trial mode.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
service_id | uuid | The service ID |
Response
Update Guest List
PUT /service/{service_id}/guest-list
Update the guest list for a restricted service.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
service_id | uuid | The service ID |
Request Body
Response
Status Code:204 No Content
Service Statistics
GET /service/{service_id}/statistics
Get notification statistics for a service.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
service_id | uuid | The service ID |
Query Parameters
| Parameter | Type | Description |
|---|---|---|
today_only | boolean | Only return today’s statistics (default: false) |
limit_days | integer | Number of days to include (default: 7) |
Response
Get Monthly Notification Stats
GET /service/{service_id}/notifications/monthly
Get monthly notification statistics for a financial year.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
service_id | uuid | The service ID |
Query Parameters
| Parameter | Type | Description |
|---|---|---|
year | integer | Financial year (required) |
Response
Related Endpoints
See also:- API Key Management - Manage service API keys
- Template Management - Manage service templates
- User Management - Manage users across services