---
title: Create organization member
---

[Skip to content](#_top)

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

[Organizations](https://developers.cloudflare.com/api/go/resources/organizations)

[Members](https://developers.cloudflare.com/api/go/resources/organizations/subresources/members)

Copy Markdown

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

---

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

# Create organization member

client.Organizations.Members.New(ctx, organizationID, body) (\*[OrganizationMember](<https://developers.cloudflare.com/api/go/resources/organizations#(resource)%20organizations.members%20%3E%20(model)%20organization_member%20%3E%20(schema)>), error)

POST/organizations/{organization\_id}/members

Create a membership that grants access to a specific Organization. (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

organizationID string

[Link to this property](<#(resource)%20organizations.members%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20organization_id%20%3E%20(schema)>)

<details>

<summary>

body MemberNewParams

</summary>

<details>

<summary>

Member param.Field\[<a href="https://developers.cloudflare.com/api/go/resources/organizations/subresources/members/methods/create#(resource)%20organizations.members%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20member%20%3E%20(schema)">MemberNewParamsMember</a>]

</summary>

<details>

<summary>

User MemberNewParamsMemberUser

</summary>

Email string

<a href="#(resource)%20organizations.members%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20member%20%3E%20(schema)%20%3E%20(property)%20user%20%3E%20(property)%20email">Link to this property</a>

</details>

<a href="#(resource)%20organizations.members%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20member%20%3E%20(schema)%20%3E%20(property)%20user">Link to this property</a>

<details>

<summary>

Status MemberNewParamsMemberStatusOptional

</summary>

One of the following:

const MemberNewParamsMemberStatusActive MemberNewParamsMemberStatus = "active"

<a href="#(resource)%20organizations.members%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20member%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%200">Link to this property</a>

const MemberNewParamsMemberStatusCanceled MemberNewParamsMemberStatus = "canceled"

<a href="#(resource)%20organizations.members%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20member%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20organizations.members%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20member%20%3E%20(schema)%20%3E%20(property)%20status">Link to this property</a>

</details>

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

</details>

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

##### ReturnsExpand Collapse

<details>

<summary>

type OrganizationMember struct{…}

</summary>

ID string

Organization Member ID

<a href="#(resource)%20organizations.members%20%3E%20(model)%20organization_member%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

CreateTime Time

formatdate-time

<a href="#(resource)%20organizations.members%20%3E%20(model)%20organization_member%20%3E%20(schema)%20%3E%20(property)%20create_time">Link to this property</a>

Meta map\[string, unknown]

<a href="#(resource)%20organizations.members%20%3E%20(model)%20organization_member%20%3E%20(schema)%20%3E%20(property)%20meta">Link to this property</a>

<details>

<summary>

Status OrganizationMemberStatus

</summary>

One of the following:

const OrganizationMemberStatusActive OrganizationMemberStatus = "active"

<a href="#(resource)%20organizations.members%20%3E%20(model)%20organization_member%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%200">Link to this property</a>

const OrganizationMemberStatusPending OrganizationMemberStatus = "pending"

<a href="#(resource)%20organizations.members%20%3E%20(model)%20organization_member%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%201">Link to this property</a>

const OrganizationMemberStatusRejected OrganizationMemberStatus = "rejected"

<a href="#(resource)%20organizations.members%20%3E%20(model)%20organization_member%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%202">Link to this property</a>

const OrganizationMemberStatusCanceled OrganizationMemberStatus = "canceled"

<a href="#(resource)%20organizations.members%20%3E%20(model)%20organization_member%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%203">Link to this property</a>

</details>

<a href="#(resource)%20organizations.members%20%3E%20(model)%20organization_member%20%3E%20(schema)%20%3E%20(property)%20status">Link to this property</a>

UpdateTime Time

formatdate-time

<a href="#(resource)%20organizations.members%20%3E%20(model)%20organization_member%20%3E%20(schema)%20%3E%20(property)%20update_time">Link to this property</a>

<details>

<summary>

User OrganizationMemberUser

</summary>

ID string

<a href="#(resource)%20organizations.members%20%3E%20(model)%20organization_member%20%3E%20(schema)%20%3E%20(property)%20user%20%3E%20(property)%20id">Link to this property</a>

Email string

<a href="#(resource)%20organizations.members%20%3E%20(model)%20organization_member%20%3E%20(schema)%20%3E%20(property)%20user%20%3E%20(property)%20email">Link to this property</a>

Name string

<a href="#(resource)%20organizations.members%20%3E%20(model)%20organization_member%20%3E%20(schema)%20%3E%20(property)%20user%20%3E%20(property)%20name">Link to this property</a>

TwoFactorAuthenticationEnabled bool

<a href="#(resource)%20organizations.members%20%3E%20(model)%20organization_member%20%3E%20(schema)%20%3E%20(property)%20user%20%3E%20(property)%20two_factor_authentication_enabled">Link to this property</a>

</details>

<a href="#(resource)%20organizations.members%20%3E%20(model)%20organization_member%20%3E%20(schema)%20%3E%20(property)%20user">Link to this property</a>

</details>

[Link to this property](<#(resource)%20organizations.members%20%3E%20(model)%20organization_member%20%3E%20(schema)>)

### Create organization member

Go

HTTPTypeScriptPythonGoTerraform

```
package main

import (
  "context"
  "fmt"

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

func main() {
  client := cloudflare.NewClient(
    option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"),
    option.WithAPIEmail("user@example.com"),
  )
  organizationMember, err := client.Organizations.Members.New(
    context.TODO(),
    "a7b9c3d2e8f4a1b5c6d0e9f2a3b7c4d8",
    organizations.MemberNewParams{
      Member: cloudflare.F(organizations.MemberNewParamsMember{
        User: cloudflare.F(organizations.MemberNewParamsMemberUser{
          Email: cloudflare.F("email"),
        }),
      }),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", organizationMember.ID)
}
```

200 example

```
{
  "errors": [],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": {
    "id": "a7b9c3d2e8f4a1b5c6d0e9f2a3b7c4d8",
    "create_time": "2019-12-27T18:11:19.117Z",
    "meta": {
      "foo": {}
    },
    "status": "active",
    "update_time": "2019-12-27T18:11:19.117Z",
    "user": {
      "id": "id",
      "email": "email",
      "name": "name",
      "two_factor_authentication_enabled": true
    }
  },
  "success": true
}
```

##### Returns Examples

200 example

```
{
  "errors": [],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": {
    "id": "a7b9c3d2e8f4a1b5c6d0e9f2a3b7c4d8",
    "create_time": "2019-12-27T18:11:19.117Z",
    "meta": {
      "foo": {}
    },
    "status": "active",
    "update_time": "2019-12-27T18:11:19.117Z",
    "user": {
      "id": "id",
      "email": "email",
      "name": "name",
      "two_factor_authentication_enabled": true
    }
  },
  "success": true
}
```