# MyStorageAPI > Globally distributed object storage Base URL: https://api.mystorageapi.com Authentication: `Authorization: Bearer ` # MyStorageAPI Object storage for assets (images, documents, etc.) served via a global CDN. Use `/hq/assets/ingest` to fetch and store a file from a URL. The response returns `asset_id` and `url` — use the `url` in other services (e.g. funnel HTML, org logos). ## Key endpoints - `POST /hq/assets/ingest` — fetch and store a file from a public URL. Returns `{ asset_id, url, name, created_at }`. - `GET /hq/assets` — list all assets for the account. - `DELETE /hq/assets/{asset_id}` — permanently delete an asset. ## Key Blog Posts - [The Hidden Cost of Data Egress](https://mystorageapi.com/blog/hidden-cost-of-data-egress): Why relying on a single regional storage bucket is bankrupting modern applications, and how global distribution solves the egress tax. - [Edge Caching Strategies: Object Storage Localized](https://mystorageapi.com/blog/edge-caching-strategies-object-storage): A technical deep dive into L1/L2 caching topologies, cache invalidation, and ensuring sub-10ms delivery for static assets. - [Securing Persistence: Presigned URLs at Scale](https://mystorageapi.com/blog/securing-persistence-presigned-urls): Architecting secure file sharing without exposing your origin buckets to the public internet. - [Building an Analytics Data Lake on Object Storage](https://mystorageapi.com/blog/building-analytics-data-lake-object-storage): Why traditional relational databases fail at analytical scale, and how to architect cost-effective data lakes using Parquet and Object Storage. - [Optimizing Video Delivery via Edge Streaming](https://mystorageapi.com/blog/optimizing-video-delivery-edge-streaming): Serving heavy media payloads effectively: HTTP Range Requests, edge buffering, and dynamic caching. ## Agent Onboarding To use this or any other MyAPIHQ service as an autonomous agent, follow these steps: 1. **Register an Agent Account**: Create an agent account. Returns `account_id`, `pin`, and a `token` (JWT) in one call — no email or human required. ```bash curl -X POST https://api.myapihq.com/hq/account/agent/create \ -H "Content-Type: application/json" \ -d '{"label": "my-agent"}' ``` 2. **Create a Permanent API Key**: Use the `token` from step 1 to create a workspace-scoped API key (`hq_live_...`). ```bash curl -X POST https://api.myapihq.com/hq/account/create/key \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"name": "my-agent-key"}' ``` 3. **Authenticate**: All subsequent requests must include: `Authorization: Bearer `. The JWT token from step 1 is valid for account and billing endpoints only. All service calls (orgs, funnels, email, domains) require the API key from step 2. ## Endpoints ### GET /hq/assets **List Storage Objects** Retrieve all assets for the authenticated account. **Response (JSON):** ```json Array<{ "asset_id": string, "name": string, "description": string, "url": string, "content_type": string, "size_bytes": integer, "created_at": string }> ``` ### POST /hq/assets/ingest **Ingest Storage Object** Ingest an asset (SSRF-protected). Optionally provide a name and description. **Request Body (JSON):** ```json { "url": string (Required), "name": string, "description": string } ``` **Response (JSON):** ```json { "asset_id": string, "url": string, "name": string, "created_at": string } ``` ### DELETE /hq/assets/{asset_id} **Delete Storage Object** Permanently delete an asset from storage and the organization registry. **Parameters:** - `asset_id` (path): (type: string, Required) ### POST /hq/billing/setup-payment **Setup Payment Method** Generates a Stripe Checkout Session URL to save a card. The user must visit this URL, enter their card, and complete the setup. A webhook will automatically save the card to the account. **Response (JSON):** ```json { "success": boolean, "data": { "url": string }, "error": string, "meta": object } ``` ## Pricing Pay per use. No subscription. --- ## Ecosystem Integration This service is part of the MyAPIHQ ecosystem. You authenticate using an API Key generated from your MyAPIHQ account. To view the full list of available services (like domain registration, funnel building, transactional email, object storage, etc.), fetch [https://myapihq.com/llms.txt](https://myapihq.com/llms.txt).