Skip to content

Python SDK method reference ​

Every public method of the socifyr package, version 0.1.0. All methods return the data part of the API response as a plain dict or list. Keyword-only arguments are shown after *.

python
from socifyr import Socifyr
client = Socifyr(api_key="sk_...", workspace_id="ws_...")

Client ​

MemberSignatureNotes
constructorSocifyr(api_key=None, workspace_id=None, *, base_url=None, timeout=30.0)Raises ValueError without an API key. See configuration
usageusage() -> dictShortcut for workspaces.usage()
attributesuploads, workspaces, analytics, ai

How do I call the uploads methods? ​

MethodSignatureCalls
texttext(*, connections: list[str], text: str, scheduled_at: str | None = None, timezone: str | None = None, first_comment: str | dict | None = None, save_draft: bool | None = None) -> dictPOST /content/text
photosphotos(*, connections: list[str], medias: list[str], text: str | None = None, scheduled_at: str | None = None) -> dictPOST /content/photos
videovideo(*, connections: list[str], medias: list[str], text: str | None = None, scheduled_at: str | None = None) -> dictPOST /content/video
bulk_schedulebulk_schedule(*, rows: list[dict] | None = None, csv: str | None = None) -> dictPOST /content/bulk-schedule
get_statusget_status(request_id: str) -> dictGET /content/status?requestId=
listlist(**query) -> dictGET /content
getget(upload_id: str) -> dictGET /content/:id
retryretry(upload_id: str) -> dictPOST /content/:id/retry
publish_draftpublish_draft(upload_id: str) -> dictPOST /content/:id/publish

Behavior shared by text, photos and video: arguments set to None are omitted from the request, and the SDK always adds "async": true. medias entries are media library IDs or public URLs. Snake-case arguments are converted to the API's camelCase (scheduled_at becomes scheduledAt).

Ack example (non-draft):

python
{"success": True, "requestId": "9f2c7a1e-...", "usage": {"count": 4, "limit": 100, "remaining": 96},
 "message": "Upload processing started", "scheduledAt": None, "totalChannels": 2}

bulk_schedule returns {"created": int, "failed": [{"row": int, "error": str}]}. Row dicts use the API keys: text, connections, scheduledAt, optional title.

list(**query) forwards its keyword arguments as query parameters. Known keys: page, limit, status, platform, type, from, to. Use list(**{"from": "2026-11-01"}) for from. The response is {"data": [...], "meta": {"total", "page", "limit", "totalPages"}}.

Runnable example:

python
ack = client.uploads.text(connections=["x-myhandle"], text="Hello")
status = client.uploads.get_status(ack["requestId"])
print(status["status"], status["uploadId"])

Details: Uploads.

How do I call the workspaces methods? ​

MethodSignatureCalls
list_connectionslist_connections(workspace_id: str) -> list[dict]GET /workspaces/:id/connections
refresh_connectionrefresh_connection(workspace_id: str, connection: str) -> dictPOST /workspaces/:id/connections/:connection/refresh
reconnect_linkreconnect_link(connection: str) -> dictPOST /oauth/connections/:connection/reconnect-link
usageusage() -> dictGET /usage

refresh_connection returns id, slug, platform, expiresAt, lastRefreshedAt, status, canRefresh. reconnect_link returns url, expiresIn (seconds), platform, slug. Path values are inserted without URL encoding, so pass slugs and IDs as-is. Details: Workspaces.

How do I call the analytics methods? ​

MethodSignatureCalls
getget(**query) -> dictGET /analytics
get_postget_post(upload_id: str) -> dictGET /analytics/post/:id
syncsync() -> dictPOST /analytics/sync
followersfollowers(*, period=None, from_date=None, to_date=None, connection=None, platform=None) -> dictGET /analytics/followers
accountsaccounts(*, period=None, from_date=None, to_date=None, connection=None, platform=None) -> dictGET /analytics/accounts

from_date and to_date are sent as from and to. Details: Analytics.

How do I call the AI methods? ​

MethodSignatureCalls
generate_captiongenerate_caption(*, upload_type: str, platforms: list[str], text: str | None = None, title: str | None = None, description: str | None = None, tone: str | None = None) -> dictPOST /ai/generate-content
suggest_hashtagssuggest_hashtags(*, text: str, platforms: list[str], count: int | None = None) -> dictPOST /ai/suggest-hashtags

upload_type is video, photo, text or document. platforms are platform names such as instagram, not slugs. tone is professional, casual, humorous, inspirational or informative. Requires an AI key on the workspace, otherwise the API returns 503.

python
res = client.ai.generate_caption(upload_type="text", platforms=["x", "linkedin"], text="We shipped v2", tone="casual")
print(res["content"]["x"])  # {"content": {platform: caption}}

tags = client.ai.suggest_hashtags(text="Launching our SDK", platforms=["instagram"], count=10)
# [{"platform": "instagram", "hashtags": [...]}]

The return annotation says dict, but the API returns a list for hashtags, as in the TypeScript SDK. Treat the value as a list of {platform, hashtags}.

How do I verify a webhook? ​

FunctionSignature
verify_webhook_signatureverify_webhook_signature(payload: str | bytes, signature: str, secret: str) -> bool

See Webhooks.

Exceptions ​

SocifyrError(message, status=None), ValidationError (400), AuthenticationError (401, 403), UsageLimitError (402), NotFoundError (404), RateLimitError (429). See Errors.

FAQ ​

Are the return values typed? ​

No. They are dict and list. Use the TypeScript SDK types or the REST API reference for field lists.

Is there a method for X? ​

If it is not in the tables above, it does not exist in the Python SDK. See the parity table.

Next steps ​