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

# Edit a KYB flow-profile

> Partially updates a KYB flow-profile: name, kyc_profile_id, owner_kyc_profile_id (both must belong to the caller's org, same check as on create) and allow_submit_on_failed_kyc. Every field is optional and a field left out keeps its stored value; a body setting none of them is a 400. owner_kyc_profile_id has no way to be cleared back to "same as kyc_profile_id" here, only replaced by another org-owned profile. role is immutable — case creation resolves the seed profile by role, so moving it here would silently repoint that lookup. Tenant comes from the caller's auth; a profile id from another org is a 404.



## OpenAPI

````yaml https://api.dataspike.io/openapi/kyb/public.json patch /api/v4/kyb/profiles/{kybProfileId}
openapi: 3.1.0
info:
  description: Know Your Business (KYB) — case creation and the embedded onboarding widget.
  title: Dataspike KYB API
  version: '1.0'
servers: []
security: []
paths:
  /api/v4/kyb/profiles/{kybProfileId}:
    patch:
      tags:
        - KYB Profiles
      summary: Edit a KYB flow-profile
      description: >-
        Partially updates a KYB flow-profile: name, kyc_profile_id,
        owner_kyc_profile_id (both must belong to the caller's org, same check
        as on create) and allow_submit_on_failed_kyc. Every field is optional
        and a field left out keeps its stored value; a body setting none of them
        is a 400. owner_kyc_profile_id has no way to be cleared back to "same as
        kyc_profile_id" here, only replaced by another org-owned profile. role
        is immutable — case creation resolves the seed profile by role, so
        moving it here would silently repoint that lookup. Tenant comes from the
        caller's auth; a profile id from another org is a 404.
      operationId: PATCH_/api/v4/kyb/profiles/:kybProfileId
      parameters:
        - description: KYB profile id.
          in: path
          name: kybProfileId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateKybProfileRequest'
          application/xml:
            schema:
              $ref: '#/components/schemas/UpdateKybProfileRequest'
        description: Request body for kyb.UpdateKybProfileRequest
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KybProfileResponse'
            application/xml:
              schema:
                $ref: '#/components/schemas/KybProfileResponse'
          description: KYB profile updated.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrInvalidBody'
            application/xml:
              schema:
                $ref: '#/components/schemas/ErrInvalidBody'
          description: >-
            `invalid_body` (the shape below) for no fields set, an empty name,
            or role sent; `invalid_kyc_profile_id` /
            `invalid_owner_kyc_profile_id` when that field is not a valid uuid.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrKybProfileNotFound'
            application/xml:
              schema:
                $ref: '#/components/schemas/ErrKybProfileNotFound'
          description: >-
            KYB profile not found — also returned when kybProfileId in the path
            is not a valid uuid.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrKycProfileNotFound'
            application/xml:
              schema:
                $ref: '#/components/schemas/ErrKycProfileNotFound'
          description: >-
            kyc_profile_id or owner_kyc_profile_id does not reference a profile
            in this org.
      security:
        - ApiKey: []
components:
  schemas:
    UpdateKybProfileRequest:
      description: UpdateKybProfileRequest schema
      properties:
        allow_submit_on_failed_kyc:
          example: false
          nullable: true
          type: boolean
        kyc_profile_id:
          example: 0195c1f0-1234-7000-8000-0123456789ab
          nullable: true
          type: string
        name:
          example: Production (external clients)
          nullable: true
          type: string
        owner_kyc_profile_id:
          example: 0195c1f0-1234-7000-8000-0123456789ab
          nullable: true
          type: string
        role:
          nullable: true
          type: string
      type: object
    KybProfileResponse:
      description: KybProfileResponse schema
      properties:
        allow_submit_on_failed_kyc:
          example: false
          type: boolean
        kyb_profile_id:
          example: 0195c1f0-1234-7000-8000-0123456789ab
          type: string
        kyc_profile_id:
          example: 0195c1f0-1234-7000-8000-0123456789ab
          type: string
        name:
          example: Production (external clients)
          nullable: true
          type: string
        owner_kyc_profile_id:
          example: 0195c1f0-1234-7000-8000-0123456789ab
          nullable: true
          type: string
        role:
          example: production
          nullable: true
          type: string
      type: object
    ErrInvalidBody:
      description: ErrInvalidBody schema
      example:
        code: invalid_body
        message: Invalid request body
      properties:
        code:
          example: email_otp_expired
          type: string
        message:
          example: OTP has expired
          type: string
        param:
          nullable: true
          type: string
      type: object
    ErrKybProfileNotFound:
      description: ErrKybProfileNotFound schema
      example:
        code: kyb_profile_not_found
        message: KYB profile not found
      properties:
        code:
          example: email_otp_expired
          type: string
        message:
          example: OTP has expired
          type: string
        param:
          nullable: true
          type: string
      type: object
    ErrKycProfileNotFound:
      description: ErrKycProfileNotFound schema
      example:
        code: kyc_profile_not_found
        message: kyc_profile_id does not reference an existing verification profile
      properties:
        code:
          example: email_otp_expired
          type: string
        message:
          example: OTP has expired
          type: string
        param:
          nullable: true
          type: string
      type: object
  securitySchemes:
    ApiKey:
      description: API token passed in the request header.
      in: header
      name: ds-api-token
      type: apiKey

````