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

# Create or update contact



## OpenAPI

````yaml /api-reference/openapi.json post /v1/contacts
openapi: 3.0.0
info:
  title: Flowella REST API
  version: 2.1.0
  description: >-
    Public v1 HTTP API for Flowella. Authenticate with `Authorization: Bearer
    <api_key>` (`flo_` prefix). Canonical base: `https://api.flowella.io/v1`.
    Legacy `https://app.flowella.io/api/v1/...` requests are permanently
    redirected (308) to the canonical host, preserving method and body.
servers:
  - url: https://api.flowella.io
    description: Canonical API host
  - url: https://app.flowella.io
    description: Legacy app host — /api/v1 permanently redirects (308) to the API host /v1
security: []
tags:
  - name: System
    description: Health and auth checks
  - name: Messages
    description: Send WhatsApp messages
  - name: Conversations
    description: Inbox conversations
  - name: Contacts
    description: CRM contacts
  - name: Templates
    description: WhatsApp templates and bulk send
  - name: Analytics
    description: Usage and delivery metrics
paths:
  /v1/contacts:
    post:
      tags:
        - Contacts
      summary: Create or update contact
      operationId: v1UpsertContact
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                phone:
                  type: string
                  minLength: 3
                  maxLength: 32
                name:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 200
                email:
                  type: string
                  nullable: true
                  format: email
                waId:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 64
              required:
                - phone
              example:
                phone: '+15551234567'
                name: Ada Lovelace
                email: ada@example.com
      responses:
        '200':
          description: Contact upserted
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  phone:
                    type: string
                  waId:
                    type: string
                    nullable: true
                  name:
                    type: string
                    nullable: true
                  email:
                    type: string
                    nullable: true
                  isOptedOut:
                    type: boolean
                  createdAt:
                    type: string
                  updatedAt:
                    type: string
                required:
                  - id
                  - phone
                  - waId
                  - name
                  - email
                  - isOptedOut
                  - createdAt
                  - updatedAt
        '400':
          description: Bad body
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
                example:
                  error:
                    code: UNAUTHORIZED
                    message: Invalid API key
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
                example:
                  error:
                    code: UNAUTHORIZED
                    message: Invalid API key
        '402':
          description: Payment required
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
                example:
                  error:
                    code: UNAUTHORIZED
                    message: Invalid API key
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
                example:
                  error:
                    code: UNAUTHORIZED
                    message: Invalid API key
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: >-
        Organization API key (`flo_…`). Paste the full key; Scalar sends
        `Authorization: Bearer <key>`.

````