Sign In

Save Naturally - Images

This system is an essential part of transferring images from Save Naturally to GPC. On this page, we'll dive into the requests for sending, updating, and deleting images using the API.

File Naming Requirements

Image file names are case-insensitive and must only include lowercase letters (a–z), numbers (0–9), and hyphens (-).
Any file name that does not follow these requirements will result in a 400 Bad Request response with the error code invalid_file_name.


Error Codes

api_key_missing

The request's Authorization header did not contain an API key.

invalid_api_key

The API key failed to authenticate. Double check that it has not been rotated.

api_key_forbidden

The API key provided does not have permission to perform the requested action.

insecure_connection

A non-HTTPS request was detected. The exposed API key has been revoked and rotated.

no_body

The request body was empty.

bad_request

The event payload contains invalid data types or is missing required fields.

server_error

Something went wrong on our end. The GPC development team has been notified.

invalid_file_name

FIle name does not conform to the File Naming Requirements


Image Object

file_name string
file_size number

Size in bytes.

url string
last_modified utc timestamp

Example

{ "file_name":"example.png", "file_size": 256, "last_modified": "2025-10-21T15:49:16Z", "url": "https://savenatrually.gpcoservices.com/v1/images/example.png" } Copy

PUT /v1/images/{filename}.{ext}

Add or Update Image

Parameters

No parameters.

Attributes

No attributes.

Returns

A 201 Created response when a new image was created. A 202 Accepted response when an image was updated. 

If an error occurs an Error model will be returned. If the request was successful an Image Object will be returned.

Request

PUT /v1/images/{filename}.{ext}

curl -X PUT https://savenaturally.gpcoservices.com/v1/images/SaveNaturally.png \ -H 'GPC-Api-Key: {key}' \ -H 'Content-Type: image/png' \ --data-binary ./SaveNaturally.png Copy

Response

{ "file_name":"example.png", "file_size": 256, "last_modified": "2025-10-21T15:49:16Z", "url": "https://savenatrually.gpcoservices.com/v1/images/example.png" } Copy

GET /v1/images/{filename}.{ext}

Parameters

No parameters.

Attributes

No attributes.

Returns

Returns the binary contents of the specified image. If an error occurs an Error model will be returned.

Request

GET /v1/images/{filename}.{ext}

curl -X GET https://savenaturally.gpcoservices.com/v1/images/SaveNaturally.png \ -H 'GPC-Api-Key: {key}' Copy

Response

HTTP/1.1 200 OK Content-Type: image/png Content-Length: 48291 Copy

GET /v1/images

Get List of Images

Parameters

No parameters.

Attributes

No attributes.

Returns

An array of Image Objects. If an error occurs an Error model will be returned.

Request

GET /v1/images

curl -X GET https://savenaturally.gpcoservices.com/v1/images \ -H 'GPC-Api-Key: {key}' Copy

Response

[ { "file_name":"example.png", "file_size": 256, "last_modified": "2025-10-21T15:49:16Z", "url": "https://savenatrually.gpcoservices.com/v1/images/example.png" } ] Copy

DELETE /v1/images/{filename}.{ext}

Delete Image

Parameters

No parameters.

Attributes

No attributes.

Returns

A 204 No Content response upon success. If an error occurs an Error model will be returned.

Request

DELETE /v1/images/{filename}.{ext}

curl -X DELETE https://savenaturally.gpcoservices.com/v1/images/example.png \ -H 'GPC-Api-Key: {key}' Copy