{
  "openapi": "3.1.0",
  "info": {
    "title": "Invoqly Flow",
    "version": "1.1.1",
    "description": "Invoqly Flow (invoqly-flow-v1). Workspace clients and draft invoices. New API keys access real records and expire in 90 days. One successful request uses one credit. Purchased credits cost USD 0.95 per 500 requests and never expire; USD 4.99 minimum top-up. Included credits last for the confirmed paid monthly/yearly period. No email sending or client payment processing. Also supports client lookup/editing, draft metadata edits with conflict protection, explicit invoice-link controls, recorded payments, currency reports, business details and usage. Existing keys need the relevant opt-in permissions.",
    "contact": {
      "email": "hello@invoqly.top"
    }
  },
  "servers": [
    {
      "url": "https://invoqly.top/api/v1"
    }
  ],
  "paths": {
    "/clients": {
      "get": {
        "operationId": "listClients",
        "summary": "List workspace clients",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10000,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createClient",
        "summary": "Create a client",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{8,100}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Client"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/invoices": {
      "get": {
        "operationId": "listInvoices",
        "summary": "List workspace invoices",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10000,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success with invoice browser links.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "invoice_url": {
                            "type": "string",
                            "format": "uri",
                            "description": "Browser invoice preview in the signed-in owner workspace. No API key in the URL. Returned for real workspace invoices."
                          },
                          "api_url": {
                            "type": "string",
                            "format": "uri",
                            "description": "Server API resource; requires invoices:read and an Authorization header."
                          },
                          "edit_url": {
                            "type": "string",
                            "format": "uri",
                            "description": "Signed-in draft editor. Present only when the response identifies the invoice as a draft."
                          },
                          "status": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          }
        },
        "description": " Returns invoice_url for the normal signed-in browser preview, api_url for server reads, and edit_url when a draft status is returned. Links do not include credentials, publish drafts or send email. Client-facing links require the separate explicit share operation. Legacy sample records have no workspace links."
      },
      "post": {
        "operationId": "createInvoice",
        "summary": "Create a draft invoice",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{8,100}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Invoice"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Success with invoice browser links.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "invoice_url": {
                          "type": "string",
                          "format": "uri",
                          "description": "Browser invoice preview in the signed-in owner workspace. No API key in the URL. Returned for real workspace invoices."
                        },
                        "api_url": {
                          "type": "string",
                          "format": "uri",
                          "description": "Server API resource; requires invoices:read and an Authorization header."
                        },
                        "edit_url": {
                          "type": "string",
                          "format": "uri",
                          "description": "Signed-in draft editor. Present only when the response identifies the invoice as a draft."
                        },
                        "status": {
                          "type": "string"
                        }
                      }
                    },
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          }
        },
        "description": " Returns invoice_url for the normal signed-in browser preview, api_url for server reads, and edit_url when a draft status is returned. Links do not include credentials, publish drafts or send email. Client-facing links require the separate explicit share operation. Legacy sample records have no workspace links."
      }
    },
    "/invoices/{id}": {
      "get": {
        "operationId": "getInvoice",
        "summary": "Read one owned invoice",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success with invoice browser links.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "invoice_url": {
                          "type": "string",
                          "format": "uri",
                          "description": "Browser invoice preview in the signed-in owner workspace. No API key in the URL. Returned for real workspace invoices."
                        },
                        "api_url": {
                          "type": "string",
                          "format": "uri",
                          "description": "Server API resource; requires invoices:read and an Authorization header."
                        },
                        "edit_url": {
                          "type": "string",
                          "format": "uri",
                          "description": "Signed-in draft editor. Present only when the response identifies the invoice as a draft."
                        },
                        "status": {
                          "type": "string"
                        }
                      }
                    },
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          }
        },
        "description": " Returns invoice_url for the normal signed-in browser preview, api_url for server reads, and edit_url when a draft status is returned. Links do not include credentials, publish drafts or send email. Client-facing links require the separate explicit share operation. Legacy sample records have no workspace links."
      },
      "patch": {
        "operationId": "updateDraft",
        "summary": "update Draft",
        "description": "Requires invoices:write. One successful request uses one credit. Returns invoice_url for the normal signed-in browser preview, api_url for server reads, and edit_url when a draft status is returned. Links do not include credentials, publish drafts or send email. Client-facing links require the separate explicit share operation. Legacy sample records have no workspace links.",
        "x-required-permission": "invoices:write",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{8,100}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success with invoice browser links.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "invoice_url": {
                          "type": "string",
                          "format": "uri",
                          "description": "Browser invoice preview in the signed-in owner workspace. No API key in the URL. Returned for real workspace invoices."
                        },
                        "api_url": {
                          "type": "string",
                          "format": "uri",
                          "description": "Server API resource; requires invoices:read and an Authorization header."
                        },
                        "edit_url": {
                          "type": "string",
                          "format": "uri",
                          "description": "Signed-in draft editor. Present only when the response identifies the invoice as a draft."
                        },
                        "status": {
                          "type": "string"
                        }
                      }
                    },
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "minProperties": 2,
                "required": [
                  "expected_updated_at"
                ],
                "properties": {
                  "expected_updated_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The updated_at value read from GET /invoices/{id}; stale values return 409."
                  },
                  "due_date": {
                    "type": "string",
                    "format": "date"
                  },
                  "notes": {
                    "type": "string",
                    "maxLength": 4000
                  },
                  "payment_instructions": {
                    "type": "string",
                    "maxLength": 4000
                  }
                }
              }
            }
          }
        }
      }
    },
    "/clients/{id}": {
      "get": {
        "operationId": "getClient",
        "summary": "get Client",
        "description": "Requires clients:read. One successful request uses one credit.",
        "x-required-permission": "clients:read",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "updateClient",
        "summary": "update Client",
        "description": "Requires clients:write. One successful request uses one credit.",
        "x-required-permission": "clients:write",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{8,100}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "minProperties": 1,
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  "email": {
                    "type": "string",
                    "maxLength": 254
                  },
                  "address": {
                    "type": "string",
                    "maxLength": 1000
                  },
                  "phone": {
                    "type": "string",
                    "maxLength": 60
                  },
                  "tax_number": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "notes": {
                    "type": "string",
                    "maxLength": 4000
                  }
                }
              }
            }
          }
        }
      }
    },
    "/invoices/{id}/share": {
      "post": {
        "operationId": "setInvoiceShare",
        "summary": "set Invoice Share",
        "description": "Requires invoices:share. One successful request uses one credit. Returns invoice_url for the normal signed-in browser preview, api_url for server reads, and edit_url when a draft status is returned. Links do not include credentials, publish drafts or send email. Client-facing links require the separate explicit share operation. Legacy sample records have no workspace links.",
        "x-required-permission": "invoices:share",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{8,100}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success with invoice browser links.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "invoice_url": {
                          "type": "string",
                          "format": "uri",
                          "description": "Browser invoice preview in the signed-in owner workspace. No API key in the URL. Returned for real workspace invoices."
                        },
                        "api_url": {
                          "type": "string",
                          "format": "uri",
                          "description": "Server API resource; requires invoices:read and an Authorization header."
                        },
                        "edit_url": {
                          "type": "string",
                          "format": "uri",
                          "description": "Signed-in draft editor. Present only when the response identifies the invoice as a draft."
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uri",
                          "description": "Client-facing browser link when sharing is enabled; null when disabled. Only issued, non-void invoices may be shared."
                        }
                      }
                    },
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "enabled"
                ],
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "regenerate": {
                    "type": "boolean",
                    "default": false,
                    "description": "Only when enabled is true; replaces and invalidates the old public link."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/payments": {
      "get": {
        "operationId": "listPayments",
        "summary": "List workspace payments",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10000,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-permission": "payments:read",
        "description": "Read manual payment records, including reversal status. No money is collected."
      }
    },
    "/reports": {
      "get": {
        "operationId": "getCurrencyReports",
        "summary": "get Currency Reports",
        "description": "Requires reports:read. One successful request uses one credit.",
        "x-required-permission": "reports:read",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/business": {
      "get": {
        "operationId": "getBusiness",
        "summary": "get Business",
        "description": "Requires business:read. One successful request uses one credit.",
        "x-required-permission": "business:read",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/usage": {
      "get": {
        "operationId": "getUsage",
        "summary": "get Usage",
        "description": "Requires usage:read. One successful request uses one credit.",
        "x-required-permission": "usage:read",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "API response. Errors include error.code, error.message and request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "mode": {
                      "enum": [
                        "test",
                        "live"
                      ]
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replayed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "credits_used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "credits_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "api": {
                      "type": "string",
                      "const": "invoqly-flow-v1",
                      "description": "Invoqly Flow API identifier"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "iq_ followed by 64 hexadecimal characters"
      }
    },
    "schemas": {
      "Client": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "email": {
            "type": "string",
            "maxLength": 254
          },
          "address": {
            "type": "string",
            "maxLength": 1000
          }
        }
      },
      "Invoice": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "client_id",
          "issue_date",
          "due_date",
          "currency",
          "items"
        ],
        "properties": {
          "client_id": {
            "type": "string",
            "format": "uuid"
          },
          "issue_date": {
            "type": "string",
            "format": "date"
          },
          "due_date": {
            "type": "string",
            "format": "date"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "notes": {
            "type": "string",
            "maxLength": 4000
          },
          "items": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/InvoiceItem"
            }
          }
        }
      },
      "InvoiceItem": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "description",
          "quantity",
          "unit_price"
        ],
        "properties": {
          "description": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "quantity": {
            "type": "number",
            "minimum": 0.000001,
            "maximum": 1000000
          },
          "unit_price": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000000
          },
          "tax_rate": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "discount_amount": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000000000000
          }
        }
      },
      "InvoiceBrowserLinks": {
        "type": "object",
        "properties": {
          "invoice_url": {
            "type": "string",
            "format": "uri",
            "description": "Browser invoice preview in the signed-in owner workspace. No API key in the URL. Returned for real workspace invoices."
          },
          "api_url": {
            "type": "string",
            "format": "uri",
            "description": "Server API resource; requires invoices:read and an Authorization header."
          },
          "edit_url": {
            "type": "string",
            "format": "uri",
            "description": "Signed-in draft editor. Present only when the response identifies the invoice as a draft."
          }
        }
      }
    }
  }
}
