Make your first request

curl --request POST \
     --url https://spreadly.app/api/v1/business-card-scans \
     --header 'accept: application/json' \
     --header 'authorization: {apiKey}' \
     --header 'content-type: multipart/form-data' \
     --form [email protected]
const axios = require('axios');
const fs = require('fs');

// Create a FormData object to simulate multipart/form-data
const formData = new FormData();
formData.append('front', fs.createReadStream('/path/to/image.png'), 'image.png');

// Set headers with Bearer token and Content-Type
const headers = {
  'Authorization': `Bearer {apiKey}`,
  'Content-Type': 'multipart/form-data',
};

// Make the POST request with Axios
axios.post('https://spreadly.app/api/v1/business-card-scans', formData, { headers })
  .then(response => {
    // Handle the response
    const scan = response.data;
    console.log('Scanned card', {scan});
  })
  .catch(error => {
    // Handle errors
    console.error('Error:', error.message);
  });
import requests

# Set headers with Bearer token and Content-Type
headers = {
    'Authorization': f'Bearer {apiKey}',
}

# Create a dictionary to simulate multipart/form-data
files = {
    'front': ('image.png', open('/path/to/image.png', 'rb')),
}

# Make the POST request with requests
response = requests.post('https://spreadly.app/api/v1/business-card-scans', headers=headers, files=files)

# Handle the response
scan = response.json()
print('Response:', scan)
import 'dart:io';
import 'package:dio/dio.dart';

Future<void> uploadImage() async {
  // Set headers with Bearer token
  Options options = Options(
    headers: {
      'Authorization': 'Bearer $apiKey',
      'Content-Type': 'multipart/form-data',
    },
  );

  // Create FormData to simulate multipart/form-data
  FormData formData = FormData.fromMap({
    'front': await MultipartFile.fromFile('/path/to/image.png', filename: 'image.png'),
  });

  try {
    // Make the POST request with dio
    Response response = await Dio().post(
      'https://spreadly.app/api/v1/business-card-scans',
      data: formData,
      options: options
    );

    // Handle the response
    Map<String, dynamic> scan = response.data;
    print('Response: $scan');
  } catch (e) {
    // Handle errors
    print('Error: $e');
  }
}

void main() {
  uploadImage();
}
<?php

require 'vendor/autoload.php'; // Make sure to include GuzzleHTTP library

use GuzzleHttp\Client;
use GuzzleHttp\Psr7\Request;

// Create a Guzzle HTTP client
$client = new Client(['headers' => [
  'Authorization' => 'Bearer {apiKey}',
  'Content-Type' => 'multipart/form-data',
]]);

// Make the POST request with Guzzle
$response = $client->request('POST', 'https://spreadly.app/api/v1/business-card-scans', [
  'multipart' => [
    [
      'name' => 'front',
      'contents' => fopen('/path/to/image.png', 'r'),
      'filename' => 'image.png',
    ],
  ],
]);

$scan = json_decode($response->getBody(), true);

Response Properties

🚧

List of properties may change in future

New features may lead to new properties being used in the future.

PropertyTypeDescription
idintegerID of the scan
given_namestring, nullGiven name found on the card
family_namestring, nullFamily name on the card
is_companybooleanDoes the card just show a company
companystring, nullCompany on the card
positionstring, nullPosition on the card
departmentstring, nullDepartment on the card
emailsarray of stringAll email addresses on the card
phonesarray of stringAll phones on the card
mobilesarray of stringAll mobile phone numbers on the card
faxesarray of stringAll fax numbers found on card
websitesarray of stringAll websites on the card
addressesarray of stringAll addresses on the card
addresses_formattedarray of objectArray of formatted addresses
addresses_formatted[][street]string, nullStreet of the address
addresses_formatted[][city]string, nullCity of the address
addresses_formatted[][postal_code]string, nullPostal code
addresses_formatted[][region]string, nullRegion of the address
addresses_formatted[][country]string, nullCountry of the address
image_urls.frontstringLink to the uploaded front image
image_urls.backstring, nullLink to the uploaded back image

📘

Improve your results

To get the best results with our API, upload images in the best possible resolution and with a business card only.

Test our scanner

You can share your API keys from Spreadly with ReadMe.io by using the same email address for the accounts.

Language
Authorization
Header
Click Try It! to start a request and see the response here!