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

# Save billing contact details

> Saves the contact details used on your invoices, as a real person or as a legal entity. With `teamID`, it saves the team's details; this needs billing permission in the team.

Once a national code or registration code has been saved, or a payment has succeeded on the account, `accountType`, `nationalCode`, `economicCode` and `nationalIdentity` can no longer change. Later requests must still send every required field, but only the names, `registrationCode`, address fields, `phone` and `telephone` are updated.



## OpenAPI

````yaml /spec/platform-auth.yaml post /v1/contact-info
openapi: 3.0.1
info:
  title: Authentication & Account
  version: 1.0.0
  description: >-
    Log in, issue API tokens, change or reset your password, set up two-factor
    authentication, verify your email address and phone number, and manage your
    account profile and billing contact details.
servers:
  - url: https://api.liara.ir
security:
  - bearerAuth: []
tags:
  - name: Login
    description: Exchange your credentials or a one-time code for an API token.
  - name: Registration
    description: Create a new account.
  - name: Password
    description: Change your password while logged in, or reset a forgotten one.
  - name: API Tokens
    description: Issue additional API tokens for your account.
  - name: Account
    description: Read and update your profile and billing contact details.
  - name: Two-Factor Authentication
    description: Set up and manage authenticator-app (TOTP) two-factor authentication.
  - name: Verification
    description: Verify, or change, your account's email address and phone number.
paths:
  /v1/contact-info:
    post:
      tags:
        - Account
      summary: Save billing contact details
      description: >-
        Saves the contact details used on your invoices, as a real person or as
        a legal entity. With `teamID`, it saves the team's details; this needs
        billing permission in the team.


        Once a national code or registration code has been saved, or a payment
        has succeeded on the account, `accountType`, `nationalCode`,
        `economicCode` and `nationalIdentity` can no longer change. Later
        requests must still send every required field, but only the names,
        `registrationCode`, address fields, `phone` and `telephone` are updated.
      operationId: saveContactInfo
      parameters:
        - $ref: '#/components/parameters/TeamID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - accountType
              properties:
                accountType:
                  type: string
                  enum:
                    - REAL_PERSON
                    - LEGAL_PERSON
                contactInfo:
                  description: >-
                    Fields for the chosen `accountType`. Every field is required
                    and at most 250 characters.
                  oneOf:
                    - $ref: '#/components/schemas/RealPersonContactInfo'
                    - $ref: '#/components/schemas/LegalPersonContactInfo'
            examples:
              realPerson:
                summary: Real person
                value:
                  accountType: REAL_PERSON
                  contactInfo:
                    firstName: نام
                    lastName: نام خانوادگی
                    phone: '09120000000'
                    nationalCode: '0000000000'
                    economicCode: '000000000000'
                    province: تهران
                    city: تهران
                    postalCode: '1234567890'
                    address: نشانی نمونه
              legalPerson:
                summary: Legal entity
                value:
                  accountType: LEGAL_PERSON
                  contactInfo:
                    companyName: شرکت نمونه
                    telephone: '02100000000'
                    registrationCode: '000000'
                    nationalIdentity: '00000000000'
                    economicCode: '000000000000'
                    province: تهران
                    city: تهران
                    postalCode: '1234567890'
                    address: نشانی نمونه
      responses:
        '200':
          description: The details were saved. The response body is empty.
        '400':
          $ref: '#/components/responses/ValidationOrTeamIDError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/TeamForbidden'
        '409':
          description: >-
            A payment has already succeeded on an account with no saved contact
            details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                statusCode: 409
                error: Conflict
                message: >-
                  You have already made a successful payment, so you cannot
                  change your contact information.
                data:
                  code: contact_info_locked
components:
  parameters:
    TeamID:
      name: teamID
      in: query
      required: false
      description: >-
        Run the request in the context of a team you belong to, instead of your
        personal account.
      schema:
        type: string
        pattern: ^[0-9a-fA-F]{24}$
      example: '000000000000000000000002'
  schemas:
    RealPersonContactInfo:
      type: object
      title: Real person
      required:
        - firstName
        - lastName
        - phone
        - nationalCode
        - economicCode
        - province
        - city
        - postalCode
        - address
      properties:
        firstName:
          type: string
        lastName:
          type: string
        phone:
          type: string
        nationalCode:
          type: string
        economicCode:
          type: string
        province:
          type: string
        city:
          type: string
        postalCode:
          type: string
        address:
          type: string
    LegalPersonContactInfo:
      type: object
      title: Legal entity
      required:
        - companyName
        - telephone
        - registrationCode
        - nationalIdentity
        - economicCode
        - province
        - city
        - postalCode
        - address
      properties:
        companyName:
          type: string
        telephone:
          type: string
        registrationCode:
          type: string
        nationalIdentity:
          type: string
        economicCode:
          type: string
        province:
          type: string
        city:
          type: string
        postalCode:
          type: string
        address:
          type: string
    Error:
      type: object
      description: Standard error body.
      properties:
        statusCode:
          type: integer
        error:
          type: string
          description: HTTP status text.
        message:
          type: string
          description: What went wrong.
        data:
          type: object
          nullable: true
          description: >-
            Extra details. When present, `code` is a stable, machine-readable
            error code.
          properties:
            code:
              type: string
    AuthError:
      type: object
      description: Error body returned when the API token is rejected.
      properties:
        error:
          type: string
  responses:
    ValidationOrTeamIDError:
      description: >-
        The body is invalid (`message` says which field failed), or `teamID`
        isn't a valid ID.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            validation:
              summary: Invalid body
              value:
                statusCode: 400
                error: Bad Request
                message: '"<field>" is required'
            invalidTeamID:
              summary: Invalid team ID
              value:
                statusCode: 400
                error: Bad Request
                message: Invalid team ID.
                data: null
    Unauthorized:
      description: The API token is missing, invalid or expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AuthError'
          example:
            error: Unauthorized.
    TeamForbidden:
      description: >-
        With `teamID`: you aren't a member of the team (`team_not_found`), or
        you don't have billing permission there (`no_permission`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            teamNotFound:
              summary: Not a team member
              value:
                statusCode: 403
                error: Forbidden
                message: Team not found
                data:
                  code: team_not_found
            noPermission:
              summary: Missing billing permission
              value:
                statusCode: 403
                error: Forbidden
                message: You do not have permission to access this resource.
                data:
                  code: no_permission
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Send your API token as `Authorization: Bearer <api-token>`. Tokens
        expire (30 days by default) and stop working when you change or reset
        your password.

````

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