---
updatedAt: 2026-05-14T14:32:15.000Z
agentTools:
  projectIndex: https://docs.oysterhr.com/v0.1/llms.txt
---

# Create customer

Creates a new customer for a reseller.

**This endpoint requires the `X-Oyster-Actor-Email` header when using client credentials authentication.**

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Endpoints",
    "version": "v0.1"
  },
  "components": {
    "securitySchemes": {
      "bearer_auth": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "address": {
        "type": "object",
        "properties": {
          "addressId": {
            "type": "string"
          },
          "addressLine1": {
            "type": "string",
            "nullable": true
          },
          "addressLine2": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "region": {
            "type": "string",
            "nullable": true
          },
          "countryCode": {
            "type": "string",
            "nullable": true
          },
          "postalCode": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "addressId",
          "addressLine1",
          "postalCode"
        ]
      },
      "endClient": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "registrationNumber": {
            "type": "string"
          },
          "countryOfIncorporation": {
            "type": "string"
          },
          "websiteUrl": {
            "type": "string",
            "nullable": true
          },
          "address": {
            "type": "object",
            "$ref": "#/components/schemas/address"
          }
        },
        "required": [
          "name",
          "registrationNumber",
          "countryOfIncorporation",
          "websiteUrl",
          "address"
        ]
      }
    }
  },
  "paths": {
    "/v0.1/reseller/customers": {
      "post": {
        "summary": "Create customer",
        "tags": [
          "Reseller"
        ],
        "description": "Creates a new customer for a reseller.\n\n**This endpoint requires the `X-Oyster-Actor-Email` header when using client credentials authentication.**",
        "security": [
          {
            "bearer_auth": [
              "manage"
            ]
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successfully created customer",
            "content": {
              "application/json": {
                "examples": {
                  "Successfully created customer": {
                    "value": {
                      "data": {
                        "id": "C33471b0",
                        "name": "Example Company",
                        "registrationNumber": "1234567890",
                        "countryOfIncorporation": "GB",
                        "websiteUrl": "https://www.example.com",
                        "address": {
                          "id": "C53c7e9f",
                          "addressId": "C53c7e9f",
                          "addressLine1": "1 Example Street",
                          "addressLine2": "",
                          "city": "London",
                          "region": "LND",
                          "regionName": "London",
                          "countryCode": "GB",
                          "postalCode": "EX1 2AM"
                        }
                      }
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/endClient"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable request",
            "content": {
              "application/json": {
                "examples": {
                  "Unprocessable request": {
                    "value": {
                      "errors": [
                        {
                          "message": "Corporate address has invalid country code XY"
                        },
                        {
                          "message": "Corporate address must match the country of incorporation (GB)"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "registrationNumber": {
                    "type": "string",
                    "minLength": 1
                  },
                  "websiteUrl": {
                    "nullable": true,
                    "type": "string",
                    "minLength": 1,
                    "pattern": "([a-zA-Z][\\-+.a-zA-Z\\d]*): (?# 1: scheme) (?: ((?:[\\-_.!~*'()a-zA-Z\\d;?:@&=+$,]|%[a-fA-F\\d]{2})(?:[\\-_.!~*'()a-zA-Z\\d;/?:@&=+$,\\[\\]]|%[a-fA-F\\d]{2})*) (?# 2: opaque) | (?:(?: //(?: (?:(?:((?:[\\-_.!~*'()a-zA-Z\\d;:&=+$,]|%[a-fA-F\\d]{2})*)@)? (?# 3: userinfo) (?:((?:(?:[a-zA-Z0-9\\-.]|%\\h\\h)+|\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}|\\[(?:(?:[a-fA-F\\d]{1,4}:)*(?:[a-fA-F\\d]{1,4}|\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})|(?:(?:[a-fA-F\\d]{1,4}:)*[a-fA-F\\d]{1,4})?::(?:(?:[a-fA-F\\d]{1,4}:)*(?:[a-fA-F\\d]{1,4}|\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}))?)\\]))(?::(\\d*))?))? (?# 4: host, 5: port) | ((?:[\\-_.!~*'()a-zA-Z\\d$,;:@&=+]|%[a-fA-F\\d]{2})+) (?# 6: registry) ) | (?!//)) (?# XXX: '//' is the mark for hostport) (/(?:[\\-_.!~*'()a-zA-Z\\d:@&=+$,]|%[a-fA-F\\d]{2})*(?:;(?:[\\-_.!~*'()a-zA-Z\\d:@&=+$,]|%[a-fA-F\\d]{2})*)*(?:/(?:[\\-_.!~*'()a-zA-Z\\d:@&=+$,]|%[a-fA-F\\d]{2})*(?:;(?:[\\-_.!~*'()a-zA-Z\\d:@&=+$,]|%[a-fA-F\\d]{2})*)*)*)? (?# 7: path) )(?:\\?((?:[\\-_.!~*'()a-zA-Z\\d;/?:@&=+$,\\[\\]]|%[a-fA-F\\d]{2})*))? (?# 8: query) ) (?:\\#((?:[\\-_.!~*'()a-zA-Z\\d;/?:@&=+$,\\[\\]]|%[a-fA-F\\d]{2})*))? (?# 9: fragment)"
                  },
                  "countryOfIncorporation": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 2
                  },
                  "address": {
                    "type": "object",
                    "properties": {
                      "addressLine1": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 70
                      },
                      "addressLine2": {
                        "type": "string",
                        "maxLength": 70
                      },
                      "city": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 35
                      },
                      "region": {
                        "nullable": true,
                        "type": "string"
                      },
                      "postalCode": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 35
                      },
                      "countryCode": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 2
                      }
                    },
                    "required": [
                      "addressLine1",
                      "city",
                      "postalCode",
                      "countryCode"
                    ]
                  }
                },
                "required": [
                  "name",
                  "registrationNumber",
                  "countryOfIncorporation",
                  "address"
                ]
              },
              "examples": {
                "Successfully created customer": {
                  "summary": "Successfully created customer",
                  "value": {
                    "name": "Example Company",
                    "registrationNumber": "1234567890",
                    "countryOfIncorporation": "GB",
                    "websiteUrl": "https://www.example.com",
                    "address": {
                      "addressLine1": "1 Example Street",
                      "addressLine2": "",
                      "city": "London",
                      "region": "LND",
                      "postalCode": "EX1 2AM",
                      "countryCode": "GB"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.oysterhr.com",
      "description": "Production server"
    },
    {
      "url": "https://api-sandbox.oysterhr.com",
      "description": "Sandbox server"
    }
  ],
  "tags": [
    {
      "name": "Reseller",
      "description": "With the Reseller API, you can manage your customers.\n You can create new customers, update existing customers, and view a list of all customers as well as individual customers."
    }
  ]
}
```