> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baseten.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Update the current organization

> Updates organization-level API key settings. Only organization admins can call it.



## OpenAPI

````yaml patch /v1/organizations/me
openapi: 3.1.0
info:
  description: REST API for management of Baseten resources
  title: Baseten management API
  version: 1.0.0
servers:
  - url: https://api.baseten.co
security:
  - BearerAuth: []
paths:
  /v1/organizations/me:
    patch:
      summary: Updates the authenticated organization
      description: >-
        Updates settings of the organization of the user making the request.
        Only organization admins can call it. Omitted fields are unchanged.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOrganizationRequestV1'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationInfoV1'
      x-codeSamples:
        - lang: bash
          source: |-
            curl --request PATCH \
            --url https://api.baseten.co/v1/organizations/me \
            --header "Authorization: Bearer $BASETEN_API_KEY" \
            --data '{
              "allow_personal_api_keys": null,
              "allow_service_account_api_keys": null,
              "allow_team_admins_to_manage_roles": null
            }'
        - lang: python
          source: |-
            import requests
            import os
            API_KEY = os.environ.get("BASETEN_API_KEY", "<YOUR_API_KEY>")
            url = "https://api.baseten.co/v1/organizations/me"

            headers = {"Authorization": f"Bearer {API_KEY}"}

            response = requests.request(
                "PATCH",
                url,
                headers=headers,
                json={'allow_personal_api_keys': None, 'allow_service_account_api_keys': None, 'allow_team_admins_to_manage_roles': None}
            )

            print(response.text)
components:
  schemas:
    UpdateOrganizationRequestV1:
      additionalProperties: false
      description: >-
        Partial update of the caller's organization settings. Omitted fields are
        unchanged.
      properties:
        allow_personal_api_keys:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          description: >-
            Whether members can create new personal API keys. Null is not
            accepted.
          title: Allow Personal Api Keys
        allow_service_account_api_keys:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          description: >-
            Whether new team and organization API keys can be created. Null is
            not accepted.
          title: Allow Service Account Api Keys
        allow_team_admins_to_manage_roles:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          description: >-
            Whether team admins create, change, and delete their team's custom
            roles. Needs `access.role.write` for the organization. Null is not
            accepted.
          title: Allow Team Admins To Manage Roles
      title: UpdateOrganizationRequestV1
      type: object
    OrganizationInfoV1:
      description: The caller's organization.
      properties:
        org_id:
          description: Unique identifier for the organization
          title: Org Id
          type: string
        name:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: Display name of the organization
          title: Name
        created_at:
          description: Time the organization was created in ISO 8601 format
          format: date-time
          title: Created At
          type: string
        aws_assume_role:
          anyOf:
            - $ref: '#/components/schemas/AwsAssumeRoleV1'
            - type: 'null'
          default: null
          description: >-
            AWS AssumeRole trust-policy inputs; null while the method is not
            enabled for the organization
        allow_personal_api_keys:
          description: >-
            Whether members can create new personal API keys. Existing keys keep
            working.
          title: Allow Personal Api Keys
          type: boolean
        allow_service_account_api_keys:
          description: >-
            Whether new team and organization API keys can be created. Existing
            keys keep working.
          title: Allow Service Account Api Keys
          type: boolean
        allow_team_admins_to_manage_roles:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          description: >-
            Whether team admins create, change, and delete their team's custom
            roles. When false, only organization admins do, and team admins
            still assign roles in their team. Null when custom roles aren't
            available to your organization, or you can't read its roles.
          title: Allow Team Admins To Manage Roles
      required:
        - org_id
        - created_at
        - allow_personal_api_keys
        - allow_service_account_api_keys
      title: OrganizationInfoV1
      type: object
    AwsAssumeRoleV1:
      description: AWS AssumeRole trust-policy inputs for the organization.
      properties:
        baseten_role_arn:
          description: Baseten role ARN to allow in an IAM role's trust policy
          title: Baseten Role Arn
          type: string
        external_id:
          description: sts:ExternalId Baseten presents when assuming the role
          title: External Id
          type: string
      required:
        - baseten_role_arn
        - external_id
      title: AwsAssumeRoleV1
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Send `Authorization: Bearer <api_key>`. The legacy `Authorization:
        Api-Key <api_key>` scheme is also accepted.

````