Get Agent
Path Parameters
uuidHeader Parameters
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/agents/497f6eca-6276-4993-bfeb-53cbbbba6f08"{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6", "name": "string", "system_prompt": "string", "first_message": "string", "recording_enabled": true, "ai_disclosure": true, "ai_disclosure_line": "string", "voice_config": {}, "tools": [ "string" ], "max_duration_seconds": 0, "handover_max_duration_seconds": 0, "voice_enabled": true, "sms_enabled": true, "email_enabled": true, "status": "live", "handover_contacts": [ { "contact_id": "string", "name": "string", "phone_e164": "string", "note": "string" } ], "http_tools": [ { "name": "string", "description": "string", "url": "string", "parameters": {}, "header_names": [ "string" ], "timeout_seconds": 0, "wait_message": "string" } ], "http_tool_secret": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Enable Sms
Set up a dedicated number for SMS at its carrier. Hail does this itself when an sms-capable number becomes active and when a texts agent is assigned, so this call is only needed to repair a number whose setup failed, or an older one whose service lacks the inbound text settings. Idempotent — an already-enabled number gets those settings set again and returns its current state. A US long code is also put on the org's approved US SMS registration. Fails with 422 for a released number or one that lacks sms capability.
Get Call
Fetch one call by id, including its current status, end reason and transcript. Org-scoped: returns 404 for a call belonging to a different organization (not 403, to avoid confirming the id exists). Use this to poll for the final outcome of a call placed with POST /v1/calls. The transcript grows while the call runs.