---
updatedAt: 2026-05-27T18:13:03.000Z
agentTools:
  projectIndex: https://docs.infiniaweb.com/llms.txt
---

# Create Subcompany

Create a subcompany.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Onboarding",
    "description": "Create customers and enable products",
    "version": "0.1.0"
  },
  "servers": [
    {
      "url": "https://app2test.infiniaweb.com/infinia_api/v1/onboarding",
      "description": "Sandbox"
    }
  ],
  "paths": {
    "/company/": {
      "post": {
        "tags": [
          "Onboarding"
        ],
        "summary": "Create Subcompany",
        "description": "Create a subcompany.",
        "operationId": "v1_create_company_endpoint_company__post",
        "security": [
          {
            "HTTPBasic": []
          }
        ],
        "parameters": [
          {
            "name": "x-company-id",
            "in": "header",
            "required": false,
            "schema": {
              "description": "ID of a child company for authentication. If not provided, the parent company will be authenticated.",
              "title": "X-Company-Id",
              "type": "integer"
            },
            "description": "ID of a child company for authentication. If not provided, the parent company will be authenticated."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCompanyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyResponse"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CompanyResponse": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status",
            "default": "success",
            "enum": [
              "success"
            ]
          },
          "data": {
            "$ref": "#/components/schemas/ShowableCompany"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "CompanyResponse"
      },
      "CreateCompanyRequest": {
        "properties": {
          "business_name": {
            "type": "string",
            "maxLength": 500,
            "title": "Business Name",
            "description": "Business legal name"
          },
          "friendly_name": {
            "type": "string",
            "maxLength": 500,
            "title": "Friendly Name",
            "description": "Business friendly name (trading name)"
          },
          "country_of_registration": {
            "type": "string",
            "pattern": "^\\w{2}$",
            "title": "Country Of Registration",
            "description": "Country of registration in ISO 3166-1 alpha-2 format, e.g. AR, BR, etc."
          },
          "registration_number": {
            "type": "string",
            "maxLength": 100,
            "title": "Registration Number",
            "description": "Registration number, e.g. CNPJ, VAT number, etc."
          },
          "entity_type": {
            "type": "string",
            "maxLength": 100,
            "title": "Entity Type",
            "description": "Entity type, e.g. LLC, INC, etc."
          },
          "idempotency_key": {
            "title": "Idempotency Key",
            "description": "A unique key that ensures a request is processed only once. If the same key is sent with multiple requests, the server returns the original response instead of performing the action again.",
            "type": "string",
            "maxLength": 36
          },
          "acc_default_webhook_url": {
            "title": "Acc Default Webhook Url",
            "description": "Account default webhook URL. All the accounts created for this company will have this webhook url by default",
            "type": "string",
            "maxLength": 512
          }
        },
        "type": "object",
        "required": [
          "business_name",
          "friendly_name",
          "country_of_registration",
          "registration_number",
          "entity_type"
        ],
        "title": "CreateCompanyRequest"
      },
      "ErrorResponse": {
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "error",
              "fail"
            ],
            "title": "Status",
            "default": "error"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "error_code": {
            "title": "Error Code",
            "type": "string"
          },
          "trace_id": {
            "title": "Trace Id",
            "type": "string"
          }
        },
        "type": "object",
        "required": [
          "message"
        ],
        "title": "Error Response"
      },
      "Geographies": {
        "type": "string",
        "enum": [
          "AR",
          "BR",
          "CL",
          "CO",
          "MX",
          "PE",
          "PY",
          "UY",
          "US",
          "EU",
          "GB",
          "XX",
          "BO",
          "SG",
          "WR"
        ],
        "title": "Geographies"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "ProductRequestStatus": {
        "type": "string",
        "enum": [
          "PENDING",
          "APPROVED",
          "REJECTED",
          "KYB_REQUIRED",
          "KYB_FAILED",
          "AWAITING_ADDITIONAL_INFO"
        ],
        "title": "ProductRequestStatus"
      },
      "Products": {
        "type": "string",
        "enum": [
          "PAYINS",
          "PAYOUTS",
          "ACCOUNT_VALIDATION",
          "IDENTITY_VALIDATION",
          "ONBOARDING",
          "INTERNAL_TRANSFER",
          "CREDIT_REFUND",
          "PAYIN_REFUND"
        ],
        "title": "Products"
      },
      "ShowableCompany": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Company ID"
          },
          "idempotency_key": {
            "title": "Idempotency Key",
            "description": "A unique key that ensures a request is processed only once. If the same key is sent with multiple requests, the server returns the original response instead of performing the action again.",
            "type": "string"
          },
          "created_at": {
            "title": "Created At",
            "description": "Creation date of the company",
            "type": "string",
            "format": "date-time"
          },
          "business_name": {
            "title": "Business Name",
            "description": "Business legal name",
            "type": "string"
          },
          "friendly_name": {
            "title": "Friendly Name",
            "description": "Business friendly name (trading name)",
            "type": "string"
          },
          "country_of_registration": {
            "title": "Country Of Registration",
            "description": "Country of registration in ISO 3166-1 alpha-2 format, e.g. AR, BR, etc.",
            "type": "string"
          },
          "registration_number": {
            "title": "Registration Number",
            "description": "Registration number, e.g. CNPJ, VAT number, etc.",
            "type": "string"
          },
          "entity_type": {
            "title": "Entity Type",
            "description": "Entity type, e.g. LLC, INC, etc.",
            "type": "string"
          },
          "acc_default_webhook_url": {
            "title": "Acc Default Webhook Url",
            "description": "Account default webhook URL. All the accounts created for this company will have this webhook url by default",
            "type": "string"
          },
          "parent_company_id": {
            "title": "Parent Company Id",
            "description": "Parent company ID",
            "type": "string"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "ShowableCompany"
      },
      "ShowableProduct": {
        "properties": {
          "company_id": {
            "title": "Company Id",
            "description": "Company ID",
            "type": "string"
          },
          "requested_at": {
            "title": "Requested At",
            "description": "Request date of the product",
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "title": "Updated At",
            "description": "Last update date of the product request",
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "description": "Status of the product request",
            "$ref": "#/components/schemas/ProductRequestStatus"
          },
          "product": {
            "description": "Product requested",
            "$ref": "#/components/schemas/Products"
          },
          "geography": {
            "description": "Geography of the product. For crypto, it will be XX",
            "$ref": "#/components/schemas/Geographies"
          },
          "callback_url": {
            "title": "Callback Url",
            "description": "Callback URL for the product",
            "type": "string"
          }
        },
        "type": "object",
        "title": "ShowableProduct"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    },
    "securitySchemes": {
      "HTTPBasic": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "webhooks": {
    "product.updated": {
      "post": {
        "operationId": "v1_webhook_product_updated",
        "summary": "Product updated",
        "description": "Sent when a product request changes status (e.g. `PENDING` → `APPROVED`). Set the destination URL using `callback_url` when enabling a product. The body is identical to an item from the [Get Company Products](ref:v1_get_products_endpoint_company__company_id__product__get) response.",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShowableProduct"
              },
              "example": {
                "company_id": "42",
                "product": "PAYINS",
                "geography": "BR",
                "status": "APPROVED",
                "callback_url": "https://your-server.com/webhooks/onboarding",
                "requested_at": "2024-05-30T10:00:00Z",
                "updated_at": "2024-05-30T10:05:00Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx response is treated as a successful acknowledgement. Infinia will retry delivery on non-2xx responses."
          }
        }
      }
    }
  }
}
```