---
title: "Create a new service"
method: POST
path: "/sources/{id}/services"
tags: ["sources", "services"]
---

# Create a new service

`POST /sources/{id}/services`

## Path parameters

- `id` string, required

## Request body

- Service
  - `id` string — Unique identifier representing a service.
  - `sourceID` string — Unique identifier of the source associated with this service
  - `name` string, required — User facing name of the service.
  - `username` string — Credentials for using this service
  - `url` string, url, required — URL for the service backend (e.g. http://localhost:8093)
  - `insecureSkipVerify` boolean — True means any certificate presented by the service is accepted. Typically used for self-signed certs. Probably should only be used for testing.
  - `type` string — Indicates what kind of service this is (e.g. flux service)
  - `metadata` object
    - `active` boolean — Indicates whether the service is the current service being used for a source
  - `links` object
    - `self` string, url — Self link mapping to this resource
    - `proxy` string, url — URL location of proxy endpoint for this service
    - `source` string, url — URL location of the source this service is associated with

## Response `200`

Returns the newly created service

- Service
  - `id` string — Unique identifier representing a service.
  - `sourceID` string — Unique identifier of the source associated with this service
  - `name` string, required — User facing name of the service.
  - `username` string — Credentials for using this service
  - `url` string, url, required — URL for the service backend (e.g. http://localhost:8093)
  - `insecureSkipVerify` boolean — True means any certificate presented by the service is accepted. Typically used for self-signed certs. Probably should only be used for testing.
  - `type` string — Indicates what kind of service this is (e.g. flux service)
  - `metadata` object
    - `active` boolean — Indicates whether the service is the current service being used for a source
  - `links` object
    - `self` string, url — Self link mapping to this resource
    - `proxy` string, url — URL location of proxy endpoint for this service
    - `source` string, url — URL location of the source this service is associated with

## Other responses

- `504` — Gateway timeout happens when the server cannot connect to the service
- `default` — Unexpected internal server error

---

[API](https://skmtc.net/influxdata/apis/chronograf.md) · [All operations](https://skmtc.net/influxdata/apis/chronograf/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/influxdata/chronograf/versions/ce55d963b4ac/schema)
