PasteNox API Documentation
ENVIRONMENT   No Environment
LANGUAGE   cURL
PasteNox / API

PasteNox API

PasteNox. Manage pastes, users, archives, authentication and public discovery through a simple REST API.

https://pastenox.com/api

Introduction

Welcome to the PasteNox API documentation. .

.

Recent Pastes

Recent Pastes API.

GEThttps://pastenox.com/api/pastes
Headers
NameValue
Acceptapplication/json
Example Request
cURL Copy
curl --location 'https://pastenox.com/api/pastes' \
--header 'Accept: application/json'

Archive List

Retrieve available paste syntax and archive information.

GEThttps://pastenox.com/api/archive
Example Request
cURL Copy
curl --location 'https://pastenox.com/api/archive' \
--header 'Accept: application/json'

Archive

Retrieve an archived paste.

GEThttps://pastenox.com/api/archive/{slug}
Path Parameter
NameDescription
slugUnique paste slug.

Login

Authenticate a PasteNox user.

POSThttps://pastenox.com/api/login
Example Request
cURL Copy
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.

POSThttps://pastenox.com/api/logout
Example Request
cURL Copy
curl --location 'https://pastenox.com/api/logout' \
--header 'Authorization: Bearer {token}' \
--header 'Accept: application/json'

Get Paste

Retrieve a specific paste.

POSThttps://pastenox.com/api/paste/get
Example Request
cURL Copy
curl --location 'https://pastenox.com/api/paste/get' \
--header 'Accept: application/json' \
--form 'slug="U2m07ANokE"'

Paste Create

Create a new paste.

POSThttps://pastenox.com/api/paste/create
Example Request
cURL Copy
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.

POSThttps://pastenox.com/api/paste/update
Headers
NameValueRequired
Acceptapplication/jsonYes
AuthorizationBearer {token}Yes
Form Data
FieldExampleDescription
slugZvV4XBhAaKRequired. Slug of the paste to edit.
content<p>this is new paste</p>Required. Minimum length 1.
titleMy PasteOptional. Maximum 80 characters.
syntaxnoneOptional. Valid syntax slug.
password12345Optional. Maximum 50 characters.
status1Optional. Public = 0, unlisted = 1, private = 2.
Example Request
cURL Copy
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.

POSThttps://pastenox.com/api/paste/delete
Headers
NameValue
AuthorizationBearer {token}
Acceptapplication/json
Form Data
FieldExampleDescription
slugZvV4XBhAaKRequired. Slug of the paste to delete.
Example Request
cURL Copy
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.

GEThttps://pastenox.com/api/page/{slug}
Example Request
cURL Copy
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.

GEThttps://pastenox.com/api/user/{username}
Example Request
cURL Copy
curl --location 'https://pastenox.com/api/user/admin' \
--header 'Accept: application/json'

Get My Pastes

Get pastes belonging to the authorized user.

GEThttps://pastenox.com/api/my-pastes
Headers
NameValue
AuthorizationBearer {token}
Acceptapplication/json
Example Request
cURL Copy
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.

POSThttps://pastenox.com/api/report-issue
Headers
NameValue
AuthorizationBearer {token}
Acceptapplication/json
Form Data
FieldExampleDescription
slugU2m07ANokERequired. Slug of the paste to report.
reasonI do not like this pasteRequired. 10–1000 characters.
Example Request
cURL Copy
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.

GEThttps://pastenox.com/api/profile
Headers
NameValue
AuthorizationBearer {token}
Acceptapplication/json
Example Request
cURL Copy
curl --location 'https://pastenox.com/api/profile' \
--header 'Authorization: Bearer {token}' \
--header 'Accept: application/json'