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

# Update Integration Auth

> Partially updates an existing auth record by authId. Only fields provided in the request body are updated — omitted fields remain unchanged. Returns the updated auth record.



## OpenAPI

````yaml patch /v1/integrations/{integrationId}/auth/{authId}
openapi: 3.0.1
info:
  title: SigmaMind APIs
  description: OpenAPI documentation SigmaMind Agent Builder APIs
  version: '1.0'
servers:
  - url: https://api.sigmamind.ai
    description: SigmaMind AI Agent Builder APIs
security:
  - apiKeyAuth: []
tags:
  - name: Chats
    description: >-
      Endpoints for creating and managing text-based chat sessions with an
      agent. A session is started by specifying an agent and an opening message.
      Returns a chatId used in all subsequent get, update, completion, and
      end-session calls.
  - name: Calls
    description: >-
      Endpoints for creating and managing outbound phone calls. A call is
      initiated by specifying an agent, caller number, and destination number —
      dynamic variables can be included to personalise the agent's behaviour.
      Returns a callId used in all subsequent get and delete operations.
  - name: Phone Numbers
    description: >-
      Endpoints for managing phone numbers used in outbound and inbound calls.
      Supports purchasing a new number through SigmaMind or importing an
      existing number via SIP trunking (BYO). Each number can be assigned
      separate inbound and outbound agents.
  - name: Campaigns
    description: >-
      Endpoints for creating and managing outbound call campaigns. A campaign
      dials a CSV-uploaded contact list using a selected agent and caller
      number, with support for immediate or scheduled launch. Returns a
      campaignId used in all subsequent get, update, and delete operations.
  - name: Agents
    description: >-
      Endpoints for creating and managing single prompt agents. An agent is
      configured with a system prompt, voice settings, and optional tools.
      Returns an agentId used in all subsequent update, call, and simulation
      operations.
  - name: Integrations
    description: >-
      Endpoints for creating and managing third-party integrations (e.g.
      Shopify, Cal.com). An integration links your account to an external
      service and acts as the parent resource for auth credentials and API
      tools. Returns an integrationId used in all subsequent auth and tool
      operations.
  - name: Integration Auth
    description: >-
      Endpoints for managing authentication credentials for a third-party
      integration. Supports API Key, Basic, and Bearer token credential types —
      scoped to an integration and injected automatically by tools when
      executing. Returns an authId used in all subsequent get, update, and
      delete operations.
  - name: Integration Tools
    description: >-
      Endpoints for creating and managing API tools backed by a third-party
      integration. Each tool defines an HTTP endpoint, method, and parameter
      schema — scoped to an integration and using its stored auth credentials
      when executing. Returns a toolId used in all subsequent get, update,
      delete, and execute operations.
  - name: Webhooks
    description: >-
      Endpoints for registering and managing webhooks. A webhook delivers
      real-time event notifications via HTTP POST when selected events occur on
      a specific agent — each webhook is scoped to one agent and one or more
      event types. Payloads are signed with an HMAC secret — verify the
      signature on your server to confirm authenticity.
  - name: Test Cases
    description: >-
      Endpoints for creating and managing simulation test cases for an agent. A
      test case defines a conversation scenario — including user persona, goals,
      and expected behaviour — used to generate a synthetic conversation with
      the agent. Returns a testCaseId used in all subsequent get, update,
      delete, and batch-run operations.
  - name: Batch Runs
    description: >-
      Endpoints for creating and managing batch runs of simulation test cases. A
      batch run executes multiple test cases in parallel against a selected
      agent and aggregates the results for review. Returns a batchId used in all
      subsequent get and list test-run operations.
  - name: Test Runs
    description: >-
      Endpoints for retrieving test run results within a batch. Each test run
      represents a single test case execution within a batch run, identified by
      a jobId. Use batchId and agentId to scope results to the correct batch.
  - name: API Keys
    description: >-
      Endpoints for creating and managing API keys used to authenticate public
      API requests. Each key must be included in the X-API-Key request header.
      Returns a keyId used in all subsequent get, revoke, and delete operations.
  - name: QA Rules
    description: >-
      Endpoints for creating and managing quality assurance rules applied to
      agent conversations. A QA rule defines evaluation criteria used to
      automatically assess conversation quality. Returns a qaRuleId used in all
      subsequent get, update,  and delete operations.
  - name: QA Issues
    description: >-
      Endpoints for retrieving and managing quality assurance issues flagged
      across agent conversations. A QA issue is created with status 'Fail' when
      a conversation violates one or more QA rules — capturing the offending
      rule reference. It is created with status 'Success' when the conversation
      passes the evaluation criteria of QA rule(s). Returns a qaIssueId used in
      all subsequent get operations.
paths:
  /v1/integrations/{integrationId}/auth/{authId}:
    patch:
      tags:
        - Integration Auth
      summary: Update Integration Auth
      description: >-
        Partially updates an existing auth record by authId. Only fields
        provided in the request body are updated — omitted fields remain
        unchanged. Returns the updated auth record.
      operationId: updateAuth
      parameters:
        - name: integrationId
          in: path
          description: Unique identifier for the integration
          required: true
          schema:
            type: string
          example: intg_AuUKK371Spr5
        - name: authId
          in: path
          description: Unique identifier for the auth record
          required: true
          schema:
            type: string
          example: auth_P3kNz7Yv1Qm9
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateIntegrationAuthRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntegrationAuthResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                default:
                  value:
                    error: Bad Request
                    message: Invalid request parameters
                    path: /v1/integrations/{integrationId}/auth
                    status: 400
                    timestamp: '2026-05-05T10:06:45.984Z'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                default:
                  value:
                    error: Unauthorized
                    message: X-API-Key is missing or invalid
                    path: /v1/integrations/{integrationId}/auth
                    status: 401
                    timestamp: '2026-05-05T10:06:45.984Z'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                default:
                  value:
                    error: Forbidden
                    message: Access denied for this resource
                    path: /v1/integrations/{integrationId}/auth
                    status: 403
                    timestamp: '2026-05-05T10:06:45.984Z'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                default:
                  value:
                    error: Not Found
                    message: The requested resource was not found
                    path: /v1/integrations/{integrationId}/auth
                    status: 404
                    timestamp: '2026-05-05T10:06:45.984Z'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                default:
                  value:
                    error: Internal Server Error
                    message: Unexpected server error
                    path: /v1/integrations/{integrationId}/auth
                    status: 500
                    timestamp: '2026-05-05T10:06:45.984Z'
components:
  schemas:
    UpdateIntegrationAuthRequest:
      type: object
      properties:
        token:
          type: string
          description: >-
            Replacement bearer token. Applicable only when the auth record was
            originally created with authType BEARER_TOKEN. Overwrites the
            previously stored token. The system will use this new value on all
            subsequent outbound requests. Omit this field to leave the existing
            token unchanged.
          example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...updated
        username:
          maxLength: 256
          minLength: 0
          type: string
          description: >-
            Replacement username for Basic authentication. Applicable only when
            the auth record was originally created with authType BASIC_AUTH. Can
            be updated independently — omitting this field leaves the existing
            username unchanged.
          example: new_api_user@example.com
        password:
          maxLength: 512
          minLength: 0
          type: string
          description: >-
            Replacement password for Basic authentication. Applicable only when
            the auth record was originally created with authType BASIC_AUTH. Can
            be updated independently — omitting this field leaves the existing
            password unchanged.
          example: newS3cretP@ssword
        apiKey:
          $ref: '#/components/schemas/ApiKeyRequest'
        headers:
          type: array
          description: >-
            Replacement list of static headers attached to every outbound
            request for this auth record. Pass a non-empty list to overwrite all
            existing headers with the new set. Pass an empty list [] to remove
            all headers. Omit this field entirely to leave existing headers
            unchanged.
          items:
            $ref: '#/components/schemas/HeaderEntry'
      description: >-
        Request body to partially update an existing authentication credential
        record. Only fields included in the request body are updated — omitted
        fields are left unchanged. The authType set at creation time is
        permanent and cannot be changed via this endpoint. Provide only the
        credential fields that match the original authType.
    IntegrationAuthResponse:
      type: object
      properties:
        authId:
          type: string
          description: Unique identifier for the auth record
          example: auth_P3kNz7Yv1Qm9
        integrationId:
          type: string
          description: Unique identifier of the parent integration
          example: intg_AuUKK371Spr5
        authType:
          type: string
          description: >-
            The authentication strategy this credential set uses. Determines
            which credential fields are required: API_KEY — provide the apiKey
            object (key name, secret value, and position). BEARER_TOKEN —
            provide the token field. BASIC_AUTH — provide username and password
            fields. NO_AUTH — no credential fields required.
          example: API_KEY
          enum:
            - NO_AUTH
            - BASIC_AUTH
            - BEARER_TOKEN
            - API_KEY
        headers:
          type: object
          description: >-
            Optional list of static HTTP headers attached to every outbound
            request under this auth. Applied on top of any headers defined at
            the integration or tool level. Useful for fixed metadata headers
            required by the third-party API.
          example:
            - key: X-Request-Source
              value: sigmamind
        createdAt:
          type: string
          description: Timestamp when the record was created
          format: date-time
        updatedAt:
          type: string
          description: Timestamp when the record was last updated
          format: date-time
    Error:
      type: object
      properties:
        timestamp:
          type: string
          description: Error timestamp in ISO format
          format: date-time
        status:
          type: integer
          description: HTTP status code
          example: 400
        error:
          type: string
          description: Error type or HTTP status message
          example: Bad Request
        message:
          type: string
          description: Detailed error message
          example: Email is required
        path:
          type: string
          description: Request path where error occurred
          example: /v1/users
        validationErrors:
          type: object
          description: Field validation errors (if any)
          example: |-
            {
              "email": "Email is required",
              "name": "Name is too short"
            }
      description: Standard error response
    ApiKeyRequest:
      required:
        - key
        - position
        - value
      type: object
      properties:
        key:
          maxLength: 128
          minLength: 0
          type: string
          description: >-
            Name of the header or query parameter that carries the API key. Must
            match what the target API expects.
          example: X-Shopify-Access-Token
        value:
          type: string
          description: The API key or secret value sent with each request.
          example: shpat_abc123xyz456
        position:
          type: string
          description: >-
            Where the API key should be added in the request. header → sent as
            an HTTP header (most common). query → appended to the request URL.
          example: header
          default: header
          enum:
            - header
            - query
      description: >-
        Defines how an API key is attached to outgoing requests. Use this when
        the API requires a key in headers or query parameters.
      example:
        key: X-API-KEY
        value: <secret>
        position: header
    HeaderEntry:
      required:
        - key
        - value
      type: object
      properties:
        key:
          maxLength: 256
          minLength: 0
          type: string
          description: HTTP header name exactly as expected by the target API.
          example: Content-Type
        value:
          maxLength: 1024
          minLength: 0
          type: string
          description: >-
            Static value for this header sent with every request. Must be a
            fixed string — use queryParams or bodyParams for dynamic values.
          example: application/json
      description: >-
        A single static HTTP header included in every request made by this tool.
        Tool-level headers are merged with integration-level and auth-level
        headers; tool-level values take precedence on key conflicts.
      example:
        - key: Content-Type
          value: application/json
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      description: >-
        Authenticate every request by passing your API key in the `X-API-Key`
        header. To get your key, go to Dashboard → API Keys and create or copy
        your Production API key.
      name: X-API-Key
      in: header

````