Skip to content
cleo.Developers
Forms/Forms integration
Cleo documentation

Forms integration

Submit test inquiries, read results, and verify signed webhook delivery in an invited Teams workspace.

Content reviewed · Maintained by Cleo Powered · Report a documentation issue · Verification basis

Set up an invited workspace

Forms uses https://teams.cleopowered.com. It is separate from the personal calling API at https://api.cleolabs.com. Start with an invited Teams workspace, a published form version, and an integration created by a workspace manager. Copy that integration's form version ID and test key. If you do not have access, request a business pilot.

Test submissions, simulations and fake execution do not call a phone or create calling charges. Use synthetic names, numbers and answers. Test mode is a Forms capability; the personal calling API makes real calls.

Download the test-mode OpenAPI contract. All nine operations have typed success responses. HTTP 201 creates an intake receipt, not a completed call.

Credentials and permissions

Send Authorization: Bearer <cf_test_key>. Grant only the scopes your integration needs:

  • submissions:write: create an inquiry.
  • results:read: list or read submissions and results.
  • simulations:write: simulate a test result.
  • webhooks:manage: register, verify, pause or rotate endpoints and inspect or replay deliveries.

Keys belong to one integration and one mode. Expiry defaults to 30 days and can be set from 1 to 90 days when creating a key. Copy the secret when shown, store it server-side, and revoke it after replacing it. A 401 requires credential recovery; 403 can indicate a missing scope, paused integration or unavailable live capability. Never try another tenant's resource ID to bypass an error.

Create a test submission

bash
curl https://teams.cleopowered.com/v1/submissions \
  -H "Authorization: Bearer $CLEO_FORMS_KEY" \
  -H "Idempotency-Key: test-inquiry-001" \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "test",
    "form_version_id": "<PUBLISHED_FORM_VERSION_UUID>",
    "name": "Synthetic test",
    "phone": "+12025550123",
    "request_mode": "call_now",
    "answers": {}
  }'

Replace the form version placeholder with the integration's published version. Match answers to the form's fields. Keep the same idempotency key and body after a timeout; changing the payload under the same key returns 409. Record the returned id and resource. The response has mode: test and calling_enabled: false.

For a synthetic completed result, POST /v1/submissions/{id}/simulate with {"scenario":"completed","answers":{}}. Other scenarios are no_answer and failed. A live key cannot use simulation. Staff-follow-up submissions do not need an automated callback result.

Read results and paginate

GET /v1/submissions/{id} to read a saved inquiry. Use result_status to distinguish pending, ready and not-applicable results; inspect the result itself before treating an inquiry as resolved.

GET /v1/submissions?limit=50 returns items, next_cursor and mode. The default limit is 50 and the maximum is 100. When next_cursor is non-null, send it as after on the next request. Stop at a null cursor. Cursors and resource access stay scoped to the integration. Save processed submission IDs to avoid duplicate work.

Verify and receive webhooks

POST /v1/webhook-endpoints with a public HTTPS URL on port 443. Store the returned signing_secret securely: it is shown only on creation and rotation. New endpoints start disabled. Up to 10 endpoints are supported per integration.

POST /v1/webhook-endpoints/{id}/verify to trigger a signed webhook.endpoint_verification event. Verify the signature, then return a 2xx JSON response containing the exact challenge received in data.challenge. Successful verification enables the endpoint.

Use a Standard Webhooks verifier with the stored secret, raw request bytes, and webhook-id, webhook-timestamp, and webhook-signature headers. Enforce timestamp freshness and deduplicate by event ID before processing. Parsing and reserializing JSON before signature verification changes the signed bytes.

Events submission.accepted and result.ready contain metadata and a resource path, not the inquiry's private answers. Acknowledge with 2xx after durable receipt, then retrieve the resource using a key with results:read. Expect retries and duplicate notifications; do not rely on event arrival order.

Use /v1/webhook-endpoints/{id}/pause or /rotate to manage delivery. A rotation returns the new secret. GET /v1/webhook-endpoints/{id}/deliveries returns up to 100 recent records; this endpoint has no cursor. POST /v1/webhook-deliveries/{id}/replay requeues eligible failed or cancelled deliveries with fewer than 20 total attempts. The integration and endpoint must be enabled and verified.

Limits and recovery

POST bodies must fit within 64 KiB. The contract defines field lengths and up to 20 scalar answer values. Gateway limits currently check 600 requests per client IP and 120 per key in a 60-second window per process. Integration and account limits can also reject requests; these are separate from gateway counters.

Read the error, retry and rate-limit contract. Keep credentials and one-time secrets out of logs. A valid submission response does not grant authority to make a live call.

Separate live pilot

The live-pilot candidate contract documents gated live resources. Forms live admission remains disabled pending explicit supervised-pilot authorization. Publication of a schema or possession of a test key does not enable it.

A pilot requires its own live integration and key, appropriate callback consent, caller identity, destination, configured rate and allowance, budget review and approved activation. Agree these with Cleo before attempting a live submission. Test integrations remain test integrations.

Documentation
Get an API key

Explore the docs

IntroductionSubmit a phone errand, follow the call, and inspect its outcome.Bot account onboardingRegister from Muse or another bot, verify your phone, receive an API key, and set your dashboard password by email.API overviewWhich endpoints are available, how they authenticate, and what is supported today.Make your first callCall your own phone, refresh its status, and inspect the returned call data.AuthenticationCreate a key in Cleo and authenticate requests with a bearer token.Create a callQueue one bounded phone task and receive durable task and call IDs.Get a callRead the most recently saved state of a call.Sync a callRefresh a call from the calling service and retrieve its latest saved state.Cancel a callCancel queued work or request a stop, then follow confirmation.The call objectThe shared response returned by create, get, sync, and cancel.Health checksCheck API liveness and readiness without an API key or placing a call.Results & schemasUnderstand result_schema, returned metadata, and what result_schema_valid does and does not establish.Task and call lifecycleFollow a call from acceptance to its final outcome.Idempotency & retriesRecover from an interrupted request without accidentally placing a second call.Safety & permissionsHow Cleo evaluates a call task before it can dial.Errors & troubleshootingUnderstand API errors and choose a safe next step.LimitsKeep call tasks bounded and leave room for API rate limits.Verification & limitationsReproduce our public health and schema checks and understand what has not been tested.Bot integrationsChoose a route for connecting your assistant to Cleo's public API.ChatGPTConfigure a private GPT Action with Cleo OpenAPI and bearer authentication.ClaudeConnect Claude client tools or a Claude Code shell workflow.Grok & Grok BotConnect xAI function tools and check Grok Bot execution requirements.OpenClawInstall a local skill for an approved Cleo calling workflow.GeminiMap Gemini function declarations to Cleo REST operations.Copilot StudioAdd Cleo through a REST API tool, custom connector, or flow.n8nBuild an authenticated HTTP workflow with durable call recovery.ZapierBuild a private Zapier integration for approved Cleo calls.Forms integrationSubmit test inquiries, read results, and verify signed webhook delivery in an invited Teams workspace.API support and changesVersions, error recovery, process-scoped limits, client generation and the public contract changelog.