9asir API Documentation

Explore the 9asir API documentation and learn how to use the API to programmatically manage short links.

Introduction

Welcome to the 9asir API documentation! This guide provides an overview of how to use our API to programmatically manage short links using API keys.

Base URL

All API requests should be made to the following base URL:

https://9asir.com/api

Authentication

To authenticate your requests, you must include an API key in the Authorization header of your request. The API key should be prefixed with Bearer. To obtain an API key, please contact our support team.

Examples

Here are some examples of how to use the 9asir API using cURL:

Create a Short Link

curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer your_api_key" -d '{
  "url": "https://www.example.com",
  "customKey": "custom_key",
  "domain": "9asir.com",
  "title": "Example Title",
  "description": "Example Description"
}' "https://9asir.com/api/url"

Retrieve Short Link Information

curl -X GET -H "Authorization: Bearer your_api_key" "https://9asir.com/api/url/custom_key"

Update a Short Link

curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer your_api_key" -d '{
  "url": "https://www.updated-example.com",
  "title": "Updated Title",
  "description": "Updated Description"
}' "https://9asir.com/api/url/link_id"

Delete a Short Link

curl -X DELETE -H "Authorization: Bearer your_api_key" "https://9asir.com/api/url/link_id"

Support

If you have any questions, issues, or need assistance, please contact our support team at [email protected].

Happy coding!