To upload or replace an image of an entity, use the following endpoints.
To upload an entity's image to Kanka.
{warning} Don't forget that all endpoints documented here need to be prefixed with
api/1.0/campaigns/{campaign.id}/
.
Method | URI | Headers |
---|---|---|
POST | entities/{entity.id}/image |
Default |
Parameter | Type | Detail |
---|---|---|
image |
stream |
Stream to file uploaded to the timeline |
curl --location --request POST 'https://kanka.io/api/1.0/campaigns/{campaign.id}/entities/{entity.id}/image' \
--header 'accept: application/json' \
--header 'Authorization: Bearer {bearer-token}' \
--form 'image=@"/path/to/image.png"'
{success} Code 200 with JSON body containing the new path to the image and thumbnail
To remove an entity's image from Kanka.
Method | URI | Headers |
---|---|---|
DELETE | entities/{entity.id}/image |
Default |
{success} Code 200 with JSON body containing the new path to the image and thumbnail