Generate Upload Image URL

Allows users to securely upload images (either as a source or target).

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Curl Request

curl --location 'https://staging.cypherface.com/api/upload/generate-url/' \
--header 'authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjeXBoZXJGYWNlSWQiOiI2N2I0ODhkOGI0Yjk1YjM5M2ZiZGZmNzQiLCJ4QXBpS2V5IjoiY2JmZTBiYWYtZGI2NS00NDYzLWJhZWMtYTk4NjMzYTEzZWY3IiwiaWF0IjoxNzQwNjY0NjI5LCJleHAiOjE3NDA4Mzc0Mjl9.UL6hwXTNlVcB5lLT-pt5SehK6BnvOHGPj50KuUBYR-4' \
--header 'Content-Type: application/json' \
--header 'Cookie: connect.sid=s%3AyoqwqQtJPuetxSVZLt9_3cikxJ6eSZO-.RDMRaaGKPjP%2F7f6E1pJeiOCPXiu61fEP8J8PwHvgW%2BY' \
--data '{
    "userId":"6789fb11e94adea011383478",
    "imageName":"amitabh (2).jpg",
    "contentType":"image/jpeg",
    "type":"upload"
}'

Process

  1. Validate the user's authorization token and input parameters (imageName, `contentType`, type).
  2. If the type is upload, check if a source image already exists for the user
    • If not, generate a Generate URL and return the URL.
    • If an image exists, check if it has been processed. If not, update the record and provide a new upload URL.
  3. If the type is match, generate a Generate URL.
Body Params
string
required
Defaults to profile.jpg

Name of the image to upload.

string
enum
required

MIME type of the image.

Allowed:
string
enum
required

Either upload or match.

Allowed:
string
required
Headers
string
required

Bearer token for user auth.

string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Basic
base64
:
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json