POST
/
community
/
{id}
/
file
curl --request POST \
  --url https://api.other.page/v1/community/{id}/file \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '{
  "name": "<string>"
}'
{
  "name": "testimage1-jpg",
  "key": "fake-uuid-1234-5678-9012-3456/testimage1-jpg",
  "mime": "image/jpeg",
  "url": "https://img.other.page/fake-uuid-1234-5678-9012-3456/testimage1-jpg?format=auto&size=600",
  "communityId": "fake-uuid-1234-5678-9012-3456",
  "thumbnail": null,
  "uploadedAt": null,
  "id": "fake-uuid-1234-5678-9012-3456",
  "createdAt": "2025-03-05T21:27:37.411Z",
  "upload": {
    "method": "POST",
    "url": "https://s3.us-west-2.amazonaws.com/other-page-files",
    "body": {
      "success_action_status": "201",
      "key": "fake-uuid-1234-5678-9012-3456/testimage1-jpg",
      "Content-Type": "image/jpeg",
      "x-amz-meta-account": "fake-uuid-1234-5678-9012-3456",
      "bucket": "other-page-files",
      "X-Amz-Algorithm": "AWS4-HMAC-SHA256",
      "X-Amz-Credential": "ADEFADEFADEF/20250305/us-west-2/s3/aws4_request",
      "X-Amz-Date": "20250305T212737Z",
      "X-Amz-Security-Token": "ALongSecurityStringToken=",
      "Policy": "eyJlExamplePolicyJwt...",
      "X-Amz-Signature": "02342352578923525525253251212745634...",
      "x-amz-meta-file": "fake-uuid-1234-5678-9012-3456",
      "x-amz-meta-community": "fake-uuid-1234-5678-9012-3456"
    }
  }
}
{
  "name": "testimage1-jpg",
  "key": "fake-uuid-1234-5678-9012-3456/testimage1-jpg",
  "mime": "image/jpeg",
  "url": "https://img.other.page/fake-uuid-1234-5678-9012-3456/testimage1-jpg?format=auto&size=600",
  "communityId": "fake-uuid-1234-5678-9012-3456",
  "thumbnail": null,
  "uploadedAt": null,
  "id": "fake-uuid-1234-5678-9012-3456",
  "createdAt": "2025-03-05T21:27:37.411Z",
  "upload": {
    "method": "POST",
    "url": "https://s3.us-west-2.amazonaws.com/other-page-files",
    "body": {
      "success_action_status": "201",
      "key": "fake-uuid-1234-5678-9012-3456/testimage1-jpg",
      "Content-Type": "image/jpeg",
      "x-amz-meta-account": "fake-uuid-1234-5678-9012-3456",
      "bucket": "other-page-files",
      "X-Amz-Algorithm": "AWS4-HMAC-SHA256",
      "X-Amz-Credential": "ADEFADEFADEF/20250305/us-west-2/s3/aws4_request",
      "X-Amz-Date": "20250305T212737Z",
      "X-Amz-Security-Token": "ALongSecurityStringToken=",
      "Policy": "eyJlExamplePolicyJwt...",
      "X-Amz-Signature": "02342352578923525525253251212745634...",
      "x-amz-meta-file": "fake-uuid-1234-5678-9012-3456",
      "x-amz-meta-community": "fake-uuid-1234-5678-9012-3456"
    }
  }
}

Uploading Your File to The CDN

Once you’ve created an Other Page file upload request, you will need to upload the file to make use of it by executing a POST request to the file upload endpoint with a body containing the upload.body object.

CURL Request Example

curl --location 'https://s3.us-west-2.amazonaws.com/other-page-files' \
    --form 'key="fake-uuid-1234-5678-9012-3456/testimage1-jpg"' \
    --form 'success_action_status="201"' \
    --form 'Content-Type="image/jpeg"' \
    --form 'x-amz-meta-account="fake-uuid-1234-5678-9012-3456"' \
    --form 'bucket="other-page-files-dev"' \
    --form 'X-Amz-Algorithm="AWS4-HMAC-SHA256"' \
    --form 'X-Amz-Credential="ADEFADEFADEF/20250305/us-west-2/s3/aws4_request"' \
    --form 'X-Amz-Date="20250305T212737Z"' \
    --form 'Policy="eyJlExamplePolicyJwt..."' \
    --form 'X-Amz-Signature="02342352578923525525253251212745634..."' \
    --form 'x-amz-meta-file="fake-uuid-1234-5678-9012-3456"' \
    --form 'x-amz-meta-community="fake-uuid-1234-5678-9012-3456"' \
    --form 'file=@"/Path/To/Your/File/TestFile.png"'

Image CDN

Image files can make use of the other page image CDN https://img.other.page/{your-file-key}?format={format}&size={size} to auto format and resize as needed.

Below is an example of how to return your image with a max size of 100px and as a png.

https://img.other.page/fake-uuid-1234-5678-9012-3456/testimage1-jpg?format=png&size=100

Authorizations

X-Api-Key
string
header
required

Path Parameters

id
string
required

Community ID

Body

application/json
name
string
required

The name of the file (must include file extension)

Response

200 - application/json
File created successfully

The response is of type object.