Overview
The Organisations API allows you to create, update, and manage organisations within GOV.UK Notify. This includes managing organisation settings, linking services, managing team members, and configuring branding pools.
Base URL: /organisation
Organisation Object
Properties
| Property | Type | Description |
|---|
id | UUID | Unique identifier for the organisation |
name | string | Name of the organisation (must be unique) |
active | boolean | Whether the organisation is active |
crown | boolean | Whether organisation is a Crown body |
organisation_type | string | Type of organisation (e.g., central, local, nhs_central) |
email_branding_id | UUID | Default email branding ID, nullable |
letter_branding_id | UUID | Default letter branding ID, nullable |
agreement_signed | boolean | Whether MOU has been signed, nullable |
agreement_signed_at | datetime | When MOU was signed, nullable |
agreement_signed_by_id | UUID | User who signed MOU, nullable |
agreement_signed_on_behalf_of_name | string | Name of person signed on behalf of, nullable |
agreement_signed_on_behalf_of_email_address | string | Email of person signed on behalf of, nullable |
agreement_signed_version | float | Version of MOU signed, nullable |
domains | array | List of email domains associated with organisation |
request_to_go_live_notes | string | Notes about go-live requests, nullable |
count_of_live_services | integer | Number of active live services |
notes | string | Internal notes about organisation, nullable |
purchase_order_number | string | PO number for billing, nullable |
billing_contact_names | string | Names for billing contacts, nullable |
billing_contact_email_addresses | string | Email addresses for billing, nullable |
billing_reference | string | Billing reference, nullable |
can_approve_own_go_live_requests | boolean | Whether org can self-approve go-live |
permissions | array | List of organisation permissions |
created_at | datetime | Timestamp when organisation was created |
updated_at | datetime | Timestamp of last update, nullable |
Endpoints
List Organisations
Retrieve all organisations.
Response
Status: 200 OK
[
{
"id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
"name": "Cabinet Office",
"active": true,
"count_of_live_services": 5,
"domains": ["cabinetoffice.gov.uk"],
"organisation_type": "central"
},
{
"id": "2b3c4d5e-6f7a-8b9c-0d1e-2f3a4b5c6d7e",
"name": "Department for Education",
"active": true,
"count_of_live_services": 12,
"domains": ["education.gov.uk"],
"organisation_type": "central"
}
]
Get Organisation by ID
Retrieve a specific organisation with full details.
GET /organisation/{organisation_id}
Path Parameters
| Parameter | Type | Description |
|---|
organisation_id | UUID | The ID of the organisation |
Response
Status: 200 OK
{
"id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
"name": "Cabinet Office",
"active": true,
"crown": true,
"organisation_type": "central",
"email_branding_id": "3f5e7c9a-1b2d-4e8f-9a3c-7d6e4b2f1a8c",
"letter_branding_id": "5f6a7b8c-9d0e-1f2a-3b4c-5d6e7f8a9b0c",
"agreement_signed": true,
"agreement_signed_at": "2024-01-15T10:00:00.000000Z",
"agreement_signed_by_id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"agreement_signed_on_behalf_of_name": null,
"agreement_signed_on_behalf_of_email_address": null,
"agreement_signed_version": 2.5,
"domains": ["cabinetoffice.gov.uk"],
"request_to_go_live_notes": null,
"count_of_live_services": 5,
"notes": "Primary central government department",
"purchase_order_number": "PO-2024-001",
"billing_contact_names": "Jane Smith",
"billing_contact_email_addresses": "[email protected]",
"billing_reference": "CO-001",
"can_approve_own_go_live_requests": true,
"permissions": ["can_ask_to_join_service"]
}
Get Organisation by Domain
Retrieve an organisation by its email domain.
GET /organisation/by-domain?domain={domain}
Query Parameters
| Parameter | Type | Required | Description |
|---|
domain | string | Yes | Email domain (without @) |
Example Request
GET /organisation/by-domain?domain=education.gov.uk
Response
Status: 200 OK
{
"id": "2b3c4d5e-6f7a-8b9c-0d1e-2f3a4b5c6d7e",
"name": "Department for Education",
"active": true,
"crown": true,
"organisation_type": "central",
"domains": ["education.gov.uk"],
"count_of_live_services": 12
}
Error Response
Status: 400 Bad Request - Invalid domain (contains @)
Status: 404 Not Found - No organisation found for domain
Search Organisations
Search for organisations by partial name match.
GET /organisation/search?name={search_term}
Query Parameters
| Parameter | Type | Required | Description |
|---|
name | string | Yes | Partial organisation name to search for |
Example Request
GET /organisation/search?name=Education
Response
Status: 200 OK
{
"data": [
{
"id": "2b3c4d5e-6f7a-8b9c-0d1e-2f3a4b5c6d7e",
"name": "Department for Education",
"active": true,
"count_of_live_services": 12,
"domains": ["education.gov.uk"],
"organisation_type": "central"
}
]
}
Create Organisation
Create a new organisation.
Request Body
| Field | Type | Required | Description |
|---|
name | string | Yes | Unique organisation name |
crown | boolean | Yes | Whether organisation is a Crown body |
organisation_type | string | Yes | Type of organisation |
active | boolean | No | Whether organisation is active (default: true) |
Example Request
{
"name": "Ministry of Justice",
"crown": true,
"organisation_type": "central",
"active": true
}
Response
Status: 201 Created
{
"id": "4d5e6f7a-8b9c-0d1e-2f3a-4b5c6d7e8f9a",
"name": "Ministry of Justice",
"active": true,
"crown": true,
"organisation_type": "central",
"email_branding_id": null,
"letter_branding_id": null,
"agreement_signed": null,
"domains": [],
"count_of_live_services": 0,
"can_approve_own_go_live_requests": false,
"permissions": []
}
Error Response
Status: 400 Bad Request
{
"result": "error",
"message": "Organisation name already exists"
}
Update Organisation
Update an existing organisation.
POST /organisation/{organisation_id}
Path Parameters
| Parameter | Type | Description |
|---|
organisation_id | UUID | The ID of the organisation to update |
Request Body
| Field | Type | Required | Description |
|---|
name | string | No | Updated organisation name |
active | boolean | No | Whether organisation is active |
crown | boolean | No | Whether organisation is a Crown body |
organisation_type | string | No | Type of organisation |
permissions | array | No | List of organisation permissions |
email_branding_id | UUID | No | Default email branding |
letter_branding_id | UUID | No | Default letter branding |
agreement_signed | boolean | No | Whether MOU has been signed |
agreement_signed_by_id | UUID | No | User who signed MOU |
can_approve_own_go_live_requests | boolean | No | Self-approval for go-live |
Example Request
{
"name": "Ministry of Justice",
"email_branding_id": "3f5e7c9a-1b2d-4e8f-9a3c-7d6e4b2f1a8c",
"can_approve_own_go_live_requests": true
}
Response
Status: 204 No Content
NHS Organisation Type: When updating organisation_type to an NHS type and no branding is set, the system automatically assigns NHS email and letter branding.MOU Signing: When agreement_signed is set to true with agreement_signed_by_id, notification emails are sent to relevant parties.
Archive Organisation
Archive an organisation. All services must be reassigned and team members removed before archiving.
POST /organisation/{organisation_id}/archive
Path Parameters
| Parameter | Type | Description |
|---|
organisation_id | UUID | The ID of the organisation to archive |
Response
Status: 204 No Content
Error Responses
Status: 400 Bad Request
{
"result": "error",
"message": "Cannot archive an organisation with active services"
}
{
"result": "error",
"message": "Cannot archive an organisation with team members or invited team members"
}
Prerequisites for archiving:
- All services must be inactive or moved to another organisation
- All team members must be removed
- All pending invitations must be cancelled
- Email branding, letter branding, and domains will be deleted upon archiving
Service Management
Link Service to Organisation
Associate a service with an organisation.
POST /organisation/{organisation_id}/service
Path Parameters
| Parameter | Type | Description |
|---|
organisation_id | UUID | The ID of the organisation |
Request Body
| Field | Type | Required | Description |
|---|
service_id | UUID | Yes | ID of the service to link |
Example Request
{
"service_id": "8c9d0e1f-2a3b-4c5d-6e7f-8a9b0c1d2e3f"
}
Response
Status: 204 No Content
Linking a service to an organisation automatically sets the default free allowance for the service.
Get Organisation Services
Retrieve all services for an organisation.
GET /organisation/{organisation_id}/services
Path Parameters
| Parameter | Type | Description |
|---|
organisation_id | UUID | The ID of the organisation |
Response
Status: 200 OK
[
{
"id": "8c9d0e1f-2a3b-4c5d-6e7f-8a9b0c1d2e3f",
"name": "Tax Notifications",
"active": true,
"restricted": false,
"message_limit": 250000,
"organisation_id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d"
},
{
"id": "9d0e1f2a-3b4c-5d6e-7f8a-9b0c1d2e3f4a",
"name": "Staff Communications",
"active": false,
"restricted": true,
"message_limit": 50,
"organisation_id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d"
}
]
Services are sorted by active status (active first) then by name.
Get Organisation Services with Usage
Retrieve services with usage statistics for a specific year.
GET /organisation/{organisation_id}/services-with-usage?year={year}
Path Parameters
| Parameter | Type | Description |
|---|
organisation_id | UUID | The ID of the organisation |
Query Parameters
| Parameter | Type | Required | Description |
|---|
year | integer | Yes | Year for usage statistics (e.g., 2024) |
Response
Status: 200 OK
{
"services": [
{
"service_id": "8c9d0e1f-2a3b-4c5d-6e7f-8a9b0c1d2e3f",
"service_name": "Tax Notifications",
"active": true,
"email_totals": 125000,
"sms_totals": 50000,
"letter_totals": 15000,
"sms_cost": 2500.00,
"letter_cost": 7500.00
}
],
"updated_at": "2024-03-03T12:00:00.000000Z"
}
Team Member Management
Add User to Organisation
Add a user to an organisation with specific permissions.
POST /organisation/{organisation_id}/users/{user_id}
Path Parameters
| Parameter | Type | Description |
|---|
organisation_id | UUID | The ID of the organisation |
user_id | UUID | The ID of the user to add |
Request Body
| Field | Type | Required | Description |
|---|
permissions | array | Yes | List of permission objects |
Example Request
{
"permissions": [
{"permission": "can_make_services_live"}
]
}
Response
Status: 200 OK
{
"data": {
"id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"user_id": "b2c3d4e5-f6a7-5b8c-9d0e-1f2a3b4c5d6e",
"organisation_id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
"permissions": ["can_make_services_live"]
}
}
Remove User from Organisation
Remove a user from an organisation.
DELETE /organisation/{organisation_id}/users/{user_id}
Path Parameters
| Parameter | Type | Description |
|---|
organisation_id | UUID | The ID of the organisation |
user_id | UUID | The ID of the user to remove |
Response
Status: 204 No Content
Error Response
Status: 404 Not Found
{
"result": "error",
"message": "User not found"
}
Get Organisation Users
Retrieve all users for an organisation.
GET /organisation/{organisation_id}/users
Path Parameters
| Parameter | Type | Description |
|---|
organisation_id | UUID | The ID of the organisation |
Response
Status: 200 OK
{
"data": [
{
"id": "b2c3d4e5-f6a7-5b8c-9d0e-1f2a3b4c5d6e",
"name": "Jane Smith",
"email_address": "[email protected]",
"mobile_number": "+447700900000",
"permissions": ["can_make_services_live"]
}
]
}
Branding Pool Management
Get Email Branding Pool
Retrieve all email brandings in an organisation’s pool.
GET /organisation/{organisation_id}/email-branding-pool
Path Parameters
| Parameter | Type | Description |
|---|
organisation_id | UUID | The ID of the organisation |
Response
Status: 200 OK
{
"data": [
{
"id": "3f5e7c9a-1b2d-4e8f-9a3c-7d6e4b2f1a8c",
"name": "Cabinet Office",
"colour": "#005ea5",
"logo": "cabinet-office-logo.png",
"alt_text": "Cabinet Office",
"brand_type": "org"
}
]
}
Update Email Branding Pool
Add email brandings to an organisation’s pool.
POST /organisation/{organisation_id}/email-branding-pool
Path Parameters
| Parameter | Type | Description |
|---|
organisation_id | UUID | The ID of the organisation |
Request Body
| Field | Type | Required | Description |
|---|
branding_ids | array | Yes | Array of email branding UUIDs to add |
Example Request
{
"branding_ids": [
"3f5e7c9a-1b2d-4e8f-9a3c-7d6e4b2f1a8c",
"4a6b8c0d-2e3f-5a7b-9c1d-8e9f0a1b2c3d"
]
}
Response
Status: 204 No Content
Remove Email Branding from Pool
Remove an email branding from an organisation’s pool.
DELETE /organisation/{organisation_id}/email-branding-pool/{email_branding_id}
Path Parameters
| Parameter | Type | Description |
|---|
organisation_id | UUID | The ID of the organisation |
email_branding_id | UUID | The ID of the email branding to remove |
Response
Status: 204 No Content
Error Response
Status: 404 Not Found
{
"result": "error",
"message": "Email branding {id} not in {org}'s pool"
}
Get Letter Branding Pool
Retrieve all letter brandings in an organisation’s pool.
GET /organisation/{organisation_id}/letter-branding-pool
Path Parameters
| Parameter | Type | Description |
|---|
organisation_id | UUID | The ID of the organisation |
Response
Status: 200 OK
{
"data": [
{
"id": "5f6a7b8c-9d0e-1f2a-3b4c-5d6e7f8a9b0c",
"name": "Cabinet Office Letterhead",
"filename": "cabinet-office-letter-template",
"created_at": "2024-01-10T08:30:00.000000Z"
}
]
}
Update Letter Branding Pool
Add letter brandings to an organisation’s pool.
POST /organisation/{organisation_id}/letter-branding-pool
Path Parameters
| Parameter | Type | Description |
|---|
organisation_id | UUID | The ID of the organisation |
Request Body
| Field | Type | Required | Description |
|---|
branding_ids | array | Yes | Array of letter branding UUIDs to add |
Example Request
{
"branding_ids": [
"5f6a7b8c-9d0e-1f2a-3b4c-5d6e7f8a9b0c",
"6a7b8c9d-0e1f-2a3b-4c5d-6e7f8a9b0c1d"
]
}
Response
Status: 204 No Content
Remove Letter Branding from Pool
Remove a letter branding from an organisation’s pool.
DELETE /organisation/{organisation_id}/letter-branding-pool/{letter_branding_id}
Path Parameters
| Parameter | Type | Description |
|---|
organisation_id | UUID | The ID of the organisation |
letter_branding_id | UUID | The ID of the letter branding to remove |
Response
Status: 204 No Content
Error Responses
Status: 404 Not Found
{
"result": "error",
"message": "Letter branding {id} not in {org}'s pool"
}
Status: 400 Bad Request
{
"result": "error",
"message": "You cannot remove an organisation's default letter branding"
}
Go-Live Request Management
Notify Users of Go-Live Request
Notify organisation members when a service requests to go live.
POST /organisation/notify-users-of-request-to-go-live/{service_id}
Path Parameters
| Parameter | Type | Description |
|---|
service_id | UUID | The ID of the service requesting go-live |
Response
Status: 204 No Content
Sends notifications to:
- Organisation users with
can_make_services_live permission (approvers)
- The user who requested go-live (requester)
Notify Org Member About Next Steps
Notify an organisation member about next steps for a go-live request.
POST /organisation/notify-org-member-about-next-steps-of-go-live-request/{service_id}
Path Parameters
| Parameter | Type | Description |
|---|
service_id | UUID | The ID of the service |
Request Body
| Field | Type | Required | Description |
|---|
to | string | Yes | Email address of recipient |
service_name | string | Yes | Name of the service |
body | string | Yes | Custom message body |
Example Request
{
"to": "[email protected]",
"service_name": "Tax Notifications",
"body": "Please review the service configuration before approval."
}
Response
Status: 204 No Content
Error Response
Status: 400 Bad Request - Service has no active go-live request or go_live_user
Notify Service Member of Rejected Go-Live
Notify a service member that their go-live request was rejected.
POST /organisation/notify-service-member-of-rejected-go-live-request/{service_id}
Path Parameters
| Parameter | Type | Description |
|---|
service_id | UUID | The ID of the service |
Request Body
| Field | Type | Required | Description |
|---|
name | string | Yes | Name of service requester |
service_name | string | Yes | Name of the service |
organisation_name | string | Yes | Name of the organisation |
reason | string | Yes | Reason for rejection |
organisation_team_member_name | string | Yes | Name of org team member rejecting |
organisation_team_member_email | string | Yes | Email of org team member rejecting |
Example Request
{
"name": "John Doe",
"service_name": "Tax Notifications",
"organisation_name": "HM Revenue & Customs",
"reason": "Additional security review required before go-live.",
"organisation_team_member_name": "Jane Smith",
"organisation_team_member_email": "[email protected]"
}
Response
Status: 204 No Content
Rejection reasons are formatted with carets (^) at the start of each line to appear as inset text in emails.
Code Examples
Python
import requests
base_url = "https://api.notifications.service.gov.uk"
headers = {"Authorization": f"Bearer {api_key}"}
# Create organisation
response = requests.post(
f"{base_url}/organisation",
headers=headers,
json={
"name": "Department for Transport",
"crown": True,
"organisation_type": "central"
}
)
org = response.json()
org_id = org["id"]
# Update organisation
requests.post(
f"{base_url}/organisation/{org_id}",
headers=headers,
json={
"email_branding_id": "3f5e7c9a-1b2d-4e8f-9a3c-7d6e4b2f1a8c",
"can_approve_own_go_live_requests": True
}
)
# Link service to organisation
requests.post(
f"{base_url}/organisation/{org_id}/service",
headers=headers,
json={"service_id": "8c9d0e1f-2a3b-4c5d-6e7f-8a9b0c1d2e3f"}
)
# Add email branding to pool
requests.post(
f"{base_url}/organisation/{org_id}/email-branding-pool",
headers=headers,
json={
"branding_ids": [
"3f5e7c9a-1b2d-4e8f-9a3c-7d6e4b2f1a8c",
"4a6b8c0d-2e3f-5a7b-9c1d-8e9f0a1b2c3d"
]
}
)
# Get organisation services with usage
response = requests.get(
f"{base_url}/organisation/{org_id}/services-with-usage",
headers=headers,
params={"year": 2024}
)
usage = response.json()
print(f"Services: {len(usage['services'])}")
cURL
# Create organisation
curl -X POST "https://api.notifications.service.gov.uk/organisation" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Department for Transport",
"crown": true,
"organisation_type": "central"
}'
# Search organisations
curl "https://api.notifications.service.gov.uk/organisation/search?name=Transport" \
-H "Authorization: Bearer $API_KEY"
# Get organisation by domain
curl "https://api.notifications.service.gov.uk/organisation/by-domain?domain=dft.gov.uk" \
-H "Authorization: Bearer $API_KEY"
# Add user to organisation
curl -X POST "https://api.notifications.service.gov.uk/organisation/{org_id}/users/{user_id}" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"permissions": [{"permission": "can_make_services_live"}]}'
# Update letter branding pool
curl -X POST "https://api.notifications.service.gov.uk/organisation/{org_id}/letter-branding-pool" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"branding_ids": [
"5f6a7b8c-9d0e-1f2a-3b4c-5d6e7f8a9b0c"
]
}'