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:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
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
}