> For the complete documentation index, see [llms.txt](https://docs.statuspal.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.statuspal.io/platform/api-reference/services.md).

# Services

Services endpoints

## GET /status\_pages/{subdomain}/services

> List services

````json
{"openapi":"3.0.1","info":{"title":"StatusPal API Reference","version":"2.0.0"},"tags":[{"name":"Services","description":"Services endpoints"}],"servers":[{"url":"https://statuspal.io/api/v2"},{"url":"https://statuspal.eu/api/v2"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"parameters":{"StatusPageSubdomain":{"name":"subdomain","in":"path","description":"The subdomain of your status page.\n\nYou can find this under your status page settings, the Subdomain field is found under the \"Domain name\" section. Alternatively find it in the URL of your admin dashboard (e.g. statuspal.io/admin/`subdomain`).\n","required":true,"schema":{"type":"string"}}},"schemas":{"Service":{"description":"Represents the service.","type":"object","required":["name"],"properties":{"id":{"type":"integer","readOnly":true,"description":"The ID of the service."},"name":{"type":"string","description":"The name of the service."},"description":{"type":"string","description":"The description of the service."},"private_description":{"type":"string","description":"The private description of the service."},"parent_id":{"type":"integer","description":"The service parent ID."},"current_incident_type":{"description":"The service's current incident type.","$ref":"#/components/schemas/IncidentType","readOnly":true},"monitoring":{"$ref":"#/components/schemas/MonitoringType"},"webhook_monitoring_service":{"$ref":"#/components/schemas/WebhookMonitoringService"},"webhook_custom_jsonpath_settings":{"$ref":"#/components/schemas/WebhookCustomJsonpathSettings"},"inbound_email_address":{"type":"string","description":"This is field is populated from `inbound_email_id`, if the `monitoring` is set to `3rd_party`.","readOnly":true},"incoming_webhook_url":{"type":"string","description":"This is field is populated from `inbound_email_id`, if the `monitoring` is set to `webhook` and the `webhook_monitoring_service` is set.","readOnly":true},"ping_url":{"type":"string","description":"We will send HTTP requests to this URL for monitoring every minute."},"incident_type":{"description":"Sets the incident type to this value when an incident is created via monitoring.","$ref":"#/components/schemas/MonitoringIncidentType"},"parent_incident_type":{"description":"Sets the parent's service incident type to this value when an incident is created via monitoring.","$ref":"#/components/schemas/MonitoringIncidentType"},"is_up":{"type":"boolean","readOnly":true,"description":"Is the monitored service up?"},"pause_monitoring_during_maintenances":{"type":"boolean","description":"Pause the service monitoring during maintenances?"},"inbound_email_id":{"type":"string","readOnly":true,"description":"The inbound email ID."},"auto_incident":{"type":"boolean","description":"Create an incident automatically when this service is down and close it if/when it comes back up."},"auto_notify":{"type":"boolean","description":"Automatically notify all your subscribers about automatically created and closed incidents."},"children_ids":{"readOnly":true,"type":"array","description":"IDs of the service's children.","items":{"type":"integer"}},"translations":{"description":"A translations object. For example:\n```json\n{\n  \"en\": {\n    \"name\": \"Your service\",\n    \"description\": \"This is your service's description...\"\n  },\n  \"fr\": {\n    \"name\": \"Votre service\",\n    \"description\": \"Voici la description de votre service...\"\n  }\n}\n```\n","type":"object","additionalProperties":true,"properties":{"[lang]":{"description":"e.g. `en`.","type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}}}}},"private":{"type":"boolean","description":"Private service?"},"display_uptime_graph":{"type":"boolean","description":"Display uptime graph?"},"display_response_time_chart":{"type":"boolean","description":"Display response time chart?"},"order":{"type":"integer","description":"Service's position in the service list."},"notification_recipients":{"description":"Array of notification recipients:\n- In request: Array of recipient IDs (write-only).\n- In response: Array of recipient objects with `id` and `email` (read-only).\n","type":"array","items":{"oneOf":[{"type":"integer","description":"Recipient ID (write-only for request).","writeOnly":true},{"type":"object","description":"Recipient object (read-only for response).","readOnly":true,"properties":{"id":{"type":"integer","description":"The ID of the recipient."},"email":{"type":"string","description":"The email of the recipient."}}}]}},"monitoring_options":{"description":"Configuration options for monitoring the service. The options vary depending on whether\nthe monitoring type is `internal` or `3rd_party`.\n","$ref":"#/components/schemas/MonitoringOptions"}}},"IncidentType":{"type":"string","description":"The type of the (current) incident:\n * `minor` - A minor incident is currently taking place.\n * `major` - A major incident is currently taking place.\n * `scheduled` - A scheduled maintenance is currently taking place.\n","enum":["major","minor","scheduled"]},"MonitoringType":{"type":"string","nullable":true,"description":"Monitoring types:\n * `null` - No monitoring\n * `internal` - StatusPal monitoring\n * `3rd_party` - 3rd Party monitoring\n * `webhook` - Incoming webhook monitoring\n","enum":[null,"internal","3rd_party","webhook"]},"WebhookMonitoringService":{"type":"string","description":"> ### Configure this field only if the `monitoring` is set to `webhook`.\n\nWebhook monitoring services:\n* `status-cake` - StatusCake monitoring service\n* `uptime-robot` - UptimeRobot monitoring service\n* `zabbix` - Zabbix monitoring service\n* `custom-jsonpath` - Custom JSONPath\n","enum":["status-cake","uptime-robot","zabbix","custom-jsonpath"]},"WebhookCustomJsonpathSettings":{"type":"object","description":"> ### Configure this field only if the `webhook_monitoring_service` is set to `custom-jsonpath`.","properties":{"jsonpath":{"type":"string","description":"The path in the JSON, e.g. `$.status`."},"expected_result":{"type":"string","description":"The expected result in the JSON, e.g. `\"up\"`."}}},"MonitoringIncidentType":{"type":"string","description":"The type of the (current) incident:\n * `minor` - A minor incident is currently taking place.\n * `major` - A major incident is currently taking place.\n","enum":["major","minor"]},"MonitoringOptions":{"type":"object","description":"Options for configuring monitoring behavior for services.","properties":{"method":{"type":"string","description":"The HTTP method to be used when sending requests for monitoring.\nThis should be set to a valid HTTP method (e.g. `GET` or `HEAD`)\nwhen monitoring type is `internal`.\nEnsure it aligns with the service's requirements for health checks.\n"},"headers":{"type":"array","description":"Custom headers to be included in the monitoring request.\nThis should be set when the monitoring type is `internal`\nto specify any necessary header fields for the request.\n","items":{"type":"object","properties":{"key":{"type":"string","description":"The name of the header field."},"value":{"type":"string","description":"The value for the header field."}}}},"keyword_down":{"type":"string","description":"A custom keyword that indicates a 'down' status when\nmonitoring a third-party service. This keyword is used\nto parse and understand service responses.\n"},"keyword_up":{"type":"string","description":"A custom keyword that indicates an 'up' status when\nmonitoring a third-party service. This keyword is used\nto parse and understand service responses.\n"}}},"UnauthorizedError":{"type":"object","properties":{"error":{"type":"integer","description":"Unauthorized"}}},"ServerError":{"type":"object","properties":{"error":{"type":"string","description":"Internal server error :("}}}},"responses":{"UnauthorizedError":{"description":"Authorization information is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"ServerError":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}}},"paths":{"/status_pages/{subdomain}/services":{"get":{"tags":["Services"],"summary":"List services","operationId":"getServices","parameters":[{"$ref":"#/components/parameters/StatusPageSubdomain"}],"responses":{"200":{"description":"The list of Services","content":{"application/json":{"schema":{"properties":{"services":{"type":"array","items":{"$ref":"#/components/schemas/Service"}},"links":{"type":"object","properties":{"next":{"type":"string","description":"Link for the next page."},"prev":{"type":"string","description":"Link for the previous page."}}},"meta":{"type":"object","properties":{"total_count":{"type":"integer","description":"Shows the total amount of services."}}}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"500":{"$ref":"#/components/responses/ServerError"}}}}}}
````

## POST /status\_pages/{subdomain}/services

> Adds a new service

````json
{"openapi":"3.0.1","info":{"title":"StatusPal API Reference","version":"2.0.0"},"tags":[{"name":"Services","description":"Services endpoints"}],"servers":[{"url":"https://statuspal.io/api/v2"},{"url":"https://statuspal.eu/api/v2"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"parameters":{"StatusPageSubdomain":{"name":"subdomain","in":"path","description":"The subdomain of your status page.\n\nYou can find this under your status page settings, the Subdomain field is found under the \"Domain name\" section. Alternatively find it in the URL of your admin dashboard (e.g. statuspal.io/admin/`subdomain`).\n","required":true,"schema":{"type":"string"}}},"schemas":{"ServiceObj":{"type":"object","properties":{"service":{"$ref":"#/components/schemas/Service"}}},"Service":{"description":"Represents the service.","type":"object","required":["name"],"properties":{"id":{"type":"integer","readOnly":true,"description":"The ID of the service."},"name":{"type":"string","description":"The name of the service."},"description":{"type":"string","description":"The description of the service."},"private_description":{"type":"string","description":"The private description of the service."},"parent_id":{"type":"integer","description":"The service parent ID."},"current_incident_type":{"description":"The service's current incident type.","$ref":"#/components/schemas/IncidentType","readOnly":true},"monitoring":{"$ref":"#/components/schemas/MonitoringType"},"webhook_monitoring_service":{"$ref":"#/components/schemas/WebhookMonitoringService"},"webhook_custom_jsonpath_settings":{"$ref":"#/components/schemas/WebhookCustomJsonpathSettings"},"inbound_email_address":{"type":"string","description":"This is field is populated from `inbound_email_id`, if the `monitoring` is set to `3rd_party`.","readOnly":true},"incoming_webhook_url":{"type":"string","description":"This is field is populated from `inbound_email_id`, if the `monitoring` is set to `webhook` and the `webhook_monitoring_service` is set.","readOnly":true},"ping_url":{"type":"string","description":"We will send HTTP requests to this URL for monitoring every minute."},"incident_type":{"description":"Sets the incident type to this value when an incident is created via monitoring.","$ref":"#/components/schemas/MonitoringIncidentType"},"parent_incident_type":{"description":"Sets the parent's service incident type to this value when an incident is created via monitoring.","$ref":"#/components/schemas/MonitoringIncidentType"},"is_up":{"type":"boolean","readOnly":true,"description":"Is the monitored service up?"},"pause_monitoring_during_maintenances":{"type":"boolean","description":"Pause the service monitoring during maintenances?"},"inbound_email_id":{"type":"string","readOnly":true,"description":"The inbound email ID."},"auto_incident":{"type":"boolean","description":"Create an incident automatically when this service is down and close it if/when it comes back up."},"auto_notify":{"type":"boolean","description":"Automatically notify all your subscribers about automatically created and closed incidents."},"children_ids":{"readOnly":true,"type":"array","description":"IDs of the service's children.","items":{"type":"integer"}},"translations":{"description":"A translations object. For example:\n```json\n{\n  \"en\": {\n    \"name\": \"Your service\",\n    \"description\": \"This is your service's description...\"\n  },\n  \"fr\": {\n    \"name\": \"Votre service\",\n    \"description\": \"Voici la description de votre service...\"\n  }\n}\n```\n","type":"object","additionalProperties":true,"properties":{"[lang]":{"description":"e.g. `en`.","type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}}}}},"private":{"type":"boolean","description":"Private service?"},"display_uptime_graph":{"type":"boolean","description":"Display uptime graph?"},"display_response_time_chart":{"type":"boolean","description":"Display response time chart?"},"order":{"type":"integer","description":"Service's position in the service list."},"notification_recipients":{"description":"Array of notification recipients:\n- In request: Array of recipient IDs (write-only).\n- In response: Array of recipient objects with `id` and `email` (read-only).\n","type":"array","items":{"oneOf":[{"type":"integer","description":"Recipient ID (write-only for request).","writeOnly":true},{"type":"object","description":"Recipient object (read-only for response).","readOnly":true,"properties":{"id":{"type":"integer","description":"The ID of the recipient."},"email":{"type":"string","description":"The email of the recipient."}}}]}},"monitoring_options":{"description":"Configuration options for monitoring the service. The options vary depending on whether\nthe monitoring type is `internal` or `3rd_party`.\n","$ref":"#/components/schemas/MonitoringOptions"}}},"IncidentType":{"type":"string","description":"The type of the (current) incident:\n * `minor` - A minor incident is currently taking place.\n * `major` - A major incident is currently taking place.\n * `scheduled` - A scheduled maintenance is currently taking place.\n","enum":["major","minor","scheduled"]},"MonitoringType":{"type":"string","nullable":true,"description":"Monitoring types:\n * `null` - No monitoring\n * `internal` - StatusPal monitoring\n * `3rd_party` - 3rd Party monitoring\n * `webhook` - Incoming webhook monitoring\n","enum":[null,"internal","3rd_party","webhook"]},"WebhookMonitoringService":{"type":"string","description":"> ### Configure this field only if the `monitoring` is set to `webhook`.\n\nWebhook monitoring services:\n* `status-cake` - StatusCake monitoring service\n* `uptime-robot` - UptimeRobot monitoring service\n* `zabbix` - Zabbix monitoring service\n* `custom-jsonpath` - Custom JSONPath\n","enum":["status-cake","uptime-robot","zabbix","custom-jsonpath"]},"WebhookCustomJsonpathSettings":{"type":"object","description":"> ### Configure this field only if the `webhook_monitoring_service` is set to `custom-jsonpath`.","properties":{"jsonpath":{"type":"string","description":"The path in the JSON, e.g. `$.status`."},"expected_result":{"type":"string","description":"The expected result in the JSON, e.g. `\"up\"`."}}},"MonitoringIncidentType":{"type":"string","description":"The type of the (current) incident:\n * `minor` - A minor incident is currently taking place.\n * `major` - A major incident is currently taking place.\n","enum":["major","minor"]},"MonitoringOptions":{"type":"object","description":"Options for configuring monitoring behavior for services.","properties":{"method":{"type":"string","description":"The HTTP method to be used when sending requests for monitoring.\nThis should be set to a valid HTTP method (e.g. `GET` or `HEAD`)\nwhen monitoring type is `internal`.\nEnsure it aligns with the service's requirements for health checks.\n"},"headers":{"type":"array","description":"Custom headers to be included in the monitoring request.\nThis should be set when the monitoring type is `internal`\nto specify any necessary header fields for the request.\n","items":{"type":"object","properties":{"key":{"type":"string","description":"The name of the header field."},"value":{"type":"string","description":"The value for the header field."}}}},"keyword_down":{"type":"string","description":"A custom keyword that indicates a 'down' status when\nmonitoring a third-party service. This keyword is used\nto parse and understand service responses.\n"},"keyword_up":{"type":"string","description":"A custom keyword that indicates an 'up' status when\nmonitoring a third-party service. This keyword is used\nto parse and understand service responses.\n"}}},"BadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Bad request!"}}},"UnauthorizedError":{"type":"object","properties":{"error":{"type":"integer","description":"Unauthorized"}}},"ForbiddenError":{"type":"object","properties":{"error":{"type":"string","description":"Forbidden"}}},"NotFoundError":{"type":"object","properties":{"error":{"type":"string","description":"Resource not found!"}}},"ValidationError":{"type":"object","properties":{"errors":{"type":"object","description":"A dictionary where each key contains the name of a field with a validation error and the value an array with the validation errors"}}},"ServerError":{"type":"object","properties":{"error":{"type":"string","description":"Internal server error :("}}}},"responses":{"BadRequestError":{"description":"Bad request error. Probably JSON syntax is wrong, check with jsonlint.com.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"UnauthorizedError":{"description":"Authorization information is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"ForbiddenError":{"description":"You lack the necessary permissions to access this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"NotFoundError":{"description":"A resource with the provided ID was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"ValidationError":{"description":"There was a validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"ServerError":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}}},"paths":{"/status_pages/{subdomain}/services":{"post":{"tags":["Services"],"summary":"Adds a new service","operationId":"addService","parameters":[{"$ref":"#/components/parameters/StatusPageSubdomain"}],"requestBody":{"description":"The service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceObj"}}},"required":true},"responses":{"201":{"description":"The service was created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceObj"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"$ref":"#/components/responses/NotFoundError"},"422":{"$ref":"#/components/responses/ValidationError"},"500":{"$ref":"#/components/responses/ServerError"}}}}}}
````

## GET /status\_pages/{subdomain}/services/{serviceId}

> Get a service

````json
{"openapi":"3.0.1","info":{"title":"StatusPal API Reference","version":"2.0.0"},"tags":[{"name":"Services","description":"Services endpoints"}],"servers":[{"url":"https://statuspal.io/api/v2"},{"url":"https://statuspal.eu/api/v2"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"parameters":{"StatusPageSubdomain":{"name":"subdomain","in":"path","description":"The subdomain of your status page.\n\nYou can find this under your status page settings, the Subdomain field is found under the \"Domain name\" section. Alternatively find it in the URL of your admin dashboard (e.g. statuspal.io/admin/`subdomain`).\n","required":true,"schema":{"type":"string"}},"ServiceId":{"name":"serviceId","in":"path","description":"The ID of a service","required":true,"schema":{"type":"integer"}}},"schemas":{"ServiceObj":{"type":"object","properties":{"service":{"$ref":"#/components/schemas/Service"}}},"Service":{"description":"Represents the service.","type":"object","required":["name"],"properties":{"id":{"type":"integer","readOnly":true,"description":"The ID of the service."},"name":{"type":"string","description":"The name of the service."},"description":{"type":"string","description":"The description of the service."},"private_description":{"type":"string","description":"The private description of the service."},"parent_id":{"type":"integer","description":"The service parent ID."},"current_incident_type":{"description":"The service's current incident type.","$ref":"#/components/schemas/IncidentType","readOnly":true},"monitoring":{"$ref":"#/components/schemas/MonitoringType"},"webhook_monitoring_service":{"$ref":"#/components/schemas/WebhookMonitoringService"},"webhook_custom_jsonpath_settings":{"$ref":"#/components/schemas/WebhookCustomJsonpathSettings"},"inbound_email_address":{"type":"string","description":"This is field is populated from `inbound_email_id`, if the `monitoring` is set to `3rd_party`.","readOnly":true},"incoming_webhook_url":{"type":"string","description":"This is field is populated from `inbound_email_id`, if the `monitoring` is set to `webhook` and the `webhook_monitoring_service` is set.","readOnly":true},"ping_url":{"type":"string","description":"We will send HTTP requests to this URL for monitoring every minute."},"incident_type":{"description":"Sets the incident type to this value when an incident is created via monitoring.","$ref":"#/components/schemas/MonitoringIncidentType"},"parent_incident_type":{"description":"Sets the parent's service incident type to this value when an incident is created via monitoring.","$ref":"#/components/schemas/MonitoringIncidentType"},"is_up":{"type":"boolean","readOnly":true,"description":"Is the monitored service up?"},"pause_monitoring_during_maintenances":{"type":"boolean","description":"Pause the service monitoring during maintenances?"},"inbound_email_id":{"type":"string","readOnly":true,"description":"The inbound email ID."},"auto_incident":{"type":"boolean","description":"Create an incident automatically when this service is down and close it if/when it comes back up."},"auto_notify":{"type":"boolean","description":"Automatically notify all your subscribers about automatically created and closed incidents."},"children_ids":{"readOnly":true,"type":"array","description":"IDs of the service's children.","items":{"type":"integer"}},"translations":{"description":"A translations object. For example:\n```json\n{\n  \"en\": {\n    \"name\": \"Your service\",\n    \"description\": \"This is your service's description...\"\n  },\n  \"fr\": {\n    \"name\": \"Votre service\",\n    \"description\": \"Voici la description de votre service...\"\n  }\n}\n```\n","type":"object","additionalProperties":true,"properties":{"[lang]":{"description":"e.g. `en`.","type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}}}}},"private":{"type":"boolean","description":"Private service?"},"display_uptime_graph":{"type":"boolean","description":"Display uptime graph?"},"display_response_time_chart":{"type":"boolean","description":"Display response time chart?"},"order":{"type":"integer","description":"Service's position in the service list."},"notification_recipients":{"description":"Array of notification recipients:\n- In request: Array of recipient IDs (write-only).\n- In response: Array of recipient objects with `id` and `email` (read-only).\n","type":"array","items":{"oneOf":[{"type":"integer","description":"Recipient ID (write-only for request).","writeOnly":true},{"type":"object","description":"Recipient object (read-only for response).","readOnly":true,"properties":{"id":{"type":"integer","description":"The ID of the recipient."},"email":{"type":"string","description":"The email of the recipient."}}}]}},"monitoring_options":{"description":"Configuration options for monitoring the service. The options vary depending on whether\nthe monitoring type is `internal` or `3rd_party`.\n","$ref":"#/components/schemas/MonitoringOptions"}}},"IncidentType":{"type":"string","description":"The type of the (current) incident:\n * `minor` - A minor incident is currently taking place.\n * `major` - A major incident is currently taking place.\n * `scheduled` - A scheduled maintenance is currently taking place.\n","enum":["major","minor","scheduled"]},"MonitoringType":{"type":"string","nullable":true,"description":"Monitoring types:\n * `null` - No monitoring\n * `internal` - StatusPal monitoring\n * `3rd_party` - 3rd Party monitoring\n * `webhook` - Incoming webhook monitoring\n","enum":[null,"internal","3rd_party","webhook"]},"WebhookMonitoringService":{"type":"string","description":"> ### Configure this field only if the `monitoring` is set to `webhook`.\n\nWebhook monitoring services:\n* `status-cake` - StatusCake monitoring service\n* `uptime-robot` - UptimeRobot monitoring service\n* `zabbix` - Zabbix monitoring service\n* `custom-jsonpath` - Custom JSONPath\n","enum":["status-cake","uptime-robot","zabbix","custom-jsonpath"]},"WebhookCustomJsonpathSettings":{"type":"object","description":"> ### Configure this field only if the `webhook_monitoring_service` is set to `custom-jsonpath`.","properties":{"jsonpath":{"type":"string","description":"The path in the JSON, e.g. `$.status`."},"expected_result":{"type":"string","description":"The expected result in the JSON, e.g. `\"up\"`."}}},"MonitoringIncidentType":{"type":"string","description":"The type of the (current) incident:\n * `minor` - A minor incident is currently taking place.\n * `major` - A major incident is currently taking place.\n","enum":["major","minor"]},"MonitoringOptions":{"type":"object","description":"Options for configuring monitoring behavior for services.","properties":{"method":{"type":"string","description":"The HTTP method to be used when sending requests for monitoring.\nThis should be set to a valid HTTP method (e.g. `GET` or `HEAD`)\nwhen monitoring type is `internal`.\nEnsure it aligns with the service's requirements for health checks.\n"},"headers":{"type":"array","description":"Custom headers to be included in the monitoring request.\nThis should be set when the monitoring type is `internal`\nto specify any necessary header fields for the request.\n","items":{"type":"object","properties":{"key":{"type":"string","description":"The name of the header field."},"value":{"type":"string","description":"The value for the header field."}}}},"keyword_down":{"type":"string","description":"A custom keyword that indicates a 'down' status when\nmonitoring a third-party service. This keyword is used\nto parse and understand service responses.\n"},"keyword_up":{"type":"string","description":"A custom keyword that indicates an 'up' status when\nmonitoring a third-party service. This keyword is used\nto parse and understand service responses.\n"}}},"UnauthorizedError":{"type":"object","properties":{"error":{"type":"integer","description":"Unauthorized"}}},"ForbiddenError":{"type":"object","properties":{"error":{"type":"string","description":"Forbidden"}}},"NotFoundError":{"type":"object","properties":{"error":{"type":"string","description":"Resource not found!"}}},"ServerError":{"type":"object","properties":{"error":{"type":"string","description":"Internal server error :("}}}},"responses":{"UnauthorizedError":{"description":"Authorization information is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"ForbiddenError":{"description":"You lack the necessary permissions to access this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"NotFoundError":{"description":"A resource with the provided ID was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"ServerError":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}}},"paths":{"/status_pages/{subdomain}/services/{serviceId}":{"get":{"operationId":"getService","summary":"Get a service","tags":["Services"],"parameters":[{"$ref":"#/components/parameters/StatusPageSubdomain"},{"$ref":"#/components/parameters/ServiceId"}],"responses":{"200":{"description":"The service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceObj"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"$ref":"#/components/responses/NotFoundError"},"500":{"$ref":"#/components/responses/ServerError"}}}}}}
````

## PUT /status\_pages/{subdomain}/services/{serviceId}

> Updates existing service

````json
{"openapi":"3.0.1","info":{"title":"StatusPal API Reference","version":"2.0.0"},"tags":[{"name":"Services","description":"Services endpoints"}],"servers":[{"url":"https://statuspal.io/api/v2"},{"url":"https://statuspal.eu/api/v2"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"parameters":{"ServiceId":{"name":"serviceId","in":"path","description":"The ID of a service","required":true,"schema":{"type":"integer"}},"StatusPageSubdomain":{"name":"subdomain","in":"path","description":"The subdomain of your status page.\n\nYou can find this under your status page settings, the Subdomain field is found under the \"Domain name\" section. Alternatively find it in the URL of your admin dashboard (e.g. statuspal.io/admin/`subdomain`).\n","required":true,"schema":{"type":"string"}}},"schemas":{"ServiceObj":{"type":"object","properties":{"service":{"$ref":"#/components/schemas/Service"}}},"Service":{"description":"Represents the service.","type":"object","required":["name"],"properties":{"id":{"type":"integer","readOnly":true,"description":"The ID of the service."},"name":{"type":"string","description":"The name of the service."},"description":{"type":"string","description":"The description of the service."},"private_description":{"type":"string","description":"The private description of the service."},"parent_id":{"type":"integer","description":"The service parent ID."},"current_incident_type":{"description":"The service's current incident type.","$ref":"#/components/schemas/IncidentType","readOnly":true},"monitoring":{"$ref":"#/components/schemas/MonitoringType"},"webhook_monitoring_service":{"$ref":"#/components/schemas/WebhookMonitoringService"},"webhook_custom_jsonpath_settings":{"$ref":"#/components/schemas/WebhookCustomJsonpathSettings"},"inbound_email_address":{"type":"string","description":"This is field is populated from `inbound_email_id`, if the `monitoring` is set to `3rd_party`.","readOnly":true},"incoming_webhook_url":{"type":"string","description":"This is field is populated from `inbound_email_id`, if the `monitoring` is set to `webhook` and the `webhook_monitoring_service` is set.","readOnly":true},"ping_url":{"type":"string","description":"We will send HTTP requests to this URL for monitoring every minute."},"incident_type":{"description":"Sets the incident type to this value when an incident is created via monitoring.","$ref":"#/components/schemas/MonitoringIncidentType"},"parent_incident_type":{"description":"Sets the parent's service incident type to this value when an incident is created via monitoring.","$ref":"#/components/schemas/MonitoringIncidentType"},"is_up":{"type":"boolean","readOnly":true,"description":"Is the monitored service up?"},"pause_monitoring_during_maintenances":{"type":"boolean","description":"Pause the service monitoring during maintenances?"},"inbound_email_id":{"type":"string","readOnly":true,"description":"The inbound email ID."},"auto_incident":{"type":"boolean","description":"Create an incident automatically when this service is down and close it if/when it comes back up."},"auto_notify":{"type":"boolean","description":"Automatically notify all your subscribers about automatically created and closed incidents."},"children_ids":{"readOnly":true,"type":"array","description":"IDs of the service's children.","items":{"type":"integer"}},"translations":{"description":"A translations object. For example:\n```json\n{\n  \"en\": {\n    \"name\": \"Your service\",\n    \"description\": \"This is your service's description...\"\n  },\n  \"fr\": {\n    \"name\": \"Votre service\",\n    \"description\": \"Voici la description de votre service...\"\n  }\n}\n```\n","type":"object","additionalProperties":true,"properties":{"[lang]":{"description":"e.g. `en`.","type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}}}}},"private":{"type":"boolean","description":"Private service?"},"display_uptime_graph":{"type":"boolean","description":"Display uptime graph?"},"display_response_time_chart":{"type":"boolean","description":"Display response time chart?"},"order":{"type":"integer","description":"Service's position in the service list."},"notification_recipients":{"description":"Array of notification recipients:\n- In request: Array of recipient IDs (write-only).\n- In response: Array of recipient objects with `id` and `email` (read-only).\n","type":"array","items":{"oneOf":[{"type":"integer","description":"Recipient ID (write-only for request).","writeOnly":true},{"type":"object","description":"Recipient object (read-only for response).","readOnly":true,"properties":{"id":{"type":"integer","description":"The ID of the recipient."},"email":{"type":"string","description":"The email of the recipient."}}}]}},"monitoring_options":{"description":"Configuration options for monitoring the service. The options vary depending on whether\nthe monitoring type is `internal` or `3rd_party`.\n","$ref":"#/components/schemas/MonitoringOptions"}}},"IncidentType":{"type":"string","description":"The type of the (current) incident:\n * `minor` - A minor incident is currently taking place.\n * `major` - A major incident is currently taking place.\n * `scheduled` - A scheduled maintenance is currently taking place.\n","enum":["major","minor","scheduled"]},"MonitoringType":{"type":"string","nullable":true,"description":"Monitoring types:\n * `null` - No monitoring\n * `internal` - StatusPal monitoring\n * `3rd_party` - 3rd Party monitoring\n * `webhook` - Incoming webhook monitoring\n","enum":[null,"internal","3rd_party","webhook"]},"WebhookMonitoringService":{"type":"string","description":"> ### Configure this field only if the `monitoring` is set to `webhook`.\n\nWebhook monitoring services:\n* `status-cake` - StatusCake monitoring service\n* `uptime-robot` - UptimeRobot monitoring service\n* `zabbix` - Zabbix monitoring service\n* `custom-jsonpath` - Custom JSONPath\n","enum":["status-cake","uptime-robot","zabbix","custom-jsonpath"]},"WebhookCustomJsonpathSettings":{"type":"object","description":"> ### Configure this field only if the `webhook_monitoring_service` is set to `custom-jsonpath`.","properties":{"jsonpath":{"type":"string","description":"The path in the JSON, e.g. `$.status`."},"expected_result":{"type":"string","description":"The expected result in the JSON, e.g. `\"up\"`."}}},"MonitoringIncidentType":{"type":"string","description":"The type of the (current) incident:\n * `minor` - A minor incident is currently taking place.\n * `major` - A major incident is currently taking place.\n","enum":["major","minor"]},"MonitoringOptions":{"type":"object","description":"Options for configuring monitoring behavior for services.","properties":{"method":{"type":"string","description":"The HTTP method to be used when sending requests for monitoring.\nThis should be set to a valid HTTP method (e.g. `GET` or `HEAD`)\nwhen monitoring type is `internal`.\nEnsure it aligns with the service's requirements for health checks.\n"},"headers":{"type":"array","description":"Custom headers to be included in the monitoring request.\nThis should be set when the monitoring type is `internal`\nto specify any necessary header fields for the request.\n","items":{"type":"object","properties":{"key":{"type":"string","description":"The name of the header field."},"value":{"type":"string","description":"The value for the header field."}}}},"keyword_down":{"type":"string","description":"A custom keyword that indicates a 'down' status when\nmonitoring a third-party service. This keyword is used\nto parse and understand service responses.\n"},"keyword_up":{"type":"string","description":"A custom keyword that indicates an 'up' status when\nmonitoring a third-party service. This keyword is used\nto parse and understand service responses.\n"}}},"BadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Bad request!"}}},"UnauthorizedError":{"type":"object","properties":{"error":{"type":"integer","description":"Unauthorized"}}},"ForbiddenError":{"type":"object","properties":{"error":{"type":"string","description":"Forbidden"}}},"NotFoundError":{"type":"object","properties":{"error":{"type":"string","description":"Resource not found!"}}},"ValidationError":{"type":"object","properties":{"errors":{"type":"object","description":"A dictionary where each key contains the name of a field with a validation error and the value an array with the validation errors"}}},"ServerError":{"type":"object","properties":{"error":{"type":"string","description":"Internal server error :("}}}},"responses":{"BadRequestError":{"description":"Bad request error. Probably JSON syntax is wrong, check with jsonlint.com.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"UnauthorizedError":{"description":"Authorization information is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"ForbiddenError":{"description":"You lack the necessary permissions to access this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"NotFoundError":{"description":"A resource with the provided ID was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"ValidationError":{"description":"There was a validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"ServerError":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}}},"paths":{"/status_pages/{subdomain}/services/{serviceId}":{"put":{"tags":["Services"],"summary":"Updates existing service","operationId":"updateService","parameters":[{"$ref":"#/components/parameters/ServiceId"},{"$ref":"#/components/parameters/StatusPageSubdomain"}],"requestBody":{"description":"The service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceObj"}}},"required":true},"responses":{"200":{"description":"The service was updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceObj"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"$ref":"#/components/responses/NotFoundError"},"422":{"$ref":"#/components/responses/ValidationError"},"500":{"$ref":"#/components/responses/ServerError"}}}}}}
````

## DELETE /status\_pages/{subdomain}/services/{serviceId}

> Deletes service permanently

```json
{"openapi":"3.0.1","info":{"title":"StatusPal API Reference","version":"2.0.0"},"tags":[{"name":"Services","description":"Services endpoints"}],"servers":[{"url":"https://statuspal.io/api/v2"},{"url":"https://statuspal.eu/api/v2"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"parameters":{"StatusPageSubdomain":{"name":"subdomain","in":"path","description":"The subdomain of your status page.\n\nYou can find this under your status page settings, the Subdomain field is found under the \"Domain name\" section. Alternatively find it in the URL of your admin dashboard (e.g. statuspal.io/admin/`subdomain`).\n","required":true,"schema":{"type":"string"}},"ServiceId":{"name":"serviceId","in":"path","description":"The ID of a service","required":true,"schema":{"type":"integer"}}},"responses":{"UnauthorizedError":{"description":"Authorization information is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"ForbiddenError":{"description":"You lack the necessary permissions to access this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"NotFoundError":{"description":"A resource with the provided ID was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"ServerError":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}},"schemas":{"UnauthorizedError":{"type":"object","properties":{"error":{"type":"integer","description":"Unauthorized"}}},"ForbiddenError":{"type":"object","properties":{"error":{"type":"string","description":"Forbidden"}}},"NotFoundError":{"type":"object","properties":{"error":{"type":"string","description":"Resource not found!"}}},"ServerError":{"type":"object","properties":{"error":{"type":"string","description":"Internal server error :("}}}}},"paths":{"/status_pages/{subdomain}/services/{serviceId}":{"delete":{"operationId":"deleteService","summary":"Deletes service permanently","tags":["Services"],"parameters":[{"$ref":"#/components/parameters/StatusPageSubdomain"},{"$ref":"#/components/parameters/ServiceId"}],"responses":{"200":{"description":"Service deleted successfully","content":{}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"$ref":"#/components/responses/NotFoundError"},"500":{"$ref":"#/components/responses/ServerError"}}}}}}
```
