[{"data":1,"prerenderedAt":110},["ShallowReactive",2],{"page:\u002Fme":3,"operation:getApiKeyContext":39},{"id":4,"title":5,"body":6,"description":29,"extension":30,"meta":31,"navigation":32,"operation":33,"path":34,"rawbody":35,"seo":36,"stem":37,"__hash__":38},"docs\u002Fme.md","Retrieve key context",{"type":7,"value":8,"toc":25},"minimark",[9,13],[10,11,12],"p",{},"Use this endpoint to check a key: at deploy time, in a health check, or when a user pastes a key into your product. It works with any active key, needs no scope and does not read or change workspace data.",[10,14,15,16,20,21,24],{},"Compare ",[17,18,19],"code",{},"user.scopes"," with the scopes your integration needs, and fail early with a clear message if one is missing — instead of waiting for the first ",[17,22,23],{},"401 Lack of permissions",".",{"title":26,"searchDepth":27,"depth":27,"links":28},"",3,[],"Return the workspace and scopes of the API key used for the request.","md",{},true,"getApiKeyContext","\u002Fme","---\ntitle: Retrieve key context\ndescription: Return the workspace and scopes of the API key used for the request.\noperation: getApiKeyContext\n---\n\nUse this endpoint to check a key: at deploy time, in a health check, or when a user pastes a key into your product. It works with any active key, needs no scope and does not read or change workspace data.\n\nCompare `user.scopes` with the scopes your integration needs, and fail early with a clear message if one is missing — instead of waiting for the first `401 Lack of permissions`.\n",{"title":5,"description":29},"me","Pjk1v6M8QIjYbIbVhSpJDuYVRFcPQmvVxaZ2xxXUi6Y",{"id":33,"method":40,"path":34,"fullPath":41,"summary":5,"tag":42,"scopes":43,"url":44,"description":45,"pathParams":46,"queryParams":47,"responses":48,"samples":93,"docsPath":34},"GET","\u002Fv1\u002Fext\u002Fme","Authentication",[],"https:\u002F\u002Fapi.vestta.app\u002Fv1\u002Fext\u002Fme","Returns the business and scopes of the API key used for the request. Any active key can call it; no scope is required.",[],[],[49,82,86,90],{"status":50,"description":51,"schemaName":52,"fields":53,"example":80,"exampleHtml":81},"200","Successful response.","CurrentApiKeyResponse",[54,61],{"name":55,"type":56,"required":32,"nullable":57,"enumValues":58,"constraints":60},"status","string",false,[59],"ok",[],{"name":62,"type":63,"required":32,"nullable":57,"constraints":64,"children":65},"user","ApiKeyContext",[],[66,70,75],{"name":67,"type":56,"required":57,"nullable":32,"description":68,"constraints":69},"company_name","Name of the business that owns the API key.",[],{"name":71,"type":72,"required":32,"nullable":57,"description":73,"constraints":74},"scopes","array of strings","Scopes granted to the key: `properties:read`, `leads:read`, `leads:ingest`.",[],{"name":76,"type":56,"required":32,"nullable":57,"enumValues":77,"constraints":79},"auth_method",[78],"api_key",[],"{\n  \"status\": \"ok\",\n  \"user\": {\n    \"company_name\": \"Inmobiliaria Ejemplo\",\n    \"scopes\": [\n      \"properties:read\",\n      \"leads:read\"\n    ],\n    \"auth_method\": \"api_key\"\n  }\n}","\u003Cpre class=\"shiki github-light\" style=\"background-color:#fff;color:#24292e\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">{\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#005CC5\">  \"status\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: \u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">\"ok\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#005CC5\">  \"user\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#005CC5\">    \"company_name\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: \u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">\"Inmobiliaria Ejemplo\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#005CC5\">    \"scopes\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: [\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">      \"properties:read\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">      \"leads:read\"\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">    ],\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#005CC5\">    \"auth_method\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: \u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">\"api_key\"\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">  }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>",{"status":83,"description":84,"schemaName":85},"401","The API key is missing, malformed, unknown, revoked or expired, or lacks the required scope.","ExternalApiError",{"status":87,"description":88,"schemaName":89},"422","A path parameter, query parameter or body field is invalid.","ExternalValidationError",{"status":91,"description":92,"schemaName":85},"500","Unexpected server error while processing the request.",[94,100,105],{"id":95,"label":96,"lang":97,"code":98,"html":99},"curl","cURL","bash","curl \"https:\u002F\u002Fapi.vestta.app\u002Fv1\u002Fext\u002Fme\" \\\n  -H \"X-Api-Key: $VESTTA_API_KEY\"","\u003Cpre class=\"shiki github-light\" style=\"background-color:#fff;color:#24292e\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6F42C1\">curl\u003C\u002Fspan>\u003Cspan style=\"color:#032F62\"> \"https:\u002F\u002Fapi.vestta.app\u002Fv1\u002Fext\u002Fme\"\u003C\u002Fspan>\u003Cspan style=\"color:#005CC5\"> \\\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#005CC5\">  -H\u003C\u002Fspan>\u003Cspan style=\"color:#032F62\"> \"X-Api-Key: \u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">$VESTTA_API_KEY\u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">\"\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>",{"id":101,"label":102,"lang":101,"code":103,"html":104},"javascript","JavaScript","const response = await fetch('https:\u002F\u002Fapi.vestta.app\u002Fv1\u002Fext\u002Fme', {\n  headers: { 'X-Api-Key': process.env.VESTTA_API_KEY },\n})\n\nconst data = await response.json()","\u003Cpre class=\"shiki github-light\" style=\"background-color:#fff;color:#24292e\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#D73A49\">const\u003C\u002Fspan>\u003Cspan style=\"color:#005CC5\"> response\u003C\u002Fspan>\u003Cspan style=\"color:#D73A49\"> =\u003C\u002Fspan>\u003Cspan style=\"color:#D73A49\"> await\u003C\u002Fspan>\u003Cspan style=\"color:#6F42C1\"> fetch\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">(\u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">'https:\u002F\u002Fapi.vestta.app\u002Fv1\u002Fext\u002Fme'\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">, {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">  headers: { \u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">'X-Api-Key'\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: process.env.\u003C\u002Fspan>\u003Cspan style=\"color:#005CC5\">VESTTA_API_KEY\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\"> },\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">})\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#D73A49\">const\u003C\u002Fspan>\u003Cspan style=\"color:#005CC5\"> data\u003C\u002Fspan>\u003Cspan style=\"color:#D73A49\"> =\u003C\u002Fspan>\u003Cspan style=\"color:#D73A49\"> await\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\"> response.\u003C\u002Fspan>\u003Cspan style=\"color:#6F42C1\">json\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">()\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>",{"id":106,"label":107,"lang":106,"code":108,"html":109},"python","Python","import os\n\nimport requests\n\nresponse = requests.get(\n    \"https:\u002F\u002Fapi.vestta.app\u002Fv1\u002Fext\u002Fme\",\n    headers={\"X-Api-Key\": os.environ[\"VESTTA_API_KEY\"]},\n)\nresponse.raise_for_status()\ndata = response.json()","\u003Cpre class=\"shiki github-light\" style=\"background-color:#fff;color:#24292e\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#D73A49\">import\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\"> os\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#D73A49\">import\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\"> requests\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">response \u003C\u002Fspan>\u003Cspan style=\"color:#D73A49\">=\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\"> requests.get(\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">    \"https:\u002F\u002Fapi.vestta.app\u002Fv1\u002Fext\u002Fme\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E36209\">    headers\u003C\u002Fspan>\u003Cspan style=\"color:#D73A49\">=\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">{\u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">\"X-Api-Key\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: os.environ[\u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">\"VESTTA_API_KEY\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">]},\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">response.raise_for_status()\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">data \u003C\u002Fspan>\u003Cspan style=\"color:#D73A49\">=\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\"> response.json()\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>",1791110048821]