WebYore API v1
Create an API key in your account and choose the permissions it needs. Write requests require an Idempotency-Key.
OpenAPI 3.1Manage API keysCreate your first short link
Choose a language, replace the sample API key and destination, then send your first request.
- Base URL
https://api.webyore.com/v1- Authentication
Bearer API key- Required scope
- links:write
- Write requests
Idempotency-Key
curl --request POST \
--url https://api.webyore.com/v1/links \
--header 'Authorization: Bearer wy_live_your_key' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: request-20260831-0001' \
--data '{"url":"https://example.com/article"}'Integrate with an AI assistant
Copy the API specification and examples for your AI coding assistant. Your API key is not included.
Read API guidellms.txtComplete API reference
Check endpoint permissions, error formats, and data models. OpenAPI 3.1 contains the complete specification.
Authentication and safe retries Bearer API keys, Idempotency-Key, and 24-hour retry rules
Authentication
Every API request uses a Bearer API key created in your account. Send it in the Authorization header, never in a URL or public client-side code.
Authorization: Bearer wy_live_your_keyIdempotency-Key
Every POST, PATCH, and DELETE request requires a unique 8-128 character Idempotency-Key. WebYore retains the record for 24 hours.
Idempotency-Key: request-20260831-0001The same key and request can be retried safely. Reusing a key with different content returns a 409 conflict.
Image hosting API Uploads, imports, ratings, and image URLs
Upload and URL import
Initial creation accepts auto, general, or nsfw. URL import requires a public URL that directly returns image bytes. If the source rejects the server with 403, the web UI can offer a consented browser import; API clients can download the file locally and use multipart upload instead.
Direct browser upload
POST file size, MIME type and SHA-256 to /images/uploads for an upload URL. Begin PUT within five minutes and finish confirmation by complete_before, with 30 extra minutes for slow transfers. PUT the original file with all returned headers (without your API key), then call complete_url. The image response matches a regular upload. Repeating completion does not charge twice; invalid or expired uploads refund reserved quota. If direct transfer is blocked, call cancel_url and wait for cancelled:true before falling back to POST /images.
POST /images/url
Content-Type: application/json
Idempotency-Key: image-import-0001
{
"url": "https://example.com/photo.jpg",
"content_rating": "auto"
}Status, ratings, and image URLs
Poll status_url until the state is ready, then use url to embed the image. New images publish as WebP. APNG is not yet supported, and malformed WebP is rejected; use the returned URL instead of constructing an extension. share_url opens a viewer with rating information and reporting. Automatic rating runs in the background. Read the current rating with GET /images/{id} or HEAD on the direct URL. An unrated image has no rating result; clients needing a safe default should hide or blur it. Clients must revalidate a cached image before display and refresh the rating from each 200 or 304 response. On 410 or 404, discard the cached image and ETag for that URL and never show a stale original; 202 means processing is still in progress, so retry later without showing a stale original.
PATCH /images/{id}/rating
Idempotency-Key: image-rating-0001
{ "content_rating": "sensitive" }New image URLs use IDs of 5 or more characters; existing URLs remain valid. Send HEAD to the direct image URL without an API key to read X-WebYore-Content-Rating without downloading the image: general, sensitive, nsfw, or unrated. Cross-origin JavaScript can also read this header. Unavailable or processing images omit the rating header.
curl -I "https://i.webyore.com/Ab3De7X.webp"
X-WebYore-Content-Rating: nsfwAPI key scopes Choose permissions for each operation
Grant only the minimum access an application needs. Read scopes never permit creation, changes, or deletion.
Select read and write permissions separately.
| Scope | Permitted access |
|---|---|
links:read | Read, search, and export short links; download QR codes |
links:write | Create, update, and disable short links; manage UTM presets |
snapshots:read | Read snapshot capture and publication status |
snapshots:write | Create snapshots |
images:read | Read hosted images, delivery URLs, and rating metadata |
images:write | Upload, import by URL, rate, and delete hosted images |
analytics:read | Read privacy-preserving aggregate link analytics |
domains:read | Read custom domains and verification state |
domains:write | Register, verify, and disable custom domains |
Insufficient scope response HTTP status, structured errors, and request_id
Insufficient scope response
When a required scope is missing, the API returns 403 with a structured api_scope_required error. detail names the scope required for that operation.
{
"error": {
"code": "api_scope_required",
"message": "The API key is missing a required scope.",
"request_id": "req_...",
"detail": "images:write"
}
}Endpoint overview Short link, snapshot, image, and domain endpoints
| Method | Path | Purpose |
|---|---|---|
| POST | /v1/links | Create a short link |
| GET | /v1/links | List short links |
| PATCH | /v1/links/{id} | Change a destination |
| GET | /v1/links/{id}/qr | Download a short link QR code |
| GET | /v1/links/{id}/analytics | Read aggregate click analytics |
| GET | /v1/links.csv | Export short links as CSV |
| POST | /v1/snapshots | Create a web snapshot |
| GET | /v1/snapshots/{id} | Read snapshot capture status |
| POST | /v1/images | Upload a hosted image |
| POST | /v1/images/uploads | Get a direct upload URL |
| POST | /v1/images/uploads/{upload_id}/complete | Confirm a direct image upload |
| POST | /v1/images/uploads/{upload_id}/cancel | Cancel and refund a direct upload |
| POST | /v1/images/url | Import an image from a public URL |
| GET | /v1/images | List hosted images |
| GET | /v1/images/{id} | Read image processing status and URLs |
| PATCH | /v1/images/{id}/rating | Set an owner content rating |
| DELETE | /v1/images/{id} | Delete a hosted image |
| POST | /v1/domains | Register a custom short link domain |
| GET | /v1/usage | Read quota usage |