API REFERENCE
Create Account
On this page
/api/accountsCreate a new account or retrieve an existing account by email or wallet address. If an account with the provided email or wallet already exists, returns that account. Otherwise creates a new account and initializes credits.
Authentication
See the authentication guide for API key and account access requirements.
Request
curl --request POST \
--url 'https://api.recoupable.dev/api/accounts' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"email": "string",
"wallet": "string"
}'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 POST \
--url 'https://recoup-api.vercel.app/api/accounts' \
--header 'Content-Type: application/json' \
--data '{
"email": "string",
"wallet": "string"
}'Request body required
Account credentials to create or lookup
application/json
emailstringEmail address to associate with the account. If an account with this email exists, it will be returned.
format: email
walletstringWallet address to associate with the account. If an account with this wallet exists, it will be returned.
Responses
200Account created or retrieved 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 - failed to create account+
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": "Create a new account or retrieve an existing account by email or wallet address. If an account with the provided email or wallet already exists, returns that account. Otherwise creates a new account and initializes credits.",
"requestBody": {
"description": "Account credentials to create or lookup",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateAccountRequest"
}
}
}
},
"responses": {
"200": {
"description": "Account created or retrieved successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountDataResponse"
}
}
}
},
"400": {
"description": "Bad request - failed to create account",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountErrorResponse"
}
}
}
}
}
}