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

# Submit Form

> The Bearer access token is optional. Without an `Authorization` header the request is a visitor submission. Any `Authorization` header that is not a valid Bearer is rejected with 401.



## OpenAPI

````yaml /openapi/mio-openapi.json post /api/v1/hub/{hub_id}/forms/submissions
openapi: 3.1.0
info:
  description: >-
    Production API reference for Membership.io. Use the authored guides for
    workflows and the generated endpoint pages for exact parameters and schemas.
  title: Membership.io API
  version: 0.1.0
servers:
  - description: Production
    url: https://api.member.dev
security:
  - bearerAuth: []
paths:
  /api/v1/hub/{hub_id}/forms/submissions:
    post:
      tags:
        - forms
      summary: Submit Form
      description: >-
        The Bearer access token is optional. Without an `Authorization` header
        the request is a visitor submission. Any `Authorization` header that is
        not a valid Bearer is rejected with 401.
      operationId: forms.post_forms_post_hub_by_hub_id_forms_submissions
      parameters:
        - in: path
          name: hub_id
          required: true
          schema:
            title: Hub Id
            type: string
        - in: header
          name: Idempotency-Key
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Idempotency-Key
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/FormSubmissionRequest'
        required: true
      responses:
        '202':
          content:
            application/vnd.api+json:
              schema: {}
          description: >-
            Accepted. The body is empty and identical for a created contact, an
            updated one, a gated one, a duplicate Idempotency-Key and a honeypot
            hit.
        '401':
          description: >-
            An Authorization header is malformed or the contact session is
            invalid.
        '404':
          description: >-
            Unknown hub, a page this caller cannot read, or a node that is
            missing or is not submittable by this audience.
        '422':
          description: >-
            Per-field errors with `source.pointer`
            `/data/attributes/fields/<wire key>`, a malformed body, or
            `idempotency_key_reused`.
        '429':
          description: Rate limited.
      security:
        - HTTPBearer: []
        - {}
components:
  schemas:
    FormSubmissionRequest:
      additionalProperties: false
      properties:
        data:
          $ref: '#/components/schemas/FormSubmissionData'
      required:
        - data
      title: FormSubmissionRequest
      type: object
    FormSubmissionData:
      additionalProperties: false
      properties:
        attributes:
          $ref: '#/components/schemas/FormSubmissionAttributes'
        type:
          const: form_submissions
          title: Type
          type: string
      required:
        - type
        - attributes
      title: FormSubmissionData
      type: object
    FormSubmissionAttributes:
      additionalProperties: false
      properties:
        fields:
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'
          maxProperties: 100
          title: Fields
          type: object
        honeypot:
          anyOf:
            - type: string
            - type: 'null'
          title: Honeypot
        node_id:
          maxLength: 128
          minLength: 1
          title: Node Id
          type: string
        page_id:
          pattern: >-
            ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
          title: Page Id
          type: string
      required:
        - page_id
        - node_id
        - fields
      title: FormSubmissionAttributes
      type: object
    JsonValue: {}
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT or mio_sk API key
      description: >-
        Send platform JWTs, contact JWTs, or team API keys as `Authorization:
        Bearer <token>`.
      scheme: bearer
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.