api

v0.2.1
com.politicalcomms/api Checked 1 day ago Published 4 months ago

Compliant political SMS/MMS from MCP clients: projects, contacts, analytics, billing.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_organizations

List all organizations visible to the API key, including their status and parent organization. Also useful as a credential check.

get_hierarchy

Get the full organization hierarchy tree visible to the API key, including nested child organizations and their brands.

ParameterTypeDescription
organization_idstringFilter to a specific descendant organization

list_projects

List messaging projects (a project is one composed send: message text, sending numbers, and contact lists). Optionally filter by organization, brand, or campaign.

ParameterTypeDescription
brand_idstringFilter to a specific brand
campaign_idstringFilter to a specific campaign
organization_idstringFilter to a specific descendant organization

get_project

Get one project by ID with its full configuration: status, channel, message text, phone numbers, contact lists, link tracking settings, and schedule.

ParameterTypeDescription
id *stringResource ID

get_project_stats

Get delivery and engagement stats for one project: sent, delivered, undeliverable, replies, opt outs, clicks, and the derived rates.

ParameterTypeDescription
id *stringResource ID

list_contact_lists

List contact lists with their contact counts and import status. Optionally filter by organization or brand.

ParameterTypeDescription
brand_idstringFilter to a specific brand
organization_idstringFilter to a specific descendant organization

get_contact_list

Get one contact list by ID, including import progress and list analysis results when available.

ParameterTypeDescription
id *stringResource ID

get_message_stats

Get aggregate message stats (totals and daily breakdown) for a date range, optionally filtered by organization, brand, or campaign.

ParameterTypeDescription
end_date *stringEnd date in YYYY-MM-DD format
start_date *stringStart date in YYYY-MM-DD format
brand_idstringFilter to a specific brand
campaign_idstringFilter to a specific campaign
organization_idstringFilter to a specific descendant organization

get_ledger_usage

Get billing usage totals and per-category breakdown from the ledger for a date range, optionally filtered to a descendant organization.

ParameterTypeDescription
end_date *stringEnd date in YYYY-MM-DD format
start_date *stringStart date in YYYY-MM-DD format
organization_idstringFilter to a specific descendant organization

create_project

Create a new messaging project (a draft send). Requires the owning organization, a name, protocol (sms or mms), sending phone number IDs, contact list IDs, and the message text. For channel=10dlc also pass brand_id and campaign_id; for channel=toll-free pass toll_free_verification_id. Creating a project does not send messages by itself.

ParameterTypeDescription
confirm *booleanMust be true to run this write operation. Set it only after the user has explicitly confirmed.
contact_list_ids *arrayContact list IDs to send to
message_text *stringThe message body to send
name *stringProject name
organization_id *stringOwning organization ID
phone_number_ids *arraySending phone number IDs (1-49)
protocol *stringMessage protocol
brand_idstringRequired when channel=10dlc
campaign_idstringRequired when channel=10dlc
channelstringMessaging channel. Defaults to 10dlc.
link_tracking_destination_urlstringDestination URL for tracked links
link_tracking_domain_idstringTracking domain ID
link_tracking_enabledbooleanEnable link tracking
link_tracking_param_fieldstringContact field appended as a redirect query param on tracking links
media_idsarrayMedia file IDs for MMS
suppression_list_idsarrayContact list IDs to suppress
toll_free_verification_idstringRequired when channel=toll-free

test_project

Send real test messages for a project to up to 50 explicit phone numbers. This delivers actual SMS or MMS to those recipients and incurs cost.

ParameterTypeDescription
confirm *booleanMust be true to run this write operation. Set it only after the user has explicitly confirmed.
id *stringResource ID
phones *arrayRecipient phone numbers for the test send

schedule_project

Schedule a project to send to its full contact lists at a specific date and time. This commits a real bulk send to every contact on the lists once the scheduled time arrives.

ParameterTypeDescription
confirm *booleanMust be true to run this write operation. Set it only after the user has explicitly confirmed.
id *stringResource ID
scheduled_at *stringISO 8601 date-time at which to send
scheduled_timezone *stringIANA timezone name, for example America/New_York

unschedule_project

Remove the schedule from a project so it will not send. Safe to call repeatedly; the project returns to an unscheduled state.

ParameterTypeDescription
id *stringResource ID

copy_project

Copy an existing project into a new draft. The copy keeps the message, phone numbers, and settings but drops contact lists, schedule, and stats, and gets a versioned name (X becomes X_v2). Copying never sends messages.

ParameterTypeDescription
project_id *stringID of the project to copy

archive_project

Archive a completed project so it no longer appears in default project listings. Only projects in completed status can be archived; other statuses are rejected with INVALID_STATE_TRANSITION.

ParameterTypeDescription
project_id *stringID of the project to archive