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

# Update Customer

> Partially update an existing customer identified by external_id. Only fields included in the request body are updated; omitted fields are left unchanged. If the customer has sync_platforms configured, changes are automatically synced to the external platform (e.g. Salesforce).



## OpenAPI

````yaml /api_schema.yaml patch /api/customers/update/
openapi: 3.0.3
info:
  title: Sphinx API
  version: 1.0.0
  description: >
    Automated compliance API for KYC/AML workflows. Sphinx handles PEP
    screening, sanctions checks, adverse media monitoring, and document
    verification with AI-powered decisions.


    **Quick Start:**

    1. **Upload Documents** (Optional) - Required for KYB, KYC EDD, and
    transaction monitoring. Not required for AML checks (PEP, Sanctions, Adverse
    Media).

    2. **Create a Case** - The case creation endpoint combines customer details
    and checks (typically a single alert) into one request.

    3. **Receive Webhook** - Results are sent to your webhook URL when
    processing completes.


    **Authentication:** All API requests require a bearer token. Include it in
    the Authorization header: `Authorization: Token <YOUR_API_KEY>`


    **Outcomes:** Each check returns an outcome (ACCEPTED, REJECTED, or PENDING)
    with detailed reasoning, risk scores (0.0-1.0), and audit-ready case notes
    in Markdown format.


    For detailed documentation, visit
    [docs.sphinxhq.com](https://docs.sphinxhq.com).
servers:
  - url: https://app.sphinxhq.com
    description: Production server (US)
  - url: https://eu.sphinxhq.com
    description: Production server (EU)
security: []
tags:
  - name: Cases
    description: >-
      Cases represent compliance reviews for a customer. Create a case, add
      checks, then start processing.
  - name: Checks
    description: >-
      Individual compliance checks within a case (e.g., PEP, Sanctions, Document
      Verification).
  - name: Customers
    description: >-
      Customer records linked to cases. Store customer details, type
      (individual/company), and external IDs.
  - name: Documents
    description: >-
      Upload and manage documents for cases and checks. Used for identity
      verification and document-based checks.


      **Allowed file types:** PDF, PNG, JPG, CSV, XLSX, DOCX, MD.
  - name: Events
    description: >-
      Timeline of activity on cases and checks: comments, outcome changes,
      assignments, status changes, reruns, and document activity.
paths:
  /api/customers/update/:
    patch:
      tags:
        - Customers
      summary: Update Customer
      description: >-
        Partially update an existing customer identified by external_id. Only
        fields included in the request body are updated; omitted fields are left
        unchanged. If the customer has sync_platforms configured, changes are
        automatically synced to the external platform (e.g. Salesforce).
      operationId: customers_update_partial_update
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedCustomerUpdate'
            examples:
              UpdateNameOnly:
                value:
                  external_id: cust-123
                  full_name: Jane Smith
                summary: Update name only
              UpdateInputDetailsOnly:
                value:
                  external_id: cust-123
                  input_details:
                    email: new@example.com
                summary: Update input_details only
              SetSyncPlatformsForOutboundSync:
                value:
                  external_id: cust-123
                  sync_platforms:
                    - domain: bofi--dev.sandbox.my.salesforce.com
                      id: 500WA00000RHR7WYAX
                summary: Set sync_platforms for outbound sync
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedCustomerUpdate'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedCustomerUpdate'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerRead'
              examples:
                UpdateNameOnly:
                  value:
                    external_id: cust-123
                    full_name: Jane Smith
                  summary: Update name only
                UpdateInputDetailsOnly:
                  value:
                    external_id: cust-123
                    input_details:
                      email: new@example.com
                  summary: Update input_details only
                SetSyncPlatformsForOutboundSync:
                  value:
                    external_id: cust-123
                    sync_platforms:
                      - domain: bofi--dev.sandbox.my.salesforce.com
                        id: 500WA00000RHR7WYAX
                  summary: Set sync_platforms for outbound sync
          description: ''
      security:
        - OAuthToken: []
        - tokenAuth: []
        - tokenAuth: []
components:
  schemas:
    PatchedCustomerUpdate:
      type: object
      description: >-
        Serializer for partial customer updates. Only provided fields are
        applied.
      properties:
        external_id:
          type: string
          description: External ID to identify the customer to update.
          maxLength: 255
        full_name:
          type: string
          description: Full name of the customer.
          maxLength: 255
        customer_type:
          enum:
            - INDIVIDUAL
            - COMPANY
            - ''
            - null
          type: string
          x-spec-enum-id: 7b9c847b681214ac
          nullable: true
          description: |-
            INDIVIDUAL or COMPANY.

            * `INDIVIDUAL` - Individual
            * `COMPANY` - Company
        input_details:
          type: object
          nullable: true
          description: Flexible JSON for customer fields.
        sync_platforms:
          type: object
          nullable: true
          description: >-
            External platform references for outbound sync. List of dicts, e.g.
            [{"domain": "bofi--dev.sandbox.my.salesforce.com", "id":
            "500WA..."}]
        delete_after:
          type: integer
          description: Number of days until deletion. Use 0 for immediate, -1 for never.
    CustomerRead:
      type: object
      description: Read-only serializer for Customer with computed fields.
      properties:
        id:
          type: integer
          readOnly: true
        external_id:
          type: string
          readOnly: true
          nullable: true
          description: ID from the source system, for lookups.
        full_name:
          type: string
          readOnly: true
        customer_type:
          enum:
            - INDIVIDUAL
            - COMPANY
            - null
          type: string
          description: |-
            * `INDIVIDUAL` - Individual
            * `COMPANY` - Company
          x-spec-enum-id: 7b9c847b681214ac
          readOnly: true
          nullable: true
        input_details:
          type: object
          nullable: true
          readOnly: true
          description: >-
            Flexible JSON for inputting customer fields such as first_name,
            address, etc. Any format accepted.
        sync_platforms:
          type: object
          nullable: true
          readOnly: true
          description: >-
            External platform references. List of dicts, e.g. [{"domain":
            "bofi--dev.sandbox.my.salesforce.com", "id": "500WA..."}]
        delete_after:
          type: integer
          readOnly: true
          description: Days until deletion. -1 means never delete.
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
      required:
        - created_at
        - customer_type
        - delete_after
        - external_id
        - full_name
        - id
        - input_details
        - sync_platforms
        - updated_at
  securitySchemes:
    OAuthToken:
      type: http
      scheme: bearer
      description: >-
        OAuth2 access token obtained from POST /api/oauth/token/ using client
        credentials.
    tokenAuth:
      type: http
      scheme: bearer

````