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

# Update a Provider

> Use this endpoint to update a provider's configuration. Note that `category` and `type` cannot be changed after creation.



## OpenAPI

````yaml /en/openapi/v3-current/AM-identity.yaml patch /v1/providers/{id}
openapi: 3.1.0
info:
  title: Identity Plugin
  description: ''
  version: 2.4.4
servers:
  - url: https://identity.sandbox.lerian.net
security: []
tags:
  - name: Groups API
  - name: Applications API
  - name: Users API
  - name: MFA API
  - name: Providers API
  - name: Application Providers API
paths:
  /v1/providers/{id}:
    patch:
      tags:
        - Providers API
      summary: Update a Provider
      description: >-
        Use this endpoint to update a provider's configuration. Note that
        `category` and `type` cannot be changed after creation.
      parameters:
        - $ref: '#/components/parameters/ProviderIdPath'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProviderUpdateInput'
            example:
              name: sendgrid-primary-v2
              host: smtp.sendgrid.net
              port: 465
              disableSsl: true
      responses:
        '200':
          description: >-
            Indicates that the provider was successfully updated and the
            operation was completed as expected.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProviderResponse'
              example:
                id: 019c96a0-1a10-7abc-d1e2-8c9d0e1f2a3b
                name: sendgrid-primary-v2
                category: Email
                type: SendGrid
                host: smtp.sendgrid.net
                port: 465
                disableSsl: true
                createdAt: '2025-04-08T08:01:30.000Z'
          headers: {}
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
              examples:
                Error0003:
                  $ref: '#/components/examples/Error0003'
                Error0004:
                  $ref: '#/components/examples/Error0004'
                Error0007:
                  $ref: '#/components/examples/Error0007'
                Error0010:
                  $ref: '#/components/examples/Error0010'
                Error0011:
                  $ref: '#/components/examples/Error0011'
          headers: {}
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
              examples:
                Error1007:
                  $ref: '#/components/examples/Error1007'
          headers: {}
        '500':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
              examples:
                Error0006:
                  $ref: '#/components/examples/Error0006'
          headers: {}
      security:
        - bearer: []
components:
  parameters:
    ProviderIdPath:
      name: id
      in: path
      description: The unique identifier of the provider.
      required: true
      example: 019c96a0-1a10-7abc-d1e2-8c9d0e1f2a3b
      schema:
        type: string
  schemas:
    ProviderUpdateInput:
      description: >-
        Information used to update an existing provider. Note that `category`
        and `type` are immutable after creation.
      type: object
      properties:
        name:
          type: string
          description: Updated name for the provider.
        subType:
          type: string
          description: Updated provider sub-type.
        method:
          type: string
          description: Updated authentication or delivery method.
        clientId:
          type: string
          description: Updated client ID or API key.
        clientSecret:
          type: string
          description: Updated client secret or API secret.
        clientId2:
          type: string
          description: Updated secondary client ID.
        clientSecret2:
          type: string
          description: Updated secondary client secret.
        host:
          type: string
          description: Updated SMTP or API host address.
        port:
          type: integer
          description: Updated SMTP port.
        disableSsl:
          type: boolean
          description: Updated SSL/TLS setting.
        title:
          type: string
          description: Updated default email or SMS title/subject.
        content:
          type: string
          description: Updated default message content template.
        receiver:
          type: string
          description: Updated default receiver address for testing.
        regionId:
          type: string
          description: Updated cloud region ID.
        signName:
          type: string
          description: Updated SMS signature name.
        templateCode:
          type: string
          description: Updated SMS template code.
        appId:
          type: string
          description: Updated application ID.
        endpoint:
          type: string
          description: Updated provider API endpoint URL.
        intranetEndpoint:
          type: string
          description: Updated intranet endpoint for private network access.
        domain:
          type: string
          description: Updated provider domain.
    ProviderResponse:
      description: Information about a communication provider.
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the provider.
        name:
          type: string
          description: Name of the provider.
        category:
          type: string
          description: Provider category.
          enum:
            - Email
            - SMS
        type:
          type: string
          description: Provider implementation type.
          enum:
            - SendGrid
            - Twilio
        subType:
          type: string
          description: Provider sub-type, if applicable.
        method:
          type: string
          description: Authentication or delivery method.
        clientId:
          type: string
          description: Client ID or API key (secret is never returned).
        clientId2:
          type: string
          description: Secondary client ID, if applicable.
        host:
          type: string
          description: SMTP or API host address.
        port:
          type: integer
          description: SMTP port.
        disableSsl:
          type: boolean
          description: Indicates whether SSL/TLS is disabled.
        title:
          type: string
          description: Default email or SMS title/subject.
        content:
          type: string
          description: Default message content template.
        receiver:
          type: string
          description: Default receiver address for testing.
        regionId:
          type: string
          description: Cloud region ID (provider-specific).
        signName:
          type: string
          description: SMS signature name (provider-specific).
        templateCode:
          type: string
          description: SMS template code (provider-specific).
        appId:
          type: string
          description: Application ID (provider-specific).
        endpoint:
          type: string
          description: Provider API endpoint URL.
        intranetEndpoint:
          type: string
          description: Intranet endpoint for private network access.
        domain:
          type: string
          description: Provider domain.
        providerUrl:
          type: string
          description: Provider-specific URL.
        createdAt:
          type: string
          format: date-time
          description: Timestamp marking when the provider was created.
    ErrorMessage:
      description: The response message error.
      type: object
      properties:
        code:
          type: string
          description: A unique, stable identifier for the error.
        title:
          type: string
          description: A brief summary of the issue.
        message:
          type: string
          description: Detailed guidance for resolving the error.
  examples:
    Error0003:
      summary: Invalid Path Parameter
      value:
        code: IDE-0003
        title: Invalid Path Parameter
        message: One or more path parameters are in an incorrect format.
    Error0004:
      summary: Unexpected Fields in the Request
      value:
        code: IDE-0004
        title: Unexpected Fields in the Request
        message: >-
          The request body contains more fields than expected. Please send only
          the allowed fields.
    Error0007:
      summary: Bad Request
      value:
        code: IDE-0007
        title: Bad Request
        message: The server could not understand the request due to malformed syntax.
    Error0010:
      summary: Unmodifiable Field Error
      value:
        code: IDE-0010
        title: Unmodifiable Field Error
        message: Your request includes a field that cannot be modified.
    Error0011:
      summary: Immutable Field Error
      value:
        code: IDE-0011
        title: Immutable Field Error
        message: The field cannot be modified. Please remove it from your request.
    Error1007:
      summary: Provider Not Found
      value:
        code: IDE-1007
        title: Provider Not Found
        message: The provided provider ID does not exist in our records.
    Error0006:
      summary: Internal Server Error
      value:
        code: IDE-0006
        title: Internal Server Error
        message: The server encountered an unexpected error. Please try again later.
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: The authorization token in the 'Bearer <token>' format.

````