409 Conflict
409 responses come from the admin API (not the gateway proxy). They indicate a resource creation or state-change conflict.
Error codes
resource_already_exists
{
"error": {
"code": "resource_already_exists",
"message": "An API key with label 'production' already exists for this organization.",
"request_id": "req_01hwz3kj4p5qm8n9v2t6ym",
"resource_type": "api_key",
"conflicting_id": "key_01hwz3kj4p5qm8n9v2t6yn"
}
}Fix: Use a unique label, or delete the existing resource first:
# List existing keys
curl https://api.curate-me.ai/v1/admin/api-keys \
-H "X-CM-API-Key: cm_sk_your_key"
# Delete the conflicting key
curl -X DELETE "https://api.curate-me.ai/v1/admin/api-keys/key_01hwz3kj4p5qm8n9v2t6yn" \
-H "X-CM-API-Key: cm_sk_your_key"
# Then recreate
curl -X POST https://api.curate-me.ai/v1/admin/api-keys \
-H "X-CM-API-Key: cm_sk_your_key" \
-H "Content-Type: application/json" \
-d '{"label": "production", "scopes": ["gateway_proxy"]}'secret_already_stored
{
"error": {
"code": "secret_already_stored",
"message": "A secret for provider 'openai' is already stored. Use PUT to update it.",
"request_id": "req_01hwz3kj4p5qm8n9v2t6yo"
}
}Fix: Use PUT instead of POST to update an existing secret:
curl -X PUT https://api.curate-me.ai/v1/admin/secrets/openai \
-H "X-CM-API-Key: cm_sk_your_key" \
-H "Content-Type: application/json" \
-d '{"secret": "sk-your-new-openai-key"}'runner_already_registered
{
"error": {
"code": "runner_already_registered",
"message": "Machine ID 'mac-mbp-work' is already registered as runner runner_xxx.",
"request_id": "req_01hwz3kj4p5qm8n9v2t6yp",
"existing_runner_id": "runner_xxx"
}
}Fix: The machine is already registered. Either use the existing runner, or deregister it first:
# Deregister the existing runner
curl -X DELETE "https://api.curate-me.ai/gateway/admin/runners/byovm/runner_xxx" \
-H "X-CM-API-Key: cm_sk_your_key"
# Then re-register with a fresh tokenwebhook_endpoint_duplicate
{
"error": {
"code": "webhook_endpoint_duplicate",
"message": "A webhook for URL 'https://app.example.com/webhooks/cm' already exists.",
"request_id": "req_01hwz3kj4p5qm8n9v2t6yq"
}
}Fix: Update the existing webhook rather than creating a new one:
# List webhooks
curl https://api.curate-me.ai/v1/admin/webhooks \
-H "X-CM-API-Key: cm_sk_your_key"
# Update the existing webhook
curl -X PATCH "https://api.curate-me.ai/v1/admin/webhooks/wh_xxx" \
-H "X-CM-API-Key: cm_sk_your_key" \
-H "Content-Type: application/json" \
-d '{"events": ["cost.exceeded", "approval.required"]}'