Skip to main content
POST
/
configs
from portkey_ai import Portkey portkey = Portkey( api_key="PORTKEY_API_KEY", ) # Create a new configuration config = portkey.configs.create( name="ConfigName_0909", config={ "retry": { "attempts": 3 }, "cache": { "mode": "simple" } }, workspace_id="WORKSPACE_ID", ) print(config)
{
  "success": true,
  "data": {
    "id": "f3d8d070-f29d-43a3-bf97-3159c60f4ce0",
    "version_id": "0db4065b-ead2-4daa-bf5e-7e9106585133"
  }
}

Authorizations

x-portkey-api-key
string
header
required

Body

application/json
name
string
config
object
isDefault
integer
workspace_id
string<uuid>

optional, when using organisation admin API keys

Response

200 - application/json

Config created successfully

success
boolean
data
object
Last modified on March 17, 2026