{{? data.api.info.description}}{{=data.api.info.description}}{{?}}

import Tabs from '@theme/Tabs'
import TabItem from '@theme/TabItem'

:::info

You are viewing REST API documentation. This documentation is auto-generated from a swagger specification which
itself is generated from annotations in the source code of the project. It is possible that this documentation includes
bugs and that code samples are incomplete or wrong.

If you find issues in the respective documentation, please do not edit the
Markdown files directly (as they are generated) but raise an issue on the project's GitHub presence instead. This documentation
will improve over time with your help! If you have ideas how to improve this part of the documentation, feel free to
share them in a [GitHub issue](https://github.com/ory/docs/issues/new) any time.

:::

{{? data.api.components && data.api.components.securitySchemes }}
{{#def.security}}
{{?}}

{{ for (var r in data.resources) { }}
{{ data.resource = data.resources[r]; }}

<a id="{{=data.title_prefix+'-'+data.utils.slugify(r)}}"></a>

## {{= r}}

{{? data.resource.description }}{{= data.resource.description}}{{?}}

{{? data.resource.externalDocs}}
<a href="{{=data.resource.externalDocs.url}}">{{=data.resource.externalDocs.description||'External documentation'}}</a>
{{?}}

{{ for (var m in data.resource.methods) { }}
{{ data.operationUniqueName = m; }}
{{ data.method = data.resource.methods[m]; }}
{{ data.operationUniqueSlug = data.method.slug; }}
{{ data.operation = data.method.operation; }}
{{= data.templates.operation(data) }}
{{ } /* of methods */ }}

{{ } /* of resources */ }}

{{? data.api.components && data.api.components.schemas }}
## Schemas

{{ for (var s in data.components.schemas) { }}
{{ var origSchema = data.components.schemas[s]; }}
{{ var schema = data.api.components.schemas[s]; }}

<a id="tocS{{=s.toLowerCase()}}"></a>

#### {{=s}}

<a id="schema{{=s.toLowerCase()}}"></a>

{{? data.options.yaml }}
```yaml
{{=data.utils.yaml.safeDump(data.utils.getSample(schema,data.options,{},data.api))}}
{{??}}
```json
{{=data.utils.safejson(data.utils.getSample(schema,data.options,{},data.api),null,2)}}
{{?}}
```

{{ var enums = []; }}
{{ var blocks = data.utils.schemaToArray(origSchema,-1,{trim:true,join:true},data); }}
{{ for (var block of blocks) {
     for (var p of block.rows) {
       if (p.schema && p.schema.enum) {
         for (var e of p.schema.enum) {
           enums.push({name:p.name,value:e});
         }
       }
     }
   }
}}

{{~ blocks :block}}
{{? block.title }}*{{= block.title}}*{{= '\n\n'}}{{?}}
{{? block.externalDocs}}
<a href="{{=block.externalDocs.url}}">{{=block.externalDocs.description||'External documentation'}}</a>
{{?}}

{{? block===blocks[0] }}
#### Properties
{{?}}

{{? block.rows.length}}|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|{{?}}
{{~ block.rows :p}}|{{=p.displayName}}|{{=p.safeType}}|{{=p.required}}|{{=p.restrictions||'none'}}|{{=p.description||'none'}}|
{{~}}
{{~}}
{{? (blocks[0].rows.length === 0) && (blocks.length === 1) }}
*None*
{{?}}

{{? enums.length > 0 }}
##### Enumerated Values

|Property|Value|
|---|---|
{{~ enums :e}}|{{=e.name}}|{{=data.utils.toPrimitive(e.value)}}|
{{~}}

{{?}}

{{ } /* of schemas */ }}

{{?}}

{{#def.footer}}

{{? data.options.discovery}}
{{#def.discovery}}
{{?}}
