# Site services

Base URL `https://pfcloud.pfctek.com/api/v1`. Every call needs `Authorization: Bearer mf_…`. Changes accept an `Idempotency-Key` header. Ids are public ids (UUIDs).

## GET /sites/{site}/services

**List services (integrations)**

Scope: `sites:read`

| Parameter | In | Description |
| --- | --- | --- |
| `site` | path | Public id from the dashboard address (required) |

## PUT /sites/{site}/services/{integration}

**Enable or configure a service**

Scope: `sites:write`

| Parameter | In | Description |
| --- | --- | --- |
| `site` | path | Public id from the dashboard address (required) |
| `integration` | path | Service key, e.g. horizon (required) |

| Body field | Type | Description |
| --- | --- | --- |
| `settings` | object |  |

## DELETE /sites/{site}/services/{integration}

**Disable a service**

Scope: `sites:write`

| Parameter | In | Description |
| --- | --- | --- |
| `site` | path | Public id from the dashboard address (required) |
| `integration` | path | Service key (required) |

## POST /sites/{site}/services/{integration}/take-over

**Let pfcloud take over a service running outside it**

Scope: `sites:write`

| Parameter | In | Description |
| --- | --- | --- |
| `site` | path | Public id from the dashboard address (required) |
| `integration` | path | Service key (required) |

## POST /sites/{site}/packages/refresh

**Check the code’s packages again**

Scope: `sites:write`

| Parameter | In | Description |
| --- | --- | --- |
| `site` | path | Public id from the dashboard address (required) |

## GET /sites/{site}/scheduled-jobs

**List scheduled jobs**

Scope: `sites:read`

| Parameter | In | Description |
| --- | --- | --- |
| `site` | path | Public id from the dashboard address (required) |

## POST /sites/{site}/scheduled-jobs

**Add a scheduled job**

Scope: `sites:write`

| Parameter | In | Description |
| --- | --- | --- |
| `site` | path | Public id from the dashboard address (required) |

| Body field | Type | Description |
| --- | --- | --- |
| `command` | string |  |
| `frequency` | string | every-minute, every-five-minutes, hourly, daily, weekly, monthly or custom |
| `cron` | string |  |

## DELETE /sites/{site}/scheduled-jobs/{job}

**Remove a scheduled job**

Scope: `sites:write`

| Parameter | In | Description |
| --- | --- | --- |
| `site` | path | Public id from the dashboard address (required) |
| `job` | path | The job’s name (required) |

