# Properties

A property is a configuration that will be used for your reports. It contains all the information regarding the website to scan, the number of pages to visit, the country from where the scan will run, etc...

## Create a Property

You can create a property by calling the [POST /reports/compliances/properties](https://didomi.stoplight.io/docs/didomi-api/4ac4424b6d533-create-one-or-many-properties) endpoint.

Please find an example of the body of a property

```json
{
    "website": "https://didomi.io",
    "name": "My Didomi Website",
    "schedule": null, // One time scan
    "pages_count": 10,
    "country": "fr",
    "enabled": true,
    "filters": [],
    "disable_anti_bot": false,
    "login": {
        "enabled": false
    },
    "scenarios": [
        {
            "enabled": true,
            "type": "accept_all",
            "scenario_actions": [
                {
                    "type": "accept",
                    "order": 0
                }
            ]
        },
        {
            "enabled": true,
            "type": "refuse_all",
            "scenario_actions": [
                {
                    "type": "refuse",
                    "order": 0
                }
            ]
        },
        {
            "enabled": true,
            "type": "no_actions",
            "scenario_actions": []
        }
    ]
}
```

For more information, please check the API documentation.

{% hint style="info" %}
When possible, we recommend using our Console to create properties as it provides all features and is easier to use.
{% endhint %}

## Retrieve a Property

You can retrieve a property by calling the [GET /reports/compliances/](https://didomi.stoplight.io/docs/didomi-api/6db43800354cb-retrieve-a-list-of-properties)[properties](https://didomi.stoplight.io/docs/didomi-api/6db43800354cb-retrieve-a-list-of-properties)[/{id}](https://didomi.stoplight.io/docs/didomi-api/c2387a41031db-retrieve-a-property) endpoint.

As mentioned in the API documentation, you can get the summary of its latest reports by adding `with[]=latest_reports` as query params.

```
GET /reports/compliances/properties/{{id}}?organization_id={{organization_id}}&with[]=latest_reports
```

## Retrieve Properties

You can retrieve a list of properties by calling the [GET /reports/compliances/](https://didomi.stoplight.io/docs/didomi-api/6db43800354cb-retrieve-a-list-of-properties)[properties](https://didomi.stoplight.io/docs/didomi-api/6db43800354cb-retrieve-a-list-of-properties) endpoint.

As mentioned in the API documentation, properties can be filtered in many ways. For example, if you want to retrieve all properties created in `January 2025`.

```
GET /reports/compliances/properties?organization_id={{organization_id}}&created_at[$gte]=2025-01-01&created_at[$lte]=2025-01-31
```

## Edit a Property

To edit a property, you will need the property ID. Edit a property by calling the [PATCH /reports/compliances/properties](https://didomi.stoplight.io/docs/didomi-api/5777630c243d8-patch-a-property) endpoint.

Every time a property is edited, a new report will run. You can omit this by setting `skip_report` to `true` in your query param.

## Delete a Property

To delete a property, you will need the property ID. Delete a property by calling the [DELETE /reports/compliances/properties](https://didomi.stoplight.io/docs/didomi-api/2e41b27383435-delete-a-property) endpoint.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.didomi.io/api-and-platform/monitoring-and-reporting/properties.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
