> ## Documentation Index
> Fetch the complete documentation index at: https://easybroker-staging.readme.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a contact request

Creates a new lead in EasyBroker interested in the provided property.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0",
    "title": "App Integration API",
    "description": "API for EasyBroker's partners. To get started click the Authorize button below and enter your API key."
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://api.stagingeb.com/v1/integration_partners",
      "description": "API URL"
    }
  ],
  "paths": {
    "/contact_requests": {
      "post": {
        "parameters": [
          {
            "$ref": "#/components/parameters/country_code"
          }
        ],
        "tags": [
          "Contact Requests"
        ],
        "summary": "Create a contact request",
        "description": "Creates a new lead in EasyBroker interested in the provided property.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A contact request was created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "successful"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "422": {
            "description": "The request couldn't be created because it is invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "object",
                      "example": {
                        "message": [
                          "can't be blank"
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "responses": {
      "UnauthorizedError": {
        "description": "API key is missing or invalid, or a restricted country was selected",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "string",
                  "example": "Your API key is invalid."
                }
              }
            }
          }
        }
      }
    },
    "parameters": {
      "country_code": {
        "name": "Country-Code",
        "in": "header",
        "required": true,
        "description": "This header is mandatory and will be used to filter the resources",
        "schema": {
          "type": "string",
          "enum": [
            "MX",
            "CL",
            "DO",
            "GT",
            "AR",
            "BR",
            "CO",
            "UY",
            "AF",
            "AL",
            "DZ",
            "AS",
            "AD",
            "AO",
            "AI",
            "AG",
            "AM",
            "AW",
            "AU",
            "AT",
            "AZ",
            "BS",
            "BH",
            "BD",
            "BB",
            "BY",
            "BE",
            "BZ",
            "BJ",
            "BM",
            "BT",
            "BO",
            "BA",
            "BW",
            "BV",
            "IO",
            "VG",
            "BN",
            "BG",
            "BF",
            "BI",
            "KH",
            "CM",
            "CA",
            "CV",
            "KY",
            "CF",
            "TD",
            "CN",
            "CX",
            "CC",
            "KM",
            "CD",
            "CG",
            "CK",
            "CR",
            "CI",
            "CU",
            "CY",
            "CZ",
            "DK",
            "DJ",
            "DM",
            "EC",
            "EG",
            "SV",
            "GQ",
            "ER",
            "EE",
            "ET",
            "FO",
            "FK",
            "FJ",
            "FI",
            "FR",
            "GF",
            "PF",
            "TF",
            "GA",
            "GM",
            "GE",
            "DE",
            "GH",
            "GI",
            "GR",
            "GL",
            "GD",
            "GP",
            "GU",
            "GN",
            "GW",
            "GY",
            "HT",
            "HM",
            "VA",
            "HN",
            "HK",
            "HR",
            "HU",
            "IS",
            "IN",
            "ID",
            "IR",
            "IQ",
            "IE",
            "IL",
            "IT",
            "JM",
            "JP",
            "JO",
            "KZ",
            "KE",
            "KI",
            "KP",
            "KR",
            "KW",
            "KG",
            "LA",
            "LV",
            "LB",
            "LS",
            "LR",
            "LY",
            "LI",
            "LT",
            "LU",
            "MO",
            "MK",
            "MG",
            "MW",
            "MY",
            "MV",
            "ML",
            "MT",
            "MH",
            "MQ",
            "MR",
            "MU",
            "YT",
            "FM",
            "MD",
            "MC",
            "MN",
            "ME",
            "MS",
            "MA",
            "MZ",
            "MM",
            "NA",
            "NR",
            "NP",
            "NL",
            "AN",
            "NC",
            "NZ",
            "NI",
            "NE",
            "NG",
            "NU",
            "NF",
            "MP",
            "NO",
            "OM",
            "PK",
            "PW",
            "PS",
            "PA",
            "PG",
            "PY",
            "PE",
            "PH",
            "PN",
            "PL",
            "PT",
            "PR",
            "QA",
            "RE",
            "RO",
            "RU",
            "RW",
            "WS",
            "SM",
            "ST",
            "SA",
            "SN",
            "RS",
            "SC",
            "SL",
            "SG",
            "SK",
            "SI",
            "SB",
            "SO",
            "ZA",
            "ES",
            "LK",
            "SH",
            "KN",
            "LC",
            "PM",
            "VC",
            "SD",
            "SR",
            "SJ",
            "SZ",
            "SE",
            "CH",
            "SY",
            "TW",
            "TJ",
            "TZ",
            "TH",
            "TL",
            "TG",
            "TK",
            "TO",
            "TT",
            "TN",
            "TR",
            "TM",
            "TC",
            "TV",
            "VI",
            "UG",
            "UA",
            "AE",
            "GB",
            "UM",
            "US",
            "UZ",
            "VU",
            "VE",
            "VN",
            "WF",
            "EH",
            "YE",
            "ZM",
            "ZW"
          ],
          "example": "MX"
        }
      }
    },
    "schemas": {
      "ContactRequestBody": {
        "required": [
          "property_id",
          "message",
          "remote_id"
        ],
        "type": "object",
        "properties": {
          "property_id": {
            "type": "string",
            "example": "EB-XXXX01",
            "description": "Required. The EasyBroker property id related to the contact request"
          },
          "name": {
            "type": "string",
            "example": "John Smith",
            "description": "Optional. Requester's name."
          },
          "email": {
            "type": "string",
            "example": "mail@example.com",
            "description": "Required if phone is not present. Requester's email."
          },
          "phone": {
            "type": "string",
            "example": "5559090909",
            "description": "Required if email is not present. Requester's phone number."
          },
          "message": {
            "type": "string",
            "example": "I'm interested in this property. Please contact me.",
            "description": "Required. Message of the contact request."
          },
          "remote_id": {
            "type": "integer",
            "example": 123456,
            "description": "Required. A unique numeric id of the contact request from your website"
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Authorization",
        "description": "Keys for this API are only available for our partners."
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 99,
      "1": 137,
      "2": 61,
      "3": 110,
      "4": 171,
      "5": 138,
      "6": 160,
      "7": 0,
      "8": 29,
      "9": 31,
      "10": 125,
      "11": 97
    }
  }
}
```