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"
}
}
}
Create a file upload for a community. Community files can be used as a standard CDN and can be used in any object including Badges, Collections, and more.
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"
}
}
}
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"'
https://img.other.page/{your-file-key}?format={format}&size={size}
to auto format and resize as needed.
https://img.other.page/fake-uuid-1234-5678-9012-3456/testimage1-jpg?format=png&size=100
Community ID
File created successfully
The response is of type object
.