# FAQ

Explore our guides and examples to integrate Cronly into your applications and workflow. Here are a couple of answers to common questions.

## How do I get started?

Just register [on the website](https://cronly.app/register). Your account is activated immediately. You need to subscribe to the paid plan to create monitors and managed jobs, but everything else is available to you straight away. Invite team members over, set up your projects and triggers and even set up unlimited free SSL certificates to monitor!

## How can I add people to my team?

You can invite team members within the Cronly app. Adding team members is completely free. There are 3 roles available for each team member, which determines the permissions they get. The three roles are: user, developer and admin. View more information about the roles and invitations on the [Employees](/setup-guides/employees) page.

## Where can I get help?

You can use our guides and documentation. Implementation is very straight-forward. Need more help? That's okay! There are a few ways to get in touch with us:

* Give us feedback with the feedback button in your account
* Shoot us an email at <info@cronly.app>
* Get in touch with us [on Twitter](https://twitter.com/CronlyApp)

## Do you have a refund policy?

You're charged on a per-month basis and can stop using Cronly each month. Not satisfied with our services? Contact us, and we'll happily refund you, or, if possible, improve your experience. Cronly is built by developers, and we understand that different developers have different requirements.

## How do I cancel my plan?

Sometimes, your business requirements change. If you no longer need Cronly, you can simply go to "Subscription" in your dashboard and cancel the subscription. We'll immediately stop billing you. Whenever you need us back, just resume your subscription. We are happy to wait for you.

## Can I get a discount as a student?

Yes, definitely. We want to support all students working on expanding their skills. Shoot us a message with what you're doing, and we'll happily get you a discount!

## Can you support our open-source project?

We don't hand out free accounts to all open-source projects, but we are happy to help projects that are aligned with our vision. Shoot us a message and hopefully, we can get you support your project!

## Is Cronly GDPR-compliant?

As a company based within the European Union, Cronly is fully GDPR-compliant. All our service providers are as well. The servers that Cronly is using, are all located in France.


# Subscription

There's only one plan available.

## Free account

If you aren't subscribed, there are still a few features of Cronly that you can take advantage of. Most notable: monitoring SSL certificates is completely free.

| Feature      | Free plan | Paid plan |
| ------------ | --------- | --------- |
| Projects     | ✅         | ✅         |
| Triggers     | ✅         | ✅         |
| Employees    | ✅         | ✅         |
| Integrations | ✅         | ✅         |
| API access   | ✅         | ✅         |
| Job monitors | ❌         | ✅         |
| Managed jobs | ❌         | ✅         |

## What does the paid plan cost?

You only pay $1/month per monitor (or managed job), or $10/year, if that's what you prefer. That's all. Users, projects, triggers, integrations, API calls and all the other features, including SSL certificate monitoring: completely free.

## Stop the automatic renewal of your subscription

If you no longer need Cronly, that's okay. Just go to "Subscription" in your dashboard and stop your subscription. We'll stop billing you immediately.

## Update payment method

Cronly partners with Stripe to safely store and process sensitive information around your subscription. To change your payment details, go to "Subscription" in your dashboard and click "Update payment details". Here, you can simply set up your new billing details.

## Where are my receipts going?

You can set up email addresses that you'd like to see the receipts go to in your Subscription dashboard. You can set up multiple email addresses by separating them with commas.


# Your account

{% hint style="info" %}
**Tip:** Never share your account details. If you need to give access to another person, just create a new account. It's 100% free. This way, you can stay in control of the permissions within your organisation.
{% endhint %}

## Changing your log-in credentials

Want to change your password? Just log in to your account, go to "Account settings" and enter a new password. This will go into effect immediately.

## Oops, I forgot my password!

Don't worry! You can simply [reset your password](https://cronly.app/forgot-password). We'll email you with a unique link, so you can set up a new password.

## How do I change my email address?

Currently, you can't change your email address. If you really want to, you can register a new account within your organisation with the email address that you want. Then, you can delete the old account. You can also get in touch with us. We'll happily help you further.


# Employees

Use employees to manage all the users within your organisation, without having to share your credentials.

## How employees are used

Employees have their own login credentials. Depending on their role, they have different permissions. View the table underneath to easily see which role can do what.

The three available roles are:

* **User:** Can view information about monitors and events. These users can access all the data they need to find information about failing monitors, but they can't create new monitors and don't have access to data to develop integrations.
* **Developer:** A developer can access everything it needs to develop new integrations. It can create things like monitors, triggers. It can also create API keys to get additional information, and it can reset the Zapier key. Likewise, it can't view information about the organization or about billing.
* **Admin:** This user has unlimited access. It can view information about the organization, billing and employees. It can register new users, cancel (or start) the subscription, and can even revoke access of existing users to the application.

{% hint style="danger" %}
**Warning:** An admin can remove permissions of another admin, so be careful with this role. There's almost never a reason to have multiple admins within an organization.
{% endhint %}

<table><thead><tr><th width="282.2857142857143">Feature</th><th width="150">User</th><th width="150">Developer</th><th width="150">Admin</th></tr></thead><tbody><tr><td>view activity stream</td><td>✅</td><td>✅</td><td>✅</td></tr><tr><td>view events</td><td>✅</td><td>✅</td><td>✅</td></tr><tr><td>view account settings</td><td>✅</td><td>✅</td><td>✅</td></tr><tr><td>view triggers</td><td>✅</td><td>✅</td><td>✅</td></tr><tr><td>view jobs</td><td>✅</td><td>✅</td><td>✅</td></tr><tr><td>view monitors</td><td>✅</td><td>✅</td><td>✅</td></tr><tr><td>view certificates</td><td>✅</td><td>✅</td><td>✅</td></tr><tr><td>view projects</td><td>✅</td><td>✅</td><td>✅</td></tr><tr><td>manage triggers</td><td>❌</td><td>✅</td><td>✅</td></tr><tr><td>manage jobs</td><td>❌</td><td>✅</td><td>✅</td></tr><tr><td>manage monitors</td><td>❌</td><td>✅</td><td>✅</td></tr><tr><td>manage certificates</td><td>❌</td><td>✅</td><td>✅</td></tr><tr><td>manage api keys</td><td>❌</td><td>✅</td><td>✅</td></tr><tr><td>manage slack</td><td>❌</td><td>✅</td><td>✅</td></tr><tr><td>manage zapier key</td><td>❌</td><td>✅</td><td>✅</td></tr><tr><td>manage projects</td><td>❌</td><td>✅</td><td>✅</td></tr><tr><td>manage organisation</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>manage subscription</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>manage users</td><td>❌</td><td>❌</td><td>✅</td></tr></tbody></table>

## Changing the account used as company owner

In Cronly, there is not really a "company owner". All admins have unlimited access to the organization. If you want to transfer admin rights, you first need to invite another admin. After that, you can revoke your own rights. The new admin can also do this.

## Inviting a colleague

1. Go to "Employees"
2. Press "Add new employee"
3. Enter the name and email address of the colleague
4. Set the correct role for the new colleague
5. Press "Send invitation"

Your colleague will receive an email with a unique link to finish their account. After setting a password, they have access to Cronly with the permissions you set.

## Editing a user

1. Go to "Employees"
2. Click the user you want to edit
3. Edit the relevant details (name, email or role)
4. Click "Update employee" or "Update role"

## Deleting an employee

{% hint style="info" %}
**Tip:** If a user is the last admin in the organization, it's account can't be deleted.
{% endhint %}

* Go to "Employees"
* Click the user you would like to delete
* Click "Delete employee"

The user is deleted immediately.


# Projects

Projects inside Cronly are simply a way to group monitors and are a quick filter for you to use. Setting up projects helps you to quickly filter the monitors you currently want to inspect.

## How projects are used

Projects are used to categorize multiple monitors, managed jobs and SSL certificates. This way, you can add triggers to those easily. This is useful if you have multiple clients that you want to help monitor their jobs for, for example.&#x20;

Just set up a project for the client and tag all the relevant monitors with that project. Then, you can set up a trigger to listen for events for that project. Now, you've got a way to set up notifications for specific clients.

* If you are developing only a single project, you can split up your monitors in various subgroups. For example: website, backups, mobile app, etc.
* If you are developing for multiple clients, you can create projects based on your clients. This way, you can notify the relevant people, without needing to communicate everything yourself.

## Creating a project

{% hint style="info" %}
**Tip:** You can add unlimited projects, as they are free.
{% endhint %}

1. Click "Projects" in your menu.
2. Pick a relevant name
3. Click save

## Editing a project

1. Click "Projects" in your menu.
2. Click the relevant project
3. Change the name
4. Click save

## Deleting a project

{% hint style="danger" %}
**Warning:** When you delete a project, all attached monitors will have their current project reset. This will also affect the attached triggers.
{% endhint %}

1. Click "Projects" in your menu.
2. Click the relevant project
3. Click "Delete project"


# Triggers

## How triggers are used

Triggers define the way we communicate [Events ](/setup-guides/events)with you and your employees. It's Cronly's way of featuring a manageable notification flow.

## Creating a trigger

{% hint style="info" %}
**Tip:** If you haven't enabled Slack yet, it won't show up here. Enable it first to select a channel.
{% endhint %}

1. Click "Triggers" in your menu
2. Click "Create new trigger"
3. Add filters for your trigger:
   1. Project: use this if you want this trigger only to be selected by a certain [project](/setup-guides/projects).
   2. Type: use this if you intend to differentiate between monitors and SSL certificates.
   3. Status: use this if you would like to filter specific statuses.
4. Add actions to tell Cronly how you'd like to be notified.

## Editing a trigger

1. Click "Triggers" in your menu
2. Select the trigger you want to edit
3. Edit the relevant details
4. Click "Update trigger"

## Deleting a trigger

{% hint style="danger" %}
**Warning:** Deleting a trigger means that the notifications for that trigger will stop immediately.
{% endhint %}

1. Click "Triggers" in your menu
2. Select the trigger you aim to delete
3. Click "Delete trigger"


# Events

## How events are used

Events are automatically generated via our monitoring systems. An event executes triggers that are configured to listen to that event.

## Event types

There are two available event types in Cronly:

* `cron` This event is for a cron job monitor.
* `certificate` This event is for an SSL certificate monitor.

## Event statuses

* `notification` This is for certificates only, to inform you of nearly expiring certificates.
* `alert` There is a problem with either your cron job or certificate.
* `cleared` The existing problem was cleared.


# Webhooks

Webhooks allow you to actively respond to events, from within your own environment.

## How webhooks are used

Webhooks are part of triggers. You can set up a webhook endpoint URL for each trigger you've created. Just go to the trigger, edit the trigger and set a webhook endpoint URL. For every event that occurs that fires that trigger, the webhook endpoint URL is called.

Cronly sends an HTTP request with `POST` data, and `JSON` contents.

## Request to your webhook

You can match the private key within your own webhook to validate the alert is really coming from Cronly. The private key of each trigger can be found inside your trigger details.

Each event can have one of the following statuses.

* `notification` This is for certificates only, to inform you of nearly expiring certificates.
* `alert` There is a problem with either your cron job or certificate.
* `cleared` The existing problem was cleared.

Each event can have one of the following types.

* `cron` This event is for a cron job monitor.
* `certificate` This event is for an SSL certificate monitor.

The `object` can be either a cron job or certificate.

### Request body example for a cron job

```json
{
  "private_key": "abc847ce-2f24-4c92-99ee-203ccc47d619",
  "event": {
    "id": 1,
    "type": "cron",
    "status": "alert",
    "title": "Test trigger",
    "description": "DEPRECATED",
    "added": "2022-05-30 14:31:22",
    "timezone": "UTC"
  },
  "object": {
    "id": 1,
    "added": "2022-05-30 14:31",
    "project": null,
    "name": "Test",
    "schedule": "* * * * *",
    "previousRun": "2022-05-30 14:42:55",
    "nextRun": null,
    "lastCheck": "2022-05-30 14:42:55",
    "lastPulse": "2022-05-30 14:42:55",
    "timezone": "UTC",
    "status": "alert",
    "archive": false
  }
}
```

### Request body example for an SSL certificate

```json
{
  "private_key": "abc847ce-2f24-4c92-99ee-203ccc47d619",
  "event": {
    "id": 1,
    "type": "certificate",
    "status": "healthy",
    "title": "Test trigger",
    "description": "DEPRECATED",
    "added": "2022-05-30 14:31:22",
    "timezone": "UTC"
  },
  "object": {
    "id": 1,
    "added": "2022-05-30 14:28:32",
    "project": null,
    "hostName": "cronly.app",
    "port": 443,
    "lastCheck": "2022-05-30 14:28:32",
    "status": "valid",
    "archive": false
  }
}
```

## Expected response

### Successful response

We wait for a response from your webhook and fetch and store the response for you to review. The response should have a `200 OK` HTTP response, if everything works as expected. We store your complete response.

### Error response

Any other response code will be interpreted as an error. Cronly sends out an e-mail notification to all email addresses related to the trigger. You can review the response in Cronly.


# Managed jobs

You can use our monitoring for your local cron jobs, but Cronly offers so much more. Use managed jobs to schedule your cron jobs in the cloud. We'll make sure they run on time.

## Creating a new managed job

1. Click "Managed jobs"
2. Click "Create new managed job"
3. Enter the relevant details:
   1. Name: This name is only for yourself, to recognize the job in your account
   2. Project: Use this to categorize the job
   3. Timezone: This is the timezone in which the job is expected to run
   4. Schedule: The schedule in which you want the job to be run
   5. Maximum duration: The number of minutes the job is expected to run. This should be at least the minimum duration you expect the job to run
   6. Allow overlapping tasks: If you set this to "Yes", we'll skip the execution of a task if a previous version is still running
   7. Number of attempts: We will try to reconnect this many times if the connection fails
4. Enter the endpoint settings: this is everything we send to your endpoint. This can be used for validation purposes.
5. Click "Create managed job"

### Cron schedule expression

```
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12)
# │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday)
# │ │ │ │ │
# │ │ │ │ │
# * * * * *
```

## How is the task token used?

Each task gets a random token that is sent with the request to the endpoint as a header. The key will be `X-Cronly-Token`, and the value will be the token itself.

Example: `X-Cronly-Token: 9531ba05-1533-488c-833f-e597f0734c3c`

You can use this token to validate that the request is coming from Cronly, if you like.


# Job monitors

Use our monitors to make sure your cron jobs run on time.

## Creating a new job monitor

1. Click "Job monitors"
2. Click "Create new monitor"
3. Enter the relevant details:
   1. Name: This name is only for yourself, to recognize the job in your account
   2. Project: Use this to categorize the job
   3. Timezone: This is the timezone in which the job is expected to run
   4. Schedule: The schedule in which you want the job to be run
   5. Maximum duration: The number of minutes the job is expected to run. This should be at least the minimum duration you expect the job to run
4. Click "Create job monitor"

### Cron schedule expression

```
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12)
# │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday)
# │ │ │ │ │
# │ │ │ │ │
# * * * * *
```

## How do monitors work?

Using monitors is very straightforward: just tell us when a cron job has finished, and we'll mark it as such. If we haven't received a pulse in time, we assume it's down, and we'll let you know.

To send out a pulse, add an HTTP request at the end of your cron job. The URL you need to call, can be found on the page of your monitor. It should look like this:

`https://cronly.app/api/monitors/pulse/a4f28bca-df99-47bf-a435-c6d8d2c948fd`

### Examples

{% hint style="info" %}
**Tip:** These examples are very basic. There are other ways available, for example with open source packages. We'll be adding more examples soon.
{% endhint %}

```bash
curl "https://api.cronly.app/1.1/cron/pulse?token={token}"
```

```php
<?php
file_get_contents("https://api.cronly.app/1.1/cron/pulse?token={token}");
```

```python
import urllib2
try:
    urllib2.urlopen("https://api.cronly.app/1.1/cron/pulse?token={token}")
except Exception:
    pass
```

```typescript
var https = require('https');
https.get("https://api.cronly.app/1.1/cron/pulse?token={token}");
```


# SSL certificates

Use our free SSL certificate monitoring to make sure your certificates never expire again.

{% hint style="info" %}
**Tip:** SSL certificate monitors are completely free!
{% endhint %}

## Creating a new SSL certificate monitor

1. Click "SSL certificates"
2. Click "Register new SSL certificate"
3. Enter the relevant details:
   1. Hostname: Just use the hostname, don't add the `https://`. For example: `cronly.app`. You can use subdomains here: `dev.cronly.app`.
   2. Port: If you don't know this, it is probably `443`.
   3. Project: Use this to categorize your certificates. This can be useful when you want to monitor certificates of your client, for example
4. Click "Register new certificate"

## How do SSL certificate monitors work?

Once you create an SSL certificate monitor, we will start monitoring it. When the status changes, we will give you a heads-up. There are three possible statuses:

* `notification`: Your certificate will expire within 30 days
* `alert`: Your certificate has expired and is no longer valid, or it has not expired, but is invalid
* `healthy`: Your certificate is valid for more than 30 days

If you want to see more information about your certificates, you can view this in your dashboard.


# How to use the API

Current version: 1.1. Previous versions: 1.0.

## General use of the API

* All requests must be sent over HTTPS.
* All requests must contain an API key (except the cron job pulse service).
* All of our server responses are in JSON format.
* The HTTP response code should always be `200`. All other response codes are system errors.
* The status value is `ok`, if successful, or `error` if there are errors in your request. The reason for an error can be found inside `reason`.

{% hint style="info" %}
To prevent abuse, please limit the maximum number of retries in case of an error. Our server might block your IP address, if we spot unusual high amounts of traffic.
{% endhint %}

{% hint style="info" %}
API keys are not safe in client-side code, like Javascript. We've chosen to use API keys to make our features accessible for a wide audience. If you want to use the API in Javascript, please consider a server side languages between your client side code and our API.
{% endhint %}

## Cron job monitor pulse (heart beat) code examples

```bash
curl "https://cronly.app/api/monitors/pulse/{token}"
```

```php
<?php
file_get_contents("https://cronly.app/api/monitors/pulse/{token}");
```

```python
import urllib2
try:
    urllib2.urlopen("https://cronly.app/api/monitors/pulse/{token}")
except Exception:
    pass
```

```typescript
var https = require('https');
https.get("https://cronly.app/api/monitors/pulse/{token}");
```


# Companies

## Overview of your company details

<mark style="color:blue;">`GET`</mark> `https://cronly.app/api/companies`

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer: `API token` |

{% tabs %}
{% tab title="200 Your company details" %}

```json
{
    "id": 1,
    "name": "Robin Martijn's Company",
    "timezone": "UTC",
    "ongoing_mails": true,
    "stripe_id": "cus_LmhqyQWUTvwA1g",
    "card_brand": "visa",
    "card_last_four": "4242",
    "card_expiration": "12/2034",
    "extra_billing_information": null,
    "trial_ends_at": null,
    "billing_address": null,
    "billing_address_line_2": null,
    "billing_city": null,
    "billing_state": null,
    "billing_postal_code": null,
    "vat_id": null,
    "receipt_emails": [],
    "billing_country": "NL",
    "slack_bot_user_id": null,
    "slack_bot_access_token": null,
    "zapier_key": "iREl82aMUKiSBYEdIXtdECj24Gq8gFjG",
    "deleted_at": null,
    "created_at": "2022-05-30T13:14:13.000000Z",
    "updated_at": "2022-05-31T19:40:40.000000Z"
}
```

{% endtab %}
{% endtabs %}


# Notifications

## Overview of all of your notifications

<mark style="color:blue;">`GET`</mark> `https://cronly.app/api/notifications`

This endpoint uses pagination

#### Query Parameters

| Name      | Type    | Description                                  |
| --------- | ------- | -------------------------------------------- |
| page      | Integer | The page you want to view (default: 1)       |
| per\_page | Integer | The number of results per page (default: 10) |

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer: `API token` |

{% tabs %}
{% tab title="200 Your notifications" %}

```json
{
    "current_page": 1,
    "data": [
        {
            "id": "90d198e9-d003-4e40-a845-b15c2c2eadf1",
            "type": "App\\Notifications\\MonitorFailedNotification",
            "notifiable_type": "App\\Models\\Company",
            "notifiable_id": 1,
            "data": {
                "type": "monitor",
                "type_id": 5,
                "project_id": 1,
                "status": "failed",
                "title": "Monitor test did not receive a pulse in time",
                "description": "Monitor test did not receive a pulse within 1\n            minutes, and has been marked as failed. This monitor will stop monitoring until it receives a pulse again.",
                "timezone": "UTC",
                "icon": "fa-stopwatch",
                "monitor_name": "test",
                "monitor_token": "6e9c5250-a609-4fcc-aec8-710104fd744e",
                "monitor_schedule": "* * * * *",
                "monitor_last_run_at": null,
                "monitor_duration": 1,
                "monitor_is_alerted": 1,
                "monitor_alert_reason": "Monitor failed"
            },
            "read_at": null,
            "created_at": "2022-05-31T19:48:03.000000Z",
            "updated_at": "2022-05-31T19:48:03.000000Z"
        },
        {
            "id": "97a31488-3ac3-4c38-9705-3c2ed03592f3",
            "type": "App\\Notifications\\SslCertificateNotification",
            "notifiable_type": "App\\Models\\Company",
            "notifiable_id": 1,
            "data": {
                "type": "ssl_certificate",
                "type_id": 7,
                "project_id": null,
                "status": "valid",
                "title": "Certificate google.com status changed",
                "description": "Certificate google.com status changed to valid",
                "timezone": "UTC",
                "icon": "fa-file-code",
                "ssl_certificate_hostname": "google.com",
                "ssl_certificate_port": 443,
                "ssl_certificate_expires_at": "2022-07-27T16:26:50.000000Z",
                "ssl_certificate_status": "valid",
                "ssl_certificate_last_checked_at": "2022-05-31T19:40:43.000000Z"
            },
            "read_at": null,
            "created_at": "2022-05-31T19:40:44.000000Z",
            "updated_at": "2022-05-31T19:40:44.000000Z"
        },
        {
            "id": "81612a8d-386b-44d9-8d05-44c2c4b3af76",
            "type": "App\\Notifications\\SslCertificateNotification",
            "notifiable_type": "App\\Models\\Company",
            "notifiable_id": 1,
            "data": {
                "type": "ssl_certificate",
                "type_id": 6,
                "project_id": null,
                "status": "valid",
                "title": "Certificate google.com status changed",
                "description": "Certificate google.com status changed to valid",
                "timezone": "UTC",
                "icon": "fa-file-code",
                "ssl_certificate_hostname": "google.com",
                "ssl_certificate_port": 443,
                "ssl_certificate_expires_at": "2022-07-27T16:26:50.000000Z",
                "ssl_certificate_status": "valid",
                "ssl_certificate_last_checked_at": "2022-05-31T19:39:50.000000Z"
            },
            "read_at": null,
            "created_at": "2022-05-31T19:39:50.000000Z",
            "updated_at": "2022-05-31T19:39:50.000000Z"
        },
        {
            "id": "dbd94ab6-e1db-4ded-b628-21e2daed0ba5",
            "type": "App\\Notifications\\SslCertificateNotification",
            "notifiable_type": "App\\Models\\Company",
            "notifiable_id": 1,
            "data": {
                "type": "ssl_certificate",
                "type_id": 5,
                "project_id": null,
                "status": "valid",
                "title": "Certificate dev.cronly.app status changed",
                "description": "Certificate dev.cronly.app status changed to valid",
                "timezone": "UTC",
                "icon": "fa-file-code",
                "ssl_certificate_hostname": "dev.cronly.app",
                "ssl_certificate_port": 443,
                "ssl_certificate_expires_at": "2022-08-06T21:10:45.000000Z",
                "ssl_certificate_status": "valid",
                "ssl_certificate_last_checked_at": "2022-05-31T19:19:07.000000Z"
            },
            "read_at": null,
            "created_at": "2022-05-31T19:19:09.000000Z",
            "updated_at": "2022-05-31T19:19:09.000000Z"
        },
        {
            "id": "9e85e89c-74c4-4e45-b5a9-319b3d4fd1b6",
            "type": "App\\Notifications\\MonitorFailedNotification",
            "notifiable_type": "App\\Models\\Company",
            "notifiable_id": 1,
            "data": {
                "type": "monitor",
                "type_id": 1,
                "project_id": null,
                "status": "failed",
                "title": "Monitor Test monitor did not receive a pulse in time",
                "description": "Monitor Test monitor did not receive a pulse within 1\n            minutes, and has been marked as failed. This monitor will stop monitoring until it receives a pulse again.",
                "timezone": "UTC",
                "icon": "fa-stopwatch",
                "monitor_name": "Test monitor",
                "monitor_token": "91d13ccf-f015-4e61-aae9-355627815800",
                "monitor_schedule": "* * * * *",
                "monitor_last_run_at": "2022-05-30T13:39:55.000000Z",
                "monitor_duration": 1,
                "monitor_is_alerted": 1,
                "monitor_alert_reason": "Monitor failed"
            },
            "read_at": null,
            "created_at": "2022-05-30T13:41:04.000000Z",
            "updated_at": "2022-05-30T13:41:04.000000Z"
        },
        {
            "id": "388871d3-73c3-47cb-92c3-eb80cb0f1be8",
            "type": "App\\Notifications\\MonitorFailedNotification",
            "notifiable_type": "App\\Models\\Company",
            "notifiable_id": 1,
            "data": {
                "type": "monitor",
                "type_id": 1,
                "project_id": null,
                "status": "failed",
                "title": "Monitor Test monitor did not receive a pulse in time",
                "description": "Monitor Test monitor did not receive a pulse within 1\n            minutes, and has been marked as failed. This monitor will stop monitoring until it receives a pulse again.",
                "timezone": "UTC",
                "icon": "fa-stopwatch",
                "monitor_name": "Test monitor",
                "monitor_token": "91d13ccf-f015-4e61-aae9-355627815800",
                "monitor_schedule": "* * * * *",
                "monitor_last_run_at": "2022-05-30T13:32:03.000000Z",
                "monitor_duration": 1,
                "monitor_is_alerted": 1,
                "monitor_alert_reason": "Monitor failed"
            },
            "read_at": "2022-05-30T13:38:43.000000Z",
            "created_at": "2022-05-30T13:34:03.000000Z",
            "updated_at": "2022-05-30T13:38:43.000000Z"
        }
    ],
    "first_page_url": "https://cronly.app/api/notifications?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "https://cronly.app/api/notifications?page=1",
    "links": [
        {
            "url": null,
            "label": "&laquo; Previous",
            "active": false
        },
        {
            "url": "https://cronly.app/api/notifications?page=1",
            "label": "1",
            "active": true
        },
        {
            "url": null,
            "label": "Next &raquo;",
            "active": false
        }
    ],
    "next_page_url": null,
    "path": "https://cronly.app/api/notifications",
    "per_page": 10,
    "prev_page_url": null,
    "to": 6,
    "total": 6
}
```

{% endtab %}
{% endtabs %}


# Job monitors

## Overview of all job monitors

<mark style="color:blue;">`GET`</mark> `https://cronly.app/api/monitors`

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer: `API token` |

{% tabs %}
{% tab title="200 All of your registered monitors" %}

```json
[
    {
        "id": 1,
        "name": "Test monitor",
        "company_id": 1,
        "project_id": null,
        "token": "91d13ccf-f015-4e61-aae9-355627815800",
        "timezone": "UTC",
        "schedule": "* * * * *",
        "last_run_at": "2022-05-30T13:39:55.000000Z",
        "duration": 1,
        "is_alerted": 1,
        "alert_reason": "Monitor failed",
        "deleted_at": null,
        "created_at": "2022-05-30T13:15:07.000000Z",
        "updated_at": "2022-05-30T13:41:01.000000Z"
    }
]
```

{% endtab %}
{% endtabs %}

## Details of job monitor

<mark style="color:blue;">`GET`</mark> `https://cronly.app/api/monitors/{id}`

#### Query Parameters

| Name                                 | Type    | Description                                |
| ------------------------------------ | ------- | ------------------------------------------ |
| id<mark style="color:red;">\*</mark> | Integer | The ID of the job monitor you want to view |

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer: `API token` |

{% tabs %}
{% tab title="200 The job monitor" %}

```json
{
    "id": 1,
    "name": "Test monitor",
    "company_id": 1,
    "project_id": null,
    "token": "91d13ccf-f015-4e61-aae9-355627815800",
    "timezone": "UTC",
    "schedule": "* * * * *",
    "last_run_at": "2022-05-30T13:39:55.000000Z",
    "duration": 1,
    "is_alerted": 1,
    "alert_reason": "Monitor failed",
    "deleted_at": null,
    "created_at": "2022-05-30T13:15:07.000000Z",
    "updated_at": "2022-05-30T13:41:01.000000Z"
}
```

{% endtab %}

{% tab title="404: Not Found The job monitor was not found" %}

```json
{
    "error": "Monitor not found"
}
```

{% endtab %}
{% endtabs %}

## Create a new job monitor

<mark style="color:green;">`POST`</mark> `https://cronly.app/api/monitors`

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer: `API token` |

#### Request Body

| Name                                       | Type    | Description |
| ------------------------------------------ | ------- | ----------- |
| name<mark style="color:red;">\*</mark>     | String  |             |
| timezone<mark style="color:red;">\*</mark> | String  |             |
| project\_id                                | Integer |             |
| schedule<mark style="color:red;">\*</mark> | String  |             |
| duration<mark style="color:red;">\*</mark> | Integer |             |

{% tabs %}
{% tab title="200 The newly created job monitor" %}

```json
{
    "name": "test",
    "project_id": "1",
    "timezone": "UTC",
    "schedule": "* * * * *",
    "duration": "1",
    "company_id": 1,
    "token": "6e9c5250-a609-4fcc-aec8-710104fd744e",
    "updated_at": "2022-05-31T19:47:36.000000Z",
    "created_at": "2022-05-31T19:47:36.000000Z",
    "id": 5
}
```

{% endtab %}
{% endtabs %}

## Delete a job monitor

<mark style="color:red;">`DELETE`</mark> `https://cronly.app/api/monitors/{id}`

#### Query Parameters

| Name                                 | Type    | Description                                |
| ------------------------------------ | ------- | ------------------------------------------ |
| id<mark style="color:red;">\*</mark> | Integer | The ID of the job monitor you want to view |

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer: `API token` |

{% tabs %}
{% tab title="204: No Content The job monitor has been deleted successfully" %}

```json
{
    "success": "Monitor deleted"
}
```

{% endtab %}

{% tab title="404: Not Found The job monitor was not found" %}

```json
{
    "error": "Monitor not found"
}
```

{% endtab %}
{% endtabs %}


# Projects

## Overview of all projects

<mark style="color:blue;">`GET`</mark> `https://cronly.app/api/projects`

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer: `API token` |

{% tabs %}
{% tab title="200 All of your projects" %}

```json
[
    {
        "id": 2,
        "name": "Project name",
        "company_id": 1,
        "deleted_at": null,
        "created_at": "2022-05-30T13:28:12.000000Z",
        "updated_at": "2022-05-30T13:28:12.000000Z"
    }
]
```

{% endtab %}
{% endtabs %}

## Details of project

<mark style="color:blue;">`GET`</mark> `https://cronly.app/api/projects/{id}`

#### Query Parameters

| Name                                 | Type    | Description                            |
| ------------------------------------ | ------- | -------------------------------------- |
| id<mark style="color:red;">\*</mark> | Integer | The ID of the project you want to view |

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer: `API token` |

{% tabs %}
{% tab title="200 The project" %}

```json
{
    "id": 2,
    "name": "Project name",
    "company_id": 1,
    "deleted_at": null,
    "created_at": "2022-05-30T13:28:12.000000Z",
    "updated_at": "2022-05-30T13:28:12.000000Z"
}
```

{% endtab %}

{% tab title="404: Not Found The project was not found" %}

```json
{
    "error": "Project not found"
}
```

{% endtab %}
{% endtabs %}

## Create a new project

<mark style="color:green;">`POST`</mark> `https://cronly.app/api/projects`

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer: `API token` |

#### Request Body

| Name                                   | Type   | Description |
| -------------------------------------- | ------ | ----------- |
| name<mark style="color:red;">\*</mark> | String |             |

{% tabs %}
{% tab title="200 The newly created project" %}

```json
{
    "name": "new project",
    "company_id": 1,
    "updated_at": "2022-05-31T19:50:29.000000Z",
    "created_at": "2022-05-31T19:50:29.000000Z",
    "id": 4
}
```

{% endtab %}
{% endtabs %}

## Delete a project

<mark style="color:red;">`DELETE`</mark> `https://cronly.app/api/projects/{id}`

#### Query Parameters

| Name                                 | Type    | Description                                |
| ------------------------------------ | ------- | ------------------------------------------ |
| id<mark style="color:red;">\*</mark> | Integer | The ID of the certificate you want to view |

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer: `API token` |

{% tabs %}
{% tab title="204: No Content The project has been deleted successfully" %}

```json
{
    "success": "Project deleted"
}
```

{% endtab %}

{% tab title="404: Not Found The project was not found" %}

```json
{
    "error": "Project not found"
}
```

{% endtab %}
{% endtabs %}


# SSL certificates

## Overview of all SSL certificate monitors

<mark style="color:blue;">`GET`</mark> `https://cronly.app/api/certificates`

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer: `API token` |

{% tabs %}
{% tab title="200 All of your registered certificate monitors" %}

```json
[
    {
        "id": 5,
        "company_id": 1,
        "project_id": null,
        "status": "valid",
        "last_checked_at": "2022-05-31T19:19:07.000000Z",
        "hostname": "dev.cronly.app",
        "port": 443,
        "expires_at": "2022-08-06T21:10:45.000000Z",
        "deleted_at": null,
        "created_at": "2022-05-31T19:19:07.000000Z",
        "updated_at": "2022-05-31T19:19:07.000000Z"
    }
]
```

{% endtab %}
{% endtabs %}

## Details of SSL certificate monitor

<mark style="color:blue;">`GET`</mark> `https://cronly.app/api/certificates/{id}`

#### Query Parameters

| Name                                 | Type    | Description                                |
| ------------------------------------ | ------- | ------------------------------------------ |
| id<mark style="color:red;">\*</mark> | Integer | The ID of the certificate you want to view |

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer: `API token` |

{% tabs %}
{% tab title="200 The SSL certificate monitor" %}

```json
{
    "id": 5,
    "company_id": 1,
    "project_id": null,
    "status": "valid",
    "last_checked_at": "2022-05-31T19:19:07.000000Z",
    "hostname": "dev.cronly.app",
    "port": 443,
    "expires_at": "2022-08-06T21:10:45.000000Z",
    "deleted_at": null,
    "created_at": "2022-05-31T19:19:07.000000Z",
    "updated_at": "2022-05-31T19:19:07.000000Z"
}
```

{% endtab %}

{% tab title="404: Not Found The SSL certificate monitor was not found" %}

```json
{
    "error": "Certificate not found"
}
```

{% endtab %}
{% endtabs %}

## Create a new SSL certificate monitor

<mark style="color:green;">`POST`</mark> `https://cronly.app/api/certificates`

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer: `API token` |

#### Request Body

| Name                                       | Type    | Description  |
| ------------------------------------------ | ------- | ------------ |
| hostname<mark style="color:red;">\*</mark> | String  |              |
| port                                       | Integer | Default: 443 |
| project\_id                                | Integer |              |

{% tabs %}
{% tab title="200 The newly created certificate monitor" %}

```json
{
    "hostname": "google.com",
    "port": "443",
    "company_id": 1,
    "updated_at": "2022-05-31T19:39:50.000000Z",
    "created_at": "2022-05-31T19:39:50.000000Z",
    "id": 6,
    "expires_at": "2022-07-27T16:26:50.000000Z",
    "last_checked_at": "2022-05-31T19:39:50.000000Z",
    "status": "valid",
    "company": {
        "id": 1,
        "name": "Robin Martijn's Company",
        "timezone": "UTC",
        "ongoing_mails": true,
        "stripe_id": "cus_LmhqyQWUTvwA1g",
        "card_brand": "visa",
        "card_last_four": "4242",
        "card_expiration": "12/2034",
        "extra_billing_information": null,
        "trial_ends_at": null,
        "billing_address": null,
        "billing_address_line_2": null,
        "billing_city": null,
        "billing_state": null,
        "billing_postal_code": null,
        "vat_id": null,
        "receipt_emails": [],
        "billing_country": "NL",
        "slack_bot_user_id": null,
        "slack_bot_access_token": null,
        "zapier_key": "iREl82aMUKiSBYEdIXtdECj24Gq8gFjG",
        "deleted_at": null,
        "created_at": "2022-05-30T13:14:13.000000Z",
        "updated_at": "2022-05-30T13:14:37.000000Z"
    }
}
```

{% endtab %}
{% endtabs %}

## Delete an SSL certificate monitor

<mark style="color:red;">`DELETE`</mark> `https://cronly.app/api/certificates/{id}`

#### Query Parameters

| Name                                 | Type    | Description                                |
| ------------------------------------ | ------- | ------------------------------------------ |
| id<mark style="color:red;">\*</mark> | Integer | The ID of the certificate you want to view |

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer: `API token` |

{% tabs %}
{% tab title="204: No Content The SSL certificate monitor has been deleted successfully" %}

```json
{
    "success": "Certificate deleted"
}
```

{% endtab %}

{% tab title="404: Not Found The SSL certificate monitor was not found" %}

```json
{
    "error": "Certificate not found"
}
```

{% endtab %}
{% endtabs %}


# Users

## Overview of all users within the organization

<mark style="color:blue;">`GET`</mark> `https://cronly.app/api/users`

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer: `API token` |

{% tabs %}
{% tab title="200 All of your users" %}

```json
[
    {
        "id": 1,
        "name": "Robin Martijn",
        "email": "robin@cronly.app",
        "email_verified_at": null,
        "deleted_at": null,
        "created_at": "2022-05-30T13:14:13.000000Z",
        "updated_at": "2022-05-30T13:14:13.000000Z",
        "company_id": 1
    },
    {
        "id": 2,
        "name": "Robin Martijn (backup)",
        "email": "ik@robinmartijn.nl",
        "email_verified_at": null,
        "deleted_at": null,
        "created_at": "2022-05-30T13:16:51.000000Z",
        "updated_at": "2022-05-30T13:16:51.000000Z",
        "company_id": 1
    },
    {
        "id": 3,
        "name": "John Doe",
        "email": "john@cronly.app",
        "email_verified_at": null,
        "deleted_at": null,
        "created_at": "2022-05-30T13:23:10.000000Z",
        "updated_at": "2022-05-30T13:23:35.000000Z",
        "company_id": 1
    }
]
```

{% endtab %}
{% endtabs %}

## Details of a specific user

<mark style="color:blue;">`GET`</mark> `https://cronly.app/api/users/{id}`

#### Query Parameters

| Name                                 | Type    | Description                         |
| ------------------------------------ | ------- | ----------------------------------- |
| id<mark style="color:red;">\*</mark> | Integer | The ID of the user you want to view |

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer: `API token` |

{% tabs %}
{% tab title="200 The user" %}

```json
{
    "id": 1,
    "name": "Robin Martijn",
    "email": "robin@cronly.app",
    "email_verified_at": null,
    "deleted_at": null,
    "created_at": "2022-05-30T13:14:13.000000Z",
    "updated_at": "2022-05-30T13:14:13.000000Z",
    "company_id": 1
}
```

{% endtab %}

{% tab title="404: Not Found The user was not found" %}

```json
{
    "error": "User not found"
}
```

{% endtab %}
{% endtabs %}


# Servers

## Overview of all servers

<mark style="color:blue;">`GET`</mark> `https://cronly.app/api/servers`

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer: `API token` |

{% tabs %}
{% tab title="200 All of your registered servers" %}

```json
[
    {
        "id": 1,
        "company_id": 1,
        "name": "Test Server",
        "identifier": "server_identifier",
        "ip_address": "143.110.208.131",
        "deleted_at": null,
        "created_at": "2024-03-04T16:19:06.000000Z",
        "updated_at": "2024-03-04T16:19:06.000000Z"
    }
]
```

{% endtab %}
{% endtabs %}

## Details of server

<mark style="color:blue;">`GET`</mark> `https://cronly.app/api/servers/{id}`

#### Query Parameters

| Name                                 | Type    | Description                               |
| ------------------------------------ | ------- | ----------------------------------------- |
| id<mark style="color:red;">\*</mark> | Integer | The ID of the job server you want to view |

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer: `API token` |

{% tabs %}
{% tab title="200 The server" %}

```json
{
        "id": 1,
        "company_id": 1,
        "name": "Test Server",
        "ip_address": "143.110.208.131",
        "identifier": "server_identifier",
        "deleted_at": null,
        "created_at": "2024-03-04T16:19:06.000000Z",
        "updated_at": "2024-03-04T16:19:06.000000Z"
}
```

{% endtab %}

{% tab title="404: Not Found The server was not found" %}

```json
{
    "error": "Server not found"
}
```

{% endtab %}
{% endtabs %}

## Create a new server

<mark style="color:green;">`POST`</mark> `https://cronly.app/api/servers`

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer: `API token` |

#### Request Body

| Name                                          | Type   | Description                  |
| --------------------------------------------- | ------ | ---------------------------- |
| name<mark style="color:red;">\*</mark>        | String | The name of the server       |
| ip\_address<mark style="color:red;">\*</mark> | String | The IP Address of the server |
| identifier<mark style="color:red;">\*</mark>  | String |                              |

{% tabs %}
{% tab title="200 The newly created server" %}

```json
{
    "name": "Test Server",
    "ip_address": "143.110.208.131",
    "identifier": "server_identifier",
    "company_id": 1,
    "updated_at": "2024-03-04T20:41:32.000000Z",
    "created_at": "2024-03-04T20:41:32.000000Z",
    "id": 4
}
```

{% endtab %}
{% endtabs %}

## Delete a server

<mark style="color:red;">`DELETE`</mark> `https://cronly.app/api/servers/{server_id}`

#### Query Parameters

| Name                                         | Type    | Description                                     |
| -------------------------------------------- | ------- | ----------------------------------------------- |
| server\_id<mark style="color:red;">\*</mark> | Integer | The identifier of the server you want to delete |

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer: `API token` |

{% tabs %}
{% tab title="200: No Content The server has been deleted successfully" %}

```json
{
    "success": "Server deleted"
}
```

{% endtab %}

{% tab title="404: Not Found The server was not found" %}

```json
{
    "error": "Server not found"
}
```

{% endtab %}
{% endtabs %}

## Alert

<mark style="color:green;">`POST`</mark> `https://cronly.app/api/servers/alert`

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer: `API token` |

#### Request Body

<table><thead><tr><th>Name</th><th width="235">Type</th><th>Description</th></tr></thead><tbody><tr><td>username<mark style="color:red;">*</mark></td><td>String</td><td>The username on the server whose back-up you want to alert</td></tr><tr><td>server_id<mark style="color:red;">*</mark></td><td>String</td><td>The identifier of the server you want to alert</td></tr><tr><td>command<mark style="color:red;">*</mark></td><td>String</td><td>The command that was altered</td></tr></tbody></table>

{% tabs %}
{% tab title="200 Success" %}

```json
{
    "success": "Alert sent"
}
```

{% endtab %}
{% endtabs %}


# Back-ups

## Overview of all back-ups

<mark style="color:blue;">`GET`</mark> `https://cronly.app/api/backups`

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer: `API token` |

{% tabs %}
{% tab title="200 All of your backups" %}

```json
[
    {
        "id": 1,
        "username": "username_on_server",
        "company_id": 1,
        "server_id": 1,
        "deleted_at": null,
        "created_at": "2024-03-04T18:19:56.000000Z",
        "updated_at": "2024-03-04T18:19:56.000000Z"
    }
]
```

{% endtab %}
{% endtabs %}

## Details of back-up

<mark style="color:blue;">`GET`</mark> `https://cronly.app/api/backups/{server_id}/{username}`

#### Query Parameters

| Name                                         | Type   | Description                                               |
| -------------------------------------------- | ------ | --------------------------------------------------------- |
| server\_id<mark style="color:red;">\*</mark> | String | The identifier of the server you want to view             |
| username                                     | String | The username on the server whose back-up you want to view |

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer: `API token` |

{% tabs %}
{% tab title="200 The back-up" %}

```json
{
    "id": 1,
    "username": "username",
    "company_id": 1,
    "server_id": "server_identifier",
    "deleted_at": null,
    "created_at": "2024-03-04T18:19:56.000000Z",
    "updated_at": "2024-03-04T18:19:56.000000Z"
}
```

{% endtab %}

{% tab title="404: Not Found The back-up was not found" %}

```json
{
    "error": "Back-up not found"
}
```

{% endtab %}
{% endtabs %}

## Create a new back-up

<mark style="color:green;">`POST`</mark> `https://cronly.app/api/backups`

The source of this request must match the IP Address configured in the corresponding Server. This will either create an entire new back-up if there is no server with a matching username, or it will create a new snapshot of the back-up.

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer: `API token` |

#### Request Body

<table><thead><tr><th>Name</th><th width="235">Type</th><th>Description</th></tr></thead><tbody><tr><td>username<mark style="color:red;">*</mark></td><td>String</td><td>The username on the server whose back-up you want to view</td></tr><tr><td>server_id<mark style="color:red;">*</mark></td><td>String</td><td>The identifier of the server you want to view</td></tr><tr><td>file_content</td><td>String</td><td>The content of the crontab file</td></tr></tbody></table>

{% tabs %}
{% tab title="200 The newly created back-up" %}

```json
{
    "id": 1,
    "username": "username_on_server",
    "company_id": 1,
    "server_id": "server_identifier",
    "deleted_at": null,
    "created_at": "2024-03-04T18:19:56.000000Z",
    "updated_at": "2024-03-04T18:19:56.000000Z"
}
```

{% endtab %}
{% endtabs %}

## Delete a back-up

<mark style="color:red;">`DELETE`</mark> `https://cronly.app/api/backups/{server_id}/{username}`

#### Query Parameters

| Name                                         | Type   | Description                                                   |
| -------------------------------------------- | ------ | ------------------------------------------------------------- |
| server\_id<mark style="color:red;">\*</mark> | String | The identifier of the server whose back-up you want to delete |
| username                                     | String | The Username whose back-up you want to delete                 |

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer: `API token` |

{% tabs %}
{% tab title="204: No Content The back-up has been deleted successfully" %}

```json
{
    "success": "Back-up deleted"
}
```

{% endtab %}

{% tab title="404: Not Found The back-up was not found" %}

```json
{
    "error": "Back-up not found"
}
```

{% endtab %}
{% endtabs %}

##


# PHP

Use the PHP wrapper to access the Cronly API from your existing project.

## More information

This package was developed by a community member and can be found on [GitHub](https://github.com/CoenSchutte/cronly-wrapper) and [Packagist](https://packagist.org/packages/coenschutte/cronly-wrapper). Thanks a lot for maintaining it, [Coen Schutte](https://github.com/CoenSchutte)!

## Installation

In your existing project, just require the wrapper:

```bash
composer require coenschutte/cronly-wrapper
```

## Usage

```php
$cronly = new CoenSchutte\CronlyWrapper($apiKey);
echo $cronly->getAllMonitors();
```


# JavaScript

Use the JavaScript wrapper to access the Cronly API from your existing project.

## More information

This package was developed by a community member and can be found on [GitHub](https://github.com/CoenSchutte/npm-cronly-wrapper) and [npmjs](https://www.npmjs.com/package/@coenschutte/npm-cronly-wrapper). Thanks a lot for maintaining it, [Coen Schutte](https://github.com/CoenSchutte)!

## Installation

In your existing project, just require the wrapper:

```bash
npm i @coenschutte/npm-cronly-wrapper
```

## Usage

```php
const Cronly = require("@coenschutte/npm-cronly-wrapper");

var cronly = new Cronly(apikey);

cronly
  .getAllCertificates()
  .then(function (response) {
    console.log(response);
  })
  .catch(function (error) {
    console.log(error);
  });
```


# Wordpress WP-Cron

You can setup Cronly for Wordpress in minutes.

## What is WP-Cron?

WP-Cron is the build in implementation of cron jobs, within Wordpress. By default, this is only executed if an user visits' your website. But this is inefficient and unreliable, especially for high traffic websites.

## Disabling visitor execution of WP-Cron

You can disable the default visitor behaviour, by adding a constant inside wp-config.php:

```php
define( 'DISABLE_WP_CRON', true );
```

## Setting up a cron job task

### Settings tab

After disabling visitor execution, you can simply add a daily cron job task within Cronly.

Go to `Services` » `Cron jobs` » Click `Add` in the top right.&#x20;

Select a **Project**.

Pick a **name**, that described to monitor. This name is only used within Cronly and doesn't effect implementation.

Select the correct **time zone**. This is the time zone of the environment the cron job runs.

The **schedule** works in the same notation Unix based systems run their cron jobs. For a daily run, use: `0 0 * * *`

When adding a new cron job, the **monitor delay in minutes** is used to automatically configure a monitor for your cron job.

To skip execution of the task, if there is a task still running, set **overlap** to no.

Set a **time-out** in seconds. We currently support a maximum of 5 minutes (7200 seconds).

After adding the cron job task, a monitor is automatically synced with the same details. This monitor is not counted as a monitor for your subscription.

### Endpoint tab

Set the **endpoint** to <https://your-domain.com/wp-cron.php>

All other values can be kept to it's defaults.


