# Rename the organisation

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

PATCH

/organizations/{organization\_id}/profile.json

```
const url = 'https://secure.ethicsportal.eu/organizations/example/profile.json';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"organization":{"name":"Example organisation"}}'
};

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/profile.json \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{ "organization": { "name": "Example organisation" } }'
```

* EthicsPortal application

Change the organisation’s name. A personal token also needs its user to be a current administrator of the organisation.

## Authorizations

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

## Parameters

### Path Parameters

**organization\_id**

required

string

Obfuscated organisation ID returned by identity.

## Request Bodyrequired

application/json

object

**organization**

required

object

**name**

required

string

\>= 1 characters

### Example 

```
{
  "organization": {
    "name": "Example organisation"
  }
}
```

## Responses

### 200

The renamed organisation.

application/json

object

**id**

required

string

**name**

required

string

#### Example 

```
{
  "id": "gHiJkl",
  "name": "Example organisation"
}
```

### 400

Invalid query, body or cursor

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, unknown, expired or revoked 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

The token lacks the required scope (WWW-Authenticate names it), the user’s role does not allow the action, or an agreement must be accepted in the web application

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": "insufficient_scope",
    "feedback_url": "https://secure.ethicsportal.eu/me/feedback.json"
  }
}
```

### 404

Organisation or resource missing or 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

Validation failed; fields are named, values are not echoed

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": [
      "name"
    ],
    "feedback_url": "https://secure.ethicsportal.eu/me/feedback.json"
  }
}
```

### 429

Rate limited; retry after the Retry-After interval

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"
  }
}
```
