# Creating a Time Service ## Prerequisites Authenticate - Submit your user credentials, Client ID, and Client Secret for OAuth2 authentication. Refer to [API Authentication](https://docs.equinix.com/equinix-api/api-authentication.md) for instructions on how to call the OAuth API to validate and authenticate your credentials. ## Create an NTP Standard Service To create an NTP Standard Service, send a `POST` request to the [`/fabric/v4/timeServices`](https://docs.equinix.com/api-catalog/fabricv4.md#tag/Precision-Time-Services/operation/createTimeServices) endpoint. Specify the `type` as `NTP`, the `code` as `NTP_Standard`, your connection ID, and your network IP address details in the body of the request. Sample cURL Request: ``` curl -X POST 'https://api.equinix.com/fabric/v4/timeServices' -H 'content-type: application/json' -H 'authorization: Bearer ' -d '{     "name": "EPT-Single-Service",     "type": "NTP",     "connections": [     {         "uuid": "06dbb0e3-e55d-4090-8aff-fc5654abaad0"     }     ],     "package": {     "code": "NTP_STANDARD"     },     "ipv4": {     "primary": "192.168.0.2",     "secondary": "192.168.0.3",     "networkMask": "255.255.255.240",     "defaultGateway": "192.168.0.1"     } }' ``` The parameters included in the request body are specific to this example. For a full list of parameters and their descriptions, see the [API Reference](https://docs.equinix.com/api-catalog/fabricv4.md#tag/Precision-Time-Services/operation/createTimeServices). Sample Response: ``` {     "href": "https://api.equinix.com/fabric/v4/timeServices/a8ba52de-faae-43b5-b0b1-6904d37ee011",     "uuid": "a8ba52de-faae-43b5-b0b1-6904d37ee011",     "name": "EPT-Single-Service",     "type": "NTP",     "state": "PROVISIONING",     "connections": [         {         "href": "https://api.equinix.com/fabric/v4/connections/a8ba52de-faae-43b5-b0b1-6904d37ee011",         "uuid": "06dbb0e3-e55d-4090-8aff-fc5654abaad0"         }     ],     "package": {         "href": "https://api.equinix.com/fabric/v4/timeServicePackages/NTP_STANDARD",         "code": "NTP_STANDARD"     },     "ipv4": {         "primary": "192.168.0.2",         "secondary": "192.168.0.3",         "networkMask": "255.255.255.240",         "defaultGateway": "192.168.0.1"     },     "account": {         "accountNumber": 123456     } } ``` Response payload includes configuration parameters defined in the request body. For a full list of possible parameters and their descriptions, see the [API Reference](https://docs.equinix.com/api-catalog/fabricv4.md#tag/Precision-Time-Services/operation/createTimeServices). ## Create a PTP Standard Service To create an PTP Standard Service, send a `POST` request to the [`/fabric/v4/timeServices`](https://docs.equinix.com/api-catalog/fabricv4.md#tag/Precision-Time-Services/operation/createTimeServices) endpoint. Specify the `type` as `PTP`, the `code` as `PTP_Standard`, your connection ID, and your network IP address details in the body of the request. ``` curl -X POST 'https://api.equinix.com/fabric/v4/timeServices' -H 'content-type: application/json' -H 'authorization: Bearer ' -d '{     "name": "EPT-Single-Service",     "type": "PTP",     "connections": [     {         "uuid": "06dbb0e3-e55d-4090-8aff-fc5654abaad0"     }     ],     "package": {     "code": "PTP_STANDARD"     },     "ipv4": {     "primary": "192.168.0.2",     "secondary": "192.168.0.3",     "networkMask": "255.255.255.240",     "defaultGateway": "192.168.0.1"     } }' ``` ## Create a PTP Service with Advanced Configuration To create an NTP Standard Service, send a `POST` request to the [`/fabric/v4/timeServices`](https://docs.equinix.com/api-catalog/fabricv4.md#tag/Precision-Time-Services/operation/createTimeServices) endpoint. Specify the `type` as `PTP`, the `code` as `PTP_Standard`, your connection ID, and your network IP address details in the body of the request. Use the `advanceConfiguration` object to specify options like priority, announce interval, or sync interval. A full list of the advanced configuration options is available in the [API Reference](https://docs.equinix.com/api-catalog/fabricv4.md#tag/Precision-Time-Services/operation/createTimeServices). ``` curl -X POST 'https://api.equinix.com/fabric/v4/timeServices' -H 'content-type: application/json' -H 'authorization: Bearer ' -d '{     "name": "EPT-Single-Service",     "type": "PTP",     "connections": [      {         "uuid": "06dbb0e3-e55d-4090-8aff-fc5654abaad0"      }     ],     "package": {      "code": "PTP_STANDARD"     },     "ipv4": {      "primary": "192.168.0.2",      "secondary": "192.168.0.3",      "networkMask": "255.255.255.240",      "defaultGateway": "192.168.0.1"     },     "advanceConfiguration": {     "ptp": {       "tailScale": true,       "domain": 10,       "priority1": 5,       "priority2": 7,       "logAnnounceInterval": 0,       "logSyncInterval": 0,       "logDelayReqInterval": 0     } }' ```