Create Service Account
https://app.fossa.com/api/users/service-accountsCreate a new service account with specified roles and optional API tokens
Request body (required) · application/json
usernamestringrequiredThe username for the service account
emailstring <email>Optional email address for the service account
fullNamestringOptional full name/description for the service account
orgRoleIdintegerID of the organization role to assign to the service account. At least one of orgRoleId or team must be provided.
teamobjectTeam assignment for the service account. At least one of orgRoleId or team must be provided.
idintegerrequiredID of the team to assign the service account to
roleIdintegerrequiredID of the team role to assign
hasPushOnlyApiTokenbooleanWhether to create a push-only API token for the service account
hasFullApiTokenbooleanWhether to create a full access API token for the service account
Responses
201Service account created successfullyidintegerrequiredThe user id of the service account
usernamestringrequiredThe username of the service account
emailstring | nullThe email address of the service account (if provided)
full_namestring | nullThe full name/description of the service account (if provided)
fullApiTokenstringThe full access API token (only present if hasFullApiToken was true)
pushOnlyApiTokenstringThe push-only API token (only present if hasPushOnlyApiToken was true)
400Bad Request. Returned when the request body fails validation, when neither
`orgRoleId` nor `team` is supplied, or when a user with the given username or
email already exists in the organization.
uuidstringUnique identifier associated with the error
codeintegerfossa specific error code
messagestringmessage associated with this error
namestringname of the error
httpStatusCodeintegerhttp status code number
403ForbiddenuuidstringUnique identifier associated with the error
codeintegerfossa specific error code
messagestringmessage associated with this error
namestringname of the error
httpStatusCodeintegerhttp status code number
404Team not founduuidstringUnique identifier associated with the error
codeintegerfossa specific error code
messagestringmessage associated with this error
namestringname of the error
httpStatusCodeintegerhttp status code number
500Server ErroruuidstringUnique identifier associated with the error
codeintegerfossa specific error code
messagestringmessage associated with this error
namestringname of the error
httpStatusCodeintegerhttp status code number
Try this endpoint
Build a request and run it against app.fossa.com.
Stored in this browser for 24 hours. Try It uses a docs proxy for CORS and does not store tokens server-side.
POST https://app.fossa.com/api/users/service-accountscurl --request POST \ --url 'https://app.fossa.com/api/users/service-accounts' \ --header 'accept: application/json' \ --header 'authorization: Bearer YOUR_API_TOKEN' \ --header 'content-type: application/json' \ --data '{ "username": "production-api-service", "email": "prod-api@company.com", "fullName": "Production API Service Account", "orgRoleId": 3, "hasPushOnlyApiToken": false, "hasFullApiToken": false}'Real request. Mutating methods can change data.