RecoupGet a Free AuditFree Audit

API REFERENCE

Update Account

On this page
PATCH/api/accounts

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.

Authentication

See the authentication guide for API key and account access requirements.

Request

cURL
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"
}'

Request body required

Account fields to update

application/json

accountIdstringrequired

The unique identifier of the account to update

format: uuid

namestring

Display name for the account

instructionstring

Custom instruction or bio for the account

organizationstring

Organization name associated with the account

imagestring

URL of the account's profile image

format: uri

jobTitlestring

Job title of the account holder

roleTypestring

Role type within the organization

companyNamestring

Company name associated with the account

knowledgesarray<Knowledge>

Knowledge base files attached to this account

Item properties for knowledges
urlstring

URL to the knowledge file

namestring

Name of the knowledge file

typestring

MIME type of the file

Responses

200Account updated successfully

application/json

dataobjectrequired

The account data

Properties for data
idstring

The unique identifier of the account

format: uuid

account_idstring

The account ID (same as id, for consistency)

format: uuid

namestring

Display name of the account

emailstring

Email address associated with the account

format: email

walletstring

Wallet address associated with the account

imagestring

URL of the account's profile image

format: uri

instructionstring

Custom instruction or bio

organizationstring

Organization name

job_titlestring

Job title

role_typestring

Role type

company_namestring

Company name

knowledgesarray<Knowledge>

Knowledge base files attached to this account

Item properties for knowledges
urlstring

URL to the knowledge file

namestring

Name of the knowledge file

typestring

MIME type of the file

400Bad request - account not found or update failed

application/json

statusstring · enumrequired

Status of the request

Values: "error"

messagestringrequired

Error message describing what went wrong

401Unauthorized - missing or invalid credentials

application/json

statusstring · enumrequired

Status of the request

Values: "error"

messagestringrequired

Error message describing what went wrong

403Forbidden - account override not permitted

application/json

statusstring · enumrequired

Status of the request

Values: "error"

messagestringrequired

Error message describing what went wrong

Full specification

Download the OpenAPI file for complete schemas, constraints, and examples.

Download accounts.json
View operation source
json
{
  "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"
          }
        }
      }
    }
  }
}