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

# Create a split

> Create a revenue split for your store. The split applies either to your whole store (`type: store`) or to a single product (`type: product`). Recipients are existing stores (added directly) or email invitees; a split created with any email invitee starts disabled and activates once the first invitee accepts. The split is always created for the store the API key belongs to.



## OpenAPI

````yaml post /v1/splits
openapi: 3.0.0
info:
  title: Creem API
  description: >-
    Creem is an all-in-one platform for managing subscriptions and recurring
    revenue, tailored specifically for today's SaaS companies. It enables you to
    boost revenue, enhance customer retention, and scale your operations
    seamlessly.
  version: v1
  contact:
    name: Creem Support
    url: https://creem.io
    email: support@creem.io
  license:
    name: Commercial
    url: https://creem.io/terms
  termsOfService: https://creem.io/terms
servers:
  - url: https://api.creem.io
    description: Production — live API for processing real transactions and data.
    x-speakeasy-server-id: prod
  - url: https://test-api.creem.io
    description: Test — sandbox API for development and testing with no real charges.
    x-speakeasy-server-id: test
security: []
tags: []
externalDocs:
  description: Creem Documentation
  url: https://docs.creem.io
paths:
  /v1/splits:
    post:
      tags:
        - Splits
      summary: Create a split
      description: >-
        Create a revenue split for your store. The split applies either to your
        whole store (`type: store`) or to a single product (`type: product`).
        Recipients are existing stores (added directly) or email invitees; a
        split created with any email invitee starts disabled and activates once
        the first invitee accepts. The split is always created for the store the
        API key belongs to.
      operationId: createSplit
      parameters: []
      requestBody:
        required: true
        description: Split creation payload
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSplitRequestEntity'
      responses:
        '200':
          description: Successfully created the split
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SplitEntity'
        '400':
          description: Bad Request - Invalid input parameters
        '401':
          description: Unauthorized - Invalid or missing API key
        '404':
          description: Not Found - Resource does not exist
      security:
        - ApiKey: []
components:
  schemas:
    CreateSplitRequestEntity:
      type: object
      properties:
        description:
          type: string
          description: An optional human-readable description of the split.
          example: Q3 revenue share
          nullable: true
        type:
          type: string
          description: >-
            What the split applies to: `store` (every payment to your store) or
            `product` (payments for one product).
          enum:
            - store
            - product
          example: store
        type_reference:
          type: string
          description: >-
            The id of the entity the split applies to: your store id when `type`
            is `store`, or the product id when `type` is `product`.
          example: prod_1a2b3c4d
        recipients:
          description: >-
            The recipients of the split and their percentage shares. Between 1
            and 10 recipients; shares must sum to at most 100.
          type: array
          items:
            $ref: '#/components/schemas/CreateSplitRecipientRequestEntity'
      required:
        - type
        - type_reference
        - recipients
    SplitEntity:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the object.
        mode:
          $ref: '#/components/schemas/EnvironmentMode'
        object:
          type: string
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          example: split
        store_id:
          type: string
          description: The id of the store that owns this split.
          example: store_1a2b3c4d
        description:
          type: string
          description: A human-readable description of the split.
          example: Q3 revenue share
          nullable: true
        type:
          type: string
          description: >-
            What the split applies to: `store` (every payment to the store) or
            `product` (payments for a specific product).
          enum:
            - store
            - product
          example: store
        type_reference:
          type: string
          description: >-
            The id of the entity the split applies to: the store id when `type`
            is `store`, or the product id when `type` is `product`.
          example: prod_1a2b3c4d
        enabled:
          type: boolean
          description: >-
            Whether the split is active. A split created with email invitees
            starts disabled and activates once the first invitee accepts.
          example: true
        recipients:
          description: The recipients of the split and their shares.
          type: array
          items:
            $ref: '#/components/schemas/SplitRecipientEntity'
        created_at:
          type: number
          description: Creation date of the split as a timestamp.
          example: 1735689600000
      required:
        - id
        - mode
        - object
        - store_id
        - type
        - type_reference
        - enabled
        - recipients
        - created_at
    CreateSplitRecipientRequestEntity:
      type: object
      properties:
        recipient_type:
          type: string
          description: >-
            The kind of recipient: `store` for an existing store (add it
            directly), or `email` to invite someone by email (the split stays
            disabled until they accept).
          enum:
            - store
            - email
          example: store
        recipient_reference:
          type: string
          description: >-
            The recipient reference: a store id when `recipient_type` is
            `store`, or an email address when `recipient_type` is `email`.
          example: store_1a2b3c4d
        amount:
          type: number
          description: >-
            The recipient's share as a percentage of the split net, from 1 to
            100. The sum of all recipient shares must not exceed 100.
          example: 25
          minimum: 1
          maximum: 100
      required:
        - recipient_type
        - recipient_reference
        - amount
    EnvironmentMode:
      type: string
      description: String representing the environment.
      enum:
        - test
        - prod
        - sandbox
    SplitRecipientEntity:
      type: object
      properties:
        type:
          type: string
          description: >-
            How the share is calculated. Currently always `percentage` — the
            recipient receives `amount` percent of the split net.
          enum:
            - fixed
            - percentage
          example: percentage
        recipient_type:
          type: string
          description: >-
            The kind of recipient. `store` and `user` are resolved (active)
            recipients; `email` is an invitee who has not yet accepted (the
            split share is held until they do).
          enum:
            - store
            - user
            - email
          example: store
        recipient_reference:
          type: string
          description: >-
            Reference to the recipient: a store id (`recipient_type: store`), a
            user id (`recipient_type: user`), or a masked email address
            (`recipient_type: email`). Raw invitee email addresses are never
            returned.
          example: store_1a2b3c4d
        amount:
          type: number
          description: >-
            The recipient share, as a percentage of the split net (e.g. 25 =
            25%).
          example: 25
        enabled:
          type: boolean
          description: >-
            Whether this recipient is currently receiving its share. Email
            invitees start disabled until they accept.
          example: true
        invite_status:
          type: string
          description: >-
            Invite lifecycle for email-type recipients that have not been
            accepted yet: `pending` (awaiting acceptance) or `declined`. Absent
            for resolved store/user recipients.
          enum:
            - pending
            - declined
          example: pending
          nullable: true
      required:
        - type
        - recipient_type
        - recipient_reference
        - amount
        - enabled
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. You can find your API key in the Creem
        dashboard under Settings > API Keys.

````