PUT
/
accounts
curl --request PUT \
  --url https://api-sandbox.koywe.com/rest/accounts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "email": "example@mail.com",
  "document": {
    "others": [
      {
        "documentNumber": "<string>",
        "documentType": "<string>",
        "country": "<string>"
      }
    ]
  },
  "address": {
    "addressCity": "<string>",
    "addressStreet": "<string>",
    "addressZipCode": "<string>",
    "addressCountry": "<string>",
    "addressState": "<string>",
    "addressNeighborhood": "<string>"
  },
  "personalInfo": {
    "names": "<string>",
    "firstLastname": "<string>",
    "secondLastname": "<string>",
    "activity": "<string>",
    "dob": "<string>",
    "phoneNumber": "<string>",
    "nationality": "<string>",
    "gender": "<string>"
  },
  "updateEmail": "example@mail.com",
  "updateDocumentNumber": "11111111",
  "updateDocumentType": "RUT"
}'
{
  "email": "example@mail.com",
  "document": {
    "isCompany": true,
    "documentNumber": "<string>",
    "documentType": "<string>",
    "country": "<string>",
    "others": [
      {
        "documentNumber": "<string>",
        "documentType": "<string>",
        "country": "<string>"
      }
    ]
  },
  "address": {
    "addressCity": "<string>",
    "addressStreet": "<string>",
    "addressZipCode": "<string>",
    "addressCountry": "<string>",
    "addressState": "<string>",
    "addressNeighborhood": "<string>"
  },
  "personalInfo": {
    "names": "<string>",
    "firstLastname": "<string>",
    "secondLastname": "<string>",
    "activity": "<string>",
    "dob": "<string>",
    "phoneNumber": "<string>",
    "nationality": "<string>",
    "gender": "<string>"
  },
  "resultUpdateDocumentNumber": "Document number is pending validation"
}

Updating Email or Document:

If an updated email is present, the API validates whether it is a valid email and ensures that another account with that email does not already exist.

If an updated document number or type is present, the API validates that it has a valid format, does not exist on another account, has no executed orders, and initiates an asynchronous validation for mismatching personal data.

The results of the asynchronous validation will be sent to the configured callback. You can find more information in the webhooks section.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
email
string
Example:

"example@mail.com"

document
object
address
object
personalInfo
object
updateEmail
string
Example:

"example@mail.com"

updateDocumentNumber
string
Example:

"11111111"

updateDocumentType
string
Example:

"RUT"

Response

200
application/json
successful operation
email
string
required
Example:

"example@mail.com"

document
object
required
address
object
required
personalInfo
object
required
resultUpdateDocumentNumber
string
Example:

"Document number is pending validation"