POST /functions/sources
Upload a function source
Upload the JavaScript module of a function. Use when the function code is ready to deploy. Before: get_functions_pricing (needs job read access). Returns source (source_ref art_..., source_sha256, size_bytes) for deploy_function. Scope: functions:deploy.
API key (Bearer), on the public API endpoint.
Request body
application/javascript
Responses
| Status | Description | Body |
|---|---|---|
2XX | Success: the JSON body the route returns (see the description for its fields). | object |
401 | Key missing or invalid | Error |
4XX | Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account). | Error |
Examples
curl
curl -X POST "$GALON_API_BASE/functions/sources" \
-H "Authorization: Bearer $GALON_API_KEY"