api_key.create
==============

Creates API Key.

`name` is a user-readable name for key.

.. raw:: html

    <div id="json-schema">
    <span class="badge badge-dark value-type">Type: object</span><br/>
    <div class="accordion" id="accordionCall_parameters">
    <div class="card">
    <div class="card-header" id="headingCall_parameters">
    <h2 class="mb-0">
    <button aria-controls="Call_parameters" aria-expanded="" class="btn btn-link property-name-button" data-target="#Call_parameters" data-toggle="collapse" onclick="setAnchor('#Call_parameters')" type="button"><span class="property-name">Call parameters</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingCall_parameters" class="collapse property-definition-div" data-parent="#accordionCall_parameters" id="Call_parameters">
    <div class="card-body pl-5">
    <span class="badge badge-dark value-type">Type: array</span><br/>
    <span class="badge badge-info no-additional">No Additional Items</span><h4>Tuple Validation</h4>
    <h5>Parameter 1: api_key_create</h5>
    <div class="card">
    <div class="card-body items-definition" id="Call_parameters_items_i0">
    <h4>api_key_create</h4><span class="badge badge-dark value-type">Type: object</span><br/>
    <span class="description"><p>API key configuration data for the new key.</p>
    </span> <span class="badge badge-info no-additional">No Additional Properties</span>
    <div class="accordion" id="accordionCall_parameters_items_i0_name">
    <div class="card">
    <div class="card-header" id="headingCall_parameters_items_i0_name">
    <h2 class="mb-0">
    <button aria-controls="Call_parameters_items_i0_name" aria-expanded="" class="btn btn-link property-name-button" data-target="#Call_parameters_items_i0_name" data-toggle="collapse" onclick="setAnchor('#Call_parameters_items_i0_name')" type="button"><span class="property-name">name</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingCall_parameters_items_i0_name" class="collapse property-definition-div" data-parent="#accordionCall_parameters_items_i0_name" id="Call_parameters_items_i0_name">
    <div class="card-body pl-5">
    <h4>Name</h4><span class="badge badge-dark value-type">Type: string</span> <span class="badge badge-success default-value">Default: "nobody"</span><br/>
    <span class="description"><p>Human-readable name for the API key.</p>
    </span>
    <p><span class="badge badge-light restriction min-length-restriction" id="Call_parameters_items_i0_name_minLength">Must be at least <code>1</code> characters long</span></p><p><span class="badge badge-light restriction max-length-restriction" id="Call_parameters_items_i0_name_maxLength">Must be at most <code>200</code> characters long</span></p>
    </div>
    </div>
    </div>
    </div>
    <div class="accordion" id="accordionCall_parameters_items_i0_username">
    <div class="card">
    <div class="card-header" id="headingCall_parameters_items_i0_username">
    <h2 class="mb-0">
    <button aria-controls="Call_parameters_items_i0_username" aria-expanded="" class="btn btn-link property-name-button" data-target="#Call_parameters_items_i0_username" data-toggle="collapse" onclick="setAnchor('#Call_parameters_items_i0_username')" type="button"><span class="property-name">username</span> <span class="badge badge-warning required-property">Required</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingCall_parameters_items_i0_username" class="collapse property-definition-div" data-parent="#accordionCall_parameters_items_i0_username" id="Call_parameters_items_i0_username">
    <div class="card-body pl-5">
    <h4>Username</h4><br/>
    <div class="any-of-value" id="Call_parameters_items_i0_username_anyOf"><h2 class="handle">
    <label>Any of</label>
    </h2><ul class="nav nav-tabs" id="tabsCall_parameters_items_i0_username_anyOf_anyOf" role="tablist"><li class="nav-item">
    <a class="nav-link active anyOf-option" data-toggle="tab" href="#tab-pane_Call_parameters_items_i0_username_anyOf_i0" id="Call_parameters_items_i0_username_anyOf_i0" onclick="setAnchor('#Call_parameters_items_i0_username_anyOf_i0')" role="tab">Option 1</a>
    </li><li class="nav-item">
    <a class="nav-link anyOf-option" data-toggle="tab" href="#tab-pane_Call_parameters_items_i0_username_anyOf_i1" id="Call_parameters_items_i0_username_anyOf_i1" onclick="setAnchor('#Call_parameters_items_i0_username_anyOf_i1')" role="tab">Option 2</a>
    </li></ul>
    <div class="tab-content card"><div class="tab-pane fade card-body active show" id="tab-pane_Call_parameters_items_i0_username_anyOf_i0" role="tabpanel">
    <span class="badge badge-dark value-type">Type: string</span><br/>
    </div><div class="tab-pane fade card-body" id="tab-pane_Call_parameters_items_i0_username_anyOf_i1" role="tabpanel">
    <span class="badge badge-dark value-type">Type: string</span><br/>
    <p><span class="badge badge-light restriction min-length-restriction" id="Call_parameters_items_i0_username_anyOf_i1_minLength">Must be at least <code>1</code> characters long</span></p>
    </div></div></div>
    </div>
    </div>
    </div>
    </div>
    <div class="accordion" id="accordionCall_parameters_items_i0_expires_at">
    <div class="card">
    <div class="card-header" id="headingCall_parameters_items_i0_expires_at">
    <h2 class="mb-0">
    <button aria-controls="Call_parameters_items_i0_expires_at" aria-expanded="" class="btn btn-link property-name-button" data-target="#Call_parameters_items_i0_expires_at" data-toggle="collapse" onclick="setAnchor('#Call_parameters_items_i0_expires_at')" type="button"><span class="property-name">expires_at</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingCall_parameters_items_i0_expires_at" class="collapse property-definition-div" data-parent="#accordionCall_parameters_items_i0_expires_at" id="Call_parameters_items_i0_expires_at">
    <div class="card-body pl-5">
    <h4>Expires At</h4> <span class="badge badge-success default-value">Default: null</span><br/>
    <span class="description"><p>Expiration timestamp for the API key or <code>null</code> for no expiration.</p>
    </span><div class="any-of-value" id="Call_parameters_items_i0_expires_at_anyOf"><h2 class="handle">
    <label>Any of</label>
    </h2><ul class="nav nav-tabs" id="tabsCall_parameters_items_i0_expires_at_anyOf_anyOf" role="tablist"><li class="nav-item">
    <a class="nav-link active anyOf-option" data-toggle="tab" href="#tab-pane_Call_parameters_items_i0_expires_at_anyOf_i0" id="Call_parameters_items_i0_expires_at_anyOf_i0" onclick="setAnchor('#Call_parameters_items_i0_expires_at_anyOf_i0')" role="tab">Option 1</a>
    </li><li class="nav-item">
    <a class="nav-link anyOf-option" data-toggle="tab" href="#tab-pane_Call_parameters_items_i0_expires_at_anyOf_i1" id="Call_parameters_items_i0_expires_at_anyOf_i1" onclick="setAnchor('#Call_parameters_items_i0_expires_at_anyOf_i1')" role="tab">Option 2</a>
    </li></ul>
    <div class="tab-content card"><div class="tab-pane fade card-body active show" id="tab-pane_Call_parameters_items_i0_expires_at_anyOf_i0" role="tabpanel">
    <span class="badge badge-dark value-type">Type: string</span><span class="badge badge-info value-type">Format: date-time</span><br/>
    </div><div class="tab-pane fade card-body" id="tab-pane_Call_parameters_items_i0_expires_at_anyOf_i1" role="tabpanel">
    <span class="badge badge-dark value-type">Type: null</span><br/>
    </div></div></div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    <div class="accordion" id="accordionReturn_value">
    <div class="card">
    <div class="card-header" id="headingReturn_value">
    <h2 class="mb-0">
    <button aria-controls="Return_value" aria-expanded="" class="btn btn-link property-name-button" data-target="#Return_value" data-toggle="collapse" onclick="setAnchor('#Return_value')" type="button"><span class="property-name">Return value</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingReturn_value" class="collapse property-definition-div" data-parent="#accordionReturn_value" id="Return_value">
    <div class="card-body pl-5">
    <h4>ApiKeyEntryWithKey</h4><span class="badge badge-dark value-type">Type: object</span><br/>
    <span class="description"><p>The created API key with the actual key value.</p>
    </span> <span class="badge badge-info no-additional">No Additional Properties</span>
    <div class="accordion" id="accordionReturn_value_id">
    <div class="card">
    <div class="card-header" id="headingReturn_value_id">
    <h2 class="mb-0">
    <button aria-controls="Return_value_id" aria-expanded="" class="btn btn-link property-name-button" data-target="#Return_value_id" data-toggle="collapse" onclick="setAnchor('#Return_value_id')" type="button"><span class="property-name">id</span> <span class="badge badge-warning required-property">Required</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingReturn_value_id" class="collapse property-definition-div" data-parent="#accordionReturn_value_id" id="Return_value_id">
    <div class="card-body pl-5">
    <h4>Id</h4><span class="badge badge-dark value-type">Type: integer</span><br/>
    <span class="description"><p>Unique identifier for the API key.</p>
    </span>
    </div>
    </div>
    </div>
    </div>
    <div class="accordion" id="accordionReturn_value_name">
    <div class="card">
    <div class="card-header" id="headingReturn_value_name">
    <h2 class="mb-0">
    <button aria-controls="Return_value_name" aria-expanded="" class="btn btn-link property-name-button" data-target="#Return_value_name" data-toggle="collapse" onclick="setAnchor('#Return_value_name')" type="button"><span class="property-name">name</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingReturn_value_name" class="collapse property-definition-div" data-parent="#accordionReturn_value_name" id="Return_value_name">
    <div class="card-body pl-5">
    <h4>Name</h4><span class="badge badge-dark value-type">Type: string</span> <span class="badge badge-success default-value">Default: "nobody"</span><br/>
    <span class="description"><p>Human-readable name for the API key.</p>
    </span>
    <p><span class="badge badge-light restriction min-length-restriction" id="Return_value_name_minLength">Must be at least <code>1</code> characters long</span></p><p><span class="badge badge-light restriction max-length-restriction" id="Return_value_name_maxLength">Must be at most <code>200</code> characters long</span></p>
    </div>
    </div>
    </div>
    </div>
    <div class="accordion" id="accordionReturn_value_username">
    <div class="card">
    <div class="card-header" id="headingReturn_value_username">
    <h2 class="mb-0">
    <button aria-controls="Return_value_username" aria-expanded="" class="btn btn-link property-name-button" data-target="#Return_value_username" data-toggle="collapse" onclick="setAnchor('#Return_value_username')" type="button"><span class="property-name">username</span> <span class="badge badge-warning required-property">Required</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingReturn_value_username" class="collapse property-definition-div" data-parent="#accordionReturn_value_username" id="Return_value_username">
    <div class="card-body pl-5">
    <h4>Username</h4><br/>
    <span class="description"><p>Username associated with the API key or <code>null</code> for system keys.</p>
    </span><div class="any-of-value" id="Return_value_username_anyOf"><h2 class="handle">
    <label>Any of</label>
    </h2><ul class="nav nav-tabs" id="tabsReturn_value_username_anyOf_anyOf" role="tablist"><li class="nav-item">
    <a class="nav-link active anyOf-option" data-toggle="tab" href="#tab-pane_Return_value_username_anyOf_i0" id="Return_value_username_anyOf_i0" onclick="setAnchor('#Return_value_username_anyOf_i0')" role="tab">Option 1</a>
    </li><li class="nav-item">
    <a class="nav-link anyOf-option" data-toggle="tab" href="#tab-pane_Return_value_username_anyOf_i1" id="Return_value_username_anyOf_i1" onclick="setAnchor('#Return_value_username_anyOf_i1')" role="tab">Option 2</a>
    </li><li class="nav-item">
    <a class="nav-link anyOf-option" data-toggle="tab" href="#tab-pane_Return_value_username_anyOf_i2" id="Return_value_username_anyOf_i2" onclick="setAnchor('#Return_value_username_anyOf_i2')" role="tab">Option 3</a>
    </li></ul>
    <div class="tab-content card"><div class="tab-pane fade card-body active show" id="tab-pane_Return_value_username_anyOf_i0" role="tabpanel">
    <span class="badge badge-dark value-type">Type: string</span><br/>
    </div><div class="tab-pane fade card-body" id="tab-pane_Return_value_username_anyOf_i1" role="tabpanel">
    <span class="badge badge-dark value-type">Type: string</span><br/>
    <p><span class="badge badge-light restriction min-length-restriction" id="Return_value_username_anyOf_i1_minLength">Must be at least <code>1</code> characters long</span></p>
    </div><div class="tab-pane fade card-body" id="tab-pane_Return_value_username_anyOf_i2" role="tabpanel">
    <span class="badge badge-dark value-type">Type: null</span><br/>
    </div></div></div>
    </div>
    </div>
    </div>
    </div>
    <div class="accordion" id="accordionReturn_value_user_identifier">
    <div class="card">
    <div class="card-header" id="headingReturn_value_user_identifier">
    <h2 class="mb-0">
    <button aria-controls="Return_value_user_identifier" aria-expanded="" class="btn btn-link property-name-button" data-target="#Return_value_user_identifier" data-toggle="collapse" onclick="setAnchor('#Return_value_user_identifier')" type="button"><span class="property-name">user_identifier</span> <span class="badge badge-warning required-property">Required</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingReturn_value_user_identifier" class="collapse property-definition-div" data-parent="#accordionReturn_value_user_identifier" id="Return_value_user_identifier">
    <div class="card-body pl-5">
    <h4>User Identifier</h4><br/>
    <span class="description"><p>User ID (numeric) or SID (string) that owns this API key.</p>
    </span><div class="any-of-value" id="Return_value_user_identifier_anyOf"><h2 class="handle">
    <label>Any of</label>
    </h2><ul class="nav nav-tabs" id="tabsReturn_value_user_identifier_anyOf_anyOf" role="tablist"><li class="nav-item">
    <a class="nav-link active anyOf-option" data-toggle="tab" href="#tab-pane_Return_value_user_identifier_anyOf_i0" id="Return_value_user_identifier_anyOf_i0" onclick="setAnchor('#Return_value_user_identifier_anyOf_i0')" role="tab">Option 1</a>
    </li><li class="nav-item">
    <a class="nav-link anyOf-option" data-toggle="tab" href="#tab-pane_Return_value_user_identifier_anyOf_i1" id="Return_value_user_identifier_anyOf_i1" onclick="setAnchor('#Return_value_user_identifier_anyOf_i1')" role="tab">Option 2</a>
    </li></ul>
    <div class="tab-content card"><div class="tab-pane fade card-body active show" id="tab-pane_Return_value_user_identifier_anyOf_i0" role="tabpanel">
    <span class="badge badge-dark value-type">Type: integer</span><br/>
    </div><div class="tab-pane fade card-body" id="tab-pane_Return_value_user_identifier_anyOf_i1" role="tabpanel">
    <span class="badge badge-dark value-type">Type: string</span><br/>
    </div></div></div>
    </div>
    </div>
    </div>
    </div>
    <div class="accordion" id="accordionReturn_value_keyhash">
    <div class="card">
    <div class="card-header" id="headingReturn_value_keyhash">
    <h2 class="mb-0">
    <button aria-controls="Return_value_keyhash" aria-expanded="" class="btn btn-link property-name-button" data-target="#Return_value_keyhash" data-toggle="collapse" onclick="setAnchor('#Return_value_keyhash')" type="button"><span class="property-name">keyhash</span> <span class="badge badge-warning required-property">Required</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingReturn_value_keyhash" class="collapse property-definition-div" data-parent="#accordionReturn_value_keyhash" id="Return_value_keyhash">
    <div class="card-body pl-5">
    <h4>Keyhash</h4><span class="badge badge-dark value-type">Type: string</span><br/>
    <span class="description"><p>Hashed representation of the API key (masked for security).</p>
    </span>
    </div>
    </div>
    </div>
    </div>
    <div class="accordion" id="accordionReturn_value_created_at">
    <div class="card">
    <div class="card-header" id="headingReturn_value_created_at">
    <h2 class="mb-0">
    <button aria-controls="Return_value_created_at" aria-expanded="" class="btn btn-link property-name-button" data-target="#Return_value_created_at" data-toggle="collapse" onclick="setAnchor('#Return_value_created_at')" type="button"><span class="property-name">created_at</span> <span class="badge badge-warning required-property">Required</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingReturn_value_created_at" class="collapse property-definition-div" data-parent="#accordionReturn_value_created_at" id="Return_value_created_at">
    <div class="card-body pl-5">
    <h4>Created At</h4><span class="badge badge-dark value-type">Type: string</span><span class="badge badge-info value-type">Format: date-time</span><br/>
    <span class="description"><p>Timestamp when the API key was created.</p>
    </span>
    </div>
    </div>
    </div>
    </div>
    <div class="accordion" id="accordionReturn_value_expires_at">
    <div class="card">
    <div class="card-header" id="headingReturn_value_expires_at">
    <h2 class="mb-0">
    <button aria-controls="Return_value_expires_at" aria-expanded="" class="btn btn-link property-name-button" data-target="#Return_value_expires_at" data-toggle="collapse" onclick="setAnchor('#Return_value_expires_at')" type="button"><span class="property-name">expires_at</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingReturn_value_expires_at" class="collapse property-definition-div" data-parent="#accordionReturn_value_expires_at" id="Return_value_expires_at">
    <div class="card-body pl-5">
    <h4>Expires At</h4> <span class="badge badge-success default-value">Default: null</span><br/>
    <span class="description"><p>Expiration timestamp for the API key or <code>null</code> for no expiration.</p>
    </span><div class="any-of-value" id="Return_value_expires_at_anyOf"><h2 class="handle">
    <label>Any of</label>
    </h2><ul class="nav nav-tabs" id="tabsReturn_value_expires_at_anyOf_anyOf" role="tablist"><li class="nav-item">
    <a class="nav-link active anyOf-option" data-toggle="tab" href="#tab-pane_Return_value_expires_at_anyOf_i0" id="Return_value_expires_at_anyOf_i0" onclick="setAnchor('#Return_value_expires_at_anyOf_i0')" role="tab">Option 1</a>
    </li><li class="nav-item">
    <a class="nav-link anyOf-option" data-toggle="tab" href="#tab-pane_Return_value_expires_at_anyOf_i1" id="Return_value_expires_at_anyOf_i1" onclick="setAnchor('#Return_value_expires_at_anyOf_i1')" role="tab">Option 2</a>
    </li></ul>
    <div class="tab-content card"><div class="tab-pane fade card-body active show" id="tab-pane_Return_value_expires_at_anyOf_i0" role="tabpanel">
    <span class="badge badge-dark value-type">Type: string</span><span class="badge badge-info value-type">Format: date-time</span><br/>
    </div><div class="tab-pane fade card-body" id="tab-pane_Return_value_expires_at_anyOf_i1" role="tabpanel">
    <span class="badge badge-dark value-type">Type: null</span><br/>
    </div></div></div>
    </div>
    </div>
    </div>
    </div>
    <div class="accordion" id="accordionReturn_value_local">
    <div class="card">
    <div class="card-header" id="headingReturn_value_local">
    <h2 class="mb-0">
    <button aria-controls="Return_value_local" aria-expanded="" class="btn btn-link property-name-button" data-target="#Return_value_local" data-toggle="collapse" onclick="setAnchor('#Return_value_local')" type="button"><span class="property-name">local</span> <span class="badge badge-warning required-property">Required</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingReturn_value_local" class="collapse property-definition-div" data-parent="#accordionReturn_value_local" id="Return_value_local">
    <div class="card-body pl-5">
    <h4>Local</h4><span class="badge badge-dark value-type">Type: boolean</span><br/>
    <span class="description"><p>Whether this API key is for local system use only.</p>
    </span>
    </div>
    </div>
    </div>
    </div>
    <div class="accordion" id="accordionReturn_value_revoked">
    <div class="card">
    <div class="card-header" id="headingReturn_value_revoked">
    <h2 class="mb-0">
    <button aria-controls="Return_value_revoked" aria-expanded="" class="btn btn-link property-name-button" data-target="#Return_value_revoked" data-toggle="collapse" onclick="setAnchor('#Return_value_revoked')" type="button"><span class="property-name">revoked</span> <span class="badge badge-warning required-property">Required</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingReturn_value_revoked" class="collapse property-definition-div" data-parent="#accordionReturn_value_revoked" id="Return_value_revoked">
    <div class="card-body pl-5">
    <h4>Revoked</h4><span class="badge badge-dark value-type">Type: boolean</span><br/>
    <span class="description"><p>Whether the API key has been revoked and is no longer valid.</p>
    </span>
    </div>
    </div>
    </div>
    </div>
    <div class="accordion" id="accordionReturn_value_revoked_reason">
    <div class="card">
    <div class="card-header" id="headingReturn_value_revoked_reason">
    <h2 class="mb-0">
    <button aria-controls="Return_value_revoked_reason" aria-expanded="" class="btn btn-link property-name-button" data-target="#Return_value_revoked_reason" data-toggle="collapse" onclick="setAnchor('#Return_value_revoked_reason')" type="button"><span class="property-name">revoked_reason</span> <span class="badge badge-warning required-property">Required</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingReturn_value_revoked_reason" class="collapse property-definition-div" data-parent="#accordionReturn_value_revoked_reason" id="Return_value_revoked_reason">
    <div class="card-body pl-5">
    <h4>Revoked Reason</h4><br/>
    <span class="description"><p>Reason for API key revocation or <code>null</code> if not revoked.</p>
    </span><div class="any-of-value" id="Return_value_revoked_reason_anyOf"><h2 class="handle">
    <label>Any of</label>
    </h2><ul class="nav nav-tabs" id="tabsReturn_value_revoked_reason_anyOf_anyOf" role="tablist"><li class="nav-item">
    <a class="nav-link active anyOf-option" data-toggle="tab" href="#tab-pane_Return_value_revoked_reason_anyOf_i0" id="Return_value_revoked_reason_anyOf_i0" onclick="setAnchor('#Return_value_revoked_reason_anyOf_i0')" role="tab">Option 1</a>
    </li><li class="nav-item">
    <a class="nav-link anyOf-option" data-toggle="tab" href="#tab-pane_Return_value_revoked_reason_anyOf_i1" id="Return_value_revoked_reason_anyOf_i1" onclick="setAnchor('#Return_value_revoked_reason_anyOf_i1')" role="tab">Option 2</a>
    </li></ul>
    <div class="tab-content card"><div class="tab-pane fade card-body active show" id="tab-pane_Return_value_revoked_reason_anyOf_i0" role="tabpanel">
    <span class="badge badge-dark value-type">Type: string</span><br/>
    </div><div class="tab-pane fade card-body" id="tab-pane_Return_value_revoked_reason_anyOf_i1" role="tabpanel">
    <span class="badge badge-dark value-type">Type: null</span><br/>
    </div></div></div>
    </div>
    </div>
    </div>
    </div>
    <div class="accordion" id="accordionReturn_value_key">
    <div class="card">
    <div class="card-header" id="headingReturn_value_key">
    <h2 class="mb-0">
    <button aria-controls="Return_value_key" aria-expanded="" class="btn btn-link property-name-button" data-target="#Return_value_key" data-toggle="collapse" onclick="setAnchor('#Return_value_key')" type="button"><span class="property-name">key</span> <span class="badge badge-warning required-property">Required</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingReturn_value_key" class="collapse property-definition-div" data-parent="#accordionReturn_value_key" id="Return_value_key">
    <div class="card-body pl-5">
    <h4>Key</h4><span class="badge badge-dark value-type">Type: string</span><br/>
    <span class="description"><p>The actual API key value (only returned on creation).</p>
    </span>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div><br><br>

*Required roles:* API_KEY_WRITE | READONLY_ADMIN

