# Configure a whistleblowing channel

Source: https://ethicsportal.eu/developers/api/operations/updatechannelconfiguration/

PATCH

/organizations/{organization\_id}/whistleblower/portal/configuration.json

```
const url = 'https://secure.ethicsportal.eu/organizations/example/whistleblower/portal/configuration.json';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"portal":{"legal_name":"Example company","country_code":"FR","registration_number":"EXAMPLE-123","address":"1 Example Street","employee_range":"1-49","industry":"professional_scientific_services","website":null,"phone_number":null,"compliance_officer_id":"mAbCde","brand_color":"#123456","retention_months":60,"social_dialogue_consulted":false,"voice_recording_enabled":false,"email_intake_enabled":false}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```
curl --request PATCH \
  --url https://secure.ethicsportal.eu/organizations/example/whistleblower/portal/configuration.json \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{ "portal": { "legal_name": "Example company", "country_code": "FR", "registration_number": "EXAMPLE-123", "address": "1 Example Street", "employee_range": "1-49", "industry": "professional_scientific_services", "website": null, "phone_number": null, "compliance_officer_id": "mAbCde", "brand_color": "#123456", "retention_months": 60, "social_dialogue_consulted": false, "voice_recording_enabled": false, "email_intake_enabled": false } }'
```

* EthicsPortal application

Change the channel’s company details and settings. Requires channel:write. A personal token also needs its user to be a current administrator; an organisation token needs only the scope. Send application/json with a nonempty portal object; only supplied fields change. Unknown fields, query parameters and incorrect JSON types are rejected. Verified company details remain locked. Retention minimums, active administrator appointments and readiness rules are the same as the web application. active, verified, slug, billing and organisation flags cannot be set.

## Authorizations

* **[personalToken](https://ethicsportal.eu/developers/api/#personaltoken)**  
channel:write
* **[organizationToken](https://ethicsportal.eu/developers/api/#organizationtoken)**  
channel:write

## Parameters

### Path Parameters

**organization\_id**

required

string

Obfuscated organisation ID.

## Request Bodyrequired

application/json

object

**portal**

required

object

\>= 1 properties

**legal\_name**

string | null

<= 255 characters

**country\_code**

A supported ISO 3166-1 alpha-2 country code. Country-specific retention minimums apply.

string | null

**registration\_number**

string | null

**address**

string | null

**employee\_range**

string | null

Allowed values: 1-49 50-249 250+ ""

**industry**

string | null

Allowed values: agriculture\_forestry mining\_quarrying manufacturing energy\_utilities water\_waste\_management construction wholesale\_retail\_trade transportation\_logistics hospitality\_food\_services information\_communication financial\_services\_insurance real\_estate professional\_scientific\_services administrative\_support\_services public\_administration\_defence education healthcare\_social\_work arts\_entertainment\_recreation other ""

**website**

string | null

**phone\_number**

string | null

**compliance\_officer\_id**

An active administrator membership in this organisation, identified by its obfuscated ID. Creation returns your membership\_id. Null removes the appointment and can make the channel inactive. Raw database IDs are rejected.

string | null

**brand\_color**

string | null

**retention\_months**

Must also meet the selected country’s minimum. Defaults to 60 months. A country change and its retention adjustment are validated together.

integer

Allowed values: 12 24 36 48 60

**social\_dialogue\_consulted**

boolean

**voice\_recording\_enabled**

boolean

**email\_intake\_enabled**

boolean

### Example 

```
{
  "portal": {
    "legal_name": "Example company",
    "country_code": "FR",
    "registration_number": "EXAMPLE-123",
    "address": "1 Example Street",
    "employee_range": "1-49",
    "industry": "professional_scientific_services",
    "website": null,
    "phone_number": null,
    "compliance_officer_id": "mAbCde",
    "brand_color": "#123456",
    "retention_months": 60,
    "social_dialogue_consulted": false,
    "voice_recording_enabled": false,
    "email_intake_enabled": false
  }
}
```

## Responses

### 200

Validated settings saved. active is derived, never a promise of activation.

application/json

object

**legal\_name**

required

string | null

<= 255 characters

**country\_code**

required

A supported ISO 3166-1 alpha-2 country code. Country-specific retention minimums apply.

string | null

**registration\_number**

required

string | null

**address**

required

string | null

**employee\_range**

required

string | null

Allowed values: 1-49 50-249 250+ ""

**industry**

required

string | null

Allowed values: agriculture\_forestry mining\_quarrying manufacturing energy\_utilities water\_waste\_management construction wholesale\_retail\_trade transportation\_logistics hospitality\_food\_services information\_communication financial\_services\_insurance real\_estate professional\_scientific\_services administrative\_support\_services public\_administration\_defence education healthcare\_social\_work arts\_entertainment\_recreation other ""

**website**

required

string | null

**phone\_number**

required

string | null

**compliance\_officer\_id**

required

An active administrator membership in this organisation, identified by its obfuscated ID. Creation returns your membership\_id. Null removes the appointment and can make the channel inactive. Raw database IDs are rejected.

string | null

**brand\_color**

required

string | null

**retention\_months**

required

Must also meet the selected country’s minimum. Defaults to 60 months. A country change and its retention adjustment are validated together.

integer

Allowed values: 12 24 36 48 60

**social\_dialogue\_consulted**

required

boolean

**voice\_recording\_enabled**

required

boolean

**email\_intake\_enabled**

required

boolean

**id**

required

string

**active**

required

boolean

**verified**

required

boolean

**reporting\_form\_url**

required

string format: uri

**missing\_fields**

required

Array<string>

unique items

Allowed values: legal\_name country\_code registration\_number address employee\_range industry compliance\_officer\_id

#### Example 

```
{
  "legal_name": "Example company",
  "country_code": "FR",
  "registration_number": "EXAMPLE-123",
  "address": "1 Example Street",
  "employee_range": "1-49",
  "industry": "professional_scientific_services",
  "website": null,
  "phone_number": null,
  "compliance_officer_id": "mAbCde",
  "brand_color": "#123456",
  "retention_months": 60,
  "social_dialogue_consulted": false,
  "voice_recording_enabled": false,
  "email_intake_enabled": false,
  "id": "AB12CD34",
  "active": false,
  "verified": false,
  "reporting_form_url": "https://secure.ethicsportal.eu/p/AB12CD34",
  "missing_fields": []
}
```

### 400

Invalid JSON body, attributes or types.

application/json

object

**error**

required

object

**code**

required

string

Allowed values: invalid\_token forbidden insufficient\_scope not\_found invalid\_request agreement\_required rate\_limited idempotency\_key\_reused idempotency\_key\_in\_progress not\_retryable channel\_inactive invitation\_unavailable already\_subscribed no\_subscription

**feedback\_url**

required

Where to tell EthicsPortal what went wrong: POST product feedback here with the same token.

string format: uri

#### Example 

```
{
  "error": {
    "code": "invalid_request",
    "feedback_url": "https://secure.ethicsportal.eu/me/feedback.json"
  }
}
```

### 401

Missing or unusable token.

application/json

object

**error**

required

object

**code**

required

string

Allowed values: invalid\_token forbidden insufficient\_scope not\_found invalid\_request agreement\_required rate\_limited idempotency\_key\_reused idempotency\_key\_in\_progress not\_retryable channel\_inactive invitation\_unavailable already\_subscribed no\_subscription

**feedback\_url**

required

Where to tell EthicsPortal what went wrong: POST product feedback here with the same token.

string format: uri

#### Example 

```
{
  "error": {
    "code": "invalid_token",
    "feedback_url": "https://secure.ethicsportal.eu/me/feedback.json"
  }
}
```

### 403

Required scope missing, a personal token whose user is not a current administrator, or agreement\_required until browser acceptance.

application/json

object

**error**

required

object

**code**

required

string

Allowed values: invalid\_token forbidden insufficient\_scope not\_found invalid\_request agreement\_required rate\_limited idempotency\_key\_reused idempotency\_key\_in\_progress not\_retryable channel\_inactive invitation\_unavailable already\_subscribed no\_subscription

**feedback\_url**

required

Where to tell EthicsPortal what went wrong: POST product feedback here with the same token.

string format: uri

#### Example 

```
{
  "error": {
    "code": "forbidden",
    "feedback_url": "https://secure.ethicsportal.eu/me/feedback.json"
  }
}
```

### 404

Resource inaccessible, or API access suspended.

application/json

object

**error**

required

object

**code**

required

string

Allowed values: invalid\_token forbidden insufficient\_scope not\_found invalid\_request agreement\_required rate\_limited idempotency\_key\_reused idempotency\_key\_in\_progress not\_retryable channel\_inactive invitation\_unavailable already\_subscribed no\_subscription

**feedback\_url**

required

Where to tell EthicsPortal what went wrong: POST product feedback here with the same token.

string format: uri

#### Example 

```
{
  "error": {
    "code": "not_found",
    "feedback_url": "https://secure.ethicsportal.eu/me/feedback.json"
  }
}
```

### 422

Model validation failed. Fields are attribute names only; values and personal data are never reflected.

application/json

object

**error**

required

object

**code**

required

Allowed value: validation\_failed

**fields**

required

Array<string>

\>= 1 items unique items

**feedback\_url**

required

Where to tell EthicsPortal what went wrong: POST product feedback here with the same token.

string format: uri

#### Example 

```
{
  "error": {
    "code": "validation_failed",
    "fields": [
      "retention_months"
    ],
    "feedback_url": "https://secure.ethicsportal.eu/me/feedback.json"
  }
}
```

### 429

Rate limit exceeded. Retry-After: 60.

application/json

object

**error**

required

object

**code**

required

string

Allowed values: invalid\_token forbidden insufficient\_scope not\_found invalid\_request agreement\_required rate\_limited idempotency\_key\_reused idempotency\_key\_in\_progress not\_retryable channel\_inactive invitation\_unavailable already\_subscribed no\_subscription

**feedback\_url**

required

Where to tell EthicsPortal what went wrong: POST product feedback here with the same token.

string format: uri

#### Example 

```
{
  "error": {
    "code": "rate_limited",
    "feedback_url": "https://secure.ethicsportal.eu/me/feedback.json"
  }
}
```
