pydo.functions_access_key.create()
Generated on 3 Aug 2026
from pydo version
v0.40.0
Usage
client.functions_access_key.create(
namespace_id="fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
body={
"name": "my-function-access-key",
"expires_in": "7d",
},
)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
namespace_idstring requiredThe ID of the namespace to be managed.
namestring requiredExample:
my-function-access-keyThe access key's name.
expires_instring 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.