---
title: Move account to organization
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/go)

[Accounts](https://developers.cloudflare.com/api/go/resources/accounts)

[Account Organizations](https://developers.cloudflare.com/api/go/resources/accounts/subresources/account_organizations)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Move account to organization

client.Accounts.AccountOrganizations.New(ctx, params) (\*[AccountOrganizationNewResponse](<https://developers.cloudflare.com/api/go/resources/accounts#(resource)%20accounts.account_organizations%20%3E%20(model)%20AccountOrganizationNewResponse%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/move

Move an account into a destination organization, either assigning a standalone account to an organization or moving it between organizations in the same hierarchy. Availability depends on the organization’s capabilities. (Currently in Public Beta - see https://developers.cloudflare.com/fundamentals/organizations/)

##### Security

API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**`X-Auth-Email: user@example.com`

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**`X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194`

##### ParametersExpand Collapse

<details>

<summary>

params AccountOrganizationNewParams

</summary>

AccountID param.Field\[string]

Path param: The ID of the account to move.

<a href="#(resource)%20accounts.account_organizations%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20account_id">Link to this property</a>

DestinationOrganizationID param.Field\[string]

Body param: The ID of the organization to move the account into.

<a href="#(resource)%20accounts.account_organizations%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20destination_organization_id">Link to this property</a>

</details>

[Link to this property](<#(resource)%20accounts.account_organizations%20%3E%20(method)%20create%20%3E%20(params)%20default>)

##### ReturnsExpand Collapse

<details>

<summary>

type AccountOrganizationNewResponse struct{…}

</summary>

AccountID string

<a href="#(resource)%20accounts.account_organizations%20%3E%20(model)%20AccountOrganizationNewResponse%20%3E%20(schema)%20%3E%20(property)%20account_id">Link to this property</a>

DestinationOrganizationID string

<a href="#(resource)%20accounts.account_organizations%20%3E%20(model)%20AccountOrganizationNewResponse%20%3E%20(schema)%20%3E%20(property)%20destination_organization_id">Link to this property</a>

SourceOrganizationID string

<a href="#(resource)%20accounts.account_organizations%20%3E%20(model)%20AccountOrganizationNewResponse%20%3E%20(schema)%20%3E%20(property)%20source_organization_id">Link to this property</a>

</details>

[Link to this property](<#(resource)%20accounts.account_organizations%20%3E%20(model)%20AccountOrganizationNewResponse%20%3E%20(schema)>)

### Move account to organization

Go

HTTPTypeScriptPythonGoTerraform

```
package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/accounts"
  "github.com/cloudflare/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"),
    option.WithAPIEmail("user@example.com"),
  )
  accountOrganization, err := client.Accounts.AccountOrganizations.New(context.TODO(), accounts.AccountOrganizationNewParams{
    AccountID: cloudflare.F("account_id"),
    DestinationOrganizationID: cloudflare.F("destination_organization_id"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", accountOrganization.AccountID)
}
```

200 example

```
{
  "errors": [],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": {
    "account_id": "account_id",
    "destination_organization_id": "destination_organization_id",
    "source_organization_id": "source_organization_id"
  },
  "success": true
}
```

##### Returns Examples

200 example

```
{
  "errors": [],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": {
    "account_id": "account_id",
    "destination_organization_id": "destination_organization_id",
    "source_organization_id": "source_organization_id"
  },
  "success": true
}
```