{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/accounts/:account_id/fax","auth":"required","results":{"codes":[{"status":200,"language":"json","code":"{\n    \"id\": \"bfa351fe1ff8ba7f457b62c4ddcd3c7204abcdef\",\n    \"extension\": {\n      \t\"id\": 12345678,\n    \t\t\"name\": \"My extension\",\n    \t\t\"extension\": 500,\n    \t\t\"voip_id\": 10000002\n  \t},\n  \t\"from\": {\n    \t\t\"number\": \"Private\",\n    \t\t\"name\": \"Donald\",\n    \t\t\"city\": null,\n    \t\t\"state\": null\n  \t},\n  \t\"to\": \"+ 15551231212\",\n  \t\"direction\": \"out\",\n  \t\"is_new\": false,\n  \t\"pages\": 0, // We always return 0 because of technical limitation of this endpoint\n \t\t\"created_at\": 1593019000,\n  \t\"form_data\": {\n    \t\t\"fax_cover\": \"\",\n    \t\t\"to_name\": \"\",\n   \t\t \t\"to_company\": \"\",\n    \t\t\"subject\": \"\",\n    \t\t\"cover_date\": \"\",\n        \"cover_time\": \"\",\n        \"memo\": \"\",\n        \"from_name\": \"Donald\",\n        \"from_company\": \"\",\n        \"from_phone\": \"\"\n    }\n}","name":""}]},"settings":"","examples":{"codes":[{"code":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n  \tCURLOPT_URL => \"https://api.phone.com/v4/accounts/10000002/fax\",\n  \tCURLOPT_RETURNTRANSFER => true,\n  \tCURLOPT_ENCODING => \"\",\n  \tCURLOPT_MAXREDIRS => 10,\n  \tCURLOPT_TIMEOUT => 0,\n  \tCURLOPT_FOLLOWLOCATION => true,\n  \tCURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  \tCURLOPT_CUSTOMREQUEST => \"POST\",\n  \tCURLOPT_HTTPHEADER => array(\n    \t\t\"Authorization: Bearer ThisIsYourAPIToken\",\n    \t\t\"Content-Type: application/json\"\n  \t),\n  \tCURLOPT_POSTFIELDS =>'{\n  \t\t\t\"to\": \"+15551231212\",\n        \"extension\": 12345678,\n        \"from_name\": \"Donald\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FnZXMgNSAwIFI+PgplbmRvYmoKeHJlZgowIDcKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDE1IDAwMDAwIG4gCjAwMDAwMDA0OTMgMDAwMDAgbiAKMDAwMDAwMDI3MCAwMDAwMCBuIAowMDAwMDAwMzA3IDAwMDAwIG4gCjAwMDAwMDA2ODEgMDAwMDAgbiAKMDAwMDAwMDczNiAwMDAwMCBuIAp0cmFpbGVyCjw8L1NpemUgNwovUm9vdCA2IDAgUgovSW5mbyAxIDAgUj4+CnN0YXJ0eHJlZgo3ODMKJSVFT0Y=\"\n        }]\n    }'\n));\n\n$response = curl_exec($curl);\n\ncurl_close($curl);\necho $response;\n","language":"php"}]},"method":"post","params":[{"name":"account_id","type":"int","default":"","desc":"Account ID","required":true,"in":"path","ref":"","_id":"56f9c415338fbb2000ec3711"},{"name":"to","type":"string","default":"","desc":"Phone number of fax addressee","required":true,"in":"body","ref":"","_id":"5efaad33272d6e00594838c2"},{"name":"extension","type":"int","default":"","desc":"This field is optional when the API is used in extension level","required":true,"in":"body","ref":"","_id":"5efaad33272d6e00594838c1"},{"name":"from","type":"string","default":"","desc":"If this parameter is omitted, default is the extension's Caller ID","required":false,"in":"body","ref":"","_id":"5efaad33272d6e00594838c0"},{"name":"from_name","type":"string","default":"","desc":"Name of fax sender","required":false,"in":"body","ref":"","_id":"5efaad33272d6e00594838bf"},{"name":"quality","type":"string","default":"","desc":"low, medium or high.  If omitted, default is set to medium","required":false,"in":"body","ref":"","_id":"5efaad33272d6e00594838be"},{"name":"cover_text","type":"string","default":"","desc":"Text of the Cover page (up to 16384 characters)","required":false,"in":"body","ref":"","_id":"5efaad33272d6e00594838bd"},{"name":"media","type":"string","default":"","desc":"Required if cover_text is not provided.  Media contains array of objects: BASE64 encoded PDF data and filename.  PDF data is required while filename is optional.","required":false,"in":"body","ref":"","_id":"5efaad33272d6e00594838bc"}]},"next":{"description":"","pages":[]},"title":"Create Fax","type":"endpoint","slug":"create-account-fax","excerpt":"The Create Fax API allows users to send a Fax.  See [Intro to Fax](doc:account-fax) for more info on the properties.\n\nNote: This API is for users with Account Owner scope access token.  Users with Extension User scope token should invoke the Create Fax API with the following definition:\n\nPOST https://api.phone.com/v4/accounts/:account_id/extensions/:extension_id/fax","body":"","updates":[],"order":4,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5efa6d41e212c2001e973d2c","createdAt":"2020-06-29T22:37:53.685Z","user":"56f99ab84d2b4f3400edb636","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Account Fax","slug":"fax","order":16,"from_sync":false,"reference":false,"_id":"59e0323d93da1f001c9ec170","project":"55c8cff571d7580d0063a5e5","version":"57624356653c2d2200fec79c","createdAt":"2017-10-13T03:25:49.733Z","__v":0},"version":{"version":"4","version_clean":"4.0.0","codename":"","is_stable":true,"is_beta":true,"is_hidden":false,"is_deprecated":false,"categories":["57624356653c2d2200fec79d","57624356653c2d2200fec79e","57624356653c2d2200fec79f","57624356653c2d2200fec7a0","57624356653c2d2200fec7a1","57624356653c2d2200fec7a2","57624356653c2d2200fec7a3","57624356653c2d2200fec7a4","57624356653c2d2200fec7a5","57624356653c2d2200fec7a6","57624356653c2d2200fec7a7","57624356653c2d2200fec7a8","57624356653c2d2200fec7a9","57624356653c2d2200fec7aa","5779ca1b99b40b0e005abb3a","5779d198aea88b0e00f63277","5797d3ab17ced017003c4be4","57ac170ef1cdae0e0053cdfc","57dbfc723ed3450e00dc9e6d","5804d12d16161c0f0077df9b","5841064b652e5b0f0015a7c8","588b5e5f2966b2230009cbf9","58a68ebf3239fa0f00857619","58c23c8b4922930f0050ac91","58fd1460809fc30f00f2ee07","5934eaf5328680002d77de6a","594bf91601cfe6000f40f4c5","595c4ed696b447001ba0cf6d","596524495cee50001575f5be","5970d4f1313162004dd303b5","59780fac24dbd1001a1fa057","59a8cfd3ead78a002d63cafe","59e0323d93da1f001c9ec170","5b0c16f2be9fcb0003e28222","5ba8fd1a4c8c220003a08f0f","5ede526e75bc22005d0adecc"],"_id":"57624356653c2d2200fec79c","createdAt":"2016-06-16T06:12:38.244Z","releaseDate":"2016-06-16T06:12:38.244Z","__v":23,"project":"55c8cff571d7580d0063a5e5"},"project":"55c8cff571d7580d0063a5e5","__v":12,"parentDoc":null}

postCreate Fax

The Create Fax API allows users to send a Fax. See [Intro to Fax](doc:account-fax) for more info on the properties. Note: This API is for users with Account Owner scope access token. Users with Extension User scope token should invoke the Create Fax API with the following definition: POST https://api.phone.com/v4/accounts/:account_id/extensions/:extension_id/fax

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

account_id:
required
integer
Account ID

Body Params

to:
required
string
Phone number of fax addressee
extension:
required
integer
This field is optional when the API is used in extension level
from:
string
If this parameter is omitted, default is the extension's Caller ID
from_name:
string
Name of fax sender
quality:
string
low, medium or high. If omitted, default is set to medium
cover_text:
string
Text of the Cover page (up to 16384 characters)
media:
string
Required if cover_text is not provided. Media contains array of objects: BASE64 encoded PDF data and filename. PDF data is required while filename is optional.

Examples


Result Format


User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}