Creating profiles with APIs
Last update: March 22, 2022
- Topics:
- API
CREATED FOR:
- Experienced
- Developer
Creating profiles is performed with a POST request on the profile resource.
If you want to associate an orgUnit to the created profile, you need to extend the profile resource with this field and, after the publication of the extension, perform a POST request on the ProfileAndServicesExt endpoint.
For more on the profile’s resource extension, refer to the Campaign documentation.
Sample request
Sample POST request to create a profile with the email “john.doe@mail.com”.
-X POST https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>' \
-i
-d '{"email":"john.doe@mail.com"}'
It returns the newly created profile, with the “john.doe@mail.com” email address.
{
"PKey": "<PKEY>",
"firstName": "John",
"lastName":"Doe",
"birthDate": "1980-10-24",
"email": "john.doe@mail.com",
...
}
recommendation-more-help
3ef63344-7f3d-48f9-85ed-02bf569c4fff