Update an admin user (own profile only)
PUT
/api/v1/admin_user/{admin_user_id}
const url = 'https://app.prefactorai.com/api/v1/admin_user/013xrzp12g3nqk8ns6jadrqmpgrjkeny';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"job_title":null,"name":"example","profile_completed_at":"2024-01-01T00:00:00Z"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://app.prefactorai.com/api/v1/admin_user/013xrzp12g3nqk8ns6jadrqmpgrjkeny \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "job_title": null, "name": "example", "profile_completed_at": "2024-01-01T00:00:00Z" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”admin_user_id
required
AdminUser_Id
A valid admin user ID
string
Example
013xrzp12g3nqk8ns6jadrqmpgrjkenyRequest Body
Section titled “Request Body”AdminUser_DetailsForUpdate
Responses
Section titled “Responses”Success
Media typeapplication/json
object
details
AdminUser_Details
object
account_id
Account_Id
A valid account ID
string
email
Admin user email
string
id
AdminUser_Id
A valid admin user ID
string
inserted_at
When the admin user was created
string format: date-time
profile_completed_at
switchable_account_summaries
Accounts this admin user can switch to
Array<object>
Account_Summaryobject
id
Account_Id
A valid account ID
string
name
Account name
string
type
Type of resource (always ‘account’)
string
type
Type of resource (always ‘admin_user’)
string
updated_at
When the admin user was last updated
string format: date-time
status
string
Example
{ "details": { "account_id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny", "email": "john@example.com", "id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny", "inserted_at": "2024-01-01T00:00:00Z", "job_title": "Developer", "name": "John Doe", "profile_completed_at": "2024-01-01T00:00:00Z", "switchable_account_summaries": [ { "id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny", "name": "My Account", "type": "account" } ], "type": "admin_user", "updated_at": "2024-01-01T00:00:00Z" }, "status": "success"}default
Section titled “default”Error