RecoupGet a Free AuditFree Audit

API REFERENCE

Create Account

On this page
POST/api/accounts

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.

Authentication

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

Request

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

Request body required

Account credentials to create or lookup

application/json

emailstring

Email address to associate with the account. If an account with this email exists, it will be returned.

format: email

walletstring

Wallet 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

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 - failed to create account

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": "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"
          }
        }
      }
    }
  }
}