Edit a Template Credential
Updates a Template Credential by its stable ID.
https://api2.transloadit.com/ template_credentials/ {templateCredentialId}Updates the Template Credential represented by TEMPLATE_CREDENTIAL_ID (its stable ID)
with a new name and optionally updated content. Resend its existing type unchanged;
changing the service requires creating another Template Credential.
This example renames an existing S3 credential without changing its content. Set
TEMPLATE_CREDENTIAL_ID to that credential’s ID. For another service, use its existing
type instead of s3.
Existing name-based URLs remain supported for compatibility. Use the stable ID for new integrations so that renames or ambiguous names do not change which credential is targeted.
When updating content:
- Omit
contentor sendnullto retain all existing content. An empty string is invalid JSON, not an instruction to clear the content. - A supplied object is validated before it is merged with the stored content. Include every
field marked
requiredOnUpdatein the credential type. Other omitted fields keep their stored values. - For a configured field named
secret, omission, an empty string, ornullretains the stored secret; a nonempty value replaces it. This exception does not apply to other fields such aspasswordorkey_file_contents, whose supplied values replace the stored values after validation.
Request example
Set TEMPLATE_CREDENTIAL_ID to your resource value without percent-encoding it.
Run this request in a server-side shell with curl and a suitable bearer token in TRANSLOADIT_TOKEN. If you need a token, expand the setup below.
Need a bearer token?
In a trusted server-side shell with curl and jq, set TRANSLOADIT_KEY and TRANSLOADIT_SECRET to your Auth Key and Auth Secret. Keep both credentials and the resulting token secret; never run this setup in browser code.
First, create a token with this endpoint’s required scopes. Your Auth Key must already grant those scopes.
if ! TOKEN_RESPONSE="$(curl --fail-with-body -sS \
--request POST \
--url 'https://api2.transloadit.com/token' \
--user "${TRANSLOADIT_KEY:?Set TRANSLOADIT_KEY}:${TRANSLOADIT_SECRET:?Set TRANSLOADIT_SECRET}" \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'aud=api2' \
--data-urlencode 'scope=template_credentials:write')"; then
printf '%s\n' "$TOKEN_RESPONSE" >&2
exit 1
fi
TRANSLOADIT_TOKEN="$(printf '%s' "$TOKEN_RESPONSE" |
jq -er '.access_token | strings | select(length > 0)')" || exit 1
Keep this shell open and run the request below. Reuse the token while it remains valid.
curl --fail-with-body -sS --request PUT \
--url "https://api2.transloadit.com/template_credentials/${TEMPLATE_CREDENTIAL_ID:?Set TEMPLATE_CREDENTIAL_ID}" \
--header "Authorization: Bearer ${TRANSLOADIT_TOKEN:?Set TRANSLOADIT_TOKEN}" \
--data-urlencode 'params={"name":"s3-renamed","type":"s3"}'
Authentication
This endpoint accepts signed params or a bearer token. See Authentication for setup instructions.
Required scope for the Auth Key or bearer token: template_credentials:write.
Signed requests require both a signature and a future params.auth.expires timestamp. Bearer tokens do not require either.
Path parameters
templateCredentialId(path segment), required. pattern:^[0-9a-f]{32}$, minimum length: 32, maximum length: 32
Form fields
Content type: application/x-www-form-urlencoded
params(JSON string), required. A JSON-encoded object whose supported keys are listed below.signature(string). Required for signed requests. Omit this field when using a bearer token.
Supported keys inside the params field
Authentication fields in this list apply to signed requests. With a bearer token, you can omit params.auth and the separate signature field. Compare the authentication-specific request parameters below.
Complete JSON Schema
params: Only the fields listed for this object are accepted.
| Field | Type and description |
|---|---|
params.required for signed requests; optional with a bearer token | Contains the Transloadit API key and signature-authentication metadata for a Template Credentials request.
|
params.required | stringISO 8601 expiration timestamp in the future. Required when a request is signed or requires signature authentication; bearer-authenticated requests may omit it. |
params.required | stringTransloadit API key used to authenticate requests |
params. | object | string | nullOmit this field or send Any of the following schemas may apply: objectobjectAdditional property schemaany valuestringnull |
params.required | stringName of the Template Credentials. Must be between 3 and 255 characters and contain only letters, digits, dashes, underscores, and dots. Validation pattern (regular expression)^[A-Za-z\u212a0-9._-]{3,255}$ |
params. | string | integerUnique, random value included in signed request params to make each signature unique and prevent accidental signature reuse. |
params.required | stringThe service these credentials belong to. On update, resend the existing type unchanged. To use a different service, create another Template Credential. Allowed values (22)
|
Request parameters by authentication method
With signed params
Include your Auth Key as params.auth.key. When signing the request, include a future params.auth.expires timestamp and send the signature in the separate signature field. The field definitions below use paths inside params.
Complete JSON Schema
params: Only the fields listed for this object are accepted.
Uses the field definitions above: params.auth, params.content, params.name, params.nonce, params.type
With a bearer token
Send the bearer token in the Authorization header. You can omit params.auth and the separate signature field. Other required parameters still apply. The field definitions below use paths inside params.
Complete JSON Schema
params: Only the fields listed for this object are accepted.
Uses the field definitions above: params.content, params.name, params.nonce, params.type
| Field | Type and description |
|---|---|
params. | Contains the Transloadit API key and signature-authentication metadata for a Template Credentials request.
|
params. | stringISO 8601 expiration timestamp in the future. Required when a request is signed or requires signature authentication; bearer-authenticated requests may omit it. |
params. | stringTransloadit API key used to authenticate requests |
Response
Here’s an example response body:
{
"credential": {
"account_id": "72a70fba93ce41cba617cfd7c2a44b1a",
"content": {
"bucket": "your-bucket",
"bucket_region": "us-east-1",
"key": "YOUR_S3_KEY",
"secret": "YOUR_S3_SECRET"
},
"created": "2026-09-12T10:00:00.000Z",
"deleted": null,
"id": "ca7644b763c848e6af4f4ccf3eaea622",
"modified": "2026-09-12T10:05:00.000Z",
"name": "s3-renamed",
"stringified": "{\"key\":\"YOUR_S3_KEY\",\"secret\":\"YOUR_S3_SECRET\",\"bucket\":\"your-bucket\",\"bucket_region\":\"us-east-1\"}",
"type": "s3"
},
"message": "Your Template Credentials were successfully updated.",
"ok": "TEMPLATE_CREDENTIALS_UPDATED"
}2xx success
JSON response body. application/json text/plain; charset=utf-8
Response body schema
Complete JSON Schema
The response may contain additional fields.
| Field | Type and description |
|---|---|
credentialrequired |
|
credential.required | string |
credential.required | object | Array<any value> | string | number | boolean | nullAdditional schema details are available in the complete JSON Schema. |
credential.required | number | string | nullAny of the following schemas may apply: number | stringnumber | stringnull |
credential.required | number | string | nullAny of the following schemas may apply: number | stringnumber | stringnull |
credential.required | string |
credential.required | number | string | nullAny of the following schemas may apply: number | stringnumber | stringnull |
credential.required | string |
credential.required | string |
credential.required | string |
messagerequired | string (minimum length: 1) |
okrequired | string (always: "TEMPLATE_CREDENTIALS_UPDATED") |
Error response
JSON response body. application/json text/plain; charset=utf-8
Response body schema
Complete JSON Schema
The response may contain additional fields.
| Field | Type and description |
|---|---|
assembly_id | string |
error | string (minimum length: 1) |
http_code | number | string
|
message | stringHuman-readable explanation of the error. Its wording can vary; use the |
reason | null | string | number | boolean | Array<any value> | objectAny of the following schemas may apply: nullstringnumberbooleanArray<any value>Array<any value>Array item schemaany valueobjectobjectAdditional property schemaany value |
HTTP 400
JSON response body. application/json text/plain; charset=utf-8
Response body schema
Complete JSON Schema
Named errors and the general error format
error: "TEMPLATE_CREDENTIALS_NOT_UPDATED"
Your Template Credentials could not be updated.
The response may contain additional fields.