GEThttps://core-api.heysadie.ai/phone-numbers/import/search
q success data sid phoneNumber friendlyName voice state hasMore metadata timestamp version path error code message details fieldSearch your Twilio numbers
Searches the numbers on your own connected Twilio account so you can import one for outbound calls. - `q`: digits matched anywhere in the number (3 to 15 digits; spaces, dashes and a leading + are ignored). Returns up to 20 numbers; `hasMore` says there are more, so narrow the search. - `state`: `available` can be imported, `imported` you already imported, `in_use` is already in use in Oncore and can't be imported. Requires the Twilio integration to be connected (409 `TWILIO_NOT_CONNECTED` otherwise).
Try it in the API ExplorerExample request
curl "https://core-api.heysadie.ai/phone-numbers/import/search?q=string" \
-H "Authorization: ApiKey YOUR_API_KEY"Authentication
Authenticate with an API key in the Authorization header using the ApiKey scheme. See Authentication for how keys work and where to get them.
AuthorizationstringrequiredAPI key in the ApiKey scheme: ApiKey YOUR_API_KEY. Tenant keys authorize their own tenant; organization keys can act on any tenant in the organization.
X-Tenant-Idstring (uuid)optionalRequired when authenticating with an organization key: it selects the tenant the request acts on. Omit with tenant keys.
Request
Query parameters
qstringrequiredDigits to match anywhere in your Twilio numbers (3 to 15 digits; other characters are ignored)
Responses
successbooleanrequiredtrue on every 2xx
dataobjectoptionalThe result
Show 2 child properties
dataobject[]requiredMatching numbers on your Twilio account
Show 5 item properties
sidstringrequiredTwilio phone number SID (PN…)
phoneNumberstringrequiredE.164 phone number
friendlyNamestringrequiredThe number's friendly name on Twilio
voicebooleanrequiredWhether the number can make voice calls
stateenumrequiredavailable: can be imported. imported: you already imported it. in_use: already in use in Oncore.
"available""imported""in_use"hasMorebooleanrequiredMore numbers match than were returned
metadataobjectoptionalRequest metadata
Show 3 child properties
timestampstringrequiredWhen the server answered, ISO 8601 UTC
versionstringrequiredAPI version
pathstringoptionalThe URL that was requested
400The request is invalid. `details` lists each field that failed
successbooleanrequiredfalse on every error
errorobjectoptionalWhat went wrong: a stable `code` to branch on and a human-readable `message`
Show 3 child properties
codeenumrequiredA parameter or body field broke a rule
"VALIDATION_ERROR"messagestringrequiredHuman-readable explanation. Do not parse it; branch on `code`
detailsobject[]optionalOne entry per field that failed
Show 2 item properties
fieldstringrequiredThe offending field
messagestringrequiredThe rule it broke
metadataobjectoptionalRequest metadata
Show 3 child properties
timestampstringrequiredWhen the server answered, ISO 8601 UTC
versionstringrequiredAPI version
pathstringoptionalThe URL that was requested
401Missing or invalid credentials
successbooleanrequiredfalse on every error
errorobjectoptionalWhat went wrong: a stable `code` to branch on and a human-readable `message`
Show 2 child properties
codeenumrequiredNo valid credentials
"UNAUTHORIZED"messagestringrequiredHuman-readable explanation. Do not parse it; branch on `code`
metadataobjectoptionalRequest metadata
Show 3 child properties
timestampstringrequiredWhen the server answered, ISO 8601 UTC
versionstringrequiredAPI version
pathstringoptionalThe URL that was requested
403The credentials are valid but may not use this route
successbooleanrequiredfalse on every error
errorobjectoptionalWhat went wrong: a stable `code` to branch on and a human-readable `message`
Show 2 child properties
codeenumrequiredThe credentials may not use this route
"FORBIDDEN"messagestringrequiredHuman-readable explanation. Do not parse it; branch on `code`
metadataobjectoptionalRequest metadata
Show 3 child properties
timestampstringrequiredWhen the server answered, ISO 8601 UTC
versionstringrequiredAPI version
pathstringoptionalThe URL that was requested
404Not found, or outside the caller's scope
successbooleanrequiredfalse on every error
errorobjectoptionalWhat went wrong: a stable `code` to branch on and a human-readable `message`
Show 2 child properties
codeenumrequiredAn id names nothing the caller can see
"RESOURCE_NOT_FOUND"messagestringrequiredHuman-readable explanation. Do not parse it; branch on `code`
metadataobjectoptionalRequest metadata
Show 3 child properties
timestampstringrequiredWhen the server answered, ISO 8601 UTC
versionstringrequiredAPI version
pathstringoptionalThe URL that was requested
500An unexpected server error
successbooleanrequiredfalse on every error
errorobjectoptionalWhat went wrong: a stable `code` to branch on and a human-readable `message`
Show 2 child properties
codeenumrequiredAn unexpected server failure
"INTERNAL_SERVER_ERROR"messagestringrequiredHuman-readable explanation. Do not parse it; branch on `code`
metadataobjectoptionalRequest metadata
Show 3 child properties
timestampstringrequiredWhen the server answered, ISO 8601 UTC
versionstringrequiredAPI version
pathstringoptionalThe URL that was requested