Introduction
Welcome to the PasteNox API documentation. .
Recent Pastes
Recent Pastes API.
| Name | Value |
|---|---|
| Accept | application/json |
curl --location 'https://pastenox.com/api/pastes' \ --header 'Accept: application/json'
Trending Paste
Retrieve trending pastes for a selected timeframe.
| Parameter | Example | Description |
|---|---|---|
| t | year | Timeframe: today, week, month or year. |
| Accept | application/json | |
curl --location 'https://pastenox.com/api/trending?t=year' \ --header 'Accept: application/json'
Search
Search pastes by keyword.
| Parameter | Example | Description |
|---|---|---|
| keyword | User | Keyword used to search pastes. Minimum 2 characters. |
| Accept | application/json | |
curl --location 'https://pastenox.com/api/search?keyword=User' \ --header 'Accept: application/json'
Archive List
Retrieve available paste syntax and archive information.
curl --location 'https://pastenox.com/api/archive' \ --header 'Accept: application/json'
Archive
Retrieve an archived paste.
| Name | Description |
|---|---|
| slug | Unique paste slug. |
Login
Authenticate a PasteNox user.
curl --location 'https://pastenox.com/api/login' \ --header 'Accept: application/json' \ --form 'email="[email protected]"' \ --form 'password="your-password"'
Logout
End the current authenticated session.
curl --location 'https://pastenox.com/api/logout' \
--header 'Authorization: Bearer {token}' \
--header 'Accept: application/json'Get Paste
Retrieve a specific paste.
curl --location 'https://pastenox.com/api/paste/get' \ --header 'Accept: application/json' \ --form 'slug="U2m07ANokE"'
Paste Create
Create a new paste.
curl --location 'https://pastenox.com/api/paste/create' \ --header 'Accept: application/json' \ --form 'content="this is a new paste"' \ --form 'title="My Paste"' \ --form 'syntax="none"'
Paste Update
Update an existing paste. Authentication is required.
| Name | Value | Required |
|---|---|---|
| Accept | application/json | Yes |
| Authorization | Bearer {token} | Yes |
| Field | Example | Description |
|---|---|---|
| slug | ZvV4XBhAaK | Required. Slug of the paste to edit. |
| content | <p>this is new paste</p> | Required. Minimum length 1. |
| title | My Paste | Optional. Maximum 80 characters. |
| syntax | none | Optional. Valid syntax slug. |
| password | 12345 | Optional. Maximum 50 characters. |
| status | 1 | Optional. Public = 0, unlisted = 1, private = 2. |
curl --location 'https://pastenox.com/api/paste/update' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {token}' \
--form 'slug="ZvV4XBhAaK"' \
--form 'content="<p>this is new paste</p>"' \
--form 'title="My Paste"' \
--form 'syntax="none"' \
--form 'password="12345"' \
--form 'status="1"'Paste Delete
Delete an existing paste. Authentication is required.
| Name | Value |
|---|---|
| Authorization | Bearer {token} |
| Accept | application/json |
| Field | Example | Description |
|---|---|---|
| slug | ZvV4XBhAaK | Required. Slug of the paste to delete. |
curl --location 'https://pastenox.com/api/paste/delete' \
--header 'Authorization: Bearer {token}' \
--header 'Accept: application/json' \
--form 'slug="ZvV4XBhAaK"'Get Page
Retrieve a public PasteNox page.
curl --location 'https://pastenox.com/api/page/U2m07ANokE' \ --header 'Accept: application/json'
Get User Public Profile & Pastes
Retrieve a user's public profile and public pastes.
curl --location 'https://pastenox.com/api/user/admin' \ --header 'Accept: application/json'
Get My Pastes
Get pastes belonging to the authorized user.
| Name | Value |
|---|---|
| Authorization | Bearer {token} |
| Accept | application/json |
curl --location 'https://pastenox.com/api/my-pastes' \
--header 'Authorization: Bearer {token}' \
--header 'Accept: application/json'Report Paste Issue
Report a paste issue. Authentication is required.
| Name | Value |
|---|---|
| Authorization | Bearer {token} |
| Accept | application/json |
| Field | Example | Description |
|---|---|---|
| slug | U2m07ANokE | Required. Slug of the paste to report. |
| reason | I do not like this paste | Required. 10–1000 characters. |
curl --location 'https://pastenox.com/api/report-issue' \
--header 'Authorization: Bearer {token}' \
--header 'Accept: application/json' \
--form 'slug="U2m07ANokE"' \
--form 'reason="I do not like this paste"'Get User
Get the authorized user's profile.
| Name | Value |
|---|---|
| Authorization | Bearer {token} |
| Accept | application/json |
curl --location 'https://pastenox.com/api/profile' \
--header 'Authorization: Bearer {token}' \
--header 'Accept: application/json'