Basker Docs

Create Media

Create a new Media. Rate limit: 20 requests per minute per API key.

This creates a media metadata record — you can set its alt text, caption, credit, and focal point. Uploading the image file itself is handled separately, not through this endpoint.

POST
/{version}/{tenant}/media
Authorization<token>

Use format: users API-Key YOUR_API_KEY

In: header

Path Parameters

version*string

API version

Default"2026-02"
Value in"2026-02"
tenant*string

Tenant slug

Query Parameters

select?

Field selection object. Example query: select[slug]=true&select[updatedAt]=true

populate?

Relationship population object. Example query: populate[media][url]=true

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://api.basker.app/partners/2026-02/string/media?select%5Bslug%5D=true&select%5BupdatedAt%5D=true&populate%5Bmedia%5D=%5Bobject+Object%5D" \  -H "Content-Type: application/json" \  -d '{}'
{
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "filename": "string",
  "focalX": 0,
  "focalY": 0,
  "height": 0,
  "prefix": "string",
  "src": "string",
  "url": "string",
  "width": 0
}
{
  "error": "Too Many Requests",
  "message": "Rate limit exceeded. Please retry later."
}