- Overview
- Key Features
- Getting Started
- Framework Integration
- API Resources
- Response Codes
- Contributing
- License
PortfolioAPI is a comprehensive backend solution for professional portfolio websites. It provides robust endpoints for managing projects, skills, reviews, and professional experience, making it ideal for developers, designers, and creatives who need a reliable API for their portfolio sites.
-
Project Management: Add and manage portfolio projects programmatically, including titles, descriptions, images, and links.
-
Skills Tracking: Track and update professional skills in your portfolio via API.
-
Review & Documentation System: Add and display testimonials or reviews to enhance your portfolio.
-
Experience Logging: Log professional experience, including company name, role, start and end dates, and job description.
-
Contact Management: Manage incoming communications using customizable email templates.
All API requests require authentication via an API key. Obtain your key through our API Registration Page.
Include your API key in request headers:
headers: {
Authorization: Bearer YOUR_API_KEY
}
The base URL for the Portfolio API is:
https://api-portfolio-v1.vercel.app/
import axios from 'axios';
import { useState, useEffect } from 'react';
function ProjectList() {
const [projects, setProjects] = useState([]);
useEffect(() => {
const fetchProjects = async () => {
try {
const response = await axios.get('https://api.example.com/projects', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
},
});
setProjects(response.data);
} catch (error) {
console.error('Error fetching projects:', error);
}
};
fetchProjects();
}, []);
}
export default {
data() {
return {
projects: []
}
},
async mounted() {
try {
const response = await axios.get('https://api.example.com/projects', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
},
});
this.projects = response.data;
} catch (error) {
console.error('Error fetching projects:', error);
}
}
}
import axios from 'axios';
import { onMount } from 'svelte';
let projects = [];
onMount(async () => {
try {
const response = await axios.get('https://api.example.com/projects', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
},
});
projects = response.data;
} catch (error) {
console.error('Error fetching projects:', error);
}
});
You can paginate your GET requests by adding
limit
andoffset
as query parameters in the URL.
- limit: Defines the number of results to be returned in a single request.
- offset: Defines the number of records to skip before starting to return results.
For example, to fetch the first 5 records, you can use the following URL:
https://api.example.com/projects?limit=5&offset=0
You can modify the
limit
andoffset
values to control the data you receive, making it easier to handle large datasets efficiently.
Manage portfolio projects with full CRUD operations.
Base URL: /api/projects
Method | Endpoint | Description |
---|---|---|
GET | / |
List all projects |
GET | /:id |
Get project details |
POST | / |
Create new project |
PUT | /:id |
Update project |
DELETE | /:id |
Delete project |
Request Body Example:
{
"title": "My New Project",
"image": "https://example.com/image.jpg",
"description": "This is a description of my project.",
"tech_stack": ["PHP", "MySQL", "JavaScript"],
"start_date": "2024-01-01",
"finish_date": "2024-12-31",
"github_link": "https://github.com/user/project",
"live_link": "https://project.example.com"
}
Track and showcase professional skills.
Base URL: /api/skills
Method | Endpoint | Description |
---|---|---|
GET | / |
List all skills |
GET | /:category |
Get skills by category |
POST | / |
Add new skill |
PUT | /:id |
Update skill |
DELETE | /:id |
Remove skill |
Request Body Example:
{
"skill_name": "PHP Programming",
"experience_level": "Intermediate",
"years_of_experience": 3,
"description": "Experienced in PHP for backend web development."
}
Manage testimonials and feedback.
Base URL: /api/reviews
Method | Endpoint | Description |
---|---|---|
GET | / |
List all reviews |
GET | /:id |
Get review details |
POST | / |
Add new review |
PUT | /:id |
Update review |
DELETE | /:id |
Remove review |
Request Body Example:
{
"reviewer_name": "John Doe",
"rating": 4,
"review_text": "Great product, highly recommend it."
"reviewer_job_title": "Indie Hacker",
}
Log professional experience and work history.
Base URL: /api/experience
Method | Endpoint | Description |
---|---|---|
GET | / |
List all experience |
GET | /:id |
Get experience details |
POST | / |
Add new experience |
PUT | /:id |
Update experience |
DELETE | /:id |
Remove experience |
Request Body Example:
{
"company_name": "Tech Corp",
"role": "Software Engineer",
"start_date": "2022-01-01",
"end_date": "2024-12-01",
"description": "Worked on developing web applications."
}
Handle incoming communications through a templated email system.
Base URL: /api/email
Key Features:
- Pre-built email templates (5 in total: 2 light, 2 dark, 1 default)
- Secure email receiving
- Customizable recipient configuration
Email Template Types:
- Default Template (Template 1): The default layout used for emails.
- Light Templates (Templates 2 and 3): Light-themed templates designed for clean and minimalist emails.
- Dark Templates (Templates 4 and 5): Dark-themed templates suitable for modern, sleek email designs.
Each template is available for use based on your preference:
- Template 1 is the default and is applied if no other template is specified.
- Templates 2 and 3 are light-themed, ideal for simple and bright email content.
- Templates 4 and 5 are dark-themed, designed for a more professional and modern look.
Additional Information:
- Sender Email: The email you want to receive incoming emails with (i.e., the "from" email address).
- Body: The body of the email is optional. If no custom body is provided, the default body will be used. If you wish to send a personalized message, you can specify a custom body in the request.
If you do not specify a template, Template 1 (default) will be applied automatically, and you can include a custom body if desired.
Request Body Example:
{
"recipient": "[email protected]",
"subject": "Test Email",
"sender_email": "[email protected]",
"sender_name": "Sender Name",
"body": "This is a custom email body", // only add if you want custom body
"template_id": 1
}
Code | Status | Description | Example Response |
---|---|---|---|
200 | OK | Request successful | {"status": "success", "data": {...}} |
201 | Created | Resource created | {"status": "success", "data": {"id": "123"}} |
400 | Bad Request | Invalid input | {"status": "error", "message": "Invalid input data"} |
401 | Unauthorized | Invalid API key | {"status": "error", "message": "Invalid API key"} |
403 | Forbidden | Insufficient permissions | {"status": "error", "message": "Access denied"} |
404 | Not Found | Resource/Email not found | {"status": "error", "message": "Resource not found"} |
429 | Too Many Requests | Daily rate limit exceeded | {"status": "error", "message": "Rate limit exceeded"} |
500 | Server Error | Internal server error | {"status": "error", "message": "Internal server error"} |
- Fork the repository
- Create your feature branch:
git checkout -b feature/amazing-feature
- Commit your changes:
git commit -m 'Add amazing feature'
- Push to the branch:
git push origin feature/amazing-feature
- Open a Pull Request
🌟 Star the Project if You Find It Useful Created by uthmandev