📄 Paste uploading
Method for uploading pastes using e-z.host.
POST
https://api.e-z.gg/pasteHeaders
| Name | Type | Description |
|---|---|---|
| key* | String | API Key |
Request Body
| Name | Type | Description |
|---|---|---|
| title* | String | Title of your paste |
| description* | String | Description of your paste |
| language* | Enum | Markdown language of your paste |
| text* | String | Your paste content |
Supported languages
plaintext
bash
c
cs
cpp
css
diff
go
html
json
java
javascript
kotlin
less
lua
makefile
markdown
objectivec
php
perl
python
pycon
r
ruby
rust
scss
sql
shell
swift
typescript
vbnet
yaml
ini
Request example
- cURL
- JavaScript
- Python
curl -X POST "https://api.e-z.gg/paste" \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "My paste",
"description": "A short description",
"language": "javascript",
"text": "console.log(\"hello world\");"
}'
const res = await fetch("https://api.e-z.gg/paste", {
method: "POST",
headers: {
"key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"title": "My paste",
"description": "A short description",
"language": "javascript",
"text": "console.log(\"hello world\");"
})
});
const data = await res.json();
console.log(data);
import requests
res = requests.post(
"https://api.e-z.gg/paste",
headers={"key": "YOUR_API_KEY"},
json={
"title": "My paste",
"description": "A short description",
"language": "javascript",
"text": "console.log(\"hello world\");"
},
)
print(res.json())
Responses
- 200: OK
- 400: Bad Request
- 401: Unauthorized
- 404: Not Found
- 500: Internal Server Error
{
"success": true,
"pasteUrl": "https://<domain>/p/<path>/<pasteid>",
"deletionUrl": "https://api.e-z.gg/paste/delete?key=pastekey",
"document": {
"pasteId": "<pasteid>",
"text": "<text>",
"language": "<language>",
"title": "<title>",
"description": "<description>",
"anonymous": true,
"onetime": false,
"deletionKey": "<pastekey>",
"timestamp": "2026-08-10T22:01:14.998Z",
"uploader": {
"uuid": "<userid>",
"username": "<username>"
},
"domain": "https://<domain>/p/<path>/<pasteid>",
"userOnlyDomain": false
}
}
{
"success": false,
"error": "error message"
}
{
"success": false,
"error": "error message"
}
{
"success": false,
"error": "error message"
}
{
"success": false,
"error": "error message"
}