Update an external fetch template

Use this endpoint to update an external fetch template.

API at a glance

Description: Update an existing external fetch template by its UUID. Modify any template properties including name, URL, HTTP method, authentication, or request body.

Authentication & testing

Testing the API on this page

How to try it here

  • Use your User API Key as the Username (leave Password blank).
  • User API Key Location
  • Select the appropriate API endpoint based on your Blueshift region.
  • API - Select Region
  • Enter the necessary parameters and click Try It to run the request.
Authentication using Base64 encoding

Note for developers

API requests require authentication using HTTP Basic Authentication with an API key. The API key serves as the username, while the password field should be left empty. The format to encode is: your_api_key: (note the trailing colon).

This string must be Base64-encoded and included in the request's Authorization header as follows:

Authorization: Basic encoded_value

You can generate the encoded value using a trusted Base64 encoder.


Postman collection

Try it with Postman: Explore the API using Blueshift's Postman collection.


Things to know before you start

  • Template UUID required: Get it from the template URL in Blueshift app.
👍

Finding the template UUID > >

You can find the template UUID in the URL when viewing a segment in the Blueshift app. For example, if you open an email template (using visual editor) in the Blueshift app, its URL looks like https://app.getblueshift.com/dashboard#/app/email_template_studio/8<TEMPLATE_UUID>/edit/templates/visual.

  • Partial updates: All fields are optional - only include fields you want to change.
  • Alias name format: Must contain only lowercase alphanumeric characters and underscores.
  • HTTP methods: Can switch between GET and POST (remember to add/remove body accordingly).
  • Authentication: Update auth_header and auth_token together for secure endpoints.

Request parameters

Check out the request parameters

Path parameters

ParameterTypeRequiredDescription
template_uuidstring✅ YesUUID of the template to update. Example: 8da0744e-141d-4c9d-85d7-c89a54ac745a

Body parameters

ParameterTypeRequiredDescription
alias_namestringNoTemplate name (lowercase alphanumeric and underscores only). Example: fetch_weekly_promotions
http_methodstringNoHTTP method: GET or POST
urlstringNoExternal API URL. Can include Liquid variables. Example: https://api.example.com/data
authorstringNoEmail address of the template author. Example: [email protected]
auth_headerstringNoAuthentication header name (use with auth_token for secure URLs)
auth_tokenstringNoAuthentication token value (use with auth_header for secure URLs)
bodystringNoJSON payload for POST requests
test_contextstringNoTest context description

Example requests & responses

Update template URL and authentication
PUT /api/v1/external_fetches/8da0744e-141d-4c9d-85d7-c89a54ac745a
{
  "url": "https://api.example.com/v2/recommendations?user_id={{user.customer_id}}",
  "auth_header": "Authorization",
  "auth_token": "Bearer new_api_token_here"
}
{
  "success": true
}
Update template name and author
PUT /api/v1/external_fetches/8da0744e-141d-4c9d-85d7-c89a54ac745a
{
  "alias_name": "fetch_weekly_promotions_v2",
  "author": "[email protected]"
}
{
  "success": true
}
Change from GET to POST with body
PUT /api/v1/external_fetches/8da0744e-141d-4c9d-85d7-c89a54ac745a
{
  "http_method": "POST",
  "body": "{\"user_id\": {{user.customer_id}}, \"preferences\": {\"language\": \"en_US\"}}"
}
{
  "success": true
}
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!