API ReferenceUsers
Create a new user
Authorization
ApiKeyAuth x-api-key<token>
API key for integrator authentication
In: header
Header Parameters
x-api-key*string
API key for authentication
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
import { PaytrieAPI, configure } from '@paytrie/sdk'configure({ headers: { 'x-api-key': process.env.PAYTRIE_API_KEY! } })const { data } = await PaytrieAPI.createUser({ email: "user@example.com", firstName: "John", lastName: "Doe", dob: "1990-12-31", phone: "4161234567", addressLine1: "123 Main St", addressLine2: "Apt 1", city: "Toronto", province: "on", postalCode: "m1b5g5", occupation: "Software Engineer", pep: false, tpd: false}){ "success": true, "data": { "id": "550e8400-e29b-41d4-a716-446655440000", "email": "user@example.com", "firstName": "John", "lastName": "Doe", "dob": "1990-12-31", "phone": "4161234567", "addressLine1": "123 Main St", "addressLine2": "Apt 1", "city": "Toronto", "province": "on", "postalCode": "m1b5g5", "country": "CA", "occupation": "Software Engineer", "pep": false, "tpd": false, "status": "initial", "createdAt": "2024-01-01T00:00:00.000Z" }}{ "success": false, "errors": [ { "field": "string", "message": "string" } ]}{ "success": false, "errors": [ { "field": "string", "message": "string" } ]}