Ivandt logo

Create environment

Create environment

Creates a new environment with a pair of API keys (Secret Key and Public Key). Use environments to separate your development, staging, and production deployments.

What you get:

  • Secret Key: For server-to-server API calls
  • Public Key: For client-side SDK usage with origin restrictions

Important: Save the Secret Key immediately - it's only shown once.

POST
/environments
namestring
Length1 <= length <= 50
allowedOriginsarray<string>
Items0 <= items <= 50

Response Body

curl -X POST "https://api.ivandt.com/v1/environments" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "allowedOrigins": [      "http://example.com"    ]  }'
{
  "name": "string",
  "secretKey": {
    "id": "string",
    "key": "string",
    "prefix": "string",
    "active": true,
    "createdAt": "2019-08-24T14:15:22Z"
  },
  "publicKey": {
    "id": "string",
    "key": "string",
    "prefix": "string",
    "allowedOrigins": [
      "string"
    ],
    "active": true,
    "createdAt": "2019-08-24T14:15:22Z"
  }
}