dots.v2.functions.namespaces.byNamespace_id().keys.post()
Generated on 13 Nov 2026
from DoTs version
v1.24.0
Usage
client.v2.functions.namespaces.byNamespace_id(namespace_id).keys.post(body: Access_key_create_request, requestConfiguration?: RequestConfiguration<object>): Promise<undefined | KeysPostResponse>Description
Creates a new access key for a serverless functions namespace. The access key can be used to authenticate requests to the namespace’s functions. The secret key is only returned once upon creation.
To create an access key, send a POST request to /v2/functions/namespaces/{namespace_id}/keys.
Parameters
Path Parameters
namespace_idstring requiredExample:
fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxThe ID of the namespace to be managed.
Request Body
namestring requiredExample:
my-function-access-keyThe access key's name.
expiresInstring optionalExample:
7dThe duration after which the access key expires, specified as a human-readable duration string in the format
<int>h(hours) or<int>d(days). Minimum value is1h. If omitted, the key will never expire.
Request Sample
Response Example
More Information
See /v2/functions/namespaces/{namespace_id}/keys in the API reference for additional detail on responses, headers, parameters, and more.