---
updatedAt: 2026-07-03T12:41:21.000Z
agentTools:
  projectIndex: https://developer.xentral.com/llms.txt
---

# 🔒 Create account

This endpoint is currently in Beta and available for testing. It may contain bugs, and breaking changes can occur at any time without prior notice. We do not recommend using Beta endpoints in production environments. Should you choose to use it in production, you assume full responsibility for any resulting issues.

Creates a single account.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Xentral API",
    "version": "v0.1",
    "description": "Xentral is an ERP platform.",
    "contact": {
      "name": "Xentral",
      "url": "https://xentral.com",
      "email": "api@xentral.com"
    }
  },
  "tags": [
    {
      "name": "Account",
      "description": "Account configurations"
    }
  ],
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Bearer token obtained in POST /tokens endpoint or pregenerated in the system."
      }
    }
  },
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://{xentralId}.xentral.biz",
      "description": "Your Xentral Instance",
      "variables": {
        "xentralId": {
          "default": "xentral"
        }
      }
    },
    {
      "url": "https://{domain}",
      "description": "Xentral at a custom domain",
      "variables": {
        "domain": {
          "default": "xentral.com"
        }
      }
    }
  ],
  "x-readme": {
    "samples-languages": []
  },
  "paths": {
    "/api/v1/account": {
      "post": {
        "tags": [
          "Account"
        ],
        "operationId": "account.create.v1",
        "summary": "🔒 Create account",
        "description": "This endpoint is currently in Beta and available for testing. It may contain bugs, and breaking changes can occur at any time without prior notice. We do not recommend using Beta endpoints in production environments. Should you choose to use it in production, you assume full responsibility for any resulting issues.\n\nCreates a single account.",
        "requestBody": {
          "description": "Create an account object",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "required": [
                  "accountNumber",
                  "accountType",
                  "name",
                  "description"
                ],
                "properties": {
                  "accountNumber": {
                    "type": "string",
                    "description": "Account number"
                  },
                  "accountType": {
                    "type": "string",
                    "maxLength": 50,
                    "description": "Account type"
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Account name"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "Account description"
                  },
                  "isStandard": {
                    "type": "boolean",
                    "default": false,
                    "description": "Is standard account"
                  }
                }
              },
              "examples": {
                "account": {
                  "value": {
                    "accountNumber": "1000",
                    "accountType": "asset",
                    "name": "Cash Account",
                    "description": "Main cash account for daily operations",
                    "isStandard": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "Account entry",
                  "properties": {
                    "id": {
                      "description": "Account ID",
                      "type": "string",
                      "example": "1"
                    },
                    "accountNumber": {
                      "description": "Account number",
                      "type": "string",
                      "example": "1000"
                    },
                    "accountType": {
                      "description": "Account type",
                      "type": "string",
                      "maxLength": 50,
                      "example": "asset"
                    },
                    "name": {
                      "description": "Account name",
                      "type": "string",
                      "maxLength": 100,
                      "example": "Cash Account"
                    },
                    "description": {
                      "description": "Account description",
                      "type": "string",
                      "maxLength": 255,
                      "example": "Main cash account for daily operations"
                    },
                    "isStandard": {
                      "description": "Is standard account",
                      "type": "boolean",
                      "example": false
                    },
                    "deletedAt": {
                      "description": "Deleted at timestamp",
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "example": null
                    },
                    "createdAt": {
                      "description": "Created at timestamp",
                      "type": "string",
                      "format": "date-time",
                      "example": "2022-01-01T00:00:00Z"
                    },
                    "updatedAt": {
                      "description": "Updated at timestamp",
                      "type": "string",
                      "format": "date-time",
                      "example": "2022-01-01T00:00:00Z"
                    }
                  },
                  "example": {
                    "id": "1",
                    "accountNumber": "1000",
                    "accountType": "asset",
                    "name": "Cash Account",
                    "description": "Main cash account for daily operations",
                    "isStandard": false,
                    "deletedAt": null,
                    "createdAt": "2022-01-01T00:00:00Z",
                    "updatedAt": "2022-01-01T00:00:00Z"
                  }
                }
              }
            }
          },
          "400": {
            "description": "XGL Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "description": "XGL Problem specification",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "URL of the problem",
                      "example": "https://api.xentral.biz/problems/xgl-error"
                    },
                    "title": {
                      "type": "string",
                      "description": "title of the error. It should be always XGL Error",
                      "example": "XGL Error"
                    },
                    "errorCode": {
                      "type": "integer",
                      "description": "Error code regarding the request failure",
                      "enum": [
                        1,
                        2,
                        3,
                        4,
                        5,
                        6,
                        7,
                        8,
                        9,
                        10,
                        11,
                        12
                      ],
                      "example": 1
                    },
                    "message": {
                      "type": "string",
                      "description": "General description about the failed request",
                      "enum": [
                        "Error listing tax obligations",
                        "Error creating tax obligation",
                        "Error listing taxes",
                        "Error getting account information",
                        "Error getting account mapping information",
                        "Error listing account mappings",
                        "Error creating account mapping",
                        "Error updating account mapping",
                        "Error deleting account mapping",
                        "Error creating tax",
                        "Error updating tax",
                        "Error getting general ledger"
                      ],
                      "example": "Error getting account information"
                    },
                    "details": {
                      "type": "object",
                      "description": "Object containing the fields and their specifications",
                      "additionalProperties": {
                        "type": "string"
                      },
                      "example": {
                        "field": "Additional error detail"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unable to authenticate the client",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "description": "Error message explaining why the request failed.",
                      "example": "Missing required scopes: customer:create."
                    }
                  }
                },
                "example": {
                  "message": "Missing required scopes: customer:create."
                }
              },
              "text/html": {
                "schema": {
                  "type": "string",
                  "example": "Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Unable to authorize the client"
          },
          "409": {
            "description": "IETF RFC 9457 Problem API compliant response",
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "title",
                        "violations"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "https://api.xentral.biz/problems/request-validation"
                          ]
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "example": "Request payload validation failed."
                        },
                        "violations": {
                          "oneOf": [
                            {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "example": {
                                  "username": [
                                    "This value should not be blank."
                                  ],
                                  "email": [
                                    "This value is not a valid email address."
                                  ]
                                }
                              },
                              "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages."
                            },
                            {
                              "type": "object",
                              "example": {
                                "_": [
                                  "This value should contain at most `9` elements."
                                ]
                              },
                              "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages."
                            }
                          ]
                        }
                      }
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "title",
                        "messages"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "https://api.xentral.biz/problems/generic-validation"
                          ]
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1
                        },
                        "messages": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "title",
                        "messages"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "https://api.xentral.biz/problems/conflict"
                          ]
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1
                        },
                        "messages": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "title",
                        "items"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "https://api.xentral.biz/problems/conflictItems"
                          ]
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "required": [
                              "id",
                              "title",
                              "messages"
                            ],
                            "properties": {
                              "id": {
                                "type": "integer"
                              },
                              "title": {
                                "type": "string",
                                "minLength": 1
                              },
                              "messages": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "title",
                        "scopes"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "https://developer.xentral.com/reference/problems#token-scopes"
                          ]
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "title",
                        "messages"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "https://api.xentral.biz/problems/generic-validation"
                          ]
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1
                        },
                        "messages": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "415": {
            "description": "Resource representation send in the request is not supported."
          },
          "429": {
            "description": "Too many API calls made."
          },
          "500": {
            "description": "XGL Problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "description": "XGL Problem specification",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "URL of the problem",
                      "example": "https://api.xentral.biz/problems/xgl-error"
                    },
                    "title": {
                      "type": "string",
                      "description": "title of the error. It should be always XGL Error",
                      "example": "XGL Error"
                    },
                    "errorCode": {
                      "type": "integer",
                      "description": "Error code regarding the request failure",
                      "enum": [
                        1,
                        2,
                        3,
                        4,
                        5,
                        6,
                        7,
                        8,
                        9,
                        10,
                        11,
                        12
                      ],
                      "example": 1
                    },
                    "message": {
                      "type": "string",
                      "description": "General description about the failed request",
                      "enum": [
                        "Error listing tax obligations",
                        "Error creating tax obligation",
                        "Error listing taxes",
                        "Error getting account information",
                        "Error getting account mapping information",
                        "Error listing account mappings",
                        "Error creating account mapping",
                        "Error updating account mapping",
                        "Error deleting account mapping",
                        "Error creating tax",
                        "Error updating tax",
                        "Error getting general ledger"
                      ],
                      "example": "Error getting account information"
                    },
                    "details": {
                      "type": "object",
                      "description": "Object containing the fields and their specifications",
                      "additionalProperties": {
                        "type": "string"
                      },
                      "example": {
                        "field": "Additional error detail"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
```