# Update an Organization

##

PUT /api/0/organizations/{organization\_id\_or\_slug}/

Update various attributes and configurable settings for the given organization.

### Path Parameters

* `organization_id_or_slug`*&#x20;<!-- -->(<!-- -->string<!-- -->)*

  REQUIRED

  The ID or slug of the organization the resource belongs to.

### Body Parameters

* `slug`*&#x20;<!-- -->(<!-- -->string<!-- -->)*

  The new slug for the organization, which needs to be unique.

* `name`*&#x20;<!-- -->(<!-- -->string<!-- -->)*

  The new name for the organization.

* `isEarlyAdopter`*&#x20;<!-- -->(<!-- -->boolean<!-- -->)*

  Specify `true` to opt-in to new features before they're released to the public.

* `hideAiFeatures`*&#x20;<!-- -->(<!-- -->boolean<!-- -->)*

  Specify `true` to hide AI features from the organization.

* `codecovAccess`*&#x20;<!-- -->(<!-- -->boolean<!-- -->)*

  Specify `true` to enable Code Coverage Insights. This feature is only available for organizations on the Team plan and above. Learn more about Codecov [here](/product/codecov/).

* `defaultRole`*&#x20;<!-- -->(<!-- -->string<!-- -->)*

  The default role new members will receive.

  * `member` - Member
  * `admin` - Admin
  * `manager` - Manager
  * `owner` - Owner

* `openMembership`*&#x20;<!-- -->(<!-- -->boolean<!-- -->)*

  Specify `true` to allow organization members to freely join any team.

* `eventsMemberAdmin`*&#x20;<!-- -->(<!-- -->boolean<!-- -->)*

  Specify `true` to allow members to delete events (including the delete & discard action) by granting them the `event:admin` scope.

* `alertsMemberWrite`*&#x20;<!-- -->(<!-- -->boolean<!-- -->)*

  Specify `true` to allow members to create, edit, and delete alert rules by granting them the `alerts:write` scope.

* `attachmentsRole`*&#x20;<!-- -->(<!-- -->string<!-- -->)*

  The role required to download event attachments, such as native crash reports or log files.

  * `member` - Member
  * `admin` - Admin
  * `manager` - Manager
  * `owner` - Owner

* `debugFilesRole`*&#x20;<!-- -->(<!-- -->string<!-- -->)*

  The role required to download debug information files, ProGuard mappings and source maps.

  * `member` - Member
  * `admin` - Admin
  * `manager` - Manager
  * `owner` - Owner

* `avatarType`*&#x20;<!-- -->(<!-- -->string<!-- -->)*

  The type of display picture for the organization.

  * `letter_avatar` - Use initials
  * `upload` - Upload an image

* `avatar`*&#x20;<!-- -->(<!-- -->string<!-- -->)*

  The image to upload as the organization avatar, in base64. Required if `avatarType` is `upload`.

* `require2FA`*&#x20;<!-- -->(<!-- -->boolean<!-- -->)*

  Specify `true` to require and enforce two-factor authentication for all members.

* `allowSharedIssues`*&#x20;<!-- -->(<!-- -->boolean<!-- -->)*

  Specify `true` to allow sharing of limited details on issues to anonymous users.

* `enhancedPrivacy`*&#x20;<!-- -->(<!-- -->boolean<!-- -->)*

  Specify `true` to enable enhanced privacy controls to limit personally identifiable information (PII) as well as source code in things like notifications.

* `scrapeJavaScript`*&#x20;<!-- -->(<!-- -->boolean<!-- -->)*

  Specify `true` to allow Sentry to scrape missing JavaScript source context when possible.

* `storeCrashReports`*&#x20;<!-- -->(<!-- -->integer<!-- -->)*

  How many native crash reports (such as Minidumps for improved processing and download in issue details) to store per issue.

  * `0` - Disabled
  * `1` - 1 per issue
  * `5` - 5 per issue
  * `10` - 10 per issue
  * `20` - 20 per issue
  * `50` - 50 per issue
  * `100` - 100 per issue
  * `-1` - Unlimited

* `allowJoinRequests`*&#x20;<!-- -->(<!-- -->boolean<!-- -->)*

  Specify `true` to allow users to request to join your organization.

* `dataScrubber`*&#x20;<!-- -->(<!-- -->boolean<!-- -->)*

  Specify `true` to require server-side data scrubbing for all projects.

* `dataScrubberDefaults`*&#x20;<!-- -->(<!-- -->boolean<!-- -->)*

  Specify `true` to apply the default scrubbers to prevent things like passwords and credit cards from being stored for all projects.

* `sensitiveFields`*&#x20;<!-- -->(<!-- -->array<!-- -->(string)<!-- -->)*

  A list of additional global field names to match against when scrubbing data for all projects.

* `safeFields`*&#x20;<!-- -->(<!-- -->array<!-- -->(string)<!-- -->)*

  A list of global field names which data scrubbers should ignore.

* `scrubIPAddresses`*&#x20;<!-- -->(<!-- -->boolean<!-- -->)*

  Specify `true` to prevent IP addresses from being stored for new events on all projects.

* `relayPiiConfig`*&#x20;<!-- -->(<!-- -->string<!-- -->)*

  Advanced data scrubbing rules that can be configured for each project as a JSON string. The new rules will only apply to new incoming events. For more details on advanced data scrubbing, see our [full documentation](/security-legal-pii/scrubbing/advanced-datascrubbing/).

  > Warning: Calling this endpoint with this field fully overwrites the advanced data scrubbing rules.

  Below is an example of a payload for a set of advanced data scrubbing rules for masking credit card numbers from the log message (equivalent to `[Mask] [Credit card numbers] from [$message]` in the Sentry app) and removing a specific key called `foo` (equivalent to `[Remove] [Anything] from [extra.foo]` in the Sentry app):

  ```json
  {
      relayPiiConfig: "{\"rules":{\"0\":{\"type\":\"creditcard\",\"redaction\":{\"method\":\"mask\"}},\"1\":{\"type\":\"anything\",\"redaction\":{\"method\":\"remove\"}}},\"applications\":{\"$message\":[\"0\"],\"extra.foo\":[\"1\"]}}"
  }
  ```

* `trustedRelays`*&#x20;<!-- -->(<!-- -->array<!-- -->(object)<!-- -->)*

  A list of local Relays (the name, public key, and description as a JSON) registered for the organization. This feature is only available for organizations on the Business and Enterprise plans. Read more about Relay [here](/product/relay/).

  Below is an example of a list containing a single local Relay registered for the organization:

  ```json
  {
    trustedRelays: [
        {
            name: "my-relay",
            publicKey: "eiwr9fdruw4erfh892qy4493reyf89ur34wefd90h",
            description: "Configuration for my-relay."
        }
    ]
  }
  ```

* `githubPRBot`*&#x20;<!-- -->(<!-- -->boolean<!-- -->)*

  Specify `true` to allow Sentry to comment on recent pull requests suspected of causing issues. Requires a GitHub integration.

* `githubOpenPRBot`*&#x20;<!-- -->(<!-- -->boolean<!-- -->)*

  Specify `true` to allow Sentry to comment on open pull requests to show recent error issues for the code being changed. Requires a GitHub integration.

* `githubNudgeInvite`*&#x20;<!-- -->(<!-- -->boolean<!-- -->)*

  Specify `true` to allow Sentry to detect users committing to your GitHub repositories that are not part of your Sentry organization. Requires a GitHub integration.

* `gitlabPRBot`*&#x20;<!-- -->(<!-- -->boolean<!-- -->)*

  Specify `true` to allow Sentry to comment on recent pull requests suspected of causing issues. Requires a GitLab integration.

* `gitlabOpenPRBot`*&#x20;<!-- -->(<!-- -->boolean<!-- -->)*

  Specify `true` to allow Sentry to comment on open pull requests to show recent error issues for the code being changed. Requires a GitLab integration.

* `issueAlertsThreadFlag`*&#x20;<!-- -->(<!-- -->boolean<!-- -->)*

  Specify `true` to allow the Sentry Slack integration to post replies in threads for an Issue Alert notification. Requires a Slack integration.

* `metricAlertsThreadFlag`*&#x20;<!-- -->(<!-- -->boolean<!-- -->)*

  Specify `true` to allow the Sentry Slack integration to post replies in threads for a Metric Alert notification. Requires a Slack integration.

* `cancelDeletion`*&#x20;<!-- -->(<!-- -->boolean<!-- -->)*

  Specify `true` to restore an organization that is pending deletion.

### Scopes

You need to [authenticate via bearer auth token.](/api/auth/)

`<auth_token>` requires one of the following scopes:

* `org:admin`
* `org:write`

```
curl https://sentry.io/api/0/organizations/{organization_id_or_slug}/ \
 -H 'Authorization: Bearer <auth_token>' \
 -X PUT \
 -H 'Content-Type: application/json' \
 -d '{}'
```

RESPONSESCHEMA

```
Copied
{
  "id": "2",
  "slug": "the-interstellar-jurisdiction",
  "status": {
    "id": "active",
    "name": "active"
  },
  "name": "The Interstellar Jurisdiction",
  "dateCreated": "2018-11-06T21:19:55.101Z",
  "isEarlyAdopter": false,
  "allowMemberInvite": true,
  "allowMemberProjectCreation": true,
  "allowSuperuserAccess": false,
  "require2FA": false,
  "requiresSso": false,
  "avatar": {
    "avatarType": "letter_avatar",
    "avatarUuid": null,
    "avatarUrl": null
  },
  "links": {
    "organizationUrl": "https://the-interstellar-jurisdiction.sentry.io",
    "regionUrl": "https://us.sentry.io"
  },
  "hasAuthProvider": false,
  "access": [
    "org:integrations",
    "member:admin",
    "alerts:write",
    "team:write",
    "team:admin",
    "project:write",
    "org:read",
    "member:write",
    "project:read",
    "member:read",
    "event:admin",
    "event:write",
    "org:write",
    "org:admin",
    "project:releases",
    "org:billing",
    "project:admin",
    "team:read",
    "event:read",
    "alerts:read"
  ],
  "onboardingTasks": [
    {
      "task": "create_project",
      "status": "complete",
      "user": {
        "id": "1",
        "name": "Stella R",
        "username": "stella@the-interstellar-jurisdiction.io",
        "email": "stella@the-interstellar-jurisdiction.io",
        "avatarUrl": "https://gravatar.com/avatar/wufeousrfdiohfwea8sfhawesdhiu",
        "isActive": true,
        "hasPasswordAuth": true,
        "isManaged": false,
        "dateJoined": "2019-06-05T17:43:29.556793Z",
        "lastLogin": "2019-06-25T13:53:44.524478Z",
        "has2fa": false,
        "lastActive": "2024-06-25T14:43:41.678886Z",
        "isSuperuser": true,
        "isStaff": false,
        "experiments": {},
        "emails": [
          {
            "id": "1",
            "email": "stella@the-interstellar-jurisdiction.io",
            "is_verified": false
          }
        ],
        "avatar": {
          "avatarType": "letter_avatar",
          "avatarUuid": null,
          "avatarUrl": null
        }
      },
      "completionSeen": null,
      "dateCompleted": "2019-06-17T18:56:25.856360Z",
      "data": {}
    }
  ],
  "experiments": {},
  "isDefault": false,
  "defaultRole": "member",
  "orgRoleList": [
    {
      "id": "billing",
      "name": "Billing",
      "desc": "Can manage subscription and billing details.",
      "scopes": [
        "org:billing"
      ],
      "allowed": true,
      "isAllowed": true,
      "isRetired": false,
      "is_global": false,
      "isGlobal": false,
      "isTeamRolesAllowed": false,
      "minimumTeamRole": "contributor"
    },
    {
      "id": "member",
      "name": "Member",
      "desc": "Members can view and act on events, as well as view most other data within the organization.",
      "scopes": [
        "team:read",
        "project:releases",
        "org:read",
        "event:read",
        "alerts:write",
        "member:read",
        "alerts:read",
        "event:admin",
        "project:read",
        "event:write"
      ],
      "allowed": true,
      "isAllowed": true,
      "isRetired": false,
      "is_global": false,
      "isGlobal": false,
      "isTeamRolesAllowed": true,
      "minimumTeamRole": "contributor"
    },
    {
      "id": "admin",
      "name": "Admin",
      "desc": "Admin privileges on any teams of which they're a member. They can create new teams and projects, as well as remove teams and projects on which they already hold membership (or all teams, if open membership is enabled). Additionally, they can manage memberships of teams that they are members of. They cannot invite members to the organization.",
      "scopes": [
        "team:admin",
        "org:integrations",
        "project:admin",
        "team:read",
        "project:releases",
        "org:read",
        "team:write",
        "event:read",
        "alerts:write",
        "member:read",
        "alerts:read",
        "event:admin",
        "project:read",
        "event:write",
        "project:write"
      ],
      "allowed": true,
      "isAllowed": true,
      "isRetired": true,
      "is_global": false,
      "isGlobal": false,
      "isTeamRolesAllowed": true,
      "minimumTeamRole": "admin"
    },
    {
      "id": "manager",
      "name": "Manager",
      "desc": "Gains admin access on all teams as well as the ability to add and remove members.",
      "scopes": [
        "team:admin",
        "org:integrations",
        "project:releases",
        "team:write",
        "member:read",
        "org:write",
        "project:write",
        "project:admin",
        "team:read",
        "org:read",
        "event:read",
        "member:write",
        "alerts:write",
        "alerts:read",
        "event:admin",
        "project:read",
        "event:write",
        "member:admin"
      ],
      "allowed": true,
      "isAllowed": true,
      "isRetired": false,
      "is_global": true,
      "isGlobal": true,
      "isTeamRolesAllowed": true,
      "minimumTeamRole": "admin"
    },
    {
      "id": "owner",
      "name": "Owner",
      "desc": "Unrestricted access to the organization, its data, and its settings. Can add, modify, and delete projects and members, as well as make billing and plan changes.",
      "scopes": [
        "team:admin",
        "org:integrations",
        "project:releases",
        "org:admin",
        "team:write",
        "member:read",
        "org:write",
        "project:write",
        "project:admin",
        "team:read",
        "org:read",
        "event:read",
        "member:write",
        "alerts:write",
        "org:billing",
        "alerts:read",
        "event:admin",
        "project:read",
        "event:write",
        "member:admin"
      ],
      "allowed": true,
      "isAllowed": true,
      "isRetired": false,
      "is_global": true,
      "isGlobal": true,
      "isTeamRolesAllowed": true,
      "minimumTeamRole": "admin"
    }
  ],
  "teamRoleList": [
    {
      "id": "contributor",
      "name": "Contributor",
      "desc": "Contributors can view and act on events, as well as view most other data within the team's projects.",
      "scopes": [
        "project:read",
        "project:releases",
        "member:read",
        "team:read",
        "event:read",
        "alerts:read",
        "event:write",
        "org:read"
      ],
      "allowed": false,
      "isAllowed": false,
      "isRetired": false,
      "isTeamRolesAllowed": true,
      "isMinimumRoleFor": null
    },
    {
      "id": "admin",
      "name": "Team Admin",
      "desc": "Admin privileges on the team. They can create and remove projects, and can manage the team's memberships.",
      "scopes": [
        "project:read",
        "project:releases",
        "member:read",
        "event:admin",
        "team:write",
        "project:admin",
        "team:read",
        "org:integrations",
        "alerts:write",
        "team:admin",
        "project:write",
        "event:read",
        "alerts:read",
        "event:write",
        "org:read"
      ],
      "allowed": false,
      "isAllowed": false,
      "isRetired": false,
      "isTeamRolesAllowed": true,
      "isMinimumRoleFor": "admin"
    }
  ],
  "openMembership": true,
  "allowSharedIssues": true,
  "enhancedPrivacy": false,
  "dataScrubber": false,
  "dataScrubberDefaults": false,
  "sensitiveFields": [],
  "safeFields": [],
  "storeCrashReports": 0,
  "attachmentsRole": "member",
  "debugFilesRole": "admin",
  "eventsMemberAdmin": true,
  "alertsMemberWrite": true,
  "scrubIPAddresses": false,
  "scrapeJavaScript": true,
  "allowJoinRequests": true,
  "relayPiiConfig": null,
  "codecovAccess": false,
  "hideAiFeatures": false,
  "githubPRBot": true,
  "githubOpenPRBot": true,
  "githubNudgeInvite": true,
  "gitlabPRBot": true,
  "gitlabOpenPRBot": true,
  "aggregatedDataConsent": false,
  "defaultAutofixAutomationTuning": "off",
  "defaultSeerScannerAutomation": true,
  "issueAlertsThreadFlag": true,
  "metricAlertsThreadFlag": true,
  "trustedRelays": [],
  "role": "owner",
  "orgRole": "owner",
  "pendingAccessRequests": 0,
  "isDynamicallySampled": false,
  "teams": [
    {
      "id": "1",
      "slug": "my-team",
      "name": "my-team",
      "dateCreated": "2019-06-17T18:56:19.729172Z",
      "isMember": true,
      "teamRole": "admin",
      "flags": {
        "idp:provisioned": false
      },
      "access": [
        "project:read",
        "project:releases",
        "member:read",
        "event:admin",
        "team:write",
        "project:admin",
        "team:read",
        "org:integrations",
        "alerts:write",
        "team:admin",
        "project:write",
        "event:read",
        "alerts:read",
        "event:write",
        "org:read"
      ],
      "hasAccess": true,
      "isPending": false,
      "memberCount": 1,
      "avatar": {
        "avatarType": "letter_avatar",
        "avatarUuid": null
      }
    }
  ],
  "projects": [
    {
      "team": {
        "id": "1",
        "slug": "my-team",
        "name": "my-team"
      },
      "teams": [
        {
          "id": "1",
          "slug": "my-team",
          "name": "my-team"
        }
      ],
      "id": "1",
      "name": "node",
      "slug": "node",
      "isBookmarked": false,
      "isMember": true,
      "access": [
        "project:read",
        "project:releases",
        "member:read",
        "event:admin",
        "team:write",
        "project:admin",
        "team:read",
        "org:integrations",
        "alerts:write",
        "team:admin",
        "project:write",
        "event:read",
        "alerts:read",
        "event:write",
        "org:read"
      ],
      "hasAccess": true,
      "dateCreated": "2019-06-17T18:56:25.777769Z",
      "environments": [],
      "eventProcessing": {
        "symbolicationDegraded": false
      },
      "features": [
        "releases"
      ],
      "firstEvent": null,
      "firstTransactionEvent": false,
      "hasSessions": false,
      "hasProfiles": false,
      "hasReplays": false,
      "hasFlags": false,
      "hasFeedbacks": false,
      "hasNewFeedbacks": false,
      "hasMonitors": false,
      "hasMinifiedStackTrace": false,
      "hasInsightsHttp": true,
      "hasInsightsDb": false,
      "hasInsightsAssets": true,
      "hasInsightsAppStart": false,
      "hasInsightsScreenLoad": false,
      "hasInsightsVitals": false,
      "hasInsightsCaches": false,
      "hasInsightsQueues": false,
      "hasInsightsLlmMonitoring": false,
      "platform": "node",
      "platforms": [],
      "latestRelease": null,
      "hasUserReports": false,
      "latestDeploys": null
    }
  ]
}
```
