---
id: tenants-tenants-create-recovery-key-create
title: "tenants_tenants_create_recovery_key_create"
description: "Create recovery key for user."
sidebar_label: "tenants_tenants_create_recovery_key_create"
hide_title: true
hide_table_of_contents: true
api: eJy9VU1v2zAM/SuGThuQxlnaw5DT2i4YgrVb0TanIggUm7HV2pInyVm9wP99pCUnzsfSHYb1UCsSRVKPj49rpgrQ3AolJzEbMQuSS2vm7TfSwC3MNURqBbqav0Dl91iPxWAiLQq6jFevm+2gNQ3QNFgqHZQGdB+tC655Dha0YaOnNRN0p+A2xSOJB5vg87IUMW6aKIWcs9Ga2aqgY2O1kAmeoNecW9xpLOv9RC6D6XTyOXDmgYhBWrGsaG1TYYLHJgplpOFHKTTgu60uoZ71mOUJZdfCwGbOCIy9UnFFuURK4qGlJS+KTEQNduGzodDrw6TV4hkiewCWS2IXrAZXPA58yACBEzwTv0ATfJoqZQUY8k6gHoMmF/IGZIKojj4QMKWr7TzmlenYC3xEgh7quovC0559z4UhXITNYJP2vc/6K1T3LlX/QX/1Aay0YQoljct8OBj8Pxxd3FNAwmshdHWSZTHS+swKpCi+pdTZofE+jN6psz4Nn8vQAbf7NIp24cDaPbjicUsRZ3P+DwH9AhLBioLLu0kw1lodIhaD5eIYCD3MIYa30fEOOrj4oC7eH6G4OIRiipUNpLIoNKWMm0goMakiKSuUsY3sUDOw0Lf05rvuqE0dHtG5kDQI9KoVrKbyLOSFCFfnISO5MBCVWtjqgcB16PDSpiQ4Lx0cUmuLVtDo9wK49s1H5bnfKsz4ledFBtsO39Jxr5UHeFnIpWrCeBi3sXuM0nYYDQfDi/7H/vCg1Lf8hUSxveUIExhBGZA8EqN41DAKqUMlZylkmfqUqE2kvlBUHKQbEI3R1Gv57eTR89+934zCMBE2LRf9SOVhx0W4XS0ytQgxlAxvJtfjbw/jBiMqZM5lx7mvYdB+oyOj5/iU6vTJmwPLV8/Cqw2LDLPq9L9j1XZQ9Dqr0e4cO0It3CX6p8RQdLJeL7iBqc7qmraRDaRIT7hccRSuBRUXCRgLQ2vk9pJnBk687N29b7f3wV8Pw6Ov9ZtcUsornpX0C5f0ht15Xc/QPAUeE2sxWWdx7VI6eyQ/Ww8HAlX32huXUQSFPWk76zT53fcH4tnCT+e8ESCm+U8a7/i/yVY1EDXt2eytWcZlUvKEbJ1P+vsN78Yo/w==
sidebar_class_name: "post api-method"
info_path: docs/developer-docs/api/reference/authentik
custom_edit_url: null
hide_send_button: true
---

import ApiTabs from "@theme/ApiTabs";
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes";
import MimeTabs from "@theme/MimeTabs";
import ParamsItem from "@theme/ParamsItem";
import ResponseSamples from "@theme/ResponseSamples";
import SchemaItem from "@theme/SchemaItem";
import SchemaTabs from "@theme/SchemaTabs";
import Heading from "@theme/Heading";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"tenants_tenants_create_recovery_key_create"}
>
</Heading>

<MethodEndpoint
  method={"post"}
  path={"/tenants/tenants/{tenant_uuid}/create_recovery_key/"}
>
  
</MethodEndpoint>



Create recovery key for user.

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<details
  style={{"marginBottom":"1rem"}}
  className={"openapi-markdown__details"}
  data-collapsed={false}
  open={true}
>
  <summary
    style={{}}
  >
    <h3
      className={"openapi-markdown__details-summary-header-params"}
    >
      Path Parameters
    </h3>
  </summary><div>
    <ul>
      <ParamsItem
        className={"paramsItem"}
        param={{"in":"path","name":"tenant_uuid","schema":{"type":"string","format":"uuid"},"description":"A UUID string identifying this Tenant.","required":true}}
      >
        
      </ParamsItem>
    </ul>
  </div>
</details><MimeTabs
  className={"openapi-tabs__mime"}
>
  <TabItem
    label={"application/json"}
    value={"application/json-schema"}
  >
    <details
      style={{}}
      className={"openapi-markdown__details mime"}
      data-collapsed={false}
      open={true}
    >
      <summary
        style={{}}
        className={"openapi-markdown__details-summary-mime"}
      >
        <h3
          className={"openapi-markdown__details-summary-header-body"}
        >
          Body
        </h3><strong
          className={"openapi-schema__required"}
        >
          required
        </strong>
      </summary><div
        style={{"textAlign":"left","marginLeft":"1rem"}}
      >
        
      </div><ul
        style={{"marginLeft":"1rem"}}
      >
        <SchemaItem
          collapsible={false}
          name={"user"}
          required={true}
          schemaName={"string"}
          qualifierMessage={"**Possible values:** `non-empty`"}
          schema={{"type":"string","minLength":1}}
        >
          
        </SchemaItem><SchemaItem
          collapsible={false}
          name={"duration_days"}
          required={true}
          schemaName={"integer"}
          qualifierMessage={undefined}
          schema={{"type":"integer"}}
        >
          
        </SchemaItem>
      </ul>
    </details>
  </TabItem>
</MimeTabs><div>
  <div>
    <ApiTabs
      label={undefined}
      id={undefined}
    >
      <TabItem
        label={"200"}
        value={"200"}
      >
        <div>
          
          
          
          
          
        </div><div>
          <MimeTabs
            className={"openapi-tabs__mime"}
            schemaType={"response"}
          >
            <TabItem
              label={"application/json"}
              value={"application/json"}
            >
              <SchemaTabs
                className={"openapi-tabs__schema"}
              >
                <TabItem
                  label={"Schema"}
                  value={"Schema"}
                >
                  <details
                    style={{}}
                    className={"openapi-markdown__details response"}
                    data-collapsed={false}
                    open={true}
                  >
                    <summary
                      style={{}}
                      className={"openapi-markdown__details-summary-response"}
                    >
                      <strong>
                        Schema
                      </strong>
                    </summary><div
                      style={{"textAlign":"left","marginLeft":"1rem"}}
                    >
                      
                    </div><ul
                      style={{"marginLeft":"1rem"}}
                    >
                      <SchemaItem
                        collapsible={false}
                        name={"expiry"}
                        required={true}
                        schemaName={"date-time"}
                        qualifierMessage={undefined}
                        schema={{"type":"string","format":"date-time"}}
                      >
                        
                      </SchemaItem><SchemaItem
                        collapsible={false}
                        name={"url"}
                        required={true}
                        schemaName={"string"}
                        qualifierMessage={undefined}
                        schema={{"type":"string"}}
                      >
                        
                      </SchemaItem>
                    </ul>
                  </details>
                </TabItem><TabItem
                  label={"Example (from schema)"}
                  value={"Example (from schema)"}
                >
                  <ResponseSamples
                    responseExample={"{\n  \"expiry\": \"2024-07-29T15:51:28.071Z\",\n  \"url\": \"string\"\n}"}
                    language={"json"}
                  >
                    
                  </ResponseSamples>
                </TabItem>
              </SchemaTabs>
            </TabItem>
          </MimeTabs>
        </div>
      </TabItem><TabItem
        label={"400"}
        value={"400"}
      >
        <div>
          
          
          Bad request
          
          
        </div><div>
          
        </div>
      </TabItem><TabItem
        label={"403"}
        value={"403"}
      >
        <div>
          
          
          
          
          
        </div><div>
          <MimeTabs
            className={"openapi-tabs__mime"}
            schemaType={"response"}
          >
            <TabItem
              label={"application/json"}
              value={"application/json"}
            >
              <SchemaTabs
                className={"openapi-tabs__schema"}
              >
                <TabItem
                  label={"Schema"}
                  value={"Schema"}
                >
                  <details
                    style={{}}
                    className={"openapi-markdown__details response"}
                    data-collapsed={false}
                    open={true}
                  >
                    <summary
                      style={{}}
                      className={"openapi-markdown__details-summary-response"}
                    >
                      <strong>
                        Schema
                      </strong>
                    </summary><div
                      style={{"textAlign":"left","marginLeft":"1rem"}}
                    >
                      
                    </div><ul
                      style={{"marginLeft":"1rem"}}
                    >
                      <SchemaItem
                        collapsible={false}
                        name={"detail"}
                        required={true}
                        schemaName={"string"}
                        qualifierMessage={undefined}
                        schema={{"type":"string"}}
                      >
                        
                      </SchemaItem><SchemaItem
                        collapsible={false}
                        name={"code"}
                        required={false}
                        schemaName={"string"}
                        qualifierMessage={undefined}
                        schema={{"type":"string"}}
                      >
                        
                      </SchemaItem>
                    </ul>
                  </details>
                </TabItem><TabItem
                  label={"Example (from schema)"}
                  value={"Example (from schema)"}
                >
                  <ResponseSamples
                    responseExample={"{\n  \"detail\": \"string\",\n  \"code\": \"string\"\n}"}
                    language={"json"}
                  >
                    
                  </ResponseSamples>
                </TabItem>
              </SchemaTabs>
            </TabItem>
          </MimeTabs>
        </div>
      </TabItem><TabItem
        label={"404"}
        value={"404"}
      >
        <div>
          
          
          User not found
          
          
        </div><div>
          
        </div>
      </TabItem>
    </ApiTabs>
  </div>
</div>
      