Postpone Logo
Getting Started

GraphQL Types

Core GraphQL types and their structure in the Postpone API.

The Postpone API uses several core GraphQL types to represent different entities in the system. Understanding these types is essential for effectively working with the API.

Core Types

UserType

The UserType represents a user account in the Postpone system with their preferences, permissions, and associated data.

id
ID! required
Unique identifier for the user.
email
String
User's email address.
username
String
User's chosen username.
fullName
String
User's full display name.
timezone
String
User's preferred timezone for scheduling.
socialAccounts
[SocialAccountType]
List of connected social media accounts the user can access.
account
AccountType
The user's account information including plan and billing details.
remainingMonthlyPosts
Int
Number of posts remaining in the current billing period.

AccountType

The AccountType represents a billing account with its plan, limits, and subscription information.

id
ID! required
Unique identifier for the account.
name
String
Display name for the account.
plan
String
Current subscription plan name.
ownerId
ID
ID of the user who owns this account.
subscriptionStatus
String
Current status of the subscription (active, canceled, etc.).
allowedMonthlyPosts
Int
Maximum number of posts allowed per month.
allowedSocialAccounts
Int
Maximum number of social accounts that can be connected.
allowedContentStorage
BigInt
Maximum content storage allowed in bytes.
currentPeriodEnd
DateTime
When the current billing period ends.

SocialAccountType

The SocialAccountType represents a connected social media account with its configuration and capabilities.

id
ID! required
Unique identifier for the social account.
platform
String
Social media platform name (e.g., "reddit", "twitter", "instagram").
username
String
Username on the social platform.
formattedUsername
String
Display-friendly version of the username.
name
String
Display name on the social platform.
avatarUrl
String
URL to the account's profile picture.
followers
Int
Number of followers on the platform.
isEnabled
Boolean
Whether the account is enabled for posting.
isConnected
Boolean
Whether the account is successfully connected.
verified
Boolean
Whether the account is verified on the platform.

MediaType

The MediaType represents uploaded media files in the content library.

id
ID! required
Unique identifier for the media file.
name
String
Display name of the media file.
altText
String
Alternative text description for accessibility.
url
String
Direct URL to access the media file.
mimeType
String
MIME type of the file (e.g., "image/jpeg", "video/mp4").
size
BigInt
File size in bytes.
isImage
Boolean
Whether the file is an image.
isVideo
Boolean
Whether the file is a video.
isGif
Boolean
Whether the file is an animated GIF.
thumbnailUrl
String
URL to a thumbnail version of the media.
duration
Int
Duration in seconds for videos.
scheduledPosts
Int
Number of scheduled posts using this media.
submittedPosts
Int
Number of submitted posts using this media.

Submission Types

SocialSubmissionResultType

Represents the result of a successful post submission to a social platform.

id
ID! required
Unique identifier for the submission result.
accountUsername
String
Username of the account that made the submission.
externalSubmissionId
String
Platform-specific ID for the submitted post.
url
String
Direct URL to view the submitted post.
dateSubmitted
DateTime
When the post was submitted to the platform.
likes
Int
Number of likes/upvotes received.
views
Int
Number of views the post has received.
comments
Int
Number of comments on the post.
status
String
Current status of the submission.

SocialSubmissionErrorType

Represents an error that occurred during post submission.

id
ID! required
Unique identifier for the submission error.
errorCode
String
Platform-specific error code.
message
String
Human-readable error message.
suggestedFix
String
Suggested solution to resolve the error.
pendingSubmissionId
String
ID of the original submission that failed.
dateFailed
DateTime
When the submission failed.
dateAcknowledged
DateTime
When the error was acknowledged by the user.

Timestamps

All entities include standard timestamp fields:

  • dateCreated - When the record was first created
  • dateUpdated - When the record was last modified
  • dateSubmitted - When an action was performed (for submissions)

Relationships

Types are interconnected through relationships:

  • Users belong to Accounts
  • Users have multiple SocialAccounts
  • Media can be used across multiple posts
  • Submissions are linked to specific SocialAccounts
When querying these types, use GraphQL fragments to reuse common field selections and keep your queries maintainable.
Some fields may be null depending on the platform or account type. Always handle potential null values in your client code.