> ## 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.

# Create address

> Add a new delivery address to the authenticated customer's account. Returns the full updated list of addresses.



## OpenAPI

````yaml /api-reference/openapi.json post /account/addresses
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:
  /account/addresses:
    parameters: []
    post:
      tags:
        - Account
      summary: Create address
      description: >-
        Add a new delivery address to the authenticated customer's account.
        Returns the full updated list of addresses.
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddressInput'
            example:
              firstName: Jane
              lastName: Doe
              addressLine1: 12 Baker Street
              addressLine2: Flat 2
              city: London
              state: Greater London
              postcode: W1U 6TU
              country: GB
              phone: '+447700900123'
              defaultAddress: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Address'
              example:
                - id: 9c1f7b2e-3d4a-4c1b-8f2a-1a2b3c4d5e6f
                  firstName: Jane
                  lastName: Doe
                  addressLine1: 12 Baker Street
                  addressLine2: Flat 2
                  city: London
                  state: Greater London
                  county: Greater London
                  postcode: W1U 6TU
                  countryName: United Kingdom
                  country: GB
                  type: shipping
                  defaultAddress: true
                  deliveryInstructions: null
                  phone: '+447700900123'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: Unauthenticated.
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
              example:
                message: The first name field is required.
                errors:
                  firstName:
                    - The first name field is required.
      security:
        - accountAuth: []
components:
  schemas:
    AddressInput:
      type: object
      required:
        - firstName
        - lastName
        - addressLine1
        - city
        - postcode
        - country
      properties:
        firstName:
          type: string
        lastName:
          type: string
        addressLine1:
          type: string
        addressLine2:
          type: string
          nullable: true
        city:
          type: string
        state:
          type: string
          nullable: true
        postcode:
          type: string
        country:
          type: string
          description: ISO country code
        phone:
          type: string
          nullable: true
          description: Must be a valid phone number for the given country
        defaultAddress:
          type: boolean
          description: Set this address as the customer's default
    Address:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the address
        firstName:
          type: string
        lastName:
          type: string
        addressLine1:
          type: string
        addressLine2:
          type: string
          nullable: true
        city:
          type: string
        state:
          type: string
          nullable: true
          description: State/county value
        county:
          type: string
          nullable: true
          description: Alias of state
        postcode:
          type: string
        countryName:
          type: string
          description: Full country name
        country:
          type: string
          description: ISO country code
        type:
          type: string
          nullable: true
          description: Address type
        defaultAddress:
          type: boolean
        deliveryInstructions:
          type: string
          nullable: true
        phone:
          type: string
          nullable: true
    Error:
      type: object
      properties:
        message:
          type: string
          description: Error message
      required:
        - message
    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
    accountAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is the account token returned from the `Login` endpoint.

````