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

# Turn invoice issuing on or off

> Controls whether monthly billing invoices are issued for the account. Once set to `false`, it can't be turned back on. With `teamID`, it applies to the team; this needs billing permission in the team.



## OpenAPI

````yaml /spec/platform-auth.yaml post /v1/invoice-issuing-entity
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/invoice-issuing-entity:
    post:
      tags:
        - Account
      summary: Turn invoice issuing on or off
      description: >-
        Controls whether monthly billing invoices are issued for the account.
        Once set to `false`, it can't be turned back on. With `teamID`, it
        applies to the team; this needs billing permission in the team.
      operationId: setInvoiceIssuing
      parameters:
        - $ref: '#/components/parameters/TeamID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - invoiceIssuingEntity
              properties:
                invoiceIssuingEntity:
                  type: boolean
                  description: '`true` to issue invoices, `false` to stop issuing them.'
            example:
              invoiceIssuingEntity: false
      responses:
        '200':
          description: The setting was saved. The response body is empty.
        '400':
          $ref: '#/components/responses/ValidationOrTeamIDError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: >-
            Invoice issuing was already turned off and can't be changed
            (`invoice_issuing_entity_locked`); or, with `teamID`, you aren't a
            member of the team (`team_not_found`) or don't have billing
            permission there (`no_permission`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                locked:
                  summary: Invoice issuing locked
                  value:
                    statusCode: 403
                    error: Forbidden
                    message: >-
                      You have already disabled invoice issuing, so you cannot
                      change your invoice issuing entity.
                    data:
                      code: invoice_issuing_entity_locked
                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
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'
  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.
  schemas:
    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
  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.