/api/rpc against a Vercel installation.
Scope
Protocol
1. Prepare
Tell the server what you are about to send.
Authenticate with an
x-api-key header, an OAuth bearer token or a session cookie. If the request carries an Origin header, it must match the installation’s own origin.
Response 200:
404, the installation doesn’t stage bodies (for example, it runs in Docker). Send the original request unchanged, and skip staging for later requests too.
2. Upload
Upload the exact body bytes to the URL from step 1.size bytes, sent as application/octet-stream.
3. Finalize
Send the original request with an empty body and the staging reference in thex-resume-staged-body header:
path (including the query string) and the same user as in step 1. The server replaces the body with the staged bytes, sets Content-Type to the stored contentType, deletes the staged object and returns the normal RPC response.
Errors
A reference can’t be retried. If a finalize response is lost, check whether the change was saved before you stage and send the request again.
Related pages
- Using the API: the REST API, which most integrations should use.
- Deploying to Vercel: hosting requirements, including Blob storage and Redis.