Organization Management API

Administer organization members and usage limits, and review enterprise control history.

GET/api/v0/organization/enterprise-controls/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
curl 'https://api.factory.ai/api/v0/organization/enterprise-controls/history' \
  -H 'Authorization: Bearer $FACTORY_API_KEY'

Parameters

limitstringqueryoptional

Maximum number of items to return (1-100)

cursorstringqueryoptional

Cursor for pagination

Responses

200Response for status 200
changesobject[]required

List of enterprise control changes

revisionintegerrequired

Revision number of the change

settingsobjectrequired

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.

sessionDefaultSettingsobject
modelstring
reasoningEffortstring

Allowed values

nonedynamicoffminimallowmediumhighxhighmax
interactionModestring

Allowed values

autospecagimission
autonomyLevelstring

Allowed values

offlowmediumhigh
autonomyModestring

Deprecated: use interactionMode + autonomyLevel instead.

Allowed values

normalspecauto-lowauto-mediumauto-high
specModeModelstring
specModeReasoningEffortstring

Allowed values

nonedynamicoffminimallowmediumhighxhighmax
runInWorktreeboolean
maxAutonomyLevelstring

Allowed values

offlowmediumhigh
mcpAutonomyOverridesobject (map)

Values

defaultLevelstring

Allowed values

lowmediumhigh
toolsobject (map)

Values

Allowed values

lowmediumhigh
mcpAutonomyUrlOverridesobject[]
urlPatternstringrequired
defaultLevelstringrequired

Allowed values

lowmediumhigh
cloudSessionSyncboolean
wikiCloudSyncboolean
includeCoAuthoredByDroidboolean
enableDroidShieldboolean
ideAutoConnectboolean
commandAllowliststring[]
commandDenyliststring[]
commandBlockliststring[]
customModelsobject[]
modelstringrequired
idstring
indexnumber
baseUrlstring
apiKeystring
providerstringrequired

Allowed values

anthropicopenaigeneric-chat-completion-apifactorygooglexaivoyagebedrock-converse
displayNamestring
maxContextLimitnumber
enableThinkingboolean
thinkingMaxTokensnumber
maxOutputTokensnumber
reasoningEffortstring

Allowed values

nonedynamicoffminimallowmediumhighxhighmax
extraHeadersobject (map)

Values

extraArgsobject (map)

Values

noImageSupportboolean
bedrockobject
awsProfilestring
awsRegionstring
bedrockBaseUrlstring <uri>
awsAuthRefreshstring
awsCredentialExportstring
baseModelIdobject
useInRouterboolean
modelPolicyobject
allowedModelIdsstring[]
blockedModelIdsstring[]
allowCustomModelsboolean
allowedBaseUrlsstring[]
allowAllFactoryModelsboolean
isFastModelsAllowedboolean
requireExplicitOptInModelIdsstring[]
allowFactoryRouterByokboolean
mcpPolicyobject
enabledboolean
allowliststring[]
missionPolicyobject
restrictedAccessboolean
allowedUserIdsstring[]
userModelPoliciesobject (map)

Values

allowedModelIdsstring[]required
blockedModelIdsstring[]required
enabledPluginsobject (map)

Values

extraKnownMarketplacesobject (map)

Values

sourceobjectrequired
variantOption 1 · object
sourcestringrequired

Allowed values

github
repostringrequired
refstring
shastring
variantOption 2 · object
sourcestringrequired

Allowed values

url
urlstringrequired
refstring
shastring
variantOption 3 · object
sourcestringrequired

Allowed values

local
pathstringrequired
variantOption 4 · object
sourcestringrequired

Allowed values

git-subdir
urlstringrequired
pathstringrequired
refstring
shastring
strictKnownMarketplacesobject[]

Each item is one of

variantOption 1 · object
sourcestringrequired

Allowed values

github
repostringrequired
refstring
shastring
variantOption 2 · object
sourcestringrequired

Allowed values

url
urlstringrequired
refstring
shastring
variantOption 3 · object
sourcestringrequired

Allowed values

local
pathstringrequired
variantOption 4 · object
sourcestringrequired

Allowed values

git-subdir
urlstringrequired
pathstringrequired
refstring
shastring
networkPolicyobject
allowedIpsstring[]required
sandboxobject
enabledboolean
modestring

Allowed values

per-commandwhole-process
filesystemobject
allowWritestring[]
allowReadstring[]
denyWritestring[]
denyReadstring[]
networkobject
allowedDomainsstring[]
allowUnixSocketsstring[]
allowAllUnixSocketsboolean
allowLocalBindingboolean
httpProxyPortnumber
socksProxyPortnumber
restrictMemberVisibilityboolean
restrictApiKeyCreationToManagersboolean
managedComputersEnabledboolean
managedComputersAllowedEmailsstring[]
byomComputersEnabledboolean
byomComputersAllowedEmailsstring[]
disableAutoUpdateboolean
sessionRetentionDaysinteger
factoryRouterGuidancestring
factoryRouterRulesobject[]
whenstring
guidancestringrequired
userobjectrequired

The user who made the change

idstringrequired

WorkOS user ID who made the change

emailstring | nullrequired

Email of the user who made the change

namestring | nullrequired

Display name of the user who made the change

updatedAtstring <date-time>required

ISO 8601 timestamp of when the change was made

paginationobjectrequired
hasMorebooleanrequired

Whether there are more items after this page

nextCursorstring | nullrequired

Cursor to use for the next page, null if no more pages

400Response for status 400
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

401Response for status 401
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

403Response for status 403
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

500Response for status 500
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

GET/api/v0/organization/usage/limits/global

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
curl 'https://api.factory.ai/api/v0/organization/usage/limits/global' \
  -H 'Authorization: Bearer $FACTORY_API_KEY'

Responses

200Response for status 200
limitinteger | nullrequired

Current global per-user credits limit, or null if none is configured

401Response for status 401
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

403Response for status 403
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

500Response for status 500
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

PUT/api/v0/organization/usage/limits/global

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
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

limitinteger | nullrequired

Global per-user credits limit (minimum 1,000,000). Pass null to remove the global limit.

Responses

200Response for status 200
limitinteger | nullrequired

The limit that was set, or null if it was removed

400Response for status 400
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

401Response for status 401
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

403Response for status 403
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

500Response for status 500
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

GET/api/v0/organization/usage/limits/users

Get user credits limits

Returns the global per-user credits limit and any individual user overrides for the organization.

cURL
curl 'https://api.factory.ai/api/v0/organization/usage/limits/users' \
  -H 'Authorization: Bearer $FACTORY_API_KEY'

Responses

200Response for status 200
globalLimitinteger | nullrequired

Global per-user credits limit applied to all users without an individual override

userLimitsobject[]required

Users with individual limit overrides

emailstring <email>required

User email address

limitinteger | nullrequired

Individual credits limit override, or null if using the global default

401Response for status 401
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

403Response for status 403
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

500Response for status 500
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

PUT/api/v0/organization/usage/limits/users

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
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

usersobject[]required

Array of user limit entries (up to 100). Each identifies a user by email.

emailstring <email>required

User email address

limitinteger | nullrequired

Credits limit to set for this user (minimum 1,000,000). Pass null to remove the individual override.

Responses

200Response for status 200
updatedobject[]required

Successfully updated user limits

emailstring <email>required

User email address

limitinteger | nullrequired

The limit that was set, or null if the override was removed

errorsobject[]required

Errors for users that could not be updated

emailstringrequired

Email that was provided

errorstringrequired

Error message

400Response for status 400
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

401Response for status 401
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

403Response for status 403
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

500Response for status 500
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

GET/api/v0/organization/users

List organization users

Returns a paginated list of users in the Factory organization.

cURL
curl 'https://api.factory.ai/api/v0/organization/users' \
  -H 'Authorization: Bearer $FACTORY_API_KEY'

Parameters

limitstringqueryoptional

Maximum number of items to return (1-100)

cursorstringqueryoptional

Cursor for pagination

Responses

200Response for status 200
usersobject[]required

List of users

idstringrequired

WorkOS user ID

emailstring <email>required

User email address

firstNamestring

User first name

lastNamestring

User last name

createdAtstringrequired

ISO 8601 timestamp of user creation

lastSignInAtstring

ISO 8601 timestamp of last sign in

metadataobject (map)required

Custom metadata for the user

Values

paginationobjectrequired
hasMorebooleanrequired

Whether there are more items after this page

nextCursorstring | nullrequired

Cursor to use for the next page, null if no more pages

401Response for status 401
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

403Response for status 403
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

500Response for status 500
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

DELETE/api/v0/organization/users

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
curl -X DELETE 'https://api.factory.ai/api/v0/organization/users' \
  -H 'Authorization: Bearer $FACTORY_API_KEY'

Parameters

emailstring <email>queryrequired

Email address of the user to remove

Responses

204Response for status 204
400Response for status 400
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

401Response for status 401
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

403Response for status 403
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

404Response for status 404
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

409Response for status 409
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

500Response for status 500
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

POST/api/v0/organization/users/invite

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
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

emailstring <email>required

Email address to invite

rolestring

Role to assign (defaults to user)

Allowed values

usermanagerowner

Responses

200Response for status 200
emailstring <email>required

Invited email address

rolestringrequired

Assigned role

Allowed values

usermanagerowner
statusstringrequired

Result of the invite operation

Allowed values

invitedalready_memberrole_updatedalready_invitederror
errorstring

Error message if status is error

400Response for status 400
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

401Response for status 401
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

403Response for status 403
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

409Response for status 409
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

500Response for status 500
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values