Skip to content
Start here

Get account profile

client.Accounts.AccountProfile.Get(ctx, query) (*AccountProfile, error)
GET/accounts/{account_id}/profile

Retrieves the business profile (name, email, phone, address, and external metadata) associated with this account’s parent organization customer record. Profiles can be shared across accounts and organizations. Only available to members of an organization that contains the account.

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
Accepted Permissions (at least one required)
Trust and Safety WriteTrust and Safety ReadDNS View WriteDNS View ReadSCIM ProvisioningLoad Balancers Account WriteLoad Balancers Account ReadZero Trust: PII ReadDDoS Botnet Feed WriteDDoS Botnet Feed ReadWorkers R2 Storage WriteWorkers R2 Storage ReadDDoS Protection WriteDDoS Protection ReadWorkers Tail ReadWorkers KV Storage WriteWorkers KV Storage ReadWorkers Scripts WriteWorkers Scripts ReadLoad Balancing: Monitors and Pools WriteLoad Balancing: Monitors and Pools ReadAccount Firewall Access Rules WriteAccount Firewall Access Rules ReadDNS Firewall WriteDNS Firewall ReadBilling WriteBilling ReadAccount Settings WriteAccount Settings Read
ParametersExpand Collapse
query AccountProfileGetParams
AccountID param.Field[string]

The ID of the account whose business profile to retrieve.

ReturnsExpand Collapse
type AccountProfile struct{…}
BusinessAddress string
BusinessEmail string
BusinessName string
BusinessPhone string
ExternalMetadata string

Get account profile

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"),
  )
  accountProfile, err := client.Accounts.AccountProfile.Get(context.TODO(), accounts.AccountProfileGetParams{
    AccountID: cloudflare.F("account_id"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", accountProfile.BusinessAddress)
}
{
  "errors": [],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": {
    "business_address": "business_address",
    "business_email": "business_email",
    "business_name": "business_name",
    "business_phone": "business_phone",
    "external_metadata": "external_metadata"
  },
  "success": true
}
Returns Examples
{
  "errors": [],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": {
    "business_address": "business_address",
    "business_email": "business_email",
    "business_name": "business_name",
    "business_phone": "business_phone",
    "external_metadata": "external_metadata"
  },
  "success": true
}