📞
API Docs
  • Welcome
  • NUMBERS / ORDERING
    • List Areas
    • List Numbers
    • Order Numbers - No Cart
    • Delete Numbers
    • Vanity Tollfree - Search
    • Vanity Toll Free - Order
  • Shopping Cart Ordering
    • Add Number to Cart
    • List Numbers in Cart
    • Delete Number from Cart
    • Complete Order Cart
  • MY INVENTORY
    • List My Nmbers
    • List Call Flows
    • Change CallFlow
    • CDR Records
  • SMS/MMS
    • Send SMS
    • Send MMS
    • Receive SMS/MMS
    • Receive Delivery Receipts
  • Campaigns
    • Submit TollFree Campaign
  • CALL APIS
    • Calls
    • Set Incoming URL
    • Incoming Calls
    • Listing Calls
    • Making Calls
      • Example Code
        • Outbound to Tel#
        • Outbound to SIP Device
        • Example Responses
    • Modifying Live Calls
      • Examples
    • Recordings
      • Get List of Recordings
      • Delete a Recording
  • CALL API MARKUP
    • API Call Markup Language
      • Say
      • Dial
        • Number
        • Client
        • SIP
      • Play
      • Gather
      • Record
      • Hangup
      • Pause
      • Reject
      • Redirect
  • LOOKUPS
    • Carrier and CNAM
  • Number Portability
    • Validate Portability
    • Lookup Port Request
    • Submit Port Request
  • FAXING
    • Create Outbound Fax
    • Lookup Outbound Fax Status
    • List Faxes
    • Download File
Powered by GitBook
On this page
  • GET or POST Request
  • Method 1 - HTTP Post of file1=url, file2=url
  • Method 2 - JSON Post of URLs
  • Method 3 - HTTP Multipart File Post
  • HTTP Post Variables Supported
  • HTTP Call Back
  1. FAXING

Create Outbound Fax

Create a new Fax request

GET or POST Request

https://v1.api19.com/fax/create

Send us a GET or POST request with your key and the source, destination and files.

We we will deliver your fax and get back to you. We support 3 methods to send fax files to us. You can choose whichever you would prefer.

Method 1 - HTTP Post of file1=url, file2=url

This method is pretty straight forward, send file1=, file2= with urls and get is supported

curl -X POST https://v1.api19.com/fax/create \
 -d "destination=3035551212" \
 -d "file1=http://x.com/file1.jpg" \
 -d "file2=http://x.com/file2.jpg" \
 -d 'key=your-key'

Method 2 - JSON Post of URLs

Send a JSON post to our server with the URLs in an array called files

Example JSON post:

{
    "key": "hfg29hg23fh23",
    "source": 3038883333,
    "destination": 8823321111,
    "files": [
        "http:\/\/example.com\/test1.jpg",
        "http:\/\/example.com\/fax2.jpg"
    ]
}

Method 3 - HTTP Multipart File Post

Send an HTTP Multipart post or use CURL @file to include the file in the multipart. You don't have to name them file1=, we will look for any multipart file attached.

curl -X POST https://v1.api19.com/fax/create \
 -F "source=3038821111" \
 -F "destination=3035551212" \
 -F "file1=@/path/to/local/file1.jpg" \
 -F "file2=@/path/to/local/file2.jpg" \
 -F 'key=your-key'

HTTP Post Variables Supported

Argument

Required

Type

key

yes

api key

source

yes

fax number with us

destination

yes

destination fax number

file1

yes

URL with supported file type

file2-10

no

add up to 20 files

ignore_bad_files

no

yes

ignore all files you send that are bad and continue sending the rest

@file

no

use CURL or http multi post to attach files to your web request

call_back_url

no

URL to call you back when done

curl -X POST https://v1.api19.com/fax/create \
 -d "source=3038821111" \
 -d "destination=3035551212" \
 -d "file1=http://x.com/file1.jpg" \
 -d "file2=http://x.com/file2.jpg" \
 -d 'key=your-key'
{
  "status": "error",
  "error": "invalid fax number"
}

OR

  "status": "error",
  "error": "invalid destination number"
}

OR

{
  "status": "error",
  "error": "invalid file format",
  "file: "http://x.com/file.wav"
}

OR

{
  "status": "ok",
  "fax_id": 32273421
}

OR

{
    "status": "error",
    "error": "no files",
    "not_supported_files": {
        "moo.mov": "unsupported file extension"
    }
}

HTTP Call Back

If you request, we will send you an HTTP call back with your fax status with the following parameters using HTTP POST:

(
    [fax_id] => 18123772
    [status] => success
    [pages] => 1
    [long_status] => Success
    [seconds] => 200
    [source] => 7209994255
    [destination] => 7208886293
    [direction] => outbound
    [send_time] => 2024-04-10 05:04:31
    [complete_time] => 2024-04-10 06:04:28
)
PreviousSubmit Port RequestNextLookup Outbound Fax Status

Last updated 29 days ago