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

# Update Provider

> Update an external-login provider (PATCH — only supplied fields changed).

Supplying a new ``client_secret`` rotates the stored ciphertext.
Omitting it leaves the stored secret unchanged.

SSRF and trusted-issuer guards apply to generic kinds on update, same as
on create.



## OpenAPI

````yaml /openapi/mio-openapi.json patch /api/v1/teams/{team_id}/external-login-providers/{provider_id}
openapi: 3.1.0
info:
  description: >-
    Production API reference for Membership.io. Use the authored guides for
    workflows and the generated endpoint pages for exact parameters and schemas.
  title: Membership.io API
  version: 0.1.0
servers:
  - description: Production
    url: https://api.member.dev
security:
  - bearerAuth: []
paths:
  /api/v1/teams/{team_id}/external-login-providers/{provider_id}:
    patch:
      tags:
        - external-login-providers
      summary: Update Provider
      description: >-
        Update an external-login provider (PATCH — only supplied fields
        changed).


        Supplying a new ``client_secret`` rotates the stored ciphertext.

        Omitting it leaves the stored secret unchanged.


        SSRF and trusted-issuer guards apply to generic kinds on update, same as

        on create.
      operationId: >-
        external_login_providers.patch_external_login_providers_patch_teams_by_team_id_external_login_providers_by_provider_id
      parameters:
        - in: path
          name: team_id
          required: true
          schema:
            title: Team Id
            type: string
        - in: path
          name: provider_id
          required: true
          schema:
            title: Provider Id
            type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/ExternalProviderUpdate'
        required: true
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: >-
                  #/components/schemas/JsonApiResponse_ExternalProviderAttributes_
          description: Successful Response
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    ExternalProviderUpdate:
      additionalProperties: false
      description: >-
        Request body for patching an external-login provider.


        All fields are optional.  Use ``model.model_dump(exclude_unset=True)``

        in the service/router to apply only the supplied changes.


        ``client_secret`` is write-only and optional on update — omit to leave

        the stored ciphertext unchanged; supply a new value to rotate the
        secret.
      properties:
        authorize_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Authorize Url
        claim_map:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Claim Map
        client_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Client Id
        client_secret:
          anyOf:
            - type: string
            - type: 'null'
          title: Client Secret
          writeOnly: true
        discovery_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Discovery Url
        display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Name
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enabled
        issuer:
          anyOf:
            - type: string
            - type: 'null'
          title: Issuer
        jwks_uri:
          anyOf:
            - type: string
            - type: 'null'
          title: Jwks Uri
        scopes:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Scopes
        slug:
          anyOf:
            - type: string
            - type: 'null'
          title: Slug
        token_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Token Url
        userinfo_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Userinfo Url
      title: ExternalProviderUpdate
      type: object
    JsonApiResponse_ExternalProviderAttributes_:
      properties:
        data:
          $ref: '#/components/schemas/JsonApiResource_ExternalProviderAttributes_'
        included:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Included
        links:
          anyOf:
            - $ref: '#/components/schemas/JsonApiLinks'
            - type: 'null'
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
      required:
        - data
      title: JsonApiResponse[ExternalProviderAttributes]
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    JsonApiResource_ExternalProviderAttributes_:
      properties:
        attributes:
          $ref: '#/components/schemas/ExternalProviderAttributes'
        id:
          title: Id
          type: string
        links:
          anyOf:
            - $ref: '#/components/schemas/JsonApiLinks'
            - type: 'null'
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
        relationships:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Relationships
        type:
          title: Type
          type: string
      required:
        - id
        - type
        - attributes
      title: JsonApiResource[ExternalProviderAttributes]
      type: object
    JsonApiLinks:
      properties:
        self:
          anyOf:
            - type: string
            - type: 'null'
          title: Self
      title: JsonApiLinks
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    ExternalProviderAttributes:
      description: |-
        Read attributes for an ``external_login_providers`` resource.

        Used in all read responses (list, retrieve, create-201, patch-200).

        Deliberately EXCLUDES:
          - ``client_secret``              — write-only, never returned
          - ``client_secret_ciphertext``   — raw DB column, never serialised
          - ``client_secret_key_id``       — raw DB column, never serialised

        Includes:
          - ``client_secret_set: bool``  — True when a ciphertext is stored
          - ``callback_url: str``        — computed from settings at read time
      properties:
        authorize_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Authorize Url
        callback_url:
          title: Callback Url
          type: string
        claim_map:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Claim Map
        client_id:
          title: Client Id
          type: string
        client_secret_set:
          title: Client Secret Set
          type: boolean
        created_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Created At
        discovery_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Discovery Url
        display_name:
          title: Display Name
          type: string
        enabled:
          title: Enabled
          type: boolean
        hub_id:
          title: Hub Id
          type: string
        issuer:
          anyOf:
            - type: string
            - type: 'null'
          title: Issuer
        jwks_uri:
          anyOf:
            - type: string
            - type: 'null'
          title: Jwks Uri
        provider_kind:
          title: Provider Kind
          type: string
        scopes:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Scopes
        slug:
          title: Slug
          type: string
        team_id:
          title: Team Id
          type: string
        token_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Token Url
        updated_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Updated At
        userinfo_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Userinfo Url
      required:
        - provider_kind
        - slug
        - display_name
        - client_id
        - enabled
        - client_secret_set
        - callback_url
        - hub_id
        - team_id
      title: ExternalProviderAttributes
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT or mio_sk API key
      description: >-
        Send platform JWTs, contact JWTs, or team API keys as `Authorization:
        Bearer <token>`.
      scheme: bearer
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````