Maton

Create Environment Variables

POST/functions/{function_id}/env

Authorization

bearerAuth
AuthorizationBearer <token>

Your Maton API key, sent as Authorization: Bearer <MATON_API_KEY>. Create one at https://maton.ai/settings.

In: header

Path Parameters

function_id*string

The function's unique identifier.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST \  "https://api.maton.ai/functions/{function_id}/env" \  -H "Authorization: Bearer $MATON_API_KEY" \  -H "Content-Type: application/json" \  -d '{"env": [{"key": "GREETING", "value": "hi", "type": "PLAIN"}]}'
{}
{
  "message": "Invalid app name.",
  "type": "Bad Request",
  "code": 400
}
{
  "message": "Invalid API key.",
  "type": "Unauthorized",
  "code": 401
}
{
  "message": "Resource not found.",
  "type": "Not Found",
  "code": 404
}
{
  "message": "env keys already exist: GREETING.",
  "type": "Conflict",
  "code": 409
}
{
  "message": "Too many requests.",
  "type": "Too Many Requests",
  "code": 429
}
{
  "message": "Internal server error.",
  "type": "Internal Server Error",
  "code": 500
}