v8

latestOpenAPI 3.0.0Apache 2.0raw.githubusercontent.com2025-10-165266542.4 MB
DigitalOcean-public.v2-new_Functions

Create Namespace

Creates a new serverless functions namespace in the desired region and associates it with the provided label. A namespace is a collection of functions and their associated packages, triggers, and project specifications. To create a namespace, send a POST request to /v2/functions/namespaces with the region and label properties.

post/v2/functions/namespaces

Request body

regionstring required

The datacenter region in which to create the namespace.

labelstring required

The namespace's unique name.

Example request

{
  "region": "nyc1",
  "label": "my namespace"
}

Response

A JSON response object with a key called namespace. The object contains the properties associated with the namespace.

Example response

{
  "namespace": {
    "api_host": "https://api_host.io",
    "namespace": "fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "created_at": "2022-09-14T04:16:45Z",
    "updated_at": "2022-09-14T04:16:45Z",
    "label": "my namespace",
    "region": "nyc1",
    "uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "key": "d1zcd455h01mqjfs4s2eaewyejehi5f2uj4etqq3h7cera8iwkub6xg5of1wdde2"
  }
}