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

# Create a Writing Moment

> Create a new Writing Moment on the In•Process protocol. No signature is required for this endpoint.

The API uses a unified `contract` object that supports both creating writing moments on existing collections and creating new collections:
- **Use existing collection**: Provide `contract.address` to add a writing moment to a collection you've already created
- **Create new collection**: Provide `contract.name` and `contract.uri` to create both a new collection and its first writing moment in a single request

Optional: `chainId` (defaults to Base mainnet in production, Base Sepolia in preview or development).



## OpenAPI

````yaml POST /moment/create/writing
openapi: 3.1.0
info:
  title: In•Process API
  description: >-
    The In•Process API enables browsing and managing moments from timelines.
    Retrieve moments from a specific artist's timeline, browse the in•process
    collective timeline, or filter by collection. The API supports creating
    moments, managing collections, handling payments, and interacting with the
    In•Process protocol ecosystem.
  version: 1.0.0
servers:
  - url: https://api.inprocess.world/api
    description: Production server
security: []
paths:
  /moment/create/writing:
    post:
      summary: Create a Writing Moment
      description: >-
        Create a new Writing Moment on the In•Process protocol. No signature is
        required for this endpoint.


        The API uses a unified `contract` object that supports both creating
        writing moments on existing collections and creating new collections:

        - **Use existing collection**: Provide `contract.address` to add a
        writing moment to a collection you've already created

        - **Create new collection**: Provide `contract.name` and `contract.uri`
        to create both a new collection and its first writing moment in a single
        request


        Optional: `chainId` (defaults to Base mainnet in production, Base
        Sepolia in preview or development).
      operationId: createWritingMoment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWritingMomentRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateMomentResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security: []
components:
  schemas:
    CreateWritingMomentRequest:
      type: object
      required:
        - title
        - contract
        - token
        - account
      properties:
        title:
          type: string
          description: Title of the writing moment
        contract:
          $ref: '#/components/schemas/MomentContractInput'
        token:
          type: object
          required:
            - tokenContent
            - createReferral
            - salesConfig
            - mintToCreatorCount
          properties:
            tokenContent:
              type: string
              description: Writing content for the token (e.g., "Hello world")
            createReferral:
              type: string
              description: Referral recipient address
            salesConfig:
              $ref: '#/components/schemas/SalesConfig'
            mintToCreatorCount:
              type: number
              description: Number of tokens to mint to creator (usually 1)
            payoutRecipient:
              type: string
              description: >-
                Optional address to receive sale proceeds (defaults to creator
                if not provided)
        splits:
          type: array
          description: >-
            Optional revenue splits configuration. Must have at least 2
            recipients and sum to 100%
          items:
            $ref: '#/components/schemas/Split'
          minItems: 2
        account:
          type: string
          description: Creator's address
        chainId:
          type: integer
          description: >-
            Chain ID (optional; defaults to Base mainnet in production and Base
            Sepolia in preview or development)
          default: 8453
    CreateMomentResponse:
      type: object
      required:
        - contractAddress
        - tokenId
        - hash
        - chainId
      properties:
        contractAddress:
          type: string
          description: The address of the collection (newly created or existing)
        tokenId:
          type: string
          description: The token ID of the created moment
        hash:
          type: string
          description: Transaction hash of the creation operation
        chainId:
          type: integer
          description: Chain ID where the transaction was executed
    Error:
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: string
          enum:
            - error
          description: Error status
        message:
          type: string
          description: Error message
        errors:
          type: array
          description: >-
            Optional array of field-level validation errors. Typically included
            in 400 Bad Request responses for validation errors.
          items:
            type: object
            required:
              - field
              - message
            properties:
              field:
                type: string
                description: The field name that failed validation
              message:
                type: string
                description: The validation error message for this field
    MomentContractInput:
      type: object
      description: >-
        Collection target. Provide `address` to mint on an existing ERC-1155
        collection, or provide both `name` and `uri` to deploy a new collection
        in the same request.
      properties:
        address:
          type: string
          description: Existing collection contract address
        name:
          type: string
          description: >-
            New collection name (required together with `uri` when `address` is
            omitted)
        uri:
          type: string
          description: >-
            New collection metadata URI (required together with `name` when
            `address` is omitted)
    SalesConfig:
      type: object
      required:
        - type
        - pricePerToken
        - saleStart
        - saleEnd
      properties:
        type:
          type: string
          enum:
            - fixedPrice
            - erc20Mint
          description: The sale type
        pricePerToken:
          oneOf:
            - type: string
            - type: integer
            - type: number
          description: >-
            Price per token in wei (18 decimals), as a decimal integer string or
            JSON number. For example, "100000000000000000" or 100000000000000000
            represents 0.1 ETH
        saleStart:
          oneOf:
            - type: string
            - type: integer
            - type: number
          description: >-
            Sale start time: Unix timestamp as a decimal integer string or JSON
            number
        saleEnd:
          oneOf:
            - type: string
            - type: integer
            - type: number
          description: >-
            Sale end time: Unix timestamp as a decimal integer string or JSON
            number
        currency:
          type: string
          description: >-
            Optional ERC20 token address. If not provided, defaults to the
            native token (ETH)
    Split:
      type: object
      required:
        - address
        - percentAllocation
      properties:
        address:
          type: string
          description: Recipient address for revenue sharing
        percentAllocation:
          type: number
          description: Allocation percentage (0-100)
          minimum: 0
          maximum: 100

````