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

# Create contact

> Creates a new contact in this organisation.



## OpenAPI

````yaml POST /v1/contacts
openapi: 3.1.0
info:
  title: infinity.swiss Open API
  version: '1.0'
  summary: ''
servers:
  - url: https://api.infinity.swiss
security:
  - apiKey: []
paths:
  /v1/contacts:
    post:
      tags: []
      summary: Create a new contact
      description: Creates a new contact in this organisation.
      operationId: create-contact-v1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Contact'
            examples:
              Contact person example:
                value:
                  companyName: Complex GmbH
                  firstName: Claudia
                  lastName: Röthlisberger
                  streetName: Frutigenstrasse
                  buildingNumber: '24'
                  townName: Spiez
                  postCode: '3700'
                  country: Schweiz
                  position: Leiterin Bereich Metallurgie
                  email: test@test.com
                  mobile: 079 111 22 33
                  phone: 052 111 22 33
                  website: complex.swiss
                  category: clients
                  note: Kontakt durch Startup-Nights.
                  vatNumber: CHE 123.456.789 MWST
        description: >-
          A new contact requires at least one of the following fields to have a
          non-empty value:

          - Company name

          - First name

          - Last name
      responses:
        '200':
          description: Contact was created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  contact:
                    $ref: '#/components/schemas/Contact'
                    x-stoplight:
                      id: 8h89eomktxv70
        '400':
          description: >-
            A bad request is thrown if the provided contact is incomplete or
            invalid.
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                properties:
                  code:
                    type: string
                    x-stoplight:
                      id: hr3p3umc1ovgr
                    description: Specific error code
                  invalidFields:
                    type: array
                    x-stoplight:
                      id: zl8s8i7t98z0y
                    description: Invalid field names from the request payload
                    items:
                      x-stoplight:
                        id: 4v6kdtk5j1dd9
                      type: string
              examples:
                Missing name:
                  value:
                    code: general/missing-fields
                    invalidFields:
                      - firstName
                      - lastName
                      - companyName
        '401':
          $ref: '#/components/responses/Unauthorised'
components:
  schemas:
    Contact:
      type: object
      x-examples:
        Example 1:
          id: 6474bb0cccc5b63aae56fa15
          companyName: Complex GmbH
          firstName: Claudia
          lastName: Röthlisberger
          streetName: Frutigenstrasse
          buildingNumber: '24'
          townName: Spiez
          postCode: '3700'
          country: Schweiz
          position: Leiterin Bereich Metallurgie
          email: test@test.com
          mobile: 079 111 22 33
          phone: 052 111 22 33
          website: complex.swiss
          category: clients
          formOfAddress: ''
          note: Kontakt durch Startup-Nights.
          vatNumber: CHE 123.456.789 MWST
          customerIdentification: C-12345
      title: Contact
      description: Represents a contact, such as a supplier, client, partner, lead, etc.
      properties:
        id:
          type: string
          example: 68234731e6074232892d18c4
          description: A unique hex identifier for the transaction.
          readOnly: true
        companyName:
          type: string
          description: >-
            The company name associated with this contact.


            For contacts which represent companies, this is used as the name of
            the contact.
          maxLength: 48
        firstName:
          type: string
          description: The given name of this contact.
          maxLength: 48
        lastName:
          type: string
          description: The surname of this contact.
          maxLength: 48
        streetName:
          type: string
          description: The street name of the contact's address.
          maxLength: 48
        buildingNumber:
          type: string
          description: The building number of the contact's address.
          maxLength: 24
        townName:
          type: string
          description: The town or city name of the contact's address.
          maxLength: 48
        postCode:
          type: string
          description: The postal code of the contact's address.
          maxLength: 24
          example: '3700'
        position:
          type: string
          description: The position of the contact person within their company.
          maxLength: 48
        email:
          type: string
          description: >-
            The email address of the contact person. Must be a valid e-mail
            address or empty.
          format: email
          maxLength: 48
        mobile:
          type: string
          description: The mobile phone number of the contact person.
          maxLength: 24
        phone:
          type: string
          description: The phone number of the contact person.
          maxLength: 24
        website:
          type: string
          description: The website of this contact. Must be a valid URL.
          maxLength: 128
        category:
          description: An optional category to associate this contact with.
          enum:
            - clients
            - suppliers
            - partners
            - team
            - leads
        formOfAddress:
          type: string
          description: The form of address of the contact person, e.g. “Dr. med.“
          maxLength: 24
        note:
          type: string
          description: A custom plain-text note for this contact. May be multi-line.
          maxLength: 2000
        vatNumber:
          type: string
          maxLength: 24
          description: >-
            An optional VAT registry number for this company. Is not validated
            for any specific format to allow entering values for formats of
            arbitrary countries.
        country:
          type: string
          maxLength: 24
          description: Display name of the country of this contact.
        secondaryAddressLine:
          type: string
          x-stoplight:
            id: 0nsdd0stpefm7
          description: An optional secondary address line for the location of this contact.
          maxLength: 48
        customerIdentification:
          type: string
          description: An optional customer identification number for this contact.
          maxLength: 16
      examples:
        - id: 6474bb0cccc5b63aae56fa15
          companyName: Complex GmbH
          firstName: Claudia
          lastName: Röthlisberger
          streetName: Frutigenstrasse
          buildingNumber: '24'
          townName: Spiez
          postCode: '3700'
          country: Schweiz
          position: Leiterin Bereich Metallurgie
          email: test@test.com
          mobile: 079 111 22 33
          phone: 052 111 22 33
          website: complex.swiss
          category: clients
          formOfAddress: ''
          note: Kontakt durch Startup-Nights.
          vatNumber: CHE 123.456.789 MWST
          customerIdentification: C-12345
  responses:
    Unauthorised:
      description: >-
        An unauthorised request was submitted. You may be using an incorrect or
        expired API token, or are attempting to access a document outside of the
        scope of the token.
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                x-stoplight:
                  id: 08hkw8ukmi2lp
                description: Specific error code
          examples:
            Unauthorised request:
              value:
                code: general/unauthorised
  securitySchemes:
    apiKey:
      name: x-api-token
      type: apiKey
      in: header
      description: >-
        API token for authentication. Obtain from your Infinity account
        settings.

````