---
agentTools:
  projectIndex: https://copperx.readme.io/llms.txt
---

# Create a customer

Creates a customer

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "paths": {
    "/api/v1/customers": {
      "post": {
        "operationId": "CustomerController_create",
        "summary": "Create a customer",
        "description": "Creates a customer",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCustomerDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerDto"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDto"
                }
              }
            }
          }
        },
        "tags": [
          "Customer"
        ],
        "security": [
          {
            "bearer": []
          }
        ]
      }
    }
  },
  "info": {
    "title": "Copperx API",
    "description": "Copperx APIs allows you to access to manage payments, transactions and more in a simple way. Our APIs are easy to use and provide an intuitive APIs for developers to create powerful applications.",
    "version": "v0.0.0",
    "contact": {
      "name": "Copperx",
      "url": "https://t.me/+bVxXaalfhF8wMDFl",
      "email": "support@copperx.io"
    }
  },
  "servers": [
    {
      "url": "https://api.copperx.dev",
      "description": "Test"
    },
    {
      "url": "https://api.copperx.io",
      "description": "Production"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "type": "http"
      }
    },
    "schemas": {
      "ErrorDto": {
        "type": "object",
        "properties": {
          "message": {
            "type": "object"
          },
          "statusCode": {
            "type": "number"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "message",
          "statusCode",
          "error"
        ]
      },
      "AddressDetailDto": {
        "type": "object",
        "properties": {
          "line1": {
            "type": "string"
          },
          "line2": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "postalCode": {
            "type": "string"
          },
          "country": {
            "type": "string"
          }
        }
      },
      "CreateTaxIdDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "country": {
            "type": "string"
          }
        }
      },
      "CreateTaxIdsDto": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateTaxIdDto"
            }
          }
        }
      },
      "EntityVisibility": {
        "type": "string",
        "enum": [
          10,
          20
        ]
      },
      "FullAddressDetailDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name"
          },
          "email": {
            "type": "string",
            "description": "The email"
          },
          "phone": {
            "type": "string",
            "description": "The phone"
          },
          "organizationName": {
            "type": "string",
            "description": "The organization name"
          },
          "address": {
            "description": "The address",
            "allOf": [
              {
                "$ref": "#/components/schemas/AddressDetailDto"
              }
            ]
          }
        }
      },
      "TaxIdDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "customerId": {
            "type": "string",
            "format": "uuid",
            "example": "c3611c05-df51-4b47-b601-f2eac02f4ef0"
          }
        },
        "required": [
          "id",
          "customerId"
        ]
      },
      "TaxIdsDto": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaxIdDto"
            }
          }
        }
      },
      "CustomerDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name"
          },
          "email": {
            "type": "string",
            "description": "The email"
          },
          "phone": {
            "type": "string",
            "description": "The phone"
          },
          "organizationName": {
            "type": "string",
            "description": "The organization name"
          },
          "address": {
            "description": "The address",
            "allOf": [
              {
                "$ref": "#/components/schemas/AddressDetailDto"
              }
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "example": "c3611c05-df51-4b47-b601-f2eac02f4ef0",
            "description": "Customer's id"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string",
            "description": "Customer's created at"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string",
            "description": "Customer's updated at"
          },
          "customerReferenceId": {
            "type": "string",
            "description": "Customer's reference id"
          },
          "shipping": {
            "description": "Customer's shipping address",
            "allOf": [
              {
                "$ref": "#/components/schemas/FullAddressDetailDto"
              }
            ]
          },
          "taxIds": {
            "$ref": "#/components/schemas/TaxIdsDto"
          },
          "visibility": {
            "description": "Customer's visibility. If Dashboard then displayed on dashboard UI. If API then only returned in API response only.",
            "$ref": "#/components/schemas/EntityVisibility"
          },
          "metadata": {
            "type": "object",
            "description": "Customer's metadata"
          },
          "customerNumber": {
            "type": "string",
            "description": "Customer number assigned by the system"
          }
        },
        "required": [
          "id",
          "customerNumber"
        ]
      },
      "CreateCustomerDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name"
          },
          "phone": {
            "type": "string",
            "description": "The phone"
          },
          "organizationName": {
            "type": "string",
            "description": "The organization name"
          },
          "address": {
            "description": "The address",
            "allOf": [
              {
                "$ref": "#/components/schemas/AddressDetailDto"
              }
            ]
          },
          "customerReferenceId": {
            "type": "string",
            "description": "Customer's reference id"
          },
          "shipping": {
            "description": "Customer's shipping address",
            "allOf": [
              {
                "$ref": "#/components/schemas/FullAddressDetailDto"
              }
            ]
          },
          "visibility": {
            "description": "Customer's visibility. If Dashboard then displayed on dashboard UI. If API then only returned in API response only.",
            "$ref": "#/components/schemas/EntityVisibility"
          },
          "metadata": {
            "type": "object",
            "description": "Customer's metadata"
          },
          "email": {
            "type": "string",
            "description": "The email"
          },
          "taxIds": {
            "$ref": "#/components/schemas/CreateTaxIdsDto"
          }
        },
        "required": [
          "email"
        ]
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 99,
      "1": 181,
      "2": 177,
      "3": 27,
      "4": 23,
      "5": 171,
      "6": 139,
      "7": 0,
      "8": 127,
      "9": 93,
      "10": 212,
      "11": 76
    }
  }
}
```