> ## 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.

# Create a KYB flow-profile

> Creates a KYB flow-profile for the organization. A profile binds a KYC verification profile (kyc_profile_id, which must belong to the caller's org) and the submit gate behavior (allow_submit_on_failed_kyc) to an optional role. role is "production" or "dashboard" for the two seed profiles selected by case-creation path, or empty for a user-defined profile. There is one production and one dashboard profile per org (a duplicate role returns 409). Tenant comes from the caller's auth.



## OpenAPI

````yaml https://api.dataspike.io/openapi/kyb/public.json post /api/v4/kyb-profiles
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:
    post:
      tags:
        - KYB Profiles
      summary: Create a KYB flow-profile
      description: >-
        Creates a KYB flow-profile for the organization. A profile binds a KYC
        verification profile (kyc_profile_id, which must belong to the caller's
        org) and the submit gate behavior (allow_submit_on_failed_kyc) to an
        optional role. role is "production" or "dashboard" for the two seed
        profiles selected by case-creation path, or empty for a user-defined
        profile. There is one production and one dashboard profile per org (a
        duplicate role returns 409). Tenant comes from the caller's auth.
      operationId: POST_/api/v4/kyb-profiles
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateKybProfileRequest'
          application/xml:
            schema:
              $ref: '#/components/schemas/CreateKybProfileRequest'
        description: Request body for kyb.CreateKybProfileRequest
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: d5293a33-1d10-4aa2-8ff9-4a2c9a2d1e19
            application/xml:
              schema:
                $ref: d5293a33-1d10-4aa2-8ff9-4a2c9a2d1e19
          description: Created
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrInvalidBody'
            application/xml:
              schema:
                $ref: '#/components/schemas/ErrInvalidBody'
          description: Invalid body, role, or kyc_profile_id.
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrKybProfileRoleExists'
            application/xml:
              schema:
                $ref: '#/components/schemas/ErrKybProfileRoleExists'
          description: A profile with this role already exists for the org.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrKycProfileNotFound'
            application/xml:
              schema:
                $ref: '#/components/schemas/ErrKycProfileNotFound'
          description: kyc_profile_id does not reference a profile in this org.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateKybProfileResponse'
            application/xml:
              schema:
                $ref: '#/components/schemas/CreateKybProfileResponse'
          description: KYB profile created.
      security:
        - ApiKey: []
components:
  schemas:
    CreateKybProfileRequest:
      description: CreateKybProfileRequest schema
      properties:
        allow_submit_on_failed_kyc:
          example: false
          type: boolean
        kyc_profile_id:
          example: 0195c1f0-1234-7000-8000-0123456789ab
          type: string
        name:
          example: Production (external clients)
          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
    ErrKybProfileRoleExists:
      description: ErrKybProfileRoleExists schema
      example:
        code: kyb_profile_role_exists
        message: a KYB profile with this role already exists for the organization
      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
    CreateKybProfileResponse:
      description: CreateKybProfileResponse 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
        role:
          example: production
          nullable: true
          type: string
      type: object
  securitySchemes:
    ApiKey:
      description: API token passed in the request header.
      in: header
      name: ds-api-token
      type: apiKey

````