POST
/
api
/
partner
/
v1
/
user
cURL
curl --request POST \
  --url https://staging-api.capa.fi/api/partner/v1/user \
  --header 'Content-Type: application/json' \
  --header 'partner-api-key: <partner-api-key>' \
  --data '{
  "externalUserId": "91b95244-72ca-459e-88d2-281c3e2935c1",
  "method": "EMAIL",
  "identifier": "money@capa.fi",
  "userType": "INDIVIDUAL or BUSINESS",
  "alias": "Satoshi Nakamoto"
}'
{
  "status": "ok",
  "data": {
    "userId": "9486244c-ff7d-4c22-9984-797179d7deaa"
  }
}
Creates a new user associated with a partner’s account using the provided authentication method and identifier. This endpoint allows partners to register their users with specific authentication methods such as email, phone number, or none.

Headers

PartnerApiKey (string) - API key associated with the partner.
Partner API Key RequiredRequires partner-api-key for authentication to ensure only authorized partners can access this data.See 🔑 API Key Generation Guide for getting your API key

Body:

  • externalUserId (string) - The partner’s own user identifier for the user.
We need an externalUserId This ID is essential for ensuring idempotency, meaning that repeated requests with the same ID will not create duplicate records.
  • method (string, optional) - The method used to authenticate the user. Must be ONE of the following values from AuthenticationMethods:
    • EMAIL
    • PHONE_NUMBER
    • NONE.
  • identifier (string, optional) - The identifier used to authenticate the user. This field’s requirements vary based on the method:
    • If method is EMAIL: Must be a valid email address.
      Example: “money@capa.fi
    • If method is PHONE_NUMBER: Must be a valid phone number in international format.
      Example: “+524401234567”
    • If method is NONE: Can be null.

Example

JSON
{
  "externalUserId": "91b95244-72ca-459e-88d2-281c3e2935c1",
  "method": "EMAIL",
  "identifier": "money@capa.fi"
}

Use cases

Register a User with Email Authentication A partner wants to register a new user using their email address. The method is set to EMAIL, and the identifier is the user’s email. The request is sent, and the new userId is returned upon successful registration. Register a User with Phone Number Authentication A partner registers a user using their phone number. The method is set to PHONE_NUMBER, and the identifier is the user’s phone number. The userId is generated and returned. Register a User Without Authentication A partner registers a user without specifying any authentication method. The method is set to NONE, and the identifier is null. The userId is generated and returned.

Headers

partner-api-key
string
required

Api key for the affiliated partner that is performing the request

Body

application/json
externalUserId
string
required

The partner's own userId.

Example:

"91b95244-72ca-459e-88d2-281c3e2935c1"

method
enum<string>

The method used to authenticate the user.

Available options:
EMAIL
Example:

"EMAIL"

identifier
string

The identifier used to authenticate the user.

Example:

"money@capa.fi"

userType
enum<string>

The type of user.

Available options:
INDIVIDUAL,
BUSINESS
Example:

"INDIVIDUAL or BUSINESS"

alias
string

An optional alias or display name for the user.

Example:

"Satoshi Nakamoto"

Response

201 - application/json
status
string
Example:

"ok"

data
object