---
updatedAt: 2025-06-09T22:41:47.000Z
agentTools:
  projectIndex: https://docs.zenloop.com/llms.txt
---

# Create a User

This endpoint allows you to create a new user in the system. Ensure all required fields are included in the request body.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "api",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.zenloop.com"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/v1/users": {
      "post": {
        "summary": "Create a User",
        "description": "This endpoint allows you to create a new user in the system. Ensure all required fields are included in the request body.",
        "operationId": "create-users-1",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "schema": {
              "type": "string",
              "default": "Bearer <token>"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "user": {
                    "properties": {
                      "email": {
                        "type": "string",
                        "description": "User's email address."
                      },
                      "first_name": {
                        "type": "string",
                        "description": "User's first name."
                      },
                      "last_name": {
                        "type": "string",
                        "description": "User's last name."
                      },
                      "password": {
                        "type": "string",
                        "description": "User account password."
                      },
                      "country": {
                        "type": "string",
                        "description": "User's country of origin."
                      },
                      "job_title": {
                        "type": "string",
                        "description": "User's job title."
                      },
                      "department": {
                        "type": "string",
                        "description": "User's work department."
                      },
                      "phone": {
                        "type": "string",
                        "description": "User's phone number."
                      },
                      "metadata": {
                        "type": "object",
                        "description": "User's metadata.",
                        "properties": {}
                      }
                    },
                    "required": [
                      "email",
                      "password"
                    ],
                    "type": "object",
                    "description": "User information data."
                  }
                }
              },
              "examples": {
                "Request Example": {
                  "value": {
                    "user": {
                      "email": "test@zenloop.com",
                      "first_name": "Zen",
                      "last_name": "Loopsky",
                      "password": "Zen.Loopy1?",
                      "country": "Poland",
                      "job_title": "CEO",
                      "department": "BI",
                      "phone": "500500500",
                      "metadata": {
                        "example_1": "value_1",
                        "example_2": "value_2",
                        "example_3": "value_3"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"country\": \"Germany\",\n  \"department\": \"BI,\n  \"email\": \"zenloop@zenloop.com\",\n  \"first_name\": \"Zen\",\n  \"id\": 244873,\n  \"inserted_at\": \"2022-08-09T22:48:51Z\",\n  \"invitation_sender_id\": 244872,\n  \"job_title\": \"CEO\",\n  \"language_id\": 79230,\n  \"last_name\": \"Loopsky\",\n  \"metadata\": {\n    \"guid\": \"12345\"\n  },\n  \"organization_id\": 193597,\n  \"phone\": \"500500500,\n  \"status\": \"active\"\n}"
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error\": {\n    \"status\": 400,\n    \"code\": \"INVALID_REQUEST\",\n    \"links\": {\n      \"documentation\": \"https://docs.zenloop.com/v1.0/reference#create-users-1\"\n    },\n    \"title\": \"Invalid request body.\",\n    \"details\": [{\n      \"detail\": \"Required property email was not present.\",\n      \"pointer\": \"\"\n    }]\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "example": 400,
                          "default": 0
                        },
                        "code": {
                          "type": "string",
                          "example": "INVALID_REQUEST"
                        },
                        "links": {
                          "type": "object",
                          "properties": {
                            "documentation": {
                              "type": "string",
                              "example": "https://docs.zenloop.com/v1.0/reference#create-users-1"
                            }
                          }
                        },
                        "title": {
                          "type": "string",
                          "example": "Invalid request body."
                        },
                        "details": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "detail": {
                                "type": "string",
                                "example": "Required property email was not present."
                              },
                              "pointer": {
                                "type": "string",
                                "example": ""
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error\": {\n    \"code\": \"UNAUTHORIZED\",\n    \"status\": 401,\n    \"title\": \"Invalid or expired token.\"\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "UNAUTHORIZED"
                        },
                        "status": {
                          "type": "integer",
                          "example": 401,
                          "default": 0
                        },
                        "title": {
                          "type": "string",
                          "example": "Invalid or expired token."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"errors\": [\n    {\n      \"details\": \"Sorry, this action is not available to you under your current user role. Please contact your Account Owner for more details.\"\n    }\n  ]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "details": {
                            "type": "string",
                            "example": "Sorry, this action is not available to you under your current user role. Please contact your Account Owner for more details."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"errors\": [\n    {\n      \"password\": \"Password must be between 10 and 256 characters and include minimum one number, upper and lower case letter, and can't repeat 3 same characters in a row\"\n    }\n  ]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "password": {
                            "type": "string",
                            "example": "Password must be between 10 and 256 characters and include minimum one number, upper and lower case letter, and can't repeat 3 same characters in a row"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "429",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error\": {\n    \"status\": 429,\n    \"code\": \"TOO_MANY_REQUESTS\",\n    \"title\": \"Rate limit exceeded.\"\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "example": 429,
                          "default": 0
                        },
                        "code": {
                          "type": "string",
                          "example": "TOO_MANY_REQUESTS"
                        },
                        "title": {
                          "type": "string",
                          "example": "Rate limit exceeded."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "key": "Content-Type",
        "value": "application/json"
      }
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```