Custom Provider Environments
Environments represent deployment targets for custom provider versions (e.g., staging, production).
Custom Provider Environments object
Attributes
object
StringString representing the object's type
id
StringUnique custom provider environment identifier
custom_provider_id
StringID of the parent custom provider
provider_id
StringNullableID of the associated provider
current_provider_version_id
StringNullableID of the current provider version in this environment
instance_id
StringNullableID of the instance this environment is associated with
created_at
DateTimestamp when created
updated_at
DateTimestamp when last updated
{"object": "custom_provider.environment","id": "cpenv_1aBcDeFgHjKlMnPq","custom_provider_id": "cpr_1aBcDeFgHjKlMnPq","provider_id": "pro_5gHjKlMnPqRsTuVw","current_provider_version_id": "prv_4dEfGhJkLmNpQrSt","instance_id": "ins_2cDeFgHjKlMnPqRs","created_at": "2025-09-15T10:30:00.000Z","updated_at": "2026-01-10T14:45:00.000Z"}
List custom provider environments
Returns a paginated list of environments for a custom provider.
URL Parameters
custom_provider_id
StringThe unique identifier for the custom_provider
Query Parameters
limit
NumberOptionalMaximum number of items to return (1-100)
after
StringOptionalReturn items after this ID
before
StringOptionalReturn items before this ID
cursor
StringOptionalPagination cursor from a previous response
order
EnumOptionalSort order for results
ids
UnionOptionalFilter by environment IDs
custom_provider_version_ids
UnionOptionalFilter by version IDs
curl -X GET "https://api.metorial.com/custom-providers/cus_Rm4Mnheq2bfEPhBhP7SY/environments" \-H "Authorization: Bearer metorial_sk_..."
Get custom provider environment
Retrieves a specific environment.
URL Parameters
custom_provider_id
StringThe unique identifier for the custom_provider
custom_provider_environment_id
StringThe unique identifier for the custom_provider_environment
curl -X GET "https://api.metorial.com/custom-providers/cus_Rm4Mnheq2bfEPhBhP7SY/environments/cus_Rm4Mnheq2bfEPhBhP7SY" \-H "Authorization: Bearer metorial_sk_..."