Organization Management API
Administer organization members and usage limits, and review enterprise control history.
List enterprise control change history
Returns a paginated list of enterprise control setting changes for the organization, ordered by revision descending. Properties for the `settings` object may be added, removed, or renamed between API versions. Clients should parse it as a generic JSON object.
curl 'https://api.factory.ai/api/v0/organization/enterprise-controls/history' \
-H 'Authorization: Bearer $FACTORY_API_KEY'Parameters
Maximum number of items to return (1-100)
Cursor for pagination
Responses
List of enterprise control changes
Revision number of the change
The managed settings snapshot at this revision. Properties may be added, removed, or renamed between API versions. Clients should parse this as a generic JSON object.
Allowed values
Allowed values
Allowed values
Deprecated: use interactionMode + autonomyLevel instead.
Allowed values
Allowed values
Allowed values
Values
Allowed values
Values
Allowed values
Allowed values
Allowed values
Allowed values
Values
Values
Values
Values
Values
Allowed values
Allowed values
Allowed values
Allowed values
Each item is one of
Allowed values
Allowed values
Allowed values
Allowed values
Allowed values
The user who made the change
WorkOS user ID who made the change
Email of the user who made the change
Display name of the user who made the change
ISO 8601 timestamp of when the change was made
Whether there are more items after this page
Cursor to use for the next page, null if no more pages
400Response for status 400
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
401Response for status 401
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
403Response for status 403
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
500Response for status 500
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
Get global user credits limit
Returns the global per-user credits limit for the organization. This limit applies to all users who do not have an individual override.
curl 'https://api.factory.ai/api/v0/organization/usage/limits/global' \
-H 'Authorization: Bearer $FACTORY_API_KEY'Responses
Current global per-user credits limit, or null if none is configured
401Response for status 401
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
403Response for status 403
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
500Response for status 500
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
Set global user credits limit
Set the global per-user credits limit for the organization. This limit applies to all users who do not have an individual override. Pass null to remove the global limit.
curl -X PUT 'https://api.factory.ai/api/v0/organization/usage/limits/global' \
-H 'Authorization: Bearer $FACTORY_API_KEY' \
-H 'Content-Type: application/json' \
-d '{ ... }'Request body
Global per-user credits limit (minimum 1,000,000). Pass null to remove the global limit.
Responses
The limit that was set, or null if it was removed
400Response for status 400
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
401Response for status 401
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
403Response for status 403
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
500Response for status 500
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
Get user credits limits
Returns the global per-user credits limit and any individual user overrides for the organization.
curl 'https://api.factory.ai/api/v0/organization/usage/limits/users' \
-H 'Authorization: Bearer $FACTORY_API_KEY'Responses
Global per-user credits limit applied to all users without an individual override
Users with individual limit overrides
User email address
Individual credits limit override, or null if using the global default
401Response for status 401
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
403Response for status 403
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
500Response for status 500
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
Set user credits limits
Set individual per-user credits limits for one or more users. Supports bulk updates (up to 100 users per request). Identify each user by email. Pass null for limit to remove an individual override.
curl -X PUT 'https://api.factory.ai/api/v0/organization/usage/limits/users' \
-H 'Authorization: Bearer $FACTORY_API_KEY' \
-H 'Content-Type: application/json' \
-d '{ ... }'Request body
Array of user limit entries (up to 100). Each identifies a user by email.
User email address
Credits limit to set for this user (minimum 1,000,000). Pass null to remove the individual override.
Responses
Successfully updated user limits
User email address
The limit that was set, or null if the override was removed
Errors for users that could not be updated
Email that was provided
Error message
400Response for status 400
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
401Response for status 401
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
403Response for status 403
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
500Response for status 500
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
List organization users
Returns a paginated list of users in the Factory organization.
curl 'https://api.factory.ai/api/v0/organization/users' \
-H 'Authorization: Bearer $FACTORY_API_KEY'Parameters
Maximum number of items to return (1-100)
Cursor for pagination
Responses
List of users
WorkOS user ID
User email address
User first name
User last name
ISO 8601 timestamp of user creation
ISO 8601 timestamp of last sign in
Custom metadata for the user
Values
Whether there are more items after this page
Cursor to use for the next page, null if no more pages
401Response for status 401
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
403Response for status 403
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
500Response for status 500
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
Remove a user
Removes a user from the organization by email. Works for both active members (deletes membership) and pending invitations (revokes the invite).
curl -X DELETE 'https://api.factory.ai/api/v0/organization/users' \
-H 'Authorization: Bearer $FACTORY_API_KEY'Parameters
Email address of the user to remove
Responses
400Response for status 400
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
401Response for status 401
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
403Response for status 403
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
404Response for status 404
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
409Response for status 409
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
500Response for status 500
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
Invite or update a user
Sends an invitation to a user to join the organization. If the user is already a member, updates their role to the specified value. If the user has a pending invite, returns the current status without changes. If the organization has reached its seat limit, returns status "error" with a descriptive error message.
curl -X POST 'https://api.factory.ai/api/v0/organization/users/invite' \
-H 'Authorization: Bearer $FACTORY_API_KEY' \
-H 'Content-Type: application/json' \
-d '{ ... }'Request body
Email address to invite
Role to assign (defaults to user)
Allowed values
Responses
Invited email address
Assigned role
Allowed values
Result of the invite operation
Allowed values
Error message if status is error
400Response for status 400
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
401Response for status 401
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
403Response for status 403
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
409Response for status 409
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values
500Response for status 500
Human-readable error message
HTTP status code
HTTP status title
Additional error metadata
Values