Skip to content

POST Create a customer ​

https://api.magmasend.com//v2/customer

This endpoint is used to create a sender or receiver customer who does not yet exist in your customer list. It is used to record the personal information needed to identify the customer.

Type customer ​

typeDescription
senderthe customer who send the transaction
receiverthe customer who receive the transaction

HEADERS ​

AuthorizationBearer TOKEN

Request Information ​

Here are the parameters you need to include in your request:

Parameter NameTypeIs MandatoryDescription
typeEnum (sender, receiver)YesType of customer. profile.
first_nameStringYesCustomer’s first name.
last_nameStringYesCustomer’s last name.
phone_numberString (E.164)YesCustomer’s phone number in international format.
birth_countryISO2 country codeNoTwo-letter country code of the customer's birth country.
birth_cityStringNoName of the city where the customer was born.
birth_dateString (YYYY-MM-DD)NoCustomer’s date of birth in ISO format.
poi_typeStringNoType of proof of identity (e.g: NationalID, Passport, DrivingLicense).
poi_idStringNoIdentification number shown on the provided proof of identity.
nationalityStringNoCustomer’s origin country.
residence_country`ISO2 country codeNoTwo-letter country code of the customer's country of residence.
residence_cityStringNoCity of residence.
`residence_addressStringNoFull street address or location of the customer's residence.
partner_referenceStringNoUnique reference from your system for tracking the request.

Response Information ​

Here are the parameters you will receive in your response:

Response ParameterTypeDescription
codeIntegerHTTP status code. 201 indicates the customer was successfully created.
statusStringText status of the operation result. "CREATED" confirms a successful creation.
customer.typeStringThe type of the customer.profile.
customer.referenceStringA unique reference ID generated for the newly created customer. Can be used for future lookups or tracking.

Example Request ​

Body raw (json) ​

json
{
	"type": "sender",
	"first_name": "John",
	"last_name": "Doe",
	"phone_number": "+22507010203",
	"birth_country": "CI",
	"birth_city": "Abidjan",
	"birth_date": "1990-01-01",
	"poi_type": "NationalID",
	"poi_id": "123456789",
	"nationality": "Ci",
	"residence_country": "Ci",
	"residence_city": "Abidjan",
	"residence_address": "Abchurch Lane and Abchurch Yard",
    "partner_reference": "REF001"
}
Curl

curl --location 'https://api.magmasend.com/v2/customer' \
--header 'Authorization: Bearer YOUR_TOKEN'
--header 'Content-Type: application/json' \
--data '{
	"type": "sender",
	"first_name": "John",
	"last_name": "Doe",
	"phone_number": "+22507010203",
	"birth_country": "CI",
	"birth_city": "Abidjan",
	"birth_date": "1990-01-01",
	"poi_type": "NationalID",
	"poi_id": "123456789",
	"nationality": "Ci",
	"residence_country": "Ci",
	"residence_city": "Abidjan",
	"residence_address": "Abchurch Lane and Abchurch Yard",
    "partner_reference": "REF001"
}'

Example Response ​

json
{
    "code": 201,
    "status": "CREATED",
    "customer": {
        "type": "type costumer",
        "reference": "unique reference ID"
    }
}

​

Example success Response
{
    "code": 201,
    "status": "CREATED",
    "customer": {
        "type": "sender",
        "reference": "00F7831X00"
    }
}

​

{
    "code": 201,
    "status": "CREATED",
    "customer": {
        "type": "receiver",
        "reference": "00F7831X00"
    }
}

​

Example failed Response
{
    "code": 400,
    "status": "DATA_NOT_VALID",
    "comment": "Data provided is not valid",
    "description": {
        "first_name": "The first name field is required.",
        "last_name": "The last name field is required.",
        "country": "The country field is required.",
        "city": "The city field is required.",
        "address_line_1": "The address line 1 field is required."
    }
}