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

# Send a message

> Submits a message to the store (for example from a contact form). A customer record is found or created from the email address, the message is logged, and admin users who opt in are notified.



## OpenAPI

````yaml /api-reference/openapi.json post /messages
openapi: 3.0.0
info:
  title: Marzipan API
  version: 1.0.0
servers:
  - url: https://api.marzipan.co/v1
security:
  - tenantAuth: []
tags:
  - name: Account
    description: >-
      Account management endpoints including registration, login, and user
      details
  - name: Carts
    description: Shopping cart management endpoints
  - name: Products
    description: Product catalog and search endpoints
  - name: Subscriptions
    description: Subscription management and renewal endpoints
  - name: CMS
    description: Content management system endpoints
  - name: Messaging
    description: Message and communication endpoints
  - name: Search
    description: Search functionality endpoints
  - name: Settings
    description: >-
      Storefront settings and market detection used to configure the web
      components and checkout.
  - name: Analytics
    description: Storefront visit and attribution tracking.
  - name: Rewards
    description: >-
      Loyalty and rewards programme endpoints for the authenticated customer,
      covering points balance, tier status, perks, exclusive products and
      transaction history.
  - name: Forms
    description: Render and submit dynamic storefront forms defined in the CMS.
  - name: Events
    description: >-
      Check event availability, browse occurrences and recurring dates, generate
      ticket QR codes, and manage event waitlists (join, leave, check status,
      and claim promoted spots).
paths:
  /messages:
    post:
      tags:
        - Messaging
      summary: Send a message
      description: >-
        Submits a message to the store (for example from a contact form). A
        customer record is found or created from the email address, the message
        is logged, and admin users who opt in are notified.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - email
                - subject
                - message
                - source
              properties:
                name:
                  type: string
                  description: Sender's full name.
                email:
                  type: string
                  format: email
                  description: Sender's email address.
                subject:
                  type: string
                  description: Message subject.
                message:
                  type: string
                  description: Message body.
                source:
                  type: string
                  description: >-
                    Where the message originated (e.g. the page URL or form
                    name).
                company:
                  type: string
                  description: Optional company name for the sender.
            example:
              name: Ada Lovelace
              email: ada@example.com
              subject: Wholesale enquiry
              message: Do you offer wholesale pricing?
              source: contact-page
              company: Analytical Engines Ltd
      responses:
        '200':
          description: The message was logged.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
              example:
                success: true
                message: Message has been logged.
        '422':
          description: The submitted data failed validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
              example:
                message: The email field is required.
                errors:
                  email:
                    - The email field is required.
components:
  schemas:
    ValidationError:
      type: object
      properties:
        message:
          type: string
          description: Validation error message
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Field-specific validation errors
      required:
        - message
        - errors
  securitySchemes:
    tenantAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your API token.
      bearerFormat: JWT

````