# Project webhooks

Receive webhook notifications whenever projects are created, updated, archived, unarchived, or deleted. Project webhooks can be used to trigger actions in your application whenever a project is changed, for example to provision resources for a new project or to keep an external project management system up to date.

## Events[​](#events "Direct link to Events")

| Event                | Description                                          |
| -------------------- | ---------------------------------------------------- |
| `project.created`    | Occurs whenever a new project is created.            |
| `project.updated`    | Occurs whenever a project's information has changed. |
| `project.archived`   | Occurs whenever a project is archived.               |
| `project.unarchived` | Occurs whenever a project is re-activated.           |
| `project.deleted`    | Occurs whenever a project is deleted.                |

## Example Payload[​](#example-payload "Direct link to Example Payload")

We return JSON-formatted content with the following structure.

| Name    | Example content                                                                             | Description                                                |
| ------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| `id`    | `882a3ceb-319a-4cca-a6e7-65ead0760726`                                                      | UUID of the trigger resource                               |
| `type`  | `project`                                                                                   | Resource type                                              |
| `event` | `project.updated`                                                                           | Event that triggered the webhook, lowercase, dot-separated |
| `url`   | `https://app.freispace.com/planning/projects/882a3ceb-319a-4cca-a6e7-65ead0760726/overview` | URL to the updated resource                                |
| `data`  | `{}`                                                                                        | The project's information                                  |

```
{

    "id": "882a3ceb-319a-4cca-a6e7-65ead0760726",

    "type": "project",

    "event": "project.updated",

    "url": "https://app.freispace.com/planning/projects/882a3ceb-319a-4cca-a6e7-65ead0760726/overview",

    "data": {

        "id": "882a3ceb-319a-4cca-a6e7-65ead0760726",

        "name": "Climate",

        "number": "P156",

        "byline": "ZDFinfo, 2x43'",

        "description": null, // (1)!

        "start": "2024-05-30",

        "end": "2024-10-30",

        "color": "#0062ff",

        "clients": [

            {

                "id": "9d4c9eda-c600-4d67-9796-43a16f001eaa",

                "name": "Production Company",

                "byline": null,

                "number": "C001",

            }

        ],

        "status": "active", // (2)!

        "children": [

            {

                "id": "9d526060-599b-4e29-b9b6-cc5bcc20dacb",

                "name": "E01",

                "number": "P156-1",

                "status": "active", // (2)!

            }

        ],

        "parent" : null,

        "custom_fields": [

            {

                "title": "Material",

                "value": "DNxHD"

            }

        ],

        "global_fields": [

            {

                "id": "e62b7570-a3ce-4480-96e5-39447cb77006",

                "title": "Deadline",

                "description": null,

                "value": "2023-01-01",

            }

        ]

    }

}
```

1. Description may be `null` or contain HTML.
2. `active` or `archive`
