Skip to main content
POST
/
files
/
meta-tag-image
Upload Open Graph image
curl --request POST \
  --url https://api.h0p.co/files/meta-tag-image \
  --header 'Content-Type: multipart/form-data' \
  --header 'x-api-key: <api-key>' \
  --form file='@example-file'
{
  "id": "01933eb8-541f-7000-a9f4-e4eee80ff04e",
  "createdAt": "2024-01-15T10:30:00Z",
  "name": "logo.png",
  "organizationId": "01933eb8-541f-7000-a9f4-e4eee80ff04e",
  "key": "qr-code/01933eb8-541f-7000-a9f4-e4eee80ff04e.png",
  "mime": "image/png",
  "size": 45230,
  "url": "<string>"
}

Authorizations

x-api-key
string
header
required

API Key authentication for programmatic access.

How to use:

  1. Create an API key from your dashboard settings
  2. Include the key in the x-api-key header with each request
  3. API keys have granular permissions (domains, shortLinks, files, stats, apiKeys)

Example:

curl -H "x-api-key: your-api-key-here" https://api.h0p.co/short-link/list

Types of API keys:

  • User keys: Linked to your user account (one per organization)
  • Bot keys: Autonomous machine users (one per organization)

Security notes:

  • Keep your API keys secure and never commit them to version control
  • API keys cannot access authentication endpoints (/auth/*)
  • Keys can be revoked at any time from the dashboard

Body

multipart/form-data
file
file
required

Image file to upload. Max 1MB. Png/Jpg/WebP accepted

Response

Success

id
string<uuid>
required

File UUID

Example:

"01933eb8-541f-7000-a9f4-e4eee80ff04e"

createdAt
string<date-time> | null
required

Upload timestamp

Example:

"2024-01-15T10:30:00Z"

name
string
required

Original file name

Example:

"logo.png"

organizationId
string<uuid> | null
required

Organization UUID

Example:

"01933eb8-541f-7000-a9f4-e4eee80ff04e"

key
string
required

S3 storage key

Example:

"qr-code/01933eb8-541f-7000-a9f4-e4eee80ff04e.png"

mime
string
required

MIME type

Example:

"image/png"

size
number
required

File size in bytes

Required range: x >= 0
Example:

45230

url
string<uri>
required