Start typing to search.

API Reference

Save one job configuration value

View Markdown

Validates and persists one job config key declared by the job snapshot. form values are objects keyed by field key; field mapping values are arrays of { source field, target fie…

PUT /api/jobs/{id}/config/{key}

Validates and persists one job_config key declared by the job snapshot. form values are objects keyed by field key; field_mapping values are arrays of { source_field, target_field, transform? }.

Operation ID: saveJobConfig

Authentication

Option 1

  • BearerAuth (http bearer) API key token. Create via POST /api/api-keys. Format: envoy_<hex>

Option 2

  • CookieAuth (apiKey) Session cookie set after login + TOTP verification

Path parameters

  • idinteger, required Resource ID
  • keystring, required

Request body

The request body is required.

application/json

  • Reference: WidgetConfigRequest
    • Type: object
    • Properties:
      • value (unknown, required) — Persisted value for the widget. field_mapping → array of { source_field, target_field, transform? }; form → object keyed by field key.

Success responses

200

Config value saved

Content type: application/json

  • Type: object
  • Properties:
    • ok (boolean)
    • value (unknown) — Stored value after any transform_expr is applied.

Error responses

400

Validation error

Content type: application/json

  • Reference: Error
    • Type: object
    • Properties:
      • error (string)
        • Example: NOT_FOUND
      • message (string)
        • Example: Resource not found

Example:

{
  "error": "VALIDATION_ERROR",
  "message": "Invalid input"
}

404

Resource not found

Content type: application/json

  • Reference: Error
    • Type: object
    • Properties:
      • error (string)
        • Example: NOT_FOUND
      • message (string)
        • Example: Resource not found

Example:

{
  "error": "NOT_FOUND",
  "message": "Resource not found"
}

Examples

cURL

curl --request PUT \
  --url 'https://your-envoy.example.com/api/jobs/YOUR_ID/config/YOUR_KEY' \
  --header 'Authorization: Bearer $API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "value": "string"
}'

JavaScript (fetch)

const response = await fetch('https://your-envoy.example.com/api/jobs/YOUR_ID/config/YOUR_KEY', {
  method: 'PUT',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "value": "string"
  }),
});
 
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = response.status === 204 ? null : await response.json();
console.log(data);