Skip to main content
JavaScript
import Riza from '@riza-io/api';

const client = new Riza({
  apiKey: process.env['RIZA_API_KEY'], // This is the default and can be omitted
});

const secret = await client.secrets.create({ name: 'name', value: 'value' });

console.log(secret.id);
import os
from rizaio import Riza

client = Riza(
api_key=os.environ.get("RIZA_API_KEY"), # This is the default and can be omitted
)
secret = client.secrets.create(
name="name",
value="value",
)
print(secret.id)
package main

import (
"context"
"fmt"

"github.com/riza-io/riza-api-go"
"github.com/riza-io/riza-api-go/option"
)

func main() {
client := riza.NewClient(
option.WithAPIKey("My API Key"), // defaults to os.LookupEnv("RIZA_API_KEY")
)
secret, err := client.Secrets.New(context.TODO(), riza.SecretNewParams{
Name: riza.F("name"),
Value: riza.F("value"),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", secret.ID)
}
{
  "id": "<string>",
  "name": "<string>"
}
{
"code": 16,
"message": "unauthenticated"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required
value
string
required

Response

OK

id
string
required
name
string
required