> For the complete documentation index, see [llms.txt](https://docs.flowretail.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flowretail.com/docs/developers/api-documentation/organization/create-a-new-organization.md).

# Create a new organization

Creates a new organization.

Required permissions: ORGANIZATION

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Organization","description":"Organization"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"requestBodies":{"OrganizationCreateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationCreateRequestSchema"}}}}},"schemas":{"OrganizationCreateRequestSchema":{"allOf":[{"$ref":"#/components/schemas/OrganizationUpdateRequestSchema"},{"properties":{"organizationUid":{"$ref":"#/components/schemas/UID"}}}],"type":"object","title":"OrganizationCreateRequestSchema"},"OrganizationUpdateRequestSchema":{"title":"OrganizationUpdateRequestSchema","type":"object","required":["name"],"properties":{"address":{"type":"string"},"city":{"type":"string"},"countryCode":{"type":"string"},"email":{"$ref":"#/components/schemas/EmailTYPE"},"externalId":{"type":"string"},"isActive":{"type":"boolean"},"name":{"type":"string"},"phone":{"type":"string"},"postalCode":{"type":"string"},"vatNumber":{"$ref":"#/components/schemas/VatNumberTYPE"},"websiteUrl":{"type":"string"},"bankInfo":{"$ref":"#/components/schemas/BankInfoRequestSchema"},"appSettings":{"$ref":"#/components/schemas/OrgAppSettingRequestSchema"},"fiscal":{"$ref":"#/components/schemas/OrganizationFiscalRequestSchema"}}},"EmailTYPE":{"title":"Email","type":"string"},"VatNumberTYPE":{"description":"VAT identification number for value added tax reporting purposes.","title":"VatNumber","type":"string"},"BankInfoRequestSchema":{"title":"BankInfoSchema","type":"object","properties":{"accountNumber":{"type":"string"},"bankName":{"type":"string"},"iban":{"type":"string"},"swift":{"type":"string"},"giroAccountNumber":{"type":"string","description":"National giro/payment-slip creditor account tied to the bank account, e.g. the Danish FIK creditor number (8 digits). Used to emit a giro payment block (FIK) on electronic invoices."}}},"OrgAppSettingRequestSchema":{"title":"OrgAppSettingRequestSchema","type":"object","properties":{"requireGtinScanBeforeDeliverOut":{"type":"boolean"}}},"OrganizationFiscalRequestSchema":{"title":"OrganizationFiscalRequestSchema","type":"object","description":"What a client may write about the organization's relationship to the\nfiscal control system. Everything the control system hands back - the\ntaxpayer id, its state, the unit id - is written by us during\nenrollment and is read-only.\n","properties":{"credentials":{"$ref":"#/components/schemas/FiscalCredentialsRequestSchema"}}},"FiscalCredentialsRequestSchema":{"title":"FiscalCredentialsRequestSchema","type":"object","description":"The credential the fiscal control system issued for this organization's\nown unit.\n\nSending this asks the fiscal control system for a token before anything\nis stored, and the update is refused unless the answer names the unit\ngiven here. A mistyped key is therefore rejected where the mistake is\nmade, rather than surfacing when someone fiscalizes a till - and a\ncredential that does not work is never written.\n\nWrite-only. None of these values are returned in any response: the\nsecret is shown once by the fiscal control system and cannot be revoked\nover its API, so a copy that escapes is permanent until a person\nrevokes it in the provider portal.\n\nAll three are required together. An API key stored without its secret\nis a pair that cannot authenticate, and the mismatch would not surface\nuntil someone tried to fiscalize a till.\n","required":["unitId","apiKey","secret"],"properties":{"unitId":{"type":"string","description":"Identifier of the organization as a unit at the fiscal control\nsystem. Checked against the credential on every call: the token\nresponse names the node the key belongs to, and a mismatch fails\nthe call before anything is created.\n"},"apiKey":{"type":"string","description":"The API key the unit issued. Identifies the credential; it is the\nsecret beside it that grants anything.\n"},"secret":{"type":"string","format":"password","description":"The secret the fiscal control system showed once. Stored sealed,\nremoved from the request log on the way in, and never returned.\nThe format marks it for renderers and form generators, so it is\nmasked rather than shown as an ordinary string.\n"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"OrganizationResponseSchema":{"title":"OrganizationResponseSchema","type":"object","required":["address","city","countryCode","createdAt","email","externalId","isActive","lastModifiedAt","name","postalCode","phone","organizationUid","vatNumber","bankInfo","websiteUrl","appSettings"],"properties":{"address":{"type":"string"},"city":{"type":"string"},"countryCode":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"email":{"$ref":"#/components/schemas/EmailTYPE"},"externalId":{"type":"string"},"isActive":{"type":"boolean"},"lastModifiedAt":{"format":"date-time","type":"string"},"name":{"type":"string"},"postalCode":{"type":"string"},"phone":{"type":"string"},"organizationUid":{"$ref":"#/components/schemas/UID"},"vatNumber":{"$ref":"#/components/schemas/VatNumberTYPE"},"bankInfo":{"$ref":"#/components/schemas/BankInfoResponseSchema"},"websiteUrl":{"type":"string"},"appSettings":{"$ref":"#/components/schemas/OrgAppSettingResponseSchema"},"fiscal":{"$ref":"#/components/schemas/OrganizationFiscalResponseSchema"}}},"BankInfoResponseSchema":{"title":"BankInfoResponseSchema","type":"object","required":["accountNumber","bankName","iban","swift","giroAccountNumber"],"properties":{"accountNumber":{"type":"string"},"bankName":{"type":"string"},"iban":{"type":"string"},"swift":{"type":"string"},"giroAccountNumber":{"type":"string","description":"National giro/payment-slip creditor account tied to the bank account, e.g. the Danish FIK creditor number (8 digits). Used to emit a giro payment block (FIK) on electronic invoices."}}},"OrgAppSettingResponseSchema":{"title":"OrgAppSettingResponseSchema","type":"object","required":["requireGtinScanBeforeDeliverOut"],"properties":{"requireGtinScanBeforeDeliverOut":{"type":"boolean"}}},"OrganizationFiscalResponseSchema":{"title":"OrganizationFiscalResponseSchema","type":"object","description":"The organization's identity at the fiscal control system.\n\nThe object is absent for an organization that has nothing to do with\nfiscalization, which is every organization outside the countries the\nintegration covers. It appears as soon as anything fiscal has been\nentered or enrolled, and every field inside it is then present: a value\nnot yet assigned is an empty string, never null.\n","required":["unitId","credentialsStored","taxpayerId","taxpayerState"],"properties":{"unitId":{"type":"string","description":"Identifier of the organization as a unit at the fiscal control\nsystem. Not a secret, and the value most often mistyped, so it is\nreturned to be checked. Empty until it has been entered.\n"},"credentialsStored":{"type":"boolean","description":"Whether an API key and secret are stored for this organization.\nThe values are never returned. To confirm that a credential\nauthenticates, send it again in fiscal.credentials on an\norganization update: it is verified before it is stored.\n"},"taxpayerId":{"type":"string","description":"Identifier of the organization as a taxpayer at the fiscal control\nsystem. Written when the organization is enrolled, and empty until\nthen.\n"},"taxpayerState":{"description":"Current state of the organization's taxpayer at the fiscal control\nsystem. Empty until the organization has been enrolled. Nothing\nbelow it - a store's location, a till's register - can be created\nuntil this is COMMISSIONED.\n","$ref":"#/components/schemas/FiscalRegisterStateENUM"}}},"FiscalRegisterStateENUM":{"description":"State of a resource at the fiscal control system: an organization's\ntaxpayer, a store's location, or a till's register. The three share\none set of states and are commissioned top down.\n\nThe empty string is a state of its own: the resource has not been\nregistered yet. It exists because the fiscal objects carry no nullable\nfields - an object that is present has every field present, and \"not\nyet\" is the empty value.\n|ENUM | Description |\n| --- | --- |\n|  | Not registered at the fiscal control system |\n| ACQUIRED | Registered, not yet commissioned |\n| COMMISSIONED | Billing has started |\n| DECOMMISSIONED | Permanently retired, cannot be undone |","enum":["","ACQUIRED","COMMISSIONED","DECOMMISSIONED"],"title":"FiscalRegisterState","type":"string"}},"responses":{"OrganizationResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponseSchema"}}},"description":"Example response"}}},"paths":{"/tenants/{tenantUid}/organizations":{"post":{"description":"Creates a new organization.\n\nRequired permissions: ORGANIZATION","operationId":"post-tenants-organizations","requestBody":{"$ref":"#/components/requestBodies/OrganizationCreateRequest"},"responses":{"200":{"$ref":"#/components/responses/OrganizationResponse"}},"summary":"Create a new organization","tags":["Organization"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flowretail.com/docs/developers/api-documentation/organization/create-a-new-organization.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
