# Sapt > The Sapt platform API — publish and schedule social content, manage CRM records, run ads, and read attribution. - [Sapt API](https://docs.sapt.ai/docs/mintlify/guides/introduction.md): One API for organic social publishing, ads, CRM, and attribution. - [How Sapt works](https://docs.sapt.ai/docs/mintlify/platform/how-it-works.md): Connect your ad accounts, Sapt builds one shared memory and fixes the signal, and your team and AI run ads from it — the whole model in one picture. - [Quickstart](https://docs.sapt.ai/docs/mintlify/guides/quickstart.md): Schedule your first post in four calls. - [Authentication](https://docs.sapt.ai/docs/mintlify/guides/authentication.md): API keys, OAuth, and connector sign-in. - [Errors](https://docs.sapt.ai/docs/mintlify/guides/errors.md): The error envelope and what each code means. - [Sapt Documentation](https://docs.sapt.ai/docs/mintlify/platform/overview.md): Sapt is the system behind your Meta and Google ads — one shared memory of every brand, campaign, and result, plus the tracking and analytics that show what works after the click. - [Memory](https://docs.sapt.ai/docs/mintlify/platform/memory.md): One shared memory of every brand, campaign, and result — so your team and your AI run ads from context instead of starting from scratch every time. - [CRM](https://docs.sapt.ai/docs/mintlify/platform/crm.md): People, companies, lists, and pipeline — where your ad leads land, get qualified, and get followed up. - [CMS](https://docs.sapt.ai/docs/mintlify/platform/cms.md): Content, pages, and bottom-funnel assets — the landing experiences your ads point to, managed in the same place as everything else. - [Ads](https://docs.sapt.ai/docs/mintlify/platform/ads.md): Run your Meta and Google ads on better signal — pixel and conversion tracking, after-the-click analytics, cross-channel attribution, and AI that helps you operate the accounts. - [Integrations](https://docs.sapt.ai/docs/mintlify/platform/integrations.md): Connect Meta, Google Ads, Google Business Profile, email, SMS, and more — the outside tools Sapt reads from and acts through. - [Workflows](https://docs.sapt.ai/docs/mintlify/platform/workflows.md): Turn repeatable account work — lead follow-up, review replies, reporting — into automation that still keeps a human in the loop. - [Starter website](https://docs.sapt.ai/docs/mintlify/platform/starter-website.md): Clone a ready-made Next.js site that's already wired into Sapt — analytics, lead capture, and a booking funnel work from a single Project ID. - [Billing & projects](https://docs.sapt.ai/docs/mintlify/platform/billing.md): How billing maps to your project structure — one paying parent project, with sub-projects that share its plan and credit pool, so you manage billing from a single account. - [Social publishing](https://docs.sapt.ai/docs/mintlify/social/overview.md): Schedule and publish organic posts across every connected platform. - [Connected accounts](https://docs.sapt.ai/docs/mintlify/social/accounts.md): Find the socialAccountId that every posting call needs. - [Uploading media](https://docs.sapt.ai/docs/mintlify/social/media.md): Stream large files, or inline small ones as base64. - [Scheduling posts](https://docs.sapt.ai/docs/mintlify/social/scheduling.md): Put a post on the calendar, then edit, move or cancel it. - [Publishing now](https://docs.sapt.ai/docs/mintlify/social/publishing.md): Publish immediately, track delivery, and retry a failure. - [Comments and engagement](https://docs.sapt.ai/docs/mintlify/social/engagement.md): Read and moderate comments, and act as the account on published posts. - [Endpoint index](https://docs.sapt.ai/docs/mintlify/social/endpoint-index.md): Every organic social endpoint on the public API, generated from the live OpenAPI document. - [First-party analytics](https://docs.sapt.ai/docs/mintlify/analytics/overview.md): Serve Sapt analytics from your own domain — more accurate data, harder to block, and a visitor ID you can join to your CRM. - [Visitors & identity resolution](https://docs.sapt.ai/docs/mintlify/analytics/visitors.md): See every visitor on your site — anonymous, identified, or contact — follow their full event timeline, and turn an identified visitor into a CRM contact with their entire prior history attached. - [Attribution analytics](https://docs.sapt.ai/docs/mintlify/analytics/attribution.md): First-touch acquisition, per-event UTM breakdowns, a pageview-to-lead conversion funnel, and conversions by source, campaign, and landing page — so you can see what actually brings in leads. - [Server-side conversions](https://docs.sapt.ai/docs/mintlify/analytics/conversions.md): Upload the leads and purchases you measure straight to Meta and Google Ads server-side — recovering attribution the browser loses and feeding Smart Bidding. Includes the new Google Ads CAPI. - [Attribution MCP](https://docs.sapt.ai/docs/mintlify/analytics/attribution-mcp.md): A dedicated MCP connector for agent-driven attribution — query who's been on your site, follow their journeys, read acquisition and conversion analytics, and act on it (link a visitor to a contact, configure Google conversions). - [API Overview](https://docs.sapt.ai/docs/mintlify/api/overview.md): Base URL, authentication, error handling, and conventions for the Sapt REST API. - [Connecting integrations](https://docs.sapt.ai/docs/mintlify/api/connect-integrations.md): Programmatically generate an OAuth connect link for Meta, Gmail, Google Business Profile, and more — and hand it to your client during onboarding. - [Server-side conversions (CAPI)](https://docs.sapt.ai/docs/mintlify/api/conversions.md): Send conversions to Meta's Conversions API server-side through Sapt, or connect a pixel-scoped CAPI token for your own integration. - [Building a client onboarding funnel](https://docs.sapt.ai/docs/mintlify/api/onboarding-funnels.md): Create a configured client project, connect the client's integrations, and hand off an embeddable invite link — all over the REST API, with no Sapt emails in the loop. - [Project templates & the bundle](https://docs.sapt.ai/docs/mintlify/api/project-templates.md): What lives inside a project template's bundle — the portable config that gets stamped onto a new client project — plus the snapshot, apply, and load endpoints. - [MCP Overview](https://docs.sapt.ai/docs/mintlify/mcp/overview.md): Connect Claude, ChatGPT, and other AI clients to Sapt through one MCP connector. - [Connect Claude or ChatGPT](https://docs.sapt.ai/docs/mintlify/mcp/connect.md): Add Sapt as an MCP connector and start asking it about your workspace. - [Sapt Connector](https://docs.sapt.ai/docs/mintlify/mcp/sapt.md): The single-URL consumer connector — shared AI memory and tools across every Sapt Project. - [Leads Tools](https://docs.sapt.ai/docs/mintlify/mcp/leads.md): Lead generation, competitive intelligence, and outreach via Reddit, Apollo, and Instantly. - [Meta/Social Tools](https://docs.sapt.ai/docs/mintlify/mcp/meta-ads.md): Social media command center for Facebook, Instagram, Threads, and Meta Ads. - [GBP Tools](https://docs.sapt.ai/docs/mintlify/mcp/gbp.md): Google Business Profile management — locations, reviews, and business hours. - [List agents](https://docs.sapt.ai/api-reference/agents/list-agents.md): List all agent definitions for a project - [Create agent](https://docs.sapt.ai/api-reference/agents/create-agent.md): Create a custom agent definition for a project - [Get agent](https://docs.sapt.ai/api-reference/agents/get-agent.md): Get a single agent definition by ID - [Update agent](https://docs.sapt.ai/api-reference/agents/update-agent.md): Update an existing agent definition - [Delete agent](https://docs.sapt.ai/api-reference/agents/delete-agent.md): Delete a custom agent definition. Built-in agents cannot be deleted. - [Get current identity](https://docs.sapt.ai/api-reference/auth/get-current-identity.md): Returns the resolved identity for the current credentials, including permissions and API key scope. - [Check whether the current identity has a project permission](https://docs.sapt.ai/api-reference/auth/check-whether-the-current-identity-has-a-project-permission.md): Debug endpoint. Resolves the caller identity and returns whether it holds the given project-scoped permission. - [Get CMS config](https://docs.sapt.ai/api-reference/cms/get-cms-config.md): Get CMS configuration including asset base URL - [List content items](https://docs.sapt.ai/api-reference/cms/list-content-items.md): List content items of a specific content type - [Get content item](https://docs.sapt.ai/api-reference/cms/get-content-item.md): Get a single content item by slug - [Request presigned asset upload URLs](https://docs.sapt.ai/api-reference/assets/request-presigned-asset-upload-urls.md): REST mirror of the assets.getUploadUrls tRPC procedure (for OAuth/REST clients). - [Record uploaded assets](https://docs.sapt.ai/api-reference/assets/record-uploaded-assets.md): REST mirror of the assets.recordUploads tRPC procedure. - [List memory entries](https://docs.sapt.ai/api-reference/memory/list-memory-entries.md): List all memory entries for a project. Returns summary data — fetch individual entries to get content. - [Create memory entry](https://docs.sapt.ai/api-reference/memory/create-memory-entry.md): Create a new memory entry for a project - [Get memory entry](https://docs.sapt.ai/api-reference/memory/get-memory-entry.md): Get a memory entry by slug including full content. Slugs may contain "/" for hierarchical paths (e.g., competitors/acme). - [Delete memory entry](https://docs.sapt.ai/api-reference/memory/delete-memory-entry.md): Delete a memory entry by slug. Slugs may contain "/" for hierarchical paths. - [Update memory entry](https://docs.sapt.ai/api-reference/memory/update-memory-entry.md): Update an existing memory entry by slug. Only provided fields are updated. Slugs may contain "/" for hierarchical paths. - [Approve pending action](https://docs.sapt.ai/api-reference/actions/approve-pending-action.md): Approve a pending action. The action handler is executed immediately with the approver's identity. - [Reject pending action](https://docs.sapt.ai/api-reference/actions/reject-pending-action.md): Reject a pending action. The action will not be executed. - [List schedules](https://docs.sapt.ai/api-reference/schedules/list-schedules.md): List scheduled executions for a project. - [Get schedule](https://docs.sapt.ai/api-reference/schedules/get-schedule.md): Get a single scheduled execution by ID. - [Delete schedule](https://docs.sapt.ai/api-reference/schedules/delete-schedule.md): Delete a scheduled execution and all its run history. - [Update schedule](https://docs.sapt.ai/api-reference/schedules/update-schedule.md): Update a scheduled execution. Only provided fields are updated. - [Pause schedule](https://docs.sapt.ai/api-reference/schedules/pause-schedule.md): Pause an active scheduled execution. - [Resume schedule](https://docs.sapt.ai/api-reference/schedules/resume-schedule.md): Resume a paused scheduled execution. - [List schedule runs](https://docs.sapt.ai/api-reference/schedules/list-schedule-runs.md): List run history for a scheduled execution. - [Get contract by ID](https://docs.sapt.ai/api-reference/contracts/get-contract-by-id.md): Retrieve a service contract by its unique ID (public, no auth required) - [Sign a contract](https://docs.sapt.ai/api-reference/contracts/sign-a-contract.md): Sign a service contract with an e-signature (public, no auth required) - [Submit contact form (unauthenticated)](https://docs.sapt.ai/api-reference/emails/submit-contact-form-unauthenticated.md): Public endpoint for contact form submissions. No authentication required. Rate limited by IP address (3/hour, 10/day). Email is sent to configured recipient addresses only. - [Send bulk email (batch send to multiple recipients)](https://docs.sapt.ai/api-reference/emails/send-bulk-email-batch-send-to-multiple-recipients.md): Queue a bulk email send to multiple recipients. The email will be processed in the background and sent to all recipients with the same content. All sends are tracked individually in the email log. - [Get bulk send status](https://docs.sapt.ai/api-reference/emails/get-bulk-send-status.md): Check the status and progress of a bulk email send operation. - [Send email via AWS SES](https://docs.sapt.ai/api-reference/emails/send-email-via-aws-ses.md): Send transactional emails with automatic tracking. All emails are tracked in the Sapt admin dashboard with delivery, open, and click tracking. - [Queue batch email send](https://docs.sapt.ai/api-reference/emails/queue-batch-email-send.md): Queue a batch email send for asynchronous processing via Cloudflare Queue. Supports template-based emails with parameter substitution. Requires X-App-Key header for authentication. - [Create invitation](https://docs.sapt.ai/api-reference/invitations/create-invitation.md): Invite a user to the platform or to a specific project. Platform admins can invite to any role and any project. Project admins can invite to their projects. The role the inviter can assign depends on their own role. - [Create project invitation](https://docs.sapt.ai/api-reference/invitations/create-project-invitation.md): Invite a user to a project. By default the invitee is emailed an acceptance link and also sees the invitation in their Sapt dashboard on next sign-in. Pass `sendEmail: false` to suppress that email and receive the `acceptUrl` in the response instead — for callers that deliver the accept link themsel… - [List user projects](https://docs.sapt.ai/api-reference/projects/list-user-projects.md): Get all projects the authenticated user is an explicit member of. Platform admins see only their own memberships through this endpoint; the customer dashboard surfaces the admin cross-tenant view via its own internal tRPC endpoint, not the public REST API. - [Create a project](https://docs.sapt.ai/api-reference/projects/create-a-project.md): Create a new project with optional initial configuration. - [List all projects (admin)](https://docs.sapt.ai/api-reference/projects/list-all-projects-admin.md): Cross-tenant listing of every project in the system. Platform-admin only — returns 403 for any other identity. Intended for staff scripts and admin tooling; customer-facing surfaces should use `GET /api/projects`. - [Get project by ID](https://docs.sapt.ai/api-reference/projects/get-project-by-id.md): Get details of a specific project - [Delete project](https://docs.sapt.ai/api-reference/projects/delete-project.md): Delete a project. - [Update project](https://docs.sapt.ai/api-reference/projects/update-project.md): Update project details. Requires project write permission. - [Get project members](https://docs.sapt.ai/api-reference/projects/get-project-members.md): Get all members of a project - [Get user membership](https://docs.sapt.ai/api-reference/projects/get-user-membership.md): Get the authenticated user's membership details for a project - [Get caller's project membership](https://docs.sapt.ai/api-reference/projects/get-callers-project-membership.md): Get the authenticated caller's membership details for a project. Gated by membership — no project permission required. Reachable under OAuth authentication. - [Get project branding](https://docs.sapt.ai/api-reference/projects/get-project-branding.md): Get the public branding subset for a project — name, tagline, colors, primary logo, and font style. Intended for OAuth clients rendering a customer-facing UI on the project owner's behalf (e.g. a hosted onboarding questionnaire themed in the agency's brand). - [List sub-projects](https://docs.sapt.ai/api-reference/projects/list-sub-projects.md): List the sub-projects of `projectId`. Returns `[]` when called on a sub-project (single-level hierarchy). Gated by `sub_projects:read` on the parent. - [Create a sub-project](https://docs.sapt.ai/api-reference/projects/create-a-sub-project.md): Create a sub-project under `projectId`. Sugar over `POST /projects` with `parentProjectId` pre-filled — same shape, minus plan/billing fields. The caller must hold `sub_projects:write` on `projectId`. - [List integrations](https://docs.sapt.ai/api-reference/integrations/list-integrations.md): List every known integration provider and its connection status for this project. - [Connect an API-key integration](https://docs.sapt.ai/api-reference/integrations/connect-an-api-key-integration.md): Connect an API-key-scheme integration by submitting credentials. OAuth providers reject this call — use POST /connect-sessions instead. - [Get integration](https://docs.sapt.ai/api-reference/integrations/get-integration.md): Get a single integration's connection status. `integrationId` is the provider id. - [Disconnect integration](https://docs.sapt.ai/api-reference/integrations/disconnect-integration.md): Disconnect an integration. `integrationId` is the provider id. - [Create an OAuth connect session](https://docs.sapt.ai/api-reference/integrations/create-an-oauth-connect-session.md): Mint a one-time URL that initiates OAuth for an integration provider. The OAuth flow terminates on a Sapt-hosted result page; poll GET /projects/{projectId}/connect-sessions/{token} for completion. - [Get connect session status](https://docs.sapt.ai/api-reference/integrations/get-connect-session-status.md): Poll for the status of an OAuth connect session created for this project. - [Get a Close lead journey](https://docs.sapt.ai/api-reference/integrations/get-a-close-lead-journey.md): Return the Sapt web journey for one native Close lead without importing it into Sapt CRM. Sapt reads the lead from the project Close connection, then resolves every tracked browser by exact Close id, normalized email/phone, or a single-candidate fbclid. A valid lead with no tracked visit returns `ma… - [Begin an OAuth integration connection](https://docs.sapt.ai/api-reference/integrations/begin-an-oauth-integration-connection.md): Deprecated — use POST /projects/{projectId}/connect-sessions. This legacy route remains for existing callers. - [List Meta pixels](https://docs.sapt.ai/api-reference/conversions/list-meta-pixels.md): Enumerate every Meta Pixel discoverable through the project’s connected Meta account. Requires Meta connected with ads permissions; returns an empty list otherwise. - [Get connected CAPI pixel](https://docs.sapt.ai/api-reference/conversions/get-connected-capi-pixel.md): Return the project’s connected Meta Pixel + Conversions API token source. The access token itself is never returned. - [Connect or update the CAPI pixel](https://docs.sapt.ai/api-reference/conversions/connect-or-update-the-capi-pixel.md): Pin a Meta Pixel for server-side Conversions API. Provide `accessToken` for a pixel-scoped token generated in Events Manager, or set `useOauthToken: true` to source the token from the project’s Meta OAuth connection. - [Disconnect the CAPI pixel](https://docs.sapt.ai/api-reference/conversions/disconnect-the-capi-pixel.md): Remove the project’s Meta Pixel CAPI credential. Server-side conversions stop being delivered. Idempotent. - [Send a server-side conversion](https://docs.sapt.ai/api-reference/conversions/send-a-server-side-conversion.md): Send a conversion to Meta’s Conversions API server-side. Customer data is hashed before delivery. Returns the `eventId` used — send the same id from your browser pixel to dedupe. A CAPI pixel must be connected first. - [Send a CAPI test event](https://docs.sapt.ai/api-reference/conversions/send-a-capi-test-event.md): Fire a synthetic conversion to verify the pixel + CAPI credential end-to-end. Watch for it in Meta’s Events Manager Test Events tab. - [List object types](https://docs.sapt.ai/api-reference/crm/list-object-types.md): List the CRM object types defined for this project, including spine-linking metadata such as linksToPerson and identityFields. - [Create object type](https://docs.sapt.ai/api-reference/crm/create-object-type.md): Create a new CRM object type in this project. Set linksToPerson for types that capture human identity or engagement so records attach to the Person spine. - [Get object type](https://docs.sapt.ai/api-reference/crm/get-object-type.md): Get a single CRM object type by slug. - [Delete object type](https://docs.sapt.ai/api-reference/crm/delete-object-type.md): Delete a CRM object type. When records exist and `force=true` is not set, the call is a dry run that returns the affected record count without deleting. - [Update object type](https://docs.sapt.ai/api-reference/crm/update-object-type.md): Partially update a CRM object type, including schema fields and spine-linking behavior such as linksToPerson and identityFields. - [List object records](https://docs.sapt.ai/api-reference/crm/list-object-records.md): List records of a given object type. Records may include personRefId, the Person spine join key for human attribution. - [Create object record](https://docs.sapt.ai/api-reference/crm/create-object-record.md): Create a new record of the given object type. If the type has linksToPerson enabled and the payload carries matching identity, the service auto-attaches or creates a Person and returns personRefId. - [Bulk-upsert object records](https://docs.sapt.ai/api-reference/crm/bulk-upsert-object-records.md): Idempotent bulk upsert keyed on `providerExternalId`. Each row is independent — a single bad row reports its error in the result and does not abort the batch. Used by external importers (CRM migrations, sync jobs) that re-run safely. - [Get a provider record journey](https://docs.sapt.ai/api-reference/crm/get-a-provider-record-journey.md): Resolve a typed CRM record by providerExternalId and return its paginated cross-channel journey with first-touch and last-touch attribution. For a cloned Close lead, use `typeSlug=person` and `providerExternalId=close:lead:`. Authenticate with `Authorization: ApiKey ` using a project s… - [Get object record](https://docs.sapt.ai/api-reference/crm/get-object-record.md): Get a single object record by id. - [Delete object record](https://docs.sapt.ai/api-reference/crm/delete-object-record.md): Hard-delete an object record. Cascades to edges via FK. - [Update object record](https://docs.sapt.ai/api-reference/crm/update-object-record.md): Partially update an object record. `data` is a partial merge — pass `null` for a key to delete it. Optional `expectedData` (JSONB containment) and `expectedStatus` fields make the write conditional; a stale precondition returns 409 without changing the record. Person-linked types may refresh personR… - [List open slots](https://docs.sapt.ai/api-reference/calendar/list-open-slots.md): List open slots for an event type on the connected calendar provider within [start, end]. - [Hold a slot](https://docs.sapt.ai/api-reference/calendar/hold-a-slot.md): Temporarily hold a slot so a concurrent visitor cannot grab it while the caller finishes a booking flow. - [Release a slot](https://docs.sapt.ai/api-reference/calendar/release-a-slot.md): Release a previously-held slot before its TTL expires so other visitors can book it. - [Create a booking](https://docs.sapt.ai/api-reference/calendar/create-a-booking.md): Create a booking for an event type at a specific start time. Persists on the connected calendar provider and emits a `calendar.booking.created` audit event. - [Get a booking](https://docs.sapt.ai/api-reference/calendar/get-a-booking.md): Fetch a single booking by its uid on the connected calendar provider. - [Reschedule a booking](https://docs.sapt.ai/api-reference/calendar/reschedule-a-booking.md): Reschedule an existing booking to a new start time. Cal.com creates a new booking linked to the original; the response carries the new `bookingUid`. - [Cancel a booking](https://docs.sapt.ai/api-reference/calendar/cancel-a-booking.md): Cancel an existing booking. Pass `seatUid` to cancel a single seat on a seated booking; omit it to cancel the whole booking. - [Google Calendar busy intervals](https://docs.sapt.ai/api-reference/calendar/google-calendar-busy-intervals.md): List busy intervals on the connected Google Calendar within [timeMin, timeMax). Use it to hide taken slots when rendering availability. - [Create a Google Calendar booking](https://docs.sapt.ai/api-reference/calendar/create-a-google-calendar-booking.md): Write a booking event onto the connected Google Calendar (primary by default). Sends a real Google invite when an attendee email is supplied, and re-checks freeBusy — returning 409 if the slot was taken. Requires the connection to have granted the calendar.events write scope. - [Delete a Google Calendar event](https://docs.sapt.ai/api-reference/calendar/delete-a-google-calendar-event.md): Delete an event from the connected Google Calendar. Idempotent — deleting an already-gone event still succeeds. Emails attendees a cancellation unless `notifyAttendees=false`. - [Reschedule/update a Google Calendar event](https://docs.sapt.ai/api-reference/calendar/rescheduleupdate-a-google-calendar-event.md): Patch an event on the connected Google Calendar — move its start/end (reschedule) and/or change title/description. Re-notifies attendees unless `notifyAttendees: false`. - [List event types](https://docs.sapt.ai/api-reference/calendar/list-event-types.md): List the bookable event types available on the connected calendar provider. Use the returned `id` as the `eventTypeId` argument for `slots`, `reservations`, and `bookings`. - [Create an event type](https://docs.sapt.ai/api-reference/calendar/create-an-event-type.md): Create a new bookable event type. Use `locations` to set Zoom/Meet/in-person/custom-link, `beforeEventBuffer`/`afterEventBuffer` for buffer time, `bookingFields` to add intake questions, and `scheduleId` to bind to a specific availability schedule. Emits `calendar.event_type.created`. - [Get an event type](https://docs.sapt.ai/api-reference/calendar/get-an-event-type.md): Fetch the full configuration of a single event type — duration, locations, buffers, intake fields, and the schedule it references. - [Delete an event type](https://docs.sapt.ai/api-reference/calendar/delete-an-event-type.md): Delete an event type. Existing bookings made against it remain. Emits `calendar.event_type.deleted`. - [Update an event type](https://docs.sapt.ai/api-reference/calendar/update-an-event-type.md): Partially update an event type. Any field omitted is left unchanged. Emits `calendar.event_type.updated`. - [List schedules](https://docs.sapt.ai/api-reference/calendar/list-schedules.md): List the availability schedules on the connected calendar provider. Each schedule defines a timezone and the weekly windows the user is bookable. - [Create a schedule](https://docs.sapt.ai/api-reference/calendar/create-a-schedule.md): Create a new availability schedule. `timeZone` controls how `availability`/`overrides` times are interpreted. Setting `isDefault: true` makes any event type without an explicit `scheduleId` use this schedule. Emits `calendar.schedule.created`. - [Get a schedule](https://docs.sapt.ai/api-reference/calendar/get-a-schedule.md): Fetch a single availability schedule by id. - [Delete a schedule](https://docs.sapt.ai/api-reference/calendar/delete-a-schedule.md): Delete an availability schedule. Event types bound to it via `scheduleId` fall back to the default schedule. Emits `calendar.schedule.deleted`. - [Update a schedule](https://docs.sapt.ai/api-reference/calendar/update-a-schedule.md): Partially update a schedule. Any field omitted is left unchanged; arrays passed replace the prior value wholesale. Emits `calendar.schedule.updated`. - [List connected Google Ads customers](https://docs.sapt.ai/api-reference/google-ads/list-connected-google-ads-customers.md) - [Create Google Ads client account](https://docs.sapt.ai/api-reference/google-ads/create-google-ads-client-account.md): Create a client account under a connected Google Ads manager account and store it as an integration account. - [List Google Ads campaigns](https://docs.sapt.ai/api-reference/google-ads/list-google-ads-campaigns.md) - [Get Google Ads campaign performance](https://docs.sapt.ai/api-reference/google-ads/get-google-ads-campaign-performance.md) - [Get Google Ads campaign health](https://docs.sapt.ai/api-reference/google-ads/get-google-ads-campaign-health.md): Derive per-campaign health (live/limited/needs_action/pending_google/off/ended) from serving status, primary status reasons, disapproved ads, and impression-share loss. - [Get Google Ads account health](https://docs.sapt.ai/api-reference/google-ads/get-google-ads-account-health.md): Derive account-level health from account status, billing status, conversion tracking, and a rollup of campaign health states. - [Update Google Ads campaign status](https://docs.sapt.ai/api-reference/google-ads/update-google-ads-campaign-status.md): Pause or enable a connected Google Ads campaign. Use validateOnly=true to test the mutation without applying it. - [Update Google Ads campaign](https://docs.sapt.ai/api-reference/google-ads/update-google-ads-campaign.md): Update a campaign's name, status, budget, bidding strategy, network settings, and/or schedule. All fields are optional — only provided fields are changed. Use validateOnly=true to test the payload without applying it. - [List Google Ads ad groups for a campaign](https://docs.sapt.ai/api-reference/google-ads/list-google-ads-ad-groups-for-a-campaign.md) - [Create Google Ads ad group](https://docs.sapt.ai/api-reference/google-ads/create-google-ads-ad-group.md): Create a standard Search ad group under an existing campaign. Use validateOnly=true to test the payload without applying it. - [List Google Ads ads for an ad group](https://docs.sapt.ai/api-reference/google-ads/list-google-ads-ads-for-an-ad-group.md) - [Create Responsive Search Ad in ad group](https://docs.sapt.ai/api-reference/google-ads/create-responsive-search-ad-in-ad-group.md): Create a new Responsive Search Ad in an ad group. If adResourceNameToRemove is provided, the existing ad is removed in the same mutate call. Use validateOnly=true to test the payload without applying it. - [Remove Google Ads ad](https://docs.sapt.ai/api-reference/google-ads/remove-google-ads-ad.md): Remove a single ad group ad by its resource name. - [List Google Ads keywords for an ad group](https://docs.sapt.ai/api-reference/google-ads/list-google-ads-keywords-for-an-ad-group.md) - [Add keywords to Google Ads ad group](https://docs.sapt.ai/api-reference/google-ads/add-keywords-to-google-ads-ad-group.md): Add one or more keywords to an ad group. Uses partialFailure so invalid keywords do not fail the batch. Returns per-row outcomes. - [Remove Google Ads keyword](https://docs.sapt.ai/api-reference/google-ads/remove-google-ads-keyword.md): Remove a single keyword (adGroupCriterion) from an ad group by its full resource name. - [List Google Ads campaign criteria](https://docs.sapt.ai/api-reference/google-ads/list-google-ads-campaign-criteria.md) - [Add criteria to Google Ads campaign](https://docs.sapt.ai/api-reference/google-ads/add-criteria-to-google-ads-campaign.md): Add geo-target locations, language targets, and/or negative keywords to a campaign. Use validateOnly=true to test the payload without applying it. - [Remove Google Ads campaign criterion](https://docs.sapt.ai/api-reference/google-ads/remove-google-ads-campaign-criterion.md): Remove a single campaign criterion (location, language, or negative keyword) by its full resource name. - [List Google Ads search terms for a customer](https://docs.sapt.ai/api-reference/google-ads/list-google-ads-search-terms-for-a-customer.md) - [List Google Ads conversion actions](https://docs.sapt.ai/api-reference/google-ads/list-google-ads-conversion-actions.md) - [Create Google Ads conversion action](https://docs.sapt.ai/api-reference/google-ads/create-google-ads-conversion-action.md): Create a conversion action on the customer. Smart Bidding cannot run without an enabled conversion action, and server-side uploads need an UPLOAD_CLICKS action to target. Use validateOnly=true to test the payload without applying it. - [Get Google Ads ad group performance](https://docs.sapt.ai/api-reference/google-ads/get-google-ads-ad-group-performance.md) - [Get Google Ads keyword performance](https://docs.sapt.ai/api-reference/google-ads/get-google-ads-keyword-performance.md) - [Get Google Ads ad performance](https://docs.sapt.ai/api-reference/google-ads/get-google-ads-ad-performance.md) - [Get Google Ads campaign time-series performance](https://docs.sapt.ai/api-reference/google-ads/get-google-ads-campaign-time-series-performance.md) - [Get Google Ads device performance breakdown](https://docs.sapt.ai/api-reference/google-ads/get-google-ads-device-performance-breakdown.md) - [Generate Google Ads keyword ideas](https://docs.sapt.ai/api-reference/google-ads/generate-google-ads-keyword-ideas.md) - [Suggest Google Ads geo targets](https://docs.sapt.ai/api-reference/google-ads/suggest-google-ads-geo-targets.md) - [Create Google Ads Search campaign](https://docs.sapt.ai/api-reference/google-ads/create-google-ads-search-campaign.md): Atomically create a full Search campaign (budget, campaign, criteria, ad group, RSA, keywords) in one mutate call. Use validateOnly=true to test the payload without applying it. - [Update Google Ads ad group](https://docs.sapt.ai/api-reference/google-ads/update-google-ads-ad-group.md): Update an ad group's name, status, and/or CPC bid. All fields are optional — only provided fields are changed. Use validateOnly=true to test the payload without applying it. - [Get a campaign’s targeted locations resolved to coordinates](https://docs.sapt.ai/api-reference/google-ads/get-a-campaign’s-targeted-locations-resolved-to-coordinates.md): Resolve a campaign’s location criteria into plottable points (zip/city/region centroids, country centroids). Unresolved targets are returned with null coordinates. - [Search US ZIPs by code or "City, ST"](https://docs.sapt.ai/api-reference/geo/search-us-zips-by-code-or-"city-st".md) - [ZIP boundaries intersecting a map viewport](https://docs.sapt.ai/api-reference/geo/zip-boundaries-intersecting-a-map-viewport.md): Returns ZIP/ZCTA boundary polygons intersecting the bbox (minLng,minLat,maxLng,maxLat). Capped; call only when zoomed in. - [List workflows](https://docs.sapt.ai/api-reference/workflows/list-workflows.md): List every workflow in the project. Optional `typeSlug` / `eventType` filters narrow to workflows that match a specific trigger. - [Create workflow](https://docs.sapt.ai/api-reference/workflows/create-workflow.md): Create a workflow. The optional `isActive` field is retained for backward compatibility; new integrations should use the workflow-drafts resource and activate only after reviewing readiness. Requires a real user identity — service-account creation is rejected because the executor needs an unambiguou… - [Get workflow](https://docs.sapt.ai/api-reference/workflows/get-workflow.md): Fetch a single workflow by id. - [Delete workflow](https://docs.sapt.ai/api-reference/workflows/delete-workflow.md): Permanently delete a workflow and its run history. `expectedRevision` is optional for backward compatibility and prevents deleting a newer definition when supplied. - [Update workflow](https://docs.sapt.ai/api-reference/workflows/update-workflow.md): Partially update a workflow. Any omitted field is unchanged; `isActive` remains accepted for backward compatibility. `expectedRevision` is optional for existing clients and guards against stale overwrites when supplied. New integrations should use the workflow-drafts resource. - [Create workflow draft](https://docs.sapt.ai/api-reference/workflows/create-workflow-draft.md): Create an inactive workflow draft. This additive resource is the revision-safe authoring contract; it never publishes at birth. - [Update workflow draft](https://docs.sapt.ai/api-reference/workflows/update-workflow-draft.md): Update an inactive workflow definition using its latest revision. This endpoint cannot change activation state and refuses stale writes. - [Activate or pause workflow](https://docs.sapt.ai/api-reference/workflows/activate-or-pause-workflow.md): Set a workflow active or inactive using the latest reviewed revision. Activation evaluates the same tenant integration readiness gate as the dashboard and MCP surfaces; pausing is always allowed. - [Run a scheduled workflow immediately](https://docs.sapt.ai/api-reference/workflows/run-a-scheduled-workflow-immediately.md): Bypass the cron-due check and fire a scheduled workflow now. `expectedRevision` is optional for backward compatibility and pins execution to the reviewed definition when supplied. Event-triggered workflows fire when their event arrives. - [Dry-run a workflow draft](https://docs.sapt.ai/api-reference/workflows/dry-run-a-workflow-draft.md): Evaluate a draft workflow against the most recent matching event (or a specific `eventId`). No real sends, writes, or HTTP calls are made — the response shows what each step would do. - [List recent workflow runs](https://docs.sapt.ai/api-reference/workflows/list-recent-workflow-runs.md): Most-recent-first list of workflow executions for this project. Filter by `workflowId` to narrow to a single workflow. - [List my OAuth clients](https://docs.sapt.ai/api-reference/oauth-clients/list-my-oauth-clients.md): List every developer OAuth client owned by the caller. - [Create OAuth client](https://docs.sapt.ai/api-reference/oauth-clients/create-oauth-client.md): Register a developer OAuth client owned by the caller. The token issued after consent carries `account:full` and acts on behalf of every consenting user across all of their Sapt projects. The plaintext `clientSecret` is returned only at create time — capture it immediately. Public PKCE clients recei… - [Delete OAuth client](https://docs.sapt.ai/api-reference/oauth-clients/delete-oauth-client.md): Delete a developer OAuth client owned by the caller. Cascades to access tokens and consent records. Cannot be undone. - [Update OAuth client](https://docs.sapt.ai/api-reference/oauth-clients/update-oauth-client.md): Update a developer OAuth client owned by the caller. Pass `null` for `description`, `homepageUrl`, or `icon` to clear them. - [Rotate OAuth client secret](https://docs.sapt.ai/api-reference/oauth-clients/rotate-oauth-client-secret.md): Rotate the `client_secret` of a developer OAuth client owned by the caller. Previously-issued access tokens remain valid until their natural expiry; this only invalidates the secret used to mint new tokens. Rejected for public PKCE clients. - [List project roles](https://docs.sapt.ai/api-reference/project-roles/list-project-roles.md): Get all roles for a specific project. Requires project:read permission. - [Create project role](https://docs.sapt.ai/api-reference/project-roles/create-project-role.md): Create a new role for a project. Requires project:write permission. - [Get project role](https://docs.sapt.ai/api-reference/project-roles/get-project-role.md): Get details of a specific project role. Requires project:read permission. - [Delete project role](https://docs.sapt.ai/api-reference/project-roles/delete-project-role.md): Delete a project role. Requires project:write permission. - [Update project role](https://docs.sapt.ai/api-reference/project-roles/update-project-role.md): Update an existing project role. Requires project:write permission. - [List project templates](https://docs.sapt.ai/api-reference/project-templates/list-project-templates.md): List the project templates saved on this project. Templates seed roles, sidebar, workflows, and CRM types/relations into a new sub-project when referenced at creation. - [Create project template](https://docs.sapt.ai/api-reference/project-templates/create-project-template.md): Create a new project template on this project. Roles inside the bundle are capped to permissions the caller already holds. - [Get project template](https://docs.sapt.ai/api-reference/project-templates/get-project-template.md): Get a single project template by id. - [Delete project template](https://docs.sapt.ai/api-reference/project-templates/delete-project-template.md): Delete a project template. Does not affect previously-applied sub-projects. - [Update project template](https://docs.sapt.ai/api-reference/project-templates/update-project-template.md): Update a project template. Omitted fields are left unchanged. - [Snapshot a project](https://docs.sapt.ai/api-reference/project-templates/snapshot-a-project.md): Capture this project's live configuration into a new reusable template (snapshot) in one step. Omit `include` to capture EVERYTHING — roles, sidebar, workflows, CRM object types/relations/column config, custom person fields, CMS content types, branding, brand-voice context, and agents. Set keys in `… - [Apply a template to a new sub-project](https://docs.sapt.ai/api-reference/project-templates/apply-a-template-to-a-new-sub-project.md): Create a new sub-project under this (parent) project and stamp the template onto it — the GHL "create from snapshot" flow. Supply `variableValues` for any `{{variables}}` the template declares. Returns the new project and an apply report (what landed vs. what failed). Requires `sub_projects:write` o… - [Load a snapshot into an existing project](https://docs.sapt.ai/api-reference/project-templates/load-a-snapshot-into-an-existing-project.md): Additively load this template's configuration into an EXISTING project (`targetProjectId` in the body) — the GHL "load snapshot into a sub-account" flow. Assets that already exist on the target are SKIPPED, never overwritten. The path `{projectId}` is the template owner; the caller must hold admin a… - [Get sidebar configuration](https://docs.sapt.ai/api-reference/dashboard-sidebar/get-sidebar-configuration.md): Get the sidebar sections rendered for a project. - [Replace sidebar configuration](https://docs.sapt.ai/api-reference/dashboard-sidebar/replace-sidebar-configuration.md): Replace the entire sidebar section list for a project. Hiding an entry never denies authority — a user with read access to the underlying resource can still reach it by URL. - [List available sidebar features](https://docs.sapt.ai/api-reference/dashboard-sidebar/list-available-sidebar-features.md): Returns the catalog of feature ids that can appear in a sidebar section, with their default labels, icons, and required read-resource permissions. - [List service accounts](https://docs.sapt.ai/api-reference/service-accounts/list-service-accounts.md): List service accounts by project or platform scope. Requires project:read or platform service_accounts:read permission. - [Create service account](https://docs.sapt.ai/api-reference/service-accounts/create-service-account.md): Create a new service account, optionally with an initial project membership. Requires service_accounts:write permission. - [Generate Google Analytics OAuth URL](https://docs.sapt.ai/api-reference/google-analytics/generate-google-analytics-oauth-url.md): Generate a URL to redirect user to Google for GA4 + GSC authorization - [Generate Google Business Profile OAuth URL](https://docs.sapt.ai/api-reference/google-business/generate-google-business-profile-oauth-url.md): Generate a URL to redirect user to Google for GBP authorization - [List connected social accounts](https://docs.sapt.ai/api-reference/socials/list-connected-social-accounts.md): Every social account connected to the project — Instagram, Facebook, TikTok, YouTube and Google Business Profile. The `id` returned here is the `socialAccountId` that the posting, scheduling and analytics endpoints take. - [Get Instagram account analytics](https://docs.sapt.ai/api-reference/socials/get-instagram-account-analytics.md): Get insights and analytics for an Instagram account including reach, interactions, and demographics - [Get Instagram media analytics](https://docs.sapt.ai/api-reference/socials/get-instagram-media-analytics.md): Get analytics for Instagram posts including engagement, reach, and interactions per post - [Get Facebook Page analytics](https://docs.sapt.ai/api-reference/socials/get-facebook-page-analytics.md): Get insights and analytics for a Facebook Page including reach, engagement, and followers - [Get Facebook Page posts analytics](https://docs.sapt.ai/api-reference/socials/get-facebook-page-posts-analytics.md): Get analytics for Facebook Page posts including engagement metrics - [Stream media upload](https://docs.sapt.ai/api-reference/socials/stream-media-upload.md): Stream an image or video straight to storage and get back a staging handle. Send the raw bytes as the request body with the file's own `Content-Type` (`image/*` or `video/*`) — not multipart, not base64. Pass the returned `handle` in `uploadedHandles` on **Create post**. This is the upload path for… - [List scheduled posts](https://docs.sapt.ai/api-reference/socials/list-scheduled-posts.md): Get all scheduled posts for a project with optional filters - [Create post](https://docs.sapt.ai/api-reference/socials/create-post.md): Create a post for any connected platform — Instagram, Facebook, TikTok, YouTube or Google Business Profile. Get `socialAccountId` from **List connected social accounts**. Set `publishNow: true` to publish immediately, or `scheduledFor` (with `timezone`) to schedule. Attach media either inline as bas… - [Get scheduled post](https://docs.sapt.ai/api-reference/socials/get-scheduled-post.md): Get details of a specific scheduled post - [Update scheduled post](https://docs.sapt.ai/api-reference/socials/update-scheduled-post.md): Update a draft or scheduled post (cannot update published posts) - [Delete scheduled post](https://docs.sapt.ai/api-reference/socials/delete-scheduled-post.md): Delete a scheduled post and cancel Instagram container if exists - [Get post status](https://docs.sapt.ai/api-reference/socials/get-post-status.md): Get the current status of a post (lightweight endpoint for polling) - [Delete post media](https://docs.sapt.ai/api-reference/socials/delete-post-media.md): Remove one media item from a scheduled post and delete its stored blob. The post itself is left in place. - [Publish post immediately](https://docs.sapt.ai/api-reference/socials/publish-post-immediately.md): Publish a scheduled or draft post right now, bypassing its `scheduledFor` time. Also the retry path for a post whose status is `failed` — publishing re-runs delivery from the failed state, so no separate retry call is needed. - [Get Instagram comments](https://docs.sapt.ai/api-reference/socials/get-instagram-comments.md): Get comments on an Instagram media object - [Reply to Instagram comment](https://docs.sapt.ai/api-reference/socials/reply-to-instagram-comment.md): Reply to a comment on Instagram - [Hide/unhide Instagram comment](https://docs.sapt.ai/api-reference/socials/hideunhide-instagram-comment.md): Hide or unhide a comment on Instagram - [Delete Instagram comment](https://docs.sapt.ai/api-reference/socials/delete-instagram-comment.md): Delete a comment on Instagram - [Get Facebook comments](https://docs.sapt.ai/api-reference/socials/get-facebook-comments.md): Get comments on a Facebook post - [Reply to Facebook comment](https://docs.sapt.ai/api-reference/socials/reply-to-facebook-comment.md): Reply to a comment on Facebook - [Hide/unhide Facebook comment](https://docs.sapt.ai/api-reference/socials/hideunhide-facebook-comment.md): Hide or unhide a comment on Facebook - [Delete Facebook comment](https://docs.sapt.ai/api-reference/socials/delete-facebook-comment.md): Delete a comment on Facebook - [Delete published Facebook post](https://docs.sapt.ai/api-reference/socials/delete-published-facebook-post.md): Delete a published post from a Facebook Page - [Like Facebook post as Page](https://docs.sapt.ai/api-reference/socials/like-facebook-post-as-page.md): Like a post as the Facebook Page - [Unlike Facebook post as Page](https://docs.sapt.ai/api-reference/socials/unlike-facebook-post-as-page.md): Remove like from a post as the Facebook Page - [Create comment on Facebook post](https://docs.sapt.ai/api-reference/socials/create-comment-on-facebook-post.md): Create a top-level comment on a Facebook post as the Page - [Create comment on Instagram post](https://docs.sapt.ai/api-reference/socials/create-comment-on-instagram-post.md): Create a top-level comment on your own Instagram post - [Get ad accounts](https://docs.sapt.ai/api-reference/ads/get-ad-accounts.md): Get all ad accounts accessible by the connected Facebook account - [Get all ad accounts in project](https://docs.sapt.ai/api-reference/ads/get-all-ad-accounts-in-project.md): Get every ad account reachable across all Meta connections in the project, deduped by ad-account id. Each row carries the connectionId whose token reaches it — pass that as `accountId` to downstream `/hierarchy`, etc. - [Get ads hierarchy](https://docs.sapt.ai/api-reference/ads/get-ads-hierarchy.md): Get complete campaign/ad set/ad hierarchy in one optimized request. Use `datePreset=maximum` to pull lifetime insights for paused/historical campaigns (the `last_30d` default returns null insights for entities with no recent spend). - [Create campaign](https://docs.sapt.ai/api-reference/ads/create-campaign.md): Create a new campaign (PAUSED by default for safety) - [Update campaign status](https://docs.sapt.ai/api-reference/ads/update-campaign-status.md): Pause or resume a campaign. ACTIVE = spending money. - [Delete campaign](https://docs.sapt.ai/api-reference/ads/delete-campaign.md): Delete (archive) a campaign. Cannot be undone. - [Create ad set](https://docs.sapt.ai/api-reference/ads/create-ad-set.md): Create a new ad set within a campaign (PAUSED by default) - [Update ad set status](https://docs.sapt.ai/api-reference/ads/update-ad-set-status.md): Pause or resume an ad set - [Delete ad set](https://docs.sapt.ai/api-reference/ads/delete-ad-set.md): Delete (archive) an ad set. Cannot be undone. - [Create ad](https://docs.sapt.ai/api-reference/ads/create-ad.md): Create a new ad within an ad set (PAUSED by default, pending review) - [Update ad status](https://docs.sapt.ai/api-reference/ads/update-ad-status.md): Pause or resume an ad - [Delete ad](https://docs.sapt.ai/api-reference/ads/delete-ad.md): Delete (archive) an ad. Cannot be undone. - [Demographic insights](https://docs.sapt.ai/api-reference/ads/demographic-insights.md): Age/gender breakdown for a campaign, ad set, or ad. - [Platform & placement insights](https://docs.sapt.ai/api-reference/ads/platform-&-placement-insights.md): Publisher platform × placement-position breakdown (Facebook feed, IG Reels, etc.). - [Video insights](https://docs.sapt.ai/api-reference/ads/video-insights.md): Video play counts and quartile retention (P25/P50/P75/P95/P100) for video ads. - [Conversion insights](https://docs.sapt.ai/api-reference/ads/conversion-insights.md): Per-action-type conversion counts, values, and costs. - [Engagement insights](https://docs.sapt.ai/api-reference/ads/engagement-insights.md): Likes, comments, shares, saves, and other engagement actions for the entity. - [Time-series insights](https://docs.sapt.ai/api-reference/ads/time-series-insights.md): Daily (or rolled-up) impressions/reach/clicks/spend over the chosen window. Pass `timeIncrement` (1..90) to roll up to N-day buckets; default daily. - [Conversion time-series insights](https://docs.sapt.ai/api-reference/ads/conversion-time-series-insights.md): Daily (or rolled-up) per-action-type conversion counts and values. - [List team members](https://docs.sapt.ai/api-reference/team/list-team-members.md): Get all team members for a project. Any project member can view this. - [Invite team member](https://docs.sapt.ai/api-reference/team/invite-team-member.md): Invite a new member to a project by email. Only project admins can invite members. Creates an invitation that is sent via email. - [Remove team member](https://docs.sapt.ai/api-reference/team/remove-team-member.md): Remove a team member from a project. Only project admins can remove members. Cannot remove yourself if you are the only admin. - [Update member roles](https://docs.sapt.ai/api-reference/team/update-member-roles.md): Update a team member roles. Only project admins can update roles. Cannot remove admin access from yourself if you are the only admin. - [Get current user](https://docs.sapt.ai/api-reference/users/get-current-user.md): Get the currently authenticated user details - [List users](https://docs.sapt.ai/api-reference/users/list-users.md): Get all users the authenticated user has permission to see. Platform admins can see all users. Other users can see members of their projects. - [Get user by ID](https://docs.sapt.ai/api-reference/users/get-user-by-id.md): Get details of a specific user - [Get user project memberships](https://docs.sapt.ai/api-reference/users/get-user-project-memberships.md): Get all projects a user is a member of (that the requester can see) - [Get user roles in project](https://docs.sapt.ai/api-reference/users/get-user-roles-in-project.md): Get all roles a user has in a specific project. This endpoint requires no special permissions and can be used by any authenticated user. - [Get analytics config](https://docs.sapt.ai/api-reference/web-analytics/get-analytics-config.md): Get analytics configuration for a project. Returns null if not configured. - [Get analytics data](https://docs.sapt.ai/api-reference/web-analytics/get-analytics-data.md): Get analytics data from all configured sources (Cloudflare, GA4, GSC). Returns partial data with errors if some sources fail. ## OpenAPI Specs - [openapi](https://api.sapt.ai/openapi.json)