Skip to main content

Create Account - POST

Once a User is created, it's time to create an Account.

This entity represents the connection of a given User with a specific platform, so one User can potentially have multiple Accounts, each one representing a different platform.

Note

This endpoint is only available for accounts in IMSS or ISSSTE. All other platforms will require the use of Palenca Link or its widget in order to create an account.

To create a user's Account, you need to make a POST request to the endpoint

POST https://api.palenca.com/v1/accounts

Here are some examples in different languages:

const axios = require('axios')

const data = JSON.stringify({
"user_id": "054d0a9d-38ec-40cb-a31c-09b483242e4a",
"country": "mx",
"platform": "imss",
"identifier": "GOPJ930704HDFPRR05"
});

const config = {
method: 'POST',
url: 'https://api.palenca.com/v1/accounts',
headers: {
'x-api-key': 'private_api_key',
'Content-Type': 'application/json'
},
data: data
};

(async () => {
try {
const {data} = await axios(config)
console.info(JSON.stringify(response.data))
} catch (error) {
console.error(error)
}
})()

Returns a JSON structured like this:

{
"success": true,
"error": null,
"data": {
"user_id": "054d0a9d-38ec-40cb-a31c-09b483242e4a",
"country": "mx",
"platform": "imss",
"account_id": "472f02e8-6b24-43a7-b529-3f71d6ecc81c"
}
}

Payload

ParameterDescriptionTypeRequiredExample
user_idThe ID of the useruuidTrue054d0a9d-38ec-40cb-a31c-09b483242e4a
countryThe user's account countrystringTruemx
platformThe user's account platformstringTrueimss
identifierThe credential used to access the platform, CURP for IMSS or ISSSTEstringTrueGOPJ930704HDFPRR05