A new profile can be created from either the profiles resource or profile resource.
- A new profile can be created by calling the url /v1/companies/<companyId>/buckets/<bucketId>/profiles. The method should be POST and a successful profile creation will result in a response status 201 CREATED.
- This can also be done by calling the url /v1/companies/<companyId>/buckets/<bucketId>/profiles/<profileId>. The method should be POST and a successful profile creation will result in a response status 201 CREATED.
Required permission profile.create
|Content-encoding||No||gzip||Caller can send a gzipped request to the API and set the Content-encoding as gzip.|
Caller can request a gzipped response from the API and set the Accept-encoding as gzip.
|app_key||No||An app key refers to a collectApp. If an app key is specified, the profile data is added as the collectApp corresponding to that app key. If no app key is specified then profile data is added using the default collectApp "web"|
|max_return_size||No||Max return size refers to the size of the profile to be returned to the caller. If no max_return_size is specified, the profile of size 500 is returned to the caller. Please read the documentation about profile trimming to learn more about how the profile is trimmed to the specified size.|
|max_return_events||No||Max return events refers to the the total number of events to be returned to the caller. The returned events can be distributed over several sessions. The max_return_events can be less than expected in the response if the profile does not have enough events or if the profile becomes larger than the max_return_size.|
|Location||Absolute url of the newly created resource.|
|Content-type||Content type of the response body.|
|Vary||Will contain the Accept-encoding header.|
|Content-encoding||Will contain encoding "gzip".|
Example 1: A typical request and response body
Example 2: A minimal request and response body
Minimal Response Body