Skip to content

Create or replace a provider

PUT
/providers/{id}
curl --request PUT \
--url https://api.canopyhq.dev/providers/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "kind": "simulated" }'

The secret is sealed at this door under a name canopy mints for the provider and is never returned. A replacement without a secret keeps the one the provider holds; every preset on the provider follows the change.

id
required

A provider’s name within its tenant.

string

The name the tenant gives the provider; presets name it by this.

Media typeapplication/json
One of:
object
kind
required
string
Allowed values: simulated

The provider was replaced or is unchanged.

Media typeapplication/json

The result of writing a named resource, without returning its value.

object
outcome
required

The result of applying a resource write at the door.

string
Allowed values: created replaced unchanged
Example
{
"outcome": "created"
}

The provider now exists under this tenant.

Media typeapplication/json

The result of writing a named resource, without returning its value.

object
outcome
required

The result of applying a resource write at the door.

string
Allowed values: created replaced unchanged
Example
{
"outcome": "created"
}

An invalid body returns an error naming the field and reason, as does a base URL that is not http or https or a new OpenRouter provider without a secret.

No console token, or one that did not verify.

Only an owner of the tenant may configure it.

Another writer changed the provider first; nothing was written.