PATCH /accounts/{accountId}
Update an account by ID
Updates the details of a specific account. This operation requires Super Admin permissions.
Authentication Required
Authorization: Bearer {token}
header string This header is required to access this endpoint
Required Parameters
accountId
path string Unique identifier of the account to update
Request Body
{}{ "name": "string", "repcode": "string", "customerServicePhone": "string", "customerServiceEmail": "string", "whitelabelSettings": {}}Try it out
Loading...
Output:
Responses
Description
Account updated successfully
{ "accountName": "string", "accountId": "string", "usersPrimaryAccount": false, "accountAdmin": false, "id": "string", "uniqueId": "string", "name": "string", "repcode": "string", "customerServicePhone": "string", "customerServiceEmail": "string", "whitelabelSettings": {}, "permissions": [ "string" ], "roles": [ "string" ]}Description
Unauthorized - User not authenticated
Description
Forbidden - User does not have the required permissions
Description
Account not found
Description
Internal server error
References
#/components/schemas/UpdateAccountInput
type: objectproperties: name: type: string repcode: type: string customerServicePhone: type: string description: Customer service phone number customerServiceEmail: type: string description: Customer service email address whitelabelSettings: type: object description: WhiteLabel Settings|export interface UpdateAccountInput { name?: string; repcode?: string; /** Customer service phone number */ customerServicePhone?: string; /** Customer service email address */ customerServiceEmail?: string; /** WhiteLabel Settings */ whitelabelSettings?: {};}#/components/schemas/Account
type: objectrequired: - accountName - accountId - id - nameproperties: accountName: type: string description: Name of the account accountId: type: string description: Unique identifier of the account usersPrimaryAccount: type: boolean description: Whether this is the user's primary account accountAdmin: type: boolean description: Whether the user is an administrator of this account id: type: string uniqueId: type: string name: type: string repcode: type: string customerServicePhone: type: string description: Customer service phone number customerServiceEmail: type: string description: Customer service email address whitelabelSettings: type: object description: WhiteLabel Settings permissions: type: array items: type: string roles: type: array items: type: string|export interface Account { /** Name of the account */ accountName: string; /** Unique identifier of the account */ accountId: string; /** Whether this is the user's primary account */ usersPrimaryAccount?: boolean; /** Whether the user is an administrator of this account */ accountAdmin?: boolean; id: string; uniqueId?: string; name: string; repcode?: string; /** Customer service phone number */ customerServicePhone?: string; /** Customer service email address */ customerServiceEmail?: string; /** WhiteLabel Settings */ whitelabelSettings?: {}; permissions?: string[]; roles?: string[];}Route Source Code
Check out the source code for this route entrypoint here: /accounts/[accountId]/route.ts
Or the swagger.yaml spec this documentation was generated from:
/accounts/swagger.yaml