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

# Create Contract

> Create a revenue sharing smart contract

Create a revenue sharing smart contract on the blockchain to automatically split payments among recipients and community members.


## OpenAPI

````yaml POST /v1#contracts_create
openapi: 3.0.0
info:
  title: SHARE Protocol API
  description: Micropayments, revenue sharing and distribution.
  version: 1.0.0
  contact:
    name: Formless
    url: https://www.formless.xyz
servers:
  - url: https://share-ddn.formless.xyz
    description: Production server
security: []
paths:
  /v1#contracts_create:
    post:
      tags:
        - Revenue Sharing
      summary: Create Revenue Sharing Contract
      description: Create a revenue sharing smart contract on the blockchain
      operationId: contracts_create
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
                - params
              properties:
                jsonrpc:
                  type: string
                  enum:
                    - '2.0'
                  default: '2.0'
                id:
                  type: string
                  default: '1'
                method:
                  type: string
                  enum:
                    - contracts_create
                  default: contracts_create
                params:
                  type: object
                  required:
                    - type
                    - network
                    - title
                    - description
                    - creator_name
                    - revenue_share
                  properties:
                    type:
                      type: string
                      enum:
                        - digital_property_with_revenue_share
                      default: digital_property_with_revenue_share
                    network:
                      type: string
                      enum:
                        - base
                      default: base
                    title:
                      type: string
                      default: HYPERMAX SNEAKER RELEASE
                    description:
                      type: string
                      default: Community revenue sharing for HYPERMAX sneaker release
                    creator_name:
                      type: string
                      default: HYPERMAX Brand
                    revenue_source:
                      type: object
                      properties:
                        product:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - product
                              default: product
                      default:
                        product:
                          type: product
                    revenue_share:
                      type: object
                      required:
                        - recipients
                        - community_allocation_percent
                        - community_split_count
                        - distribution_unit
                      properties:
                        recipients:
                          type: object
                          additionalProperties:
                            type: number
                          default: {}
                        community_allocation_percent:
                          type: number
                          default: 100
                        community_split_count:
                          type: integer
                          default: 100
                        distribution_unit:
                          type: object
                          required:
                            - value
                            - currency
                          properties:
                            value:
                              type: number
                              default: 1
                            currency:
                              type: string
                              enum:
                                - USD
                                - USDC
                              default: USD
                          default:
                            value: 1
                            currency: USD
                      default:
                        recipients: {}
                        community_allocation_percent: 100
                        community_split_count: 100
                        distribution_unit:
                          value: 1
                          currency: USD
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractsCreateResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    ContractsCreateResponse:
      type: object
      required:
        - jsonrpc
        - id
        - result
      properties:
        jsonrpc:
          type: string
          enum:
            - '2.0'
        id:
          type: string
        result:
          oneOf:
            - $ref: '#/components/schemas/ContractsCreateSuccess'
            - $ref: '#/components/schemas/ContractsCreateError'
    ContractsCreateSuccess:
      type: object
      required:
        - status
        - code
      properties:
        status:
          type: string
          enum:
            - success
          description: Status of the contract creation
        code:
          type: integer
          enum:
            - 200
          description: HTTP status code
        network_id:
          type: integer
          description: The network ID where the contract was deployed
        blockchain_name:
          type: string
          description: The name of the blockchain (e.g., 'base')
        revenue_share_smart_contract_address:
          type: string
          description: The address of the deployed revenue sharing smart contract
        digital_property_contract_address:
          type: string
          description: The address of the deployed digital property contract
        digital_property_contract_id:
          type: string
          description: The ID of the digital property contract
        join_splits_url:
          type: string
          format: uri
          description: URL where community members can join the revenue split
    ContractsCreateError:
      type: object
      required:
        - status
        - code
        - message
      properties:
        status:
          type: string
          enum:
            - failure
          description: Status indicating failure
        code:
          type: integer
          description: HTTP error status code
        message:
          type: string
          description: Error message describing what went wrong
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT token with Unique ID identification

````