Machine Templates API
Create, list, inspect, update, and delete machine templates.
Deprecated
List machine templates
Deprecated: use Environments (`/api/v0/environments`) instead. Returns every machine template the caller can access in the authenticated organization, in one response: pagination.hasMore is always false and pagination.nextCursor is always null.
curl 'https://api.factory.ai/api/v0/machines/templates' \
-H "Authorization: Bearer $FACTORY_BEARER_TOKEN"Parameters
Organization a JWT request acts in; required to act in a sub-organization. Without it, the request acts in the user's root organization, or is rejected with 403 when the user cannot access the root organization. API keys always act in their own organization and ignore this header.
Responses
application/json
Array items
Template ID
Repository URL
Allowed values
Human-readable template name
Default branch name
User ID of creator
Creation timestamp (ms)
Build status
Current build status
Allowed values
Reason for build failure (only present when status is failed)
Allowed values
Build start timestamp (ms)
Build completion timestamp (ms)
Build logs
Last update timestamp (ms)
Shared environment variables
Array items
Environment variable name
Environment variable value
User-specific environment variables
Array items
Environment variable name
Environment variable value
Setup script to run after cloning
Whether there are more items after this page
Cursor to use for the next page, null if no more pages
400Response for status 400
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
401Response for status 401
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
402Response for status 402
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
403Response for status 403
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
404Response for status 404
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
451Response for status 451
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
500Response for status 500
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
503Response for status 503
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
Deprecated
Create a machine template
Deprecated: use Environments (`/api/v0/environments`) instead. Creates a machine template from a repository enabled in the organization integrations and starts its build asynchronously. The 201 response reports buildStatus.status `building`; poll GET until it becomes `success` or `failed`. Returns 403 when Cloud Machines are not enabled for the organization, and 400 when the template name is taken, the repository is not found or not enabled, or the GitHub App installation for the repository is disconnected. Returns 409 when the organization requires personal GitLab Self-Hosted connections and the GitLab project behind the template was renamed or moved since repositories were last synced; an admin must sync repositories before the request can succeed.
curl -X POST 'https://api.factory.ai/api/v0/machines/templates' \
-H "Authorization: Bearer $FACTORY_BEARER_TOKEN" \
-H 'Content-Type: application/json' \
-d '{ ... }'Parameters
Organization a JWT request acts in; required to act in a sub-organization. Without it, the request acts in the user's root organization, or is rejected with 403 when the user cannot access the root organization. API keys always act in their own organization and ignore this header.
Request body
Required
application/json
No additional properties
Repository URL to clone
Human-readable template name
Minimum length: 1
Maximum length: 100
Environment variables to set in the machine
Array items
No additional properties
Uppercase POSIX environment variable name. A name the managed computer runtime reserves is rejected with 400.
Pattern: ^[A-Z_][A-Z0-9_]*$
Environment variable value
Setup script to run after cloning
Maximum length: 10000
Responses
application/json
Template ID
Repository URL
Allowed values
Human-readable template name
Default branch name
User ID of creator
Creation timestamp (ms)
Build status
Current build status
Allowed values
Reason for build failure (only present when status is failed)
Allowed values
Build start timestamp (ms)
Build completion timestamp (ms)
Build logs
Last update timestamp (ms)
Shared environment variables
Array items
Environment variable name
Environment variable value
User-specific environment variables
Array items
Environment variable name
Environment variable value
Setup script to run after cloning
400Response for status 400
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
Request validation error
Framework validation issues, when available
Array items
object401Response for status 401
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
402Response for status 402
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
403Response for status 403
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
404Response for status 404
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
409Response for status 409
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
413Response for status 413
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The platform edge refused a body over its own size limit before the route ran, and answered in JSON because the request accepts JSON, for example `{"error":{"code":"413","message":"Request Entity Too Large"}}`.
Must not include detail
text/plain
The platform edge refused a body over its own size limit before the route ran, for example `Request Entity Too Large` followed by an error code such as `FUNCTION_PAYLOAD_TOO_LARGE`.
string415Response for status 415
application/json
Request validation error
Framework validation issues, when available
Array items
object451Response for status 451
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
500Response for status 500
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
503Response for status 503
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
Deprecated
Get a machine template
Deprecated: use Environments (`/api/v0/environments`) instead. Returns details of a specific machine template. Returns 409 when the organization requires personal GitLab Self-Hosted connections and the GitLab project behind the template was renamed or moved since repositories were last synced; an admin must sync repositories before the request can succeed.
curl 'https://api.factory.ai/api/v0/machines/templates/{templateId}' \
-H "Authorization: Bearer $FACTORY_BEARER_TOKEN"Parameters
Template ID
Organization a JWT request acts in; required to act in a sub-organization. Without it, the request acts in the user's root organization, or is rejected with 403 when the user cannot access the root organization. API keys always act in their own organization and ignore this header.
Responses
application/json
Template ID
Repository URL
Allowed values
Human-readable template name
Default branch name
User ID of creator
Creation timestamp (ms)
Build status
Current build status
Allowed values
Reason for build failure (only present when status is failed)
Allowed values
Build start timestamp (ms)
Build completion timestamp (ms)
Build logs
Last update timestamp (ms)
Shared environment variables
Array items
Environment variable name
Environment variable value
User-specific environment variables
Array items
Environment variable name
Environment variable value
Setup script to run after cloning
400Response for status 400
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
Request validation error
Framework validation issues, when available
Array items
object401Response for status 401
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
402Response for status 402
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
403Response for status 403
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
404Response for status 404
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
409Response for status 409
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
451Response for status 451
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
500Response for status 500
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
503Response for status 503
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
Deprecated
Update a machine template
Deprecated: use Environments (`/api/v0/environments`) instead. Updates the configuration of a machine template. Each supplied array replaces the stored list: environmentVariables for every user of the template, userEnvironmentVariables for the caller only. Changing setupScript or environmentVariables requires the Manager or Owner role or being the template creator; any member can set their own userEnvironmentVariables. Supplying setupScript, or sending an empty JSON object (`{}`), starts an asynchronous rebuild: the response reports buildStatus.status `building`, and GET reports the result. The built-in empty template cannot be modified. Returns 409 when the organization requires personal GitLab Self-Hosted connections and the GitLab project behind the template was renamed or moved since repositories were last synced; an admin must sync repositories before the request can succeed.
curl -X PATCH 'https://api.factory.ai/api/v0/machines/templates/{templateId}' \
-H "Authorization: Bearer $FACTORY_BEARER_TOKEN" \
-H 'Content-Type: application/json' \
-d '{ ... }'Parameters
Template ID
Organization a JWT request acts in; required to act in a sub-organization. Without it, the request acts in the user's root organization, or is rejected with 403 when the user cannot access the root organization. API keys always act in their own organization and ignore this header.
Request body
Required
application/json
No additional properties
Shared environment variables for all machine users
Array items
No additional properties
Uppercase POSIX environment variable name. A name the managed computer runtime reserves is rejected with 400.
Pattern: ^[A-Z_][A-Z0-9_]*$
Environment variable value
User-specific environment variables
Array items
No additional properties
Uppercase POSIX environment variable name. A name the managed computer runtime reserves is rejected with 400.
Pattern: ^[A-Z_][A-Z0-9_]*$
Environment variable value
Setup script to run after cloning
Maximum length: 10000
Responses
application/json
Template ID
Repository URL
Allowed values
Human-readable template name
Default branch name
User ID of creator
Creation timestamp (ms)
Build status
Current build status
Allowed values
Reason for build failure (only present when status is failed)
Allowed values
Build start timestamp (ms)
Build completion timestamp (ms)
Build logs
Last update timestamp (ms)
Shared environment variables
Array items
Environment variable name
Environment variable value
User-specific environment variables
Array items
Environment variable name
Environment variable value
Setup script to run after cloning
400Response for status 400
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
Request validation error
Framework validation issues, when available
Array items
object401Response for status 401
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
402Response for status 402
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
403Response for status 403
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
404Response for status 404
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
409Response for status 409
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
413Response for status 413
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The platform edge refused a body over its own size limit before the route ran, and answered in JSON because the request accepts JSON, for example `{"error":{"code":"413","message":"Request Entity Too Large"}}`.
Must not include detail
text/plain
The platform edge refused a body over its own size limit before the route ran, for example `Request Entity Too Large` followed by an error code such as `FUNCTION_PAYLOAD_TOO_LARGE`.
string415Response for status 415
application/json
Request validation error
Framework validation issues, when available
Array items
object451Response for status 451
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
500Response for status 500
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
503Response for status 503
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
Deprecated
Delete a machine template
Deprecated: use Environments (`/api/v0/environments`) instead. Deletes a machine template: revokes its API keys and marks the template deleted, after which GET and PATCH return 400. Requires the Manager or Owner role or being the template creator. The built-in empty template cannot be deleted.
curl -X DELETE 'https://api.factory.ai/api/v0/machines/templates/{templateId}' \
-H "Authorization: Bearer $FACTORY_BEARER_TOKEN"Parameters
Template ID
Organization a JWT request acts in; required to act in a sub-organization. Without it, the request acts in the user's root organization, or is rejected with 403 when the user cannot access the root organization. API keys always act in their own organization and ignore this header.
Responses
No response body.
400Response for status 400
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
Request validation error
Framework validation issues, when available
Array items
object401Response for status 401
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
402Response for status 402
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
403Response for status 403
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
404Response for status 404
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
451Response for status 451
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
500Response for status 500
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
503Response for status 503
application/json
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users
The same error fields, for clients that only read body.error
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
objectRequest identifier to include when contacting support
Stable machine-readable error code, when one applies
True when detail is curated copy that is safe to show users