API REFERENCE
Update Account
On this page
/api/accountsUpdate an existing account's profile information including name, organization, image, instruction, job title, role type, company name, and knowledges. Requires authentication via x-api-key or Authorization Bearer token. The authenticated account may update itself or a permitted account_id override.
Authentication
See the authentication guide for API key and account access requirements.
Request
curl --request PATCH \
--url 'https://api.recoupable.dev/api/accounts' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"accountId": "YOUR_ID"
}'Try it
Fill in the fields, send the request from your browser, and read the live response. The curl below updates as you type.
Kept in this browser tab only and cleared when it closes.
curl --request PATCH \
--url 'https://recoup-api.vercel.app/api/accounts' \
--header 'Content-Type: application/json' \
--data '{
"accountId": "YOUR_ID"
}'Request body required
Account fields to update
application/json
accountIdstringrequiredThe unique identifier of the account to update
format: uuid
namestringDisplay name for the account
instructionstringCustom instruction or bio for the account
organizationstringOrganization name associated with the account
imagestringURL of the account's profile image
format: uri
jobTitlestringJob title of the account holder
roleTypestringRole type within the organization
companyNamestringCompany name associated with the account
knowledgesarray<Knowledge>Knowledge base files attached to this account
Item properties for knowledges
urlstringURL to the knowledge file
namestringName of the knowledge file
typestringMIME type of the file
Responses
200Account updated successfully+
application/json
dataobjectrequiredThe account data
Properties for data
idstringThe unique identifier of the account
format: uuid
account_idstringThe account ID (same as id, for consistency)
format: uuid
namestringDisplay name of the account
emailstringEmail address associated with the account
format: email
walletstringWallet address associated with the account
imagestringURL of the account's profile image
format: uri
instructionstringCustom instruction or bio
organizationstringOrganization name
job_titlestringJob title
role_typestringRole type
company_namestringCompany name
knowledgesarray<Knowledge>Knowledge base files attached to this account
Item properties for knowledges
urlstringURL to the knowledge file
namestringName of the knowledge file
typestringMIME type of the file
400Bad request - account not found or update failed+
application/json
statusstring · enumrequiredStatus of the request
Values: "error"
messagestringrequiredError message describing what went wrong
401Unauthorized - missing or invalid credentials+
application/json
statusstring · enumrequiredStatus of the request
Values: "error"
messagestringrequiredError message describing what went wrong
403Forbidden - account override not permitted+
application/json
statusstring · enumrequiredStatus of the request
Values: "error"
messagestringrequiredError message describing what went wrong
Full specification
Download the OpenAPI file for complete schemas, constraints, and examples.
Download accounts.jsonView operation source
{
"description": "Update an existing account's profile information including name, organization, image, instruction, job title, role type, company name, and knowledges. Requires authentication via x-api-key or Authorization Bearer token. The authenticated account may update itself or a permitted account_id override.",
"requestBody": {
"description": "Account fields to update",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateAccountRequest"
}
}
}
},
"responses": {
"200": {
"description": "Account updated successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountDataResponse"
}
}
}
},
"400": {
"description": "Bad request - account not found or update failed",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized - missing or invalid credentials",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountErrorResponse"
}
}
}
},
"403": {
"description": "Forbidden - account override not permitted",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountErrorResponse"
}
}
}
}
}
}