Phone Numbers

Provision a phone number

Changed on

Provisions a new phone number for the account and routes its inbound calls to an AI voice agent. Pass country (ISO 3166-1 alpha-2, default US) for a number in any country Crevio sells; prices differ by country. Most countries provision instantly (201). Regulated countries first need the business verified: the response is 202 with status: awaiting_verification and a verification_url to send the business owner to (pass verification_return_url to bring them back). The number then moves to in_review, and becomes active (or declined, with a review_note) once the carrier decides, usually within 1-3 days. The first month is charged in credits when the number becomes active, and each month it is kept after that; a number the balance cannot renew is released.

post/phone-numbers

Request

  • Base URL
    https://api.crevio.co/v1
  • Auth
    API key in header Authorization

Headers

Idempotency-Key, string

Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.

Request body

PhoneNumberRequest required
inbound_objective, string nullable
status, 'active' | 'inactive' | 'awaiting_verification' | 'in_review' | 'porting' | 'declined' | 'cancelled'
country, string
forward_to, string nullable
call_routing, 'agent' | 'forward' | 'business_hours'
business_hours_schedule_id, string nullable

The schedule (sched_...) whose open hours ring forward_to when call_routing is business_hours. Outside them the assistant answers.

answer_texts, boolean
text_back_missed_calls, boolean
text_new_leads, boolean
text_booking_reminders, boolean
review_link, string uri nullable

The page where contacts leave a review, starting with http:// or https://.

intake_questions, string[]

Questions the assistant asks every caller and texter before wrapping up. Their answers come back in the call's analysis.intake. Replaces the whole list.

Response

Phone number provisioned

PhoneNumber required
id, string required
object, string required
e164, string nullable required
status, 'active' | 'inactive' | 'awaiting_verification' | 'in_review' | 'porting' | 'declined' | 'cancelled' required
country, string required
inbound_objective, string nullable required
forward_to, string nullable required
call_routing, 'agent' | 'forward' | 'business_hours' required
verification_url, string nullable required
review_note, string nullable required
texting, 'off' | 'registering' | 'active' | 'unsupported' required
sms_registration_url, string nullable required
answer_texts, boolean required
text_back_missed_calls, boolean required
text_new_leads, boolean required
text_booking_reminders, boolean required
review_link, string nullable required
created_at, string date-time required
updated_at, string date-time required
business_hours_schedule, string nullable required
intake_questions, string[] required
monthly_credits, integer required

Changes

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    5 more changes in this revision