Ivandt logo

Update origins

Update origins

Updates the allowed origins for an environment's Public Key. This controls which domains can use the Public Key for client-side SDK integration.

Origin format:

  • https://example.com
  • https://*.example.com (wildcard subdomains)
  • http://localhost:3000 (development)

Security: Requests from unlisted origins will be rejected.

PATCH
/environments/{name}/origins

Path Parameters

namestring

The environment name

allowedOriginsarray<string>
Items0 <= items <= 50

Response Body

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