We’ve migrated our documentation to a new site, which means some URLs have changed.
Audience

/segment/group/image/upload

Description

Uploads and assigns an image in the format of jpg, png, gif to a segment group. Last upload will remain in the subsequent uploads to the same segment.

In case update fails or is aborted, old image stay in the segment group.

The maximum size of an image is 150kb.


  • The user must be authenticated and have write permissions to the segment's siteGroup.


Request

The request object has multipart-form-data type and has the following part fields.

Name

Type

Required

Description

category

String

Yes

Identifier for the segment category to be assigned with image.

group

String

Yes

Identifier for the segment group to be assigned with image.

item

String

No

Identifier for the segment group item to be assigned with image.

img

Binary

Yes

Image file to be assigned to the specified segment.

Response

The response for a successful query is an empty object: {"status":"ok"}

Examples

Bash
$ curl -X POST -H 'X-cXense-Authentication: ...' -F category=Custom -F group=Sport -F img=@Sport.jpg https://api.cxense.com/segment/group/image/upload
{"status":"ok"}

Last updated: