APIsGet Account Tweets

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

ParameterTypeRequiredDescriptionFormatExample
start_datestringYesBeginning of date range (inclusive)YYYY-MM-DD”2025-05-28”
end_datestringYesEnd 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

FieldTypeDescription
dataarrayArray of post objects within the date range
successbooleanIndicates if the request was successful

Post Object Fields

FieldTypeDescription
post_uuidstringUnique identifier for the individual post
calendar_uuidstringLinks the post to a specific content calendar
calendar_metadataobjectInformation about the calendar/account owner
contentstringThe actual post content/text
statusstringPost status (published, scheduled, draft)
created_atstringISO 8601 timestamp when post was created
updated_atstringISO 8601 timestamp of last modification
channelstringSocial media platform (Twitter, LinkedIn, etc.)
post_typestringType of post (comment, thread, post, etc.)
scheduled_atstringISO 8601 timestamp when post was/will be published
post_metadataobjectPlatform-specific metadata about the target post
post_contentobjectDetailed content information and user data

Calendar Metadata Object

FieldTypeDescription
namestringDisplay name of the account
usernamestringPlatform username/handle
profile_photostringURL to the account’s profile picture
refresh_tokenstringAuthentication token for the connected account
twitter_user_idstringPlatform-specific user identifier

Post Metadata Object (Platform-Specific)

For Twitter posts:

FieldTypeDescription
namestringDisplay name of the original poster
usernamestringUsername of the original poster
profile_photostringProfile photo URL of original poster
twitter_idstringTwitter user ID of original poster
verifiedstringVerification status (“true” or “false”)
tweet_idstringID of the original tweet being replied to
textstringContent of the original tweet

Post Content Object

FieldTypeDescription
user_first_namestringFirst name of the post author
user_last_namestringLast name of the post author
user_emailstringEmail address of the post author
user_uuidstringUnique identifier for the user
namestringDisplay name for the post
usernamestringUsername for the post
profile_photostringProfile photo URL for the post
twitter_idstringPlatform-specific ID
verifiedstringVerification status
tweet_idstringID of the published post
textstringThe actual content that was posted

Post Types

The API returns various types of content:

Post TypeDescriptionExample Use Case
commentReply to another user’s postEngaging with community content
threadMulti-part Twitter threadLong-form storytelling or tutorials
postOriginal standalone postBrand announcements or updates
retweetShared content from another userContent curation

Post Status Values

StatusDescription
publishedPost has been successfully published
scheduledPost is scheduled for future publication
draftPost is saved but not scheduled
failedPost 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

  1. Optimize Date Ranges: Use smaller date ranges for better performance
  2. Cache Results: Cache frequently accessed date ranges to reduce API calls
  3. Handle Pagination: For large datasets, consider implementing pagination logic
  4. Error Handling: Always check the success field before processing data

Last updated: May 30, 2025