Website Builder API
POST /services/websites/v1/media/register Auth

Request Body Required

FieldTypeRequiredDescriptionExample
s3_key string
max: 512
Yes
filename string
max: 255
Yes
mime_type string|null
max: 100
No
file_size integer|null No
width integer|null No
height integer|null No
is_private boolean|null No
website_id integer|null No
source_type string|null
max: 50
No
source_id integer|null No

Responses

200
422
401
403
429
Successful response
Headers
HeaderTypeDescriptionExample
X-RateLimit-Limit integer Maximum number of requests allowed per minute 60
X-RateLimit-Remaining integer Number of requests remaining in the current window 57
FieldTypeDescription
error boolean
message string
data object
data.media object
Validation error
FieldTypeDescription
message string Errors overview.
errors object A detailed description of each field that failed validation.
Unauthenticated — missing or invalid Bearer token
Headers
HeaderTypeDescriptionExample
X-RateLimit-Limit integer Maximum number of requests allowed per minute 60
X-RateLimit-Remaining integer Number of requests remaining in the current window 57
FieldTypeDescription
error boolean
message string
Forbidden — insufficient permissions for this resource
Headers
HeaderTypeDescriptionExample
X-RateLimit-Limit integer Maximum number of requests allowed per minute 60
X-RateLimit-Remaining integer Number of requests remaining in the current window 57
FieldTypeDescription
error boolean
message string
Too Many Requests — rate limit exceeded
Headers
HeaderTypeDescriptionExample
X-RateLimit-Limit integer Maximum number of requests allowed per minute 60
X-RateLimit-Remaining integer Number of requests remaining in the current window 57
Retry-After integer Seconds until the rate limit resets 60
FieldTypeDescription
error boolean
message string
Base URL
https://api.wemasy.nl/api
Authentication

Request Sample
cURL
JS
PHP
Python
curl -X POST "https://api.wemasy.nl/api/services/websites/v1/media/register" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "s3_key": "string",
    "filename": "string",
    "mime_type": "string",
    "file_size": "string",
    "width": "string",
    "height": "string",
    "is_private": "string",
    "website_id": "string",
    "source_type": "string",
    "source_id": "string"
}'
fetch('https://api.wemasy.nl/api/services/websites/v1/media/register', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "s3_key": "string",
    "filename": "string",
    "mime_type": "string",
    "file_size": "string",
    "width": "string",
    "height": "string",
    "is_private": "string",
    "website_id": "string",
    "source_type": "string",
    "source_id": "string"
})})
.then(r => r.json())
.then(data => console.log(data));
$response = Http::withToken('YOUR_API_TOKEN')
    ->accept('application/json')
    ->post('https://api.wemasy.nl/api/services/websites/v1/media/register', {
    "s3_key": "string",
    "filename": "string",
    "mime_type": "string",
    "file_size": "string",
    "width": "string",
    "height": "string",
    "is_private": "string",
    "website_id": "string",
    "source_type": "string",
    "source_id": "string"
});
$data = $response->json();
import requests

headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json"
}
data = {
    "s3_key": "string",
    "filename": "string",
    "mime_type": "string",
    "file_size": "string",
    "width": "string",
    "height": "string",
    "is_private": "string",
    "website_id": "string",
    "source_type": "string",
    "source_id": "string"
}
r = requests.post("https://api.wemasy.nl/api/services/websites/v1/media/register", headers=headers, json=data)
print(r.json())
Response Example
{
    "error": false,
    "message": "string",
    "data": {
        "media": {
            "id": 0,
            "project_id": 0,
            "user_id": 0,
            "website_id": 0,
            "source_type": "string",
            "source_id": 0,
            "filename": "string",
            "s3_key": "string",
            "mime_type": "string",
            "file_size": 0,
            "width": 0,
            "height": 0,
            "alt_text": "string",
            "focal_point_x": 0,
            "focal_point_y": 0,
            "is_private": true,
            "in_use_count": 0,
            "deleted_at": "string",
            "created_at": "string",
            "updated_at": "string",
            "cdn_url": "string"
        }
    }
}

Try It
Request Body Required

Export