Create Service

Create a new service within the context of a specific team in your monitoring system. In this structure, each service is owned and managed by a team, allowing for better organization, role-based visibility, and scoped alert handling.

To create a service, include the name of the service and the team_id it belongs to in the request body. This association ensures that each team is responsible for monitoring and responding to events tied to its own services.

Real-world use cases:
  • Team-specific service tracking — Allow different teams to independently monitor their own microservices, apps, or integrations.
  • Structured growth — As your system scales, teams can register new services under their scope to maintain separation of responsibilities.
  • Improved alert ownership — Alerts and incidents triggered from the service can be routed to the right team based on the team_id assignment.

After a service is created, it can be connected to uptime monitors, incident workflows, and team-based notification channels for complete operational visibility.

Authorization: Bearer YOUR_TOKEN

Request Body Parameters
  • name string
    The name of the service.
    Example: 'ServiceName'
  • team_id string
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-cmd.api.pinghome.io/v1/service';
const data = {
  name: 'ServiceName',
  team_id: '39ed7fbd-200b-41eb-8467-a91f0809e802'
};

axios.post(url, data, {
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json'
  }
})
.then(response => {
  console.log(response.data);
})
.catch(error => {
  console.error(error);
});
ResponseThis section is used to view the possible HTTP response codes returned by the API. These codes indicate the status of a request, such as 201 (Created), 401 (Unauthorized), 409 (Conflict), or 422 (Unprocessable Entity).