Get Posts by Date Range API
Retrieves all posts (published and scheduled) within a specified date range across all connected social media platforms. This endpoint provides comprehensive post history and analytics data for content management and reporting purposes.
Endpoint Details
GET https://portfolio.tigest.club/api/v1/dashboard/post/by_date
Content-Type: application/json
Request Parameters
Parameter | Type | Required | Description | Format | Example |
---|---|---|---|---|---|
start_date | string | Yes | Beginning of date range (inclusive) | YYYY-MM-DD | ”2025-05-28” |
end_date | string | Yes | End of date range (inclusive) | YYYY-MM-DD | ”2025-05-28” |
Query Parameters
Both parameters are passed as URL query parameters:
?start_date=2025-05-28&end_date=2025-05-28
Authentication
Include your API key in the request header:
X-API-KEY: your_api_key_here
Example Request
Single Day Query
curl --location 'https://portfolio.tigest.club/api/v1/dashboard/post/by_date?start_date=2025-05-28&end_date=2025-05-28' \
--header 'X-API-KEY: your_api_key_here'
Date Range Query
curl --location 'https://portfolio.tigest.club/api/v1/dashboard/post/by_date?start_date=2025-05-01&end_date=2025-05-31' \
--header 'X-API-KEY: your_api_key_here'
Response Format
Successful Response
Status Code: 200 OK
{
"data": [
{
"post_uuid": "0148113b-7601-4668-9e44-88c07cbea4ef",
"calendar_uuid": "11b05fb5-5376-4e2e-99bb-ef4a35652580",
"calendar_metadata": {
"name": "Dhruv | List Your Token on Coinstore",
"username": "DhruvAkSharda",
"profile_photo": "https://pbs.twimg.com/profile_images/1563232110021726209/loqllRDe_normal.jpg",
"refresh_token": "bWxUOHIyQlhnUzN5THBzQWQxZHB4Yk1NVkt2OUZsempEaFBqSVVVTHFKeFdfOjE3NDg1Mzk5NDI4OTE6MToxOnJ0OjE",
"twitter_user_id": "736938931"
},
"content": "quantum tech turning entropy into gains, sheesh 🚀",
"status": "published",
"created_at": "2025-05-28T09:01:00.703Z",
"updated_at": "2025-05-28T09:02:18.723Z",
"channel": "Twitter",
"post_type": "comment",
"scheduled_at": "2025-05-28T09:02:00.158Z",
"post_metadata": {
"name": "✨_geeknik_//✨",
"username": "geeknik",
"profile_photo": "https://pbs.twimg.com/profile_images/1509304017993752578/qqcKUKZb_normal.jpg",
"twitter_id": "6450462",
"verified": "true",
"tweet_id": "1927164217796239574",
"text": "Quantum entanglement feeds on thermal chaos—asymmetric coupling turns heat death into coherence birth, maximum correlation from maximum entropy.\nhttps://t.co/uCkOkYXnqc"
},
"post_content": {
"user_first_name": "dhruv.csx",
"user_last_name": "",
"user_email": "[email protected]",
"user_uuid": "57a73826-e573-4ec9-8997-89f8a577d801",
"name": "Dhruv | List Your Token on Coinstore",
"username": "DhruvAkSharda",
"profile_photo": "https://pbs.twimg.com/profile_images/1563232110021726209/loqllRDe_normal.jpg",
"twitter_id": "736938931",
"verified": "",
"tweet_id": "1927651635293200397",
"text": "quantum tech turning entropy into gains, sheesh 🚀"
}
}
],
"success": true
}
Response Structure
Root Object
Field | Type | Description |
---|---|---|
data | array | Array of post objects within the date range |
success | boolean | Indicates if the request was successful |
Post Object Fields
Field | Type | Description |
---|---|---|
post_uuid | string | Unique identifier for the individual post |
calendar_uuid | string | Links the post to a specific content calendar |
calendar_metadata | object | Information about the calendar/account owner |
content | string | The actual post content/text |
status | string | Post status (published, scheduled, draft) |
created_at | string | ISO 8601 timestamp when post was created |
updated_at | string | ISO 8601 timestamp of last modification |
channel | string | Social media platform (Twitter, LinkedIn, etc.) |
post_type | string | Type of post (comment, thread, post, etc.) |
scheduled_at | string | ISO 8601 timestamp when post was/will be published |
post_metadata | object | Platform-specific metadata about the target post |
post_content | object | Detailed content information and user data |
Calendar Metadata Object
Field | Type | Description |
---|---|---|
name | string | Display name of the account |
username | string | Platform username/handle |
profile_photo | string | URL to the account’s profile picture |
refresh_token | string | Authentication token for the connected account |
twitter_user_id | string | Platform-specific user identifier |
Post Metadata Object (Platform-Specific)
For Twitter posts:
Field | Type | Description |
---|---|---|
name | string | Display name of the original poster |
username | string | Username of the original poster |
profile_photo | string | Profile photo URL of original poster |
twitter_id | string | Twitter user ID of original poster |
verified | string | Verification status (“true” or “false”) |
tweet_id | string | ID of the original tweet being replied to |
text | string | Content of the original tweet |
Post Content Object
Field | Type | Description |
---|---|---|
user_first_name | string | First name of the post author |
user_last_name | string | Last name of the post author |
user_email | string | Email address of the post author |
user_uuid | string | Unique identifier for the user |
name | string | Display name for the post |
username | string | Username for the post |
profile_photo | string | Profile photo URL for the post |
twitter_id | string | Platform-specific ID |
verified | string | Verification status |
tweet_id | string | ID of the published post |
text | string | The actual content that was posted |
Post Types
The API returns various types of content:
Post Type | Description | Example Use Case |
---|---|---|
comment | Reply to another user’s post | Engaging with community content |
thread | Multi-part Twitter thread | Long-form storytelling or tutorials |
post | Original standalone post | Brand announcements or updates |
retweet | Shared content from another user | Content curation |
Post Status Values
Status | Description |
---|---|
published | Post has been successfully published |
scheduled | Post is scheduled for future publication |
draft | Post is saved but not scheduled |
failed | Post publication failed |
Use Cases
Content Performance Analysis
Retrieve posts from a specific time period to analyze engagement patterns:
# Get all posts from last week
curl --location 'https://portfolio.tigest.club/api/v1/dashboard/post/by_date?start_date=2025-05-20&end_date=2025-05-27' \
--header 'X-API-KEY: your_api_key_here'
Monthly Reporting
Generate monthly content reports:
# Get all posts from May 2025
curl --location 'https://portfolio.tigest.club/api/v1/dashboard/post/by_date?start_date=2025-05-01&end_date=2025-05-31' \
--header 'X-API-KEY: your_api_key_here'
Error Handling
Invalid Date Format (Code: 4001)
{
"errors": {
"code": 4001,
"message": "Invalid date format. Please use YYYY-MM-DD format."
},
"success": false
}
Solution: Ensure dates are in the correct YYYY-MM-DD format.
Date Range Too Large (Code: 4002)
{
"errors": {
"code": 4002,
"message": "Date range exceeds maximum allowed period of 90 days."
},
"success": false
}
Solution: Reduce the date range to 90 days or less.
Invalid Date Range (Code: 4003)
{
"errors": {
"code": 4003,
"message": "Start date must be before or equal to end date."
},
"success": false
}
Solution: Ensure the start_date is not after the end_date.
Authentication Error (Code: 4004)
{
"errors": {
"code": 4004,
"message": "Invalid API key or insufficient permissions."
},
"success": false
}
Solution: Verify your API key is correct and has the necessary permissions.
No Data Found (Code: 4005)
{
"data": [],
"success": true
}
Note: This is not an error - it indicates no posts were found in the specified date range.
Best Practices
- Optimize Date Ranges: Use smaller date ranges for better performance
- Cache Results: Cache frequently accessed date ranges to reduce API calls
- Handle Pagination: For large datasets, consider implementing pagination logic
- Error Handling: Always check the
success
field before processing data
Last updated: May 30, 2025