{"openapi":"3.1.0","info":{"title":"TINE API","version":"1.0.0","summary":"Phone numbers, SMS/MMS and calls for US, Canadian and UK numbers.","description":"Buy US, Canadian and UK phone numbers, send and receive SMS and MMS, read calls and voicemails, and receive signed webhooks.\nHuman-readable reference: https://tinetech.org/developers/docs.\n\n**Billing.** Requires the Developer plan ($40/month, all of it added as usage credit). Each request that passes the key, scope and rate limit checks costs $0.001. Outbound SMS is $0.05/segment, numbers are $5 once then $5/month (UK $8 and $8).\n\n**Rate limits.** 600 requests per minute per key on every endpoint, plus stricter limits on sending messages and buying numbers. Over the limit you get 429 with Retry-After.\n\n**Idempotency.** POST /v1/messages and POST /v1/numbers/purchase accept an Idempotency-Key header. A retry with the same key and body within 24 hours returns the original response with Idempotent-Replayed: true.","contact":{"name":"TINE","email":"pluto@tinesim.com","url":"https://tinetech.org/developers/docs"},"termsOfService":"https://tinetech.org/terms"},"servers":[{"url":"https://tinetech.org/v1"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Balance"},{"name":"Numbers"},{"name":"Messages"},{"name":"Calls"},{"name":"Voicemails"},{"name":"Billing"},{"name":"Voice"}],"paths":{"/balance":{"get":{"tags":["Balance"],"operationId":"getBalance","summary":"Get your credit balance","description":"Required scope: billing:read.","responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Balance"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/numbers":{"get":{"tags":["Numbers"],"operationId":"listNumbers","summary":"List the numbers you own","description":"Required scope: numbers:read.","responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OwnedNumber"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/numbers/available":{"get":{"tags":["Numbers"],"operationId":"searchAvailableNumbers","summary":"Search numbers you can buy","description":"US and Canadian searches return local numbers; UK searches return mobile (+44 7) numbers. Required scope: numbers:read.","parameters":[{"name":"country","in":"query","schema":{"type":"string","enum":["US","CA","GB","UK"],"default":"US"}},{"name":"area_code","in":"query","schema":{"type":"string","example":"212"}},{"name":"contains","in":"query","description":"Digits the number must contain.","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":30,"default":10}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AvailableNumber"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/numbers/purchase":{"post":{"tags":["Numbers"],"operationId":"purchaseNumber","summary":"Buy a number","description":"Charges the setup fee from your balance; the monthly fee is billed from then on. Required scope: voice:call. Rate limit: 20 per hour per key, on top of the general limit.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["phone_number"],"properties":{"phone_number":{"type":"string","description":"E.164, from /numbers/available.","example":"+12125551234"}}}}}},"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PurchasedNumber"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/messages":{"get":{"tags":["Messages"],"operationId":"listMessages","summary":"List messages, newest first","description":"Required scope: messages:read.","parameters":[{"name":"number","in":"query","description":"Only include records to or from this E.164 number.","schema":{"type":"string","example":"+12125550100"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"before","in":"query","description":"Cursor from next_cursor (Unix milliseconds).","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"next_cursor":{"type":["string","null"],"description":"Pass as `before` to get the next page; null on the last page. Unix milliseconds."}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"post":{"tags":["Messages"],"operationId":"sendMessage","summary":"Send an SMS or MMS","description":"`from` must be a number you own. US and Canadian numbers can text US and Canadian numbers; UK numbers can text UK numbers and can't send MMS. Required scope: messages:send. Rate limit: 60 per minute per key, on top of the general limit.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["from","to"],"properties":{"from":{"type":"string","example":"+12125550100"},"to":{"type":"string","example":"+12125550199"},"body":{"type":"string","description":"Required unless media_url is given."},"media_url":{"type":"array","items":{"type":"string","format":"uri"},"description":"Public URLs; sends an MMS."}}}}}},"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SentMessage"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/calls":{"get":{"tags":["Calls"],"operationId":"listCalls","summary":"List calls, newest first","description":"Required scope: calls:read.","parameters":[{"name":"number","in":"query","description":"Only include records to or from this E.164 number.","schema":{"type":"string","example":"+12125550100"}},{"name":"direction","in":"query","schema":{"type":"string","enum":["inbound","outbound"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"before","in":"query","description":"Cursor from next_cursor (ISO 8601).","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Call"}},"next_cursor":{"type":["string","null"],"description":"Pass as `before` to get the next page; null on the last page. ISO 8601 timestamp."}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/calls/{callSid}/recording":{"get":{"tags":["Calls"],"operationId":"getCallRecording","summary":"Get a call recording","description":"Required scope: calls:read.","parameters":[{"name":"callSid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Recording"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/voicemails":{"get":{"tags":["Voicemails"],"operationId":"listVoicemails","summary":"List voicemails, newest first","description":"Required scope: calls:read.","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}},{"name":"before","in":"query","description":"Cursor from next_cursor (ISO 8601).","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Voicemail"}},"next_cursor":{"type":["string","null"],"description":"Pass as `before` to get the next page; null on the last page. ISO 8601 timestamp."}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/billing/history":{"get":{"tags":["Billing"],"operationId":"listBillingHistory","summary":"List balance transactions, newest first","description":"Per-request fees are rolled up into one row per day. Required scope: billing:read.","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"before","in":"query","description":"Cursor from next_cursor (ISO 8601).","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}},"next_cursor":{"type":["string","null"],"description":"Pass as `before` to get the next page; null on the last page. ISO 8601 timestamp."}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/voice/token":{"post":{"tags":["Voice"],"operationId":"createVoiceToken","summary":"Get a Twilio Voice SDK access token","description":"Use with the Twilio Voice JavaScript, iOS or Android SDK to make and receive calls on your numbers. Valid for one hour. Required scope: voice:call.","responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["token","identity","ttl"],"properties":{"token":{"type":"string"},"identity":{"type":"string"},"ttl":{"type":"integer","example":3600}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}}},"webhooks":{"message.received":{"post":{"summary":"message.received event","description":"Sent to every endpoint subscribed to this event. Verify X-Tine-Signature: HMAC-SHA256 of `<X-Tine-Timestamp>.<raw body>` with your whsec_ secret, compared in constant time; reject timestamps older than 5 minutes. Failed deliveries are retried for about 8 hours.","parameters":[{"name":"X-Tine-Timestamp","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Tine-Signature","in":"header","required":true,"schema":{"type":"string","example":"v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Any 2xx acknowledges the event."}}}},"message.delivered":{"post":{"summary":"message.delivered event","description":"Sent to every endpoint subscribed to this event. Verify X-Tine-Signature: HMAC-SHA256 of `<X-Tine-Timestamp>.<raw body>` with your whsec_ secret, compared in constant time; reject timestamps older than 5 minutes. Failed deliveries are retried for about 8 hours.","parameters":[{"name":"X-Tine-Timestamp","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Tine-Signature","in":"header","required":true,"schema":{"type":"string","example":"v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Any 2xx acknowledges the event."}}}},"message.failed":{"post":{"summary":"message.failed event","description":"Sent to every endpoint subscribed to this event. Verify X-Tine-Signature: HMAC-SHA256 of `<X-Tine-Timestamp>.<raw body>` with your whsec_ secret, compared in constant time; reject timestamps older than 5 minutes. Failed deliveries are retried for about 8 hours.","parameters":[{"name":"X-Tine-Timestamp","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Tine-Signature","in":"header","required":true,"schema":{"type":"string","example":"v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Any 2xx acknowledges the event."}}}},"call.completed":{"post":{"summary":"call.completed event","description":"Sent to every endpoint subscribed to this event. Verify X-Tine-Signature: HMAC-SHA256 of `<X-Tine-Timestamp>.<raw body>` with your whsec_ secret, compared in constant time; reject timestamps older than 5 minutes. Failed deliveries are retried for about 8 hours.","parameters":[{"name":"X-Tine-Timestamp","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Tine-Signature","in":"header","required":true,"schema":{"type":"string","example":"v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Any 2xx acknowledges the event."}}}},"webhook.test":{"post":{"summary":"webhook.test event","description":"Sent to every endpoint subscribed to this event. Verify X-Tine-Signature: HMAC-SHA256 of `<X-Tine-Timestamp>.<raw body>` with your whsec_ secret, compared in constant time; reject timestamps older than 5 minutes. Failed deliveries are retried for about 8 hours.","parameters":[{"name":"X-Tine-Timestamp","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Tine-Signature","in":"header","required":true,"schema":{"type":"string","example":"v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Any 2xx acknowledges the event."}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key from the Developers page, starting with tine_live_."}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"description":"Up to 255 characters. Reusing a key with the same body within 24 hours replays the original response.","schema":{"type":"string","maxLength":255}}},"headers":{"X-Request-Id":{"description":"Quote this when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed in the current window, for the tightest limit that applies.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"responses":{"BadRequest":{"description":"invalid_request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"authentication_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"PaymentRequired":{"description":"insufficient_funds or subscription_required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"permission_denied (missing scope, number not yours, destination not allowed)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"IdempotencyInProgress":{"description":"idempotency_in_progress","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unprocessable":{"description":"unprocessable or idempotency_key_reused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"rate_limited","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"internal_error or provider_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unavailable":{"description":"Sending is paused (maintenance)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"request_id":{"type":"string","example":"req_a1b2c3d4e5f6a7b8c9d0"}}}}},"Balance":{"type":"object","properties":{"balance":{"type":"number","example":37.512},"currency":{"type":"string","const":"USD"},"plan_credit":{"type":["number","null"],"description":"Part of the balance that is this month's plan credit."},"plan_credit_expires_at":{"type":["string","null"],"format":"date-time"}}},"OwnedNumber":{"type":"object","properties":{"phone_number":{"type":"string","example":"+12125550100"},"country_code":{"type":"string","example":"US"},"is_primary":{"type":"boolean"},"subscription_status":{"type":["string","null"]},"twilio_sid":{"type":["string","null"]},"purchased_at":{"type":["string","null"],"format":"date-time"}}},"AvailableNumber":{"type":"object","properties":{"phone_number":{"type":"string"},"friendly_name":{"type":"string"},"country_code":{"type":"string"},"region":{"type":["string","null"]},"capabilities":{"type":"object","properties":{"sms":{"type":"boolean"},"voice":{"type":"boolean"},"mms":{"type":"boolean"}}}}},"PurchasedNumber":{"type":"object","properties":{"phone_number":{"type":"string"},"country_code":{"type":"string","enum":["US","GB","XX"],"description":"US is used for all +1 numbers, including Canada."},"twilio_sid":{"type":"string"},"purchased_at":{"type":"string","format":"date-time"}}},"Message":{"type":"object","properties":{"id":{"type":"string"},"direction":{"type":["string","null"],"enum":["inbound","outbound",null]},"from":{"type":"string"},"to":{"type":"string"},"body":{"type":"string"},"media_url":{"type":"array","items":{"type":"string"}},"status":{"type":["string","null"]},"message_sid":{"type":["string","null"]},"is_read":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"}}},"SentMessage":{"type":"object","properties":{"id":{"type":"string"},"direction":{"type":"string","const":"outbound"},"from":{"type":"string"},"to":{"type":"string"},"body":{"type":"string"},"media_url":{"type":"array","items":{"type":"string"}},"status":{"type":"string","example":"queued"},"message_sid":{"type":"string"},"segments":{"type":"integer"},"price":{"type":"number","description":"USD charged for the message (not including the per-request fee)."},"created_at":{"type":"string","format":"date-time"}}},"Call":{"type":"object","properties":{"id":{"type":"string"},"from":{"type":["string","null"]},"to":{"type":["string","null"]},"direction":{"type":["string","null"]},"status":{"type":["string","null"]},"duration_seconds":{"type":"integer"},"created_at":{"type":["string","null"],"format":"date-time"}}},"Recording":{"type":"object","properties":{"call_sid":{"type":"string"},"recording_url":{"type":"string","format":"uri"},"recording_duration":{"type":"integer"},"has_voicemail":{"type":"boolean"}}},"Voicemail":{"type":"object","properties":{"id":{"type":"string"},"call_sid":{"type":["string","null"]},"from":{"type":["string","null"]},"to":{"type":["string","null"]},"recording_url":{"type":["string","null"],"format":"uri"},"recording_duration":{"type":"integer"},"listened":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"}}},"Transaction":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"type_label":{"type":"string"},"amount":{"type":"number"},"balance_after":{"type":["number","null"]},"description":{"type":["string","null"]},"created_at":{"type":["string","null"],"format":"date-time"}}},"WebhookEvent":{"type":"object","required":["id","event","created_at","data"],"properties":{"id":{"type":"string"},"event":{"type":"string","enum":["message.received","message.delivered","message.failed","call.completed","webhook.test"]},"created_at":{"type":"string","format":"date-time"},"data":{"type":"object","additionalProperties":true}}}}}}