Upsert Prompt Template by External ID
Prompt Templates
Upsert Prompt Template by External ID
PUT
Upsert Prompt Template by External ID
Publish a prompt template by a customer-defined external ID. If the mapping already exists, PromptLayer creates a new version on the mapped prompt template. If the mapping does not exist, PromptLayer creates or updates the prompt template from the request body and attaches the mapping.
This is the only external ID endpoint that uses
PUT. See External IDs for mapping rules and conflict behavior.Authorizations
Path Parameters
External ID source.
Required string length:
1 - 128External ID value. URL-encode any reserved path characters.
Required string length:
1 - 512Body
application/json
Template metadata, including prompt name, tags, folder, and workspace fields.
Version content and configuration.
Release labels to create or move to the newly created version.
Identifiers from other systems.
Response
Prompt template updated
The ID of the prompt template.
The name of the prompt template.
The ID of the created prompt version.
The version number of the prompt template.
- Completion Template
- Chat Template
External ID mappings attached to the prompt template.
Metadata associated with the prompt blueprint. Supports additional custom fields beyond the model field.

