Skip to content
Start here

Delete organization member

client.Organizations.Members.Delete(ctx, organizationID, memberID) (*MemberDeleteResponse, error)
DELETE/organizations/{organization_id}/members/{member_id}

Delete a membership to a particular Organization.

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
memberID string

Organization Member ID

ReturnsExpand Collapse
type MemberDeleteResponse struct{…}
ID string

Delete organization member

package main

import (
  "context"
  "fmt"

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

func main() {
  client := cloudflare.NewClient(
    option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"),
    option.WithAPIEmail("user@example.com"),
  )
  member, err := client.Organizations.Members.Delete(
    context.TODO(),
    "a7b9c3d2e8f4a1b5c6d0e9f2a3b7c4d8",
    "a7b9c3d2e8f4a1b5c6d0e9f2a3b7c4d8",
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", member.ID)
}
{
  "errors": [],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": {
    "id": "id"
  },
  "success": true
}
Returns Examples
{
  "errors": [],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": {
    "id": "id"
  },
  "success": true
}