2. Update Logo

2. Update Logo


This  POST  API is used to upload your Logo in your account.
      *PDF documentation reference - Section 2.2 Logo Upload in Account

Query Parameters

In our REST APIs, Query Parameters have to be URL encoded as the data is being transmitted in the request URL. This is especially important for the  asgn  parameter and any parameters with JSON as they always contain characters that need to be URL encoded. Since  ak  and  ts   parameters don't contain any characters that need to be URL encoded, URL encoding of these parameters can be skipped.

Mandatory parameters

Query Parameter



This is your Public-API-Key, which Mettl uses to identify your account.


This is the current UNIX or Epoch Timestamp (the number of seconds between 1970-01-01 00:00:00 and current UTC Time). Any current generated Timestamp will be valid for 24 hours only.


This is a unique Signature which has to be generated for each API request.

The Signature is generated by creating a String-to-Sign and hashing it with your Private-API-Key using the HMAC-SHA256 (for version v2 and v3) or HMAC-SHA1 (for v1) hashing algorithm with Base-64 and URL encoding.

Read more about the above Signature Generation Process in API Authentication and Signature Generation.

 POST  request syntax with mandatory parameters:

Body Form-Data

Only supported in multipart/form-data requests. All form-data fields are irrelevant for the signature generation process.

Mandatory fields




This is the logo which appears on the top left of a candidate's test screen and your dashboard. You can upload an image file with the following properties-
  1. Accepted logo formats: jpeg, jpg, png and gif
  2. Maximum logo size: 100 Kb
  3. Recommended size: 160x60px


Request without Signature
a.1.  POST  request URL, with queries  ak  and  ts  but without  asgn  (Signature)
a.2.  POST  request body with multipart/form-data  logo 
logo: 'logo.png' 

b. Creating a String-to-Sign, calculated with Method + Endpoint + Values of query parametersin new lines and in ascending order of the parameter name (i.e., the new line characters "\n" followed by values of  ak  and  ts  in order, for this example)
String-to-Sign = "POST" +  "https://api.mettl.com/v2/account/upload-logo"  + "\n" + "ab12c345-6789-0123-456d-78e9f0123456"  + "\n" + "1635976200"
c. Output of the Sting-to-Sign created above
d. Private-API-Key to sign/hash the above Sting-to-Sign using HMAC-SHA256 (since API version is v2)
e. Output of the generated Signature for  asgn  using the Sting-to-Sign and your Private-API-Key, hashed with HMAC-SHA256 (Base-64 and URL Encoded)
Read more about the above Signature Generation Process in API Authentication and Signature Generation

Request with Signature
f.1. Final  POST  request URL with queries  ak  ,  ts  and  asgn  (URL Encoded)
f.2.  POST  request body with multipart/form-data  logo 
logo: 'logo.png' 


Upon making a successful request, if there are no errors, you will receive a JSON in the given format
    "status": "SUCCESS"