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

# Register a new company

> Creates a company account and returns a client_id and api_key for API authentication.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/company/register
openapi: 3.0.0
info:
  title: PlugToPay API
  description: API to make payments easy in multiple gateways.
  version: 1.0.0
servers:
  - url: http://localhost:7701
    description: Test Server
security: []
paths:
  /api/v1/company/register:
    post:
      tags:
        - Company
      summary: Register a new company
      description: >-
        Creates a company account and returns a client_id and api_key for API
        authentication.
      operationId: c60a28a0f2eca736f05349ac7a573195
      parameters:
        - $ref: '#/components/parameters/XClientId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
                - name
              properties:
                name:
                  type: string
                  example: Acme Corp
                gateway_ids:
                  type: array
                  items:
                    type: integer
                  example:
                    - 1
                    - 2
                  nullable: true
                email:
                  type: string
                  format: email
                  example: finance@acme.com
                  nullable: true
                document:
                  type: string
                  example: '12345678000195'
                  nullable: true
                document_type:
                  type: string
                  enum:
                    - cpf
                    - cnpj
                  example: cnpj
                  nullable: true
                type:
                  type: string
                  enum:
                    - individual
                    - corporation
                  example: corporation
                  nullable: true
                bank_account:
                  description: Required when gateway_ids is provided
                  properties:
                    holder_name:
                      type: string
                      example: Acme Corp
                    holder_type:
                      type: string
                      enum:
                        - individual
                        - company
                      example: company
                    holder_document:
                      type: string
                      example: '12345678000195'
                    bank:
                      type: string
                      example: '341'
                    branch_number:
                      type: string
                      example: '0001'
                    account_number:
                      type: string
                      example: '12345678'
                    account_check_digit:
                      type: string
                      example: '9'
                    type:
                      type: string
                      enum:
                        - checking
                        - savings
                      example: checking
                  type: object
                  nullable: true
              type: object
      responses:
        '200':
          description: Company registered successfully
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                    example: Company registered successfully!
                  credentials:
                    properties:
                      client_id:
                        type: string
                        example: client_a1b2c3d4e5f6g7h8
                      api_key:
                        type: string
                        example: sk_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6
                      warning:
                        type: string
                        example: Save your api_key safely, it won't be showed again.
                    type: object
                type: object
        '422':
          description: Validation Error
components:
  parameters:
    XClientId:
      name: x-client-id
      in: header
      description: Client identifier for the company in the request.
      required: true
      schema:
        type: string
        example: client_abc123

````