Create Account Credential
Create a new account credential. If no data is provided, a random code and PIN will be generated.
- If account_id is provided in request body, creates credentials for that account
- If no account_id is provided, creates credentials for the authenticated account
Authorization rules:
- Admin accounts can create credentials for any account
- PSP accounts can create credentials for their merchant children
- Merchant accounts can only create credentials for themselves
NOTE: The PIN will only be returned once during creation.
Headers
- enumAcceptconst:application/jsonrequired
Response format. Must be
application/json.values- application/json
- enumContent
- Type const:application/jsonrequiredRequest payload format. Must be
application/jsonwhen a body is sent.values- application/json
Body·CredentialCreateWithAccount
required
application/json
Extended model with account_id for creating credentials
- Type: string | null · Account Idaccount
_id - Type: string · Codecodemin length:12max length:12
- Type: string · Pinpinmin length:6max length:6
Responses
- application/json
- application/json
Request Example for post/v1/accounts/credentials
curl https://api.uat.koard.com/v1/accounts/credentials \
--request POST \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'x-koard-apikey: YOUR_SECRET_TOKEN' \
--data '{
"account_id": null,
"code": "",
"pin": ""
}'
{
"account_id": "string",
"code": "string",
"created_at": "2026-04-20T15:32:06.309Z",
"id": "string",
"is_active": true,
"pin": "string"
}
