Skip to content
DocsOpenAPI spec

    Create Object Storage Key

    POST/v1/storage/keys

    Create an S3 access key for a project’s Buckets in a region. The response is the only one that includes the secret access key.

    Body ParametersJSONExpand Collapse
    name: string

    Name of the Object Storage Key.

    project_id: string

    Project ID the Object Storage Key belongs to. The key can access the project’s Buckets in its region.

    region: RegionName

    Region the resource is in.

    One of the following:
    "us-sva-2"
    "us-wdc-1"
    ReturnsExpand Collapse
    ObjectStorageKeyWithSecret object { id, access_key, created_at, 6 more }

    Object Storage Key details, including the secret access key. Returned only when the key is created.

    id: string

    Unique identifier for the Object Storage Key.

    access_key: string

    S3 access key ID.

    created_at: string

    When the Object Storage Key was created.

    formatdate-time
    name: string

    Name of the Object Storage Key.

    project_id: string

    Project ID the Object Storage Key belongs to.

    region: RegionName

    Region the resource is in.

    One of the following:
    "us-sva-2"
    "us-wdc-1"
    secret: string

    S3 secret access key. It is only returned here and cannot be retrieved again: store it securely, or delete the key and create a new one if it is lost.

    Status of the resource.

    One of the following:
    "pending"
    "creating"
    "updating"
    "ready"
    "deleting"
    "deleted"
    "error"
    "suspended"
    updated_at: string

    When the Object Storage Key was updated.

    formatdate-time

    Create Object Storage Key

    curl https://api.nirvanalabs.io/v1/storage/keys \
        -H 'Content-Type: application/json' \
        -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \
        -d '{
              "name": "ci-uploads",
              "project_id": "123e4567-e89b-12d3-a456-426614174000",
              "region": "us-sva-2"
            }'
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "access_key": "0555B35654AD1656D804",
      "created_at": "2025-01-01T00:00:00Z",
      "name": "ci-uploads",
      "project_id": "123e4567-e89b-12d3-a456-426614174000",
      "region": "us-sva-2",
      "secret": "h7GhxuBLTrlhVUyxSPUKUV8r/2EI4ngqJxD7iBdBYLhwluN30JaT3Q==",
      "status": "ready",
      "updated_at": "2025-01-01T00:00:00Z"
    }
    Returns Examples
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "access_key": "0555B35654AD1656D804",
      "created_at": "2025-01-01T00:00:00Z",
      "name": "ci-uploads",
      "project_id": "123e4567-e89b-12d3-a456-426614174000",
      "region": "us-sva-2",
      "secret": "h7GhxuBLTrlhVUyxSPUKUV8r/2EI4ngqJxD7iBdBYLhwluN30JaT3Q==",
      "status": "ready",
      "updated_at": "2025-01-01T00:00:00Z"
    }