---
updatedAt: 2026-04-24T16:40:21.000Z
agentTools:
  projectIndex: https://developers.cloudbeds.com/llms.txt
---

# Create a new profile (any type)

Create a company, group, or travel agent profile based on the attributes provided in the request body

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Group Profile API",
    "version": "1.0.0",
    "description": "API for managing group profiles, contact persons, and related operations"
  },
  "tags": [
    {
      "name": "Profile",
      "description": "Unified Profile API for all profile types (Company, Group, Travel Agent)"
    }
  ],
  "servers": [
    {
      "url": "https://api.cloudbeds.com"
    }
  ],
  "paths": {
    "/group-profile/v1/profiles": {
      "post": {
        "summary": "Create a new profile (any type)",
        "description": "Create a company, group, or travel agent profile based on the attributes provided in the request body",
        "operationId": "createProfile",
        "tags": [
          "Profile"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/xPropertyId"
          },
          {
            "$ref": "#/components/parameters/xOrganizationId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProfileRequest"
              },
              "examples": {
                "CompanyProfileExample": {
                  "summary": "Create Company Profile (All Fields)",
                  "value": {
                    "code": "ACME001",
                    "name": "Acme Corporation",
                    "status": "ACTIVE",
                    "phone": "+1-555-0100",
                    "cellPhone": "+1-555-0101",
                    "email": "info@acmecorp.com",
                    "externalCrmId": "CRM-ACME-12345",
                    "optIn": true,
                    "optInType": "MARKETING",
                    "optInMethods": "EMAIL",
                    "address": {
                      "address1": "Suite 500",
                      "address2": "5th Floor",
                      "street": "Main Street",
                      "number": "100",
                      "complement": "Building A",
                      "neighborhood": "Financial District",
                      "city": "New York",
                      "state": "NY",
                      "zip": "10001",
                      "countryCode": "US",
                      "email": "reception@acmecorp.com",
                      "latitude": 40.7128,
                      "longitude": -74.006
                    },
                    "useBillingAsMainAddress": false,
                    "billingDetails": {
                      "billingEntity": true,
                      "legalName": "Acme Corporation Inc.",
                      "billingEmail": "billing@acmecorp.com",
                      "billingAddress": {
                        "address1": "Billing Department",
                        "address2": "PO Box 1234",
                        "street": "Park Avenue",
                        "number": "200",
                        "city": "New York",
                        "state": "NY",
                        "zip": "10002",
                        "countryCode": "US",
                        "email": "ar@acmecorp.com"
                      },
                      "billingCurrency": "USD",
                      "paymentMethod": "DIRECT_BILL",
                      "billingInstructions": "Net 30 days, please reference invoice number",
                      "invoiceRecipientEmail": "ap@acmecorp.com",
                      "creditLimit": 50000,
                      "taxId": "12-3456789",
                      "billingFrequency": "MONTHLY",
                      "invoiceDueDays": 30
                    },
                    "attributes": {
                      "companyProfile": {
                        "parentCompanyId": null,
                        "companyType": "CORPORATE",
                        "website": "https://www.acmecorp.com",
                        "contractStartDate": "2024-01-01",
                        "contractEndDate": "2025-12-31",
                        "roomNightCommitment": 500,
                        "roomNightType": "NUMBER"
                      }
                    }
                  }
                },
                "GroupProfileExample": {
                  "summary": "Create Group Profile (All Fields)",
                  "value": {
                    "code": "TECH2024",
                    "name": "Tech Summit 2024",
                    "status": "ACTIVE",
                    "phone": "+1-555-0200",
                    "cellPhone": "+1-555-0201",
                    "email": "events@techsummit.com",
                    "externalCrmId": "CRM-TECH-67890",
                    "optIn": true,
                    "optInType": "TRANSACTIONAL",
                    "optInMethods": "SMS",
                    "address": {
                      "address1": "Convention Center",
                      "address2": "Hall B",
                      "street": "Market Street",
                      "number": "300",
                      "complement": "West Wing",
                      "neighborhood": "Downtown",
                      "city": "San Francisco",
                      "state": "CA",
                      "zip": "94103",
                      "countryCode": "US",
                      "email": "venue@techsummit.com",
                      "latitude": 37.7749,
                      "longitude": -122.4194
                    },
                    "useBillingAsMainAddress": true,
                    "billingDetails": {
                      "billingEntity": true,
                      "legalName": "Tech Summit LLC",
                      "billingEmail": "billing@techsummit.com",
                      "billingAddress": {
                        "address1": "Accounting Office",
                        "street": "Market Street",
                        "number": "300",
                        "city": "San Francisco",
                        "state": "CA",
                        "zip": "94103",
                        "countryCode": "US"
                      },
                      "billingCurrency": "USD",
                      "paymentMethod": "CREDIT_CARD",
                      "billingInstructions": "Please charge card on file",
                      "invoiceRecipientEmail": "finance@techsummit.com",
                      "creditLimit": 25000,
                      "taxId": "98-7654321",
                      "billingFrequency": "WEEKLY",
                      "invoiceDueDays": 7
                    },
                    "attributes": {
                      "groupProfile": {
                        "groupType": "CONFERENCE",
                        "groupId": "GRP-2024-001",
                        "cutOffDate": "2024-10-01",
                        "internalSalesManager": "John Smith",
                        "specialRequirements": "AV equipment, high-speed internet, catering for 200",
                        "roomNightCommitment": 150,
                        "roomNightType": "NUMBER"
                      }
                    }
                  }
                },
                "TravelAgentProfileExample": {
                  "summary": "Create Travel Agent Profile (All Fields)",
                  "value": {
                    "code": "12345678",
                    "name": "Global Travel Partners",
                    "status": "ACTIVE",
                    "phone": "+1-555-0300",
                    "cellPhone": "+1-555-0301",
                    "email": "contact@gtp.com",
                    "externalCrmId": "CRM-GTP-11111",
                    "optIn": true,
                    "optInType": "MARKETING",
                    "optInMethods": "EMAIL",
                    "address": {
                      "address1": "Travel Agency Office",
                      "address2": "Suite 100",
                      "street": "Ocean Drive",
                      "number": "500",
                      "complement": "Ground Floor",
                      "neighborhood": "South Beach",
                      "city": "Miami",
                      "state": "FL",
                      "zip": "33139",
                      "countryCode": "US",
                      "email": "office@gtp.com",
                      "latitude": 25.7617,
                      "longitude": -80.1918
                    },
                    "useBillingAsMainAddress": false,
                    "billingDetails": {
                      "billingEntity": true,
                      "legalName": "Global Travel Partners Inc.",
                      "billingEmail": "accounting@gtp.com",
                      "billingAddress": {
                        "address1": "Corporate HQ",
                        "street": "Brickell Avenue",
                        "number": "1000",
                        "city": "Miami",
                        "state": "FL",
                        "zip": "33131",
                        "countryCode": "US",
                        "email": "ar@gtp.com"
                      },
                      "billingCurrency": "USD",
                      "paymentMethod": "CHECK",
                      "billingInstructions": "Mail checks to corporate office",
                      "invoiceRecipientEmail": "invoices@gtp.com",
                      "creditLimit": 15000,
                      "taxId": "45-6789012",
                      "billingFrequency": "MONTHLY",
                      "invoiceDueDays": 15
                    },
                    "attributes": {
                      "travelAgentProfile": {
                        "agencyId": "AGY-001",
                        "agencyType": "RETAIL",
                        "commissionable": true,
                        "commissionType": "PERCENTAGE",
                        "commissionAmount": 10.5,
                        "commissionTerms": "Net 30 days after guest checkout",
                        "commissionCalculation": "CHECK_OUT"
                      }
                    }
                  }
                },
                "CompanyProfileMinimal": {
                  "summary": "Create Company Profile (Minimal - Required Fields Only)",
                  "value": {
                    "code": "ACME001",
                    "name": "Acme Corporation",
                    "status": "ACTIVE",
                    "attributes": {
                      "companyProfile": {}
                    }
                  }
                },
                "GroupProfileMinimal": {
                  "summary": "Create Group Profile (Minimal - Required Fields Only)",
                  "value": {
                    "code": "TECH2024",
                    "name": "Tech Summit 2024",
                    "status": "ACTIVE",
                    "attributes": {
                      "groupProfile": {}
                    }
                  }
                },
                "TravelAgentProfileMinimal": {
                  "summary": "Create Travel Agent Profile (Minimal - Required Fields Only)",
                  "value": {
                    "code": "12345678",
                    "name": "Global Travel Partners",
                    "status": "ACTIVE",
                    "attributes": {
                      "travelAgentProfile": {}
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Profile created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileResponse"
                },
                "example": {
                  "id": "19074818619469856",
                  "code": "ACME001",
                  "name": "Acme Corporation",
                  "status": "ACTIVE",
                  "phone": "+1-555-0100",
                  "cellPhone": "+1-555-0101",
                  "email": "info@acmecorp.com",
                  "externalCrmId": "CRM-ACME-12345",
                  "profileType": "COMPANY",
                  "optIn": true,
                  "optInType": "MARKETING",
                  "optInMethods": "EMAIL",
                  "address": {
                    "id": 1,
                    "address1": "Suite 500",
                    "address2": "5th Floor",
                    "street": "Main Street",
                    "number": "100",
                    "complement": "Building A",
                    "neighborhood": "Financial District",
                    "city": "New York",
                    "state": "NY",
                    "zip": "10001",
                    "countryCode": "US",
                    "email": "reception@acmecorp.com",
                    "latitude": 40.7128,
                    "longitude": -74.006
                  },
                  "useBillingAsMainAddress": false,
                  "billingDetails": {
                    "billingEntity": true,
                    "legalName": "Acme Corporation Inc.",
                    "billingEmail": "billing@acmecorp.com",
                    "billingAddress": {
                      "id": 2,
                      "address1": "Billing Department",
                      "address2": "PO Box 1234",
                      "street": "Park Avenue",
                      "number": "200",
                      "city": "New York",
                      "state": "NY",
                      "zip": "10002",
                      "countryCode": "US",
                      "email": "ar@acmecorp.com"
                    },
                    "billingCurrency": "USD",
                    "paymentMethod": "DIRECT_BILL",
                    "billingInstructions": "Net 30 days, please reference invoice number",
                    "invoiceRecipientEmail": "ap@acmecorp.com",
                    "creditLimit": 50000,
                    "taxId": "12-3456789",
                    "billingFrequency": "MONTHLY",
                    "invoiceDueDays": 30
                  },
                  "createdAt": "2024-01-15T10:30:00Z",
                  "updatedAt": "2024-01-15T10:30:00Z",
                  "attributes": {
                    "companyProfile": {
                      "parentCompanyId": null,
                      "companyType": "CORPORATE",
                      "website": "https://www.acmecorp.com",
                      "contractStartDate": "2024-01-01",
                      "contractEndDate": "2025-12-31",
                      "roomNightCommitment": 500,
                      "roomNightType": "NUMBER"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "parameters": {
      "xPropertyId": {
        "name": "x-property-id",
        "in": "header",
        "description": "Property ID",
        "required": false,
        "schema": {
          "type": "integer",
          "format": "int64"
        }
      },
      "xOrganizationId": {
        "name": "x-organization-id",
        "in": "header",
        "description": "Organization ID",
        "required": true,
        "schema": {
          "type": "integer",
          "format": "int64"
        }
      }
    },
    "schemas": {
      "BaseProfile": {
        "type": "object",
        "required": [
          "name",
          "status",
          "code"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the profile",
            "example": "19074818619469856"
          },
          "profileType": {
            "$ref": "#/components/schemas/ProfileType"
          },
          "code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "Profile code (company code, group code, or IATA number for travel agents)"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "description": "Profile name (company name, group name, or agency name)"
          },
          "status": {
            "$ref": "#/components/schemas/ProfileStatus"
          },
          "cellPhone": {
            "type": "string",
            "maxLength": 50,
            "pattern": "^[+]?[0-9\\s\\-().]+$",
            "description": "Cell phone number"
          },
          "phone": {
            "type": "string",
            "maxLength": 50,
            "pattern": "^[+]?[0-9\\s\\-().]+$",
            "description": "Primary phone number"
          },
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 255,
            "description": "Primary email address"
          },
          "externalCrmId": {
            "type": "string",
            "maxLength": 100,
            "description": "External CRM system reference ID"
          },
          "optIn": {
            "type": "boolean",
            "description": "Opt-in status"
          },
          "optInType": {
            "type": "string",
            "enum": [
              "MARKETING",
              "TRANSACTIONAL"
            ],
            "description": "Type of opt-in"
          },
          "optInMethods": {
            "type": "string",
            "enum": [
              "EMAIL",
              "SMS",
              "NOTIFICATION"
            ],
            "description": "Opt-in communication method"
          },
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "useBillingAsMainAddress": {
            "type": "boolean",
            "default": false,
            "description": "When true, use billing address as the main address instead of the address field"
          },
          "billingDetails": {
            "$ref": "#/components/schemas/BillingDetails"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "groupProfile": {
                "$ref": "#/components/schemas/GroupProfile"
              },
              "companyProfile": {
                "$ref": "#/components/schemas/CompanyProfile"
              },
              "travelAgentProfile": {
                "$ref": "#/components/schemas/TravelAgentProfile"
              }
            },
            "description": "Dictionary containing profile-specific data (groupProfile, companyProfile, or travelAgentProfile). Only one profile type should be present."
          }
        }
      },
      "GroupProfile": {
        "type": "object",
        "properties": {
          "groupType": {
            "type": "string",
            "enum": [
              "WEDDING",
              "SOCIAL",
              "SMERF",
              "CORPORATE",
              "ASSOCIATION",
              "EDUCATION",
              "MEETING",
              "CONFERENCE",
              "MICE",
              "EXHIBITIONS",
              "INCENTIVE",
              "OTHER"
            ],
            "description": "Type of group"
          },
          "groupId": {
            "type": "string",
            "maxLength": 100,
            "description": "Unique group identifier"
          },
          "cutOffDate": {
            "type": "string",
            "format": "date",
            "description": "Booking cut-off date"
          },
          "internalSalesManager": {
            "type": "string",
            "description": "Internal sales manager name"
          },
          "specialRequirements": {
            "type": "string",
            "description": "Special requirements or notes"
          },
          "roomNightCommitment": {
            "type": "integer",
            "minimum": 0,
            "description": "Room night commitment"
          },
          "roomNightType": {
            "type": "string",
            "enum": [
              "USD",
              "PERCENTAGE",
              "NUMBER"
            ],
            "description": "Type of room night commitment (USD, Percentage, or Number)"
          }
        }
      },
      "CompanyProfile": {
        "type": "object",
        "properties": {
          "companyType": {
            "$ref": "#/components/schemas/CompanyType"
          },
          "parentCompanyId": {
            "type": "integer",
            "format": "int64",
            "description": "Parent company ID if this is a subsidiary"
          },
          "website": {
            "type": "string",
            "description": "Company website URL"
          },
          "contractStartDate": {
            "type": "string",
            "format": "date",
            "description": "Contract start date"
          },
          "contractEndDate": {
            "type": "string",
            "format": "date",
            "description": "Contract end date"
          },
          "roomNightCommitment": {
            "type": "integer",
            "minimum": 0,
            "description": "Annual room night commitment"
          },
          "roomNightType": {
            "type": "string",
            "enum": [
              "USD",
              "PERCENTAGE",
              "NUMBER"
            ],
            "description": "Type of room night commitment (USD, Percentage, or Number)"
          }
        }
      },
      "TravelAgentProfile": {
        "type": "object",
        "properties": {
          "agencyId": {
            "type": "string",
            "maxLength": 50,
            "description": "Agency identifier"
          },
          "agencyType": {
            "$ref": "#/components/schemas/AgencyType"
          },
          "commissionable": {
            "type": "boolean",
            "description": "Whether this agent is eligible for commission"
          },
          "commissionType": {
            "type": "string",
            "enum": [
              "PERCENTAGE",
              "FLAT_RATE"
            ],
            "description": "Type of commission (Percentage or Flat Rate)"
          },
          "commissionAmount": {
            "type": "number",
            "description": "Commission amount (percentage or flat rate value)"
          },
          "commissionTerms": {
            "type": "string",
            "description": "Terms of commission payout"
          },
          "commissionCalculation": {
            "type": "string",
            "enum": [
              "CHECK_IN",
              "CHECK_OUT",
              "INCLUDED_IN_RATE",
              "NOT_INCLUDED_IN_RATE",
              "NA"
            ],
            "description": "When commission is calculated"
          }
        }
      },
      "ProfileRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseProfile"
          },
          {
            "type": "object",
            "required": [
              "name",
              "status"
            ],
            "properties": {
              "id": {
                "readOnly": true
              },
              "createdAt": {
                "readOnly": true
              },
              "updatedAt": {
                "readOnly": true
              }
            }
          }
        ]
      },
      "ProfileResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseProfile"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique identifier for the profile",
                "example": "19074818619469856"
              }
            }
          }
        ]
      },
      "BillingDetails": {
        "type": "object",
        "description": "Billing details for profiles and contact persons",
        "properties": {
          "billingEntity": {
            "type": "boolean",
            "description": "Whether this is a billing entity"
          },
          "legalName": {
            "type": "string",
            "maxLength": 255,
            "description": "Legal name for billing purposes"
          },
          "billingEmail": {
            "type": "string",
            "format": "email",
            "maxLength": 255,
            "description": "Billing email address"
          },
          "billingAddress": {
            "$ref": "#/components/schemas/Address"
          },
          "billingCurrency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3,
            "pattern": "^[A-Z]{3}$",
            "description": "Billing currency code (ISO 4217 - 3 uppercase letters, e.g., USD, EUR, GBP)",
            "example": "USD"
          },
          "paymentMethod": {
            "$ref": "#/components/schemas/PaymentMethod"
          },
          "billingInstructions": {
            "type": "string",
            "description": "Special billing instructions"
          },
          "invoiceRecipientEmail": {
            "type": "string",
            "format": "email",
            "maxLength": 255,
            "description": "Email address for invoice delivery"
          },
          "creditLimit": {
            "type": "number",
            "description": "Credit limit amount"
          },
          "taxId": {
            "type": "string",
            "maxLength": 100,
            "description": "Tax identification number"
          },
          "billingFrequency": {
            "$ref": "#/components/schemas/BillingFrequency"
          },
          "invoiceDueDays": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of days until invoice is due"
          }
        }
      },
      "Address": {
        "type": "object",
        "description": "Flexible address object with country-specific fields.\nThe countryCode determines the expected address format.\nAll address fields except id and countryCode are stored as dynamic properties.\nCommon fields include: address1, address2, street, number, city, state, zip, etc.\n",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "Unique identifier for the address",
            "readOnly": true
          },
          "countryCode": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2,
            "pattern": "^[A-Z]{2}$",
            "description": "ISO 3166-1 alpha-2 country code (determines address format)"
          }
        },
        "additionalProperties": true
      },
      "ProfileStatus": {
        "type": "string",
        "enum": [
          "PENDING",
          "ACTIVE",
          "INACTIVE",
          "CANCELLED",
          "ARCHIVED"
        ],
        "description": "Profile status",
        "example": "ACTIVE"
      },
      "ProfileType": {
        "type": "string",
        "enum": [
          "COMPANY",
          "GROUP",
          "TRAVEL_AGENT"
        ],
        "description": "Profile type"
      },
      "PaymentMethod": {
        "type": "string",
        "enum": [
          "DIRECT_BILL",
          "CASH",
          "CHECK",
          "CREDIT_CARD",
          "DEBIT_CARD",
          "VOUCHER",
          "PAY_BY_LINK",
          "THIRD_PARTY_PAYMENT"
        ],
        "description": "Payment method. Allowed values are DIRECT_BILL, CASH, CHECK, CREDIT_CARD, DEBIT_CARD, VOUCHER, PAY_BY_LINK, THIRD_PARTY_PAYMENT",
        "example": "CREDIT_CARD"
      },
      "BillingFrequency": {
        "type": "string",
        "enum": [
          "PER_STAY",
          "WEEKLY",
          "MONTHLY",
          "ON_DEMAND"
        ],
        "description": "Billing frequency. Allowed values are PER_STAY, WEEKLY, MONTHLY, ON_DEMAND",
        "example": "MONTHLY"
      },
      "CompanyType": {
        "type": "string",
        "enum": [
          "CORPORATE",
          "SME",
          "NON_PROFIT",
          "ENTERPRISE",
          "GOVERNMENT",
          "ASSOCIATION",
          "LOCAL",
          "B2B",
          "PARTNERSHIP",
          "OTHER"
        ],
        "description": "Company type. Allowed values are CORPORATE, SME, NON_PROFIT, ENTERPRISE, GOVERNMENT, ASSOCIATION, LOCAL, B2B, PARTNERSHIP, OTHER",
        "example": "CORPORATE"
      },
      "AgencyType": {
        "type": "string",
        "enum": [
          "OTA",
          "RETAIL",
          "CORPORATE_AGENT",
          "CONSORTIA",
          "WHOLESALER",
          "GROUP_TOUR",
          "TOUR_OPERATOR",
          "DOMESTIC",
          "FOREIGN",
          "OTHER"
        ],
        "description": "Travel agency type. Allowed values are OTA, RETAIL, CORPORATE_AGENT, CONSORTIA, WHOLESALER, GROUP_TOUR, TOUR_OPERATOR, DOMESTIC, FOREIGN, OTHER",
        "example": "RETAIL"
      },
      "ApiError": {
        "type": "object",
        "description": "Standard error response for 4xx and 5xx errors (except validation errors).\n\n## Error Codes\n\n### Validation Errors (400)\n- `INVALID_REQUEST` - The request body is invalid or malformed\n- `INVALID_PARAMETER` - One or more request parameters are invalid\n- `INVALID_ENUM_VALUE` - Invalid enum value provided\n- `INVALID_JSON` - The request body contains malformed JSON\n\n### Resource Errors (404)\n- `RESOURCE_NOT_FOUND` - The requested resource was not found\n- `PROFILE_NOT_FOUND` - Profile not found\n- `NOTE_NOT_FOUND` - Note not found\n- `TAG_NOT_FOUND` - Tag not found\n\n### Conflict Errors (409)\n- `RESOURCE_ALREADY_EXISTS` - The resource already exists\n- `DUPLICATE_PROFILE_CODE` - A profile with this code already exists\n- `DUPLICATE_RELATIONSHIP` - This relationship already exists\n\n### Authorization Errors (403)\n- `ACCESS_DENIED` - Access denied to the requested resource\n- `ORGANIZATION_MISMATCH` - Resource belongs to a different organization\n\n### Server Errors (500)\n- `INTERNAL_ERROR` - An unexpected error occurred\n- `DATABASE_ERROR` - A database error occurred\n",
        "properties": {
          "message": {
            "type": "string",
            "description": "Human-readable error message explaining what went wrong",
            "example": "A profile with this code already exists. Please use a unique code."
          },
          "code": {
            "type": "string",
            "description": "Machine-readable error code for programmatic error handling",
            "example": "DUPLICATE_PROFILE_CODE"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp when the error occurred",
            "example": "2024-01-15T10:30:45.123Z"
          }
        }
      },
      "ValidationError": {
        "type": "object",
        "description": "Validation error response returned for 422 Unprocessable Entity.\nContains field-level validation errors with specific details about what failed.\n\n## Error Code\n- `VALIDATION_ERROR` - One or more fields failed validation\n",
        "properties": {
          "message": {
            "type": "string",
            "description": "Overall validation error message",
            "example": "One or more fields failed validation"
          },
          "code": {
            "type": "string",
            "description": "Error code (always \"VALIDATION_ERROR\" for validation failures)",
            "example": "VALIDATION_ERROR"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp when the error occurred",
            "example": "2024-01-15T10:30:45.123Z"
          },
          "fieldErrors": {
            "type": "array",
            "description": "List of field-specific validation errors",
            "items": {
              "$ref": "#/components/schemas/FieldError"
            }
          }
        }
      },
      "FieldError": {
        "type": "object",
        "description": "Field-level validation error details",
        "properties": {
          "field": {
            "type": "string",
            "description": "Name of the field that failed validation (supports nested fields with dot notation)",
            "example": "attributes.companyProfile.website"
          },
          "message": {
            "type": "string",
            "description": "Human-readable message explaining why validation failed for this field",
            "example": "Invalid value 'INVALID_TYPE'. Allowed values are: [COMPANY, GROUP, TRAVEL_AGENT]"
          }
        },
        "example": {
          "field": "email",
          "message": "must be a well-formed email address (provided: 'invalid-email')"
        }
      }
    }
  }
}
```