Get Contact Upload Credentials

Obtain a pre-signed upload credential for uploading a contact CSV file to the object storage service before importing the contacts.

Request URL

POST {base_url}/uc-ccontact/api/v1/resources/upload-credential

Request parameters

Headers
Parameter Required Type Description
Authorization Yes String The access token used for authentication.

Format: Bearer {access_token}.

x-tenant-code Yes String The tenant name.
Note: You can obtain tenant name using the Query Tenants interface.
Body parameters
Parameter Required Type Description
bizType Yes String

The type of contact file to upload.

Valid value:

  • company_contact_import
  • personal_contact_import
contentType No String The MIME type of the file to upload.

Valid value: text/csv

Response parameters

Parameter Type Description
requestId String The unique ID of the request, which can be used to quickly locate the request.
code String The HTTP status code of the request.
  • 200: Request succeeded.
  • Non-200 value: Request failed.
message String The status message of the request.
detailMessage String The detailed error information.

When the request is successful, this parameter returns empty.

result Object<Upload_Credential> The upload credential.
Upload_Credential
Parameter Type Description
resourceId String The resource ID, which is passed as resourceId when the contact import interface is called.
uploadUrl String The pre-signed URL to which the file is uploaded.
httpMethod String The HTTP method to use for the upload. The value is always PUT.
headers Object The request headers to include when uploading the file.
expiresIn Integer The validity period of the credential, in seconds.

Example

Request example

POST /uc-ccontact/api/v1/resources/upload-credential HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJkaXN0cmlidXRvcmV4YW1wbGVAb3V0bG9vay5jb20iLCJncmFudF90eXBlIjoib3BlbmFwaSIsImNsaWVudF9leHQiOnsiZGVzY3JpcHRpb24iOiLnrKzkuInmlrnlkIjkvZzkvJnkvLTlupTnlKgiLCJwYXJ0bmVyIjoi56S65L6L5ZCI5L2c5LyZ5Ly0In0sImNsaWVudF90eXBlIjoib3BlbmFwaSIsImV4cCI6MTc5MTU1NjIyNywiaWF0IjoxNzkxNTM0NjI3LCJqdGkiOiI1OGIyYTM3YS1kM2Q2LTRhYTUtODEwOS1kZTg5ZGE3YTQ5NWMiLCJjbGllbnRfaWQiOiJub3ZvLW9wZW4tcGxhdGZvcm0iLCJ1c2VyX2V4dCI6eyJyb2xlSWRzIjpbM10sInN0eXBlIjoiQURNSU4iLCJ0ZW5hbnRDb2RlIjpudWxsLCJ0eXBlIjoiUF9BQ0NPVU5UIiwidXNlcklkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJlbWFpbCI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInVzZXJuYW1lIjoiZGlzdHJpYnV0b3JleGFtcGxlQG91dGxvb2suY29tIiwidWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5Nn19.z9-FUkQL_rpNNUHl9ddimwioABpVsvQIF403CoYsR8OATIkbpWbxQXDpRD2ydJpkj_6FCqWxee7XjAswlUcn3YMWLo1HeuXFF3TnyS5diTmrAmd4_AL1S3S38pmY4sbgjVFLbZphx85V-HZ35ngZoHkNiyEoondYhF4eyE3SuXgnDRd3PQB-pD5QNzqortzvMAVXlzcTQvTG2OFKvQDVySyFigu0kK35EiL-A1PaBzQCrR768WG-Myk3R6T_Ae1p5IsB3zM0pBs0b_VI6qloo596Hq-yB3GFeCMMGpujTjIa7pk51mzgoOGwcYih8Q5klojv_t0SyoNbxJxXDMVNVw
Content-Type: application/json
x-tenant-code: jint
{
  "bizType": "company_contact_import",
  "contentType": "text/csv"
}

Response example

HTTP/1.1 200 OK
{
  "requestId": "8d6d3be4bc6bffccd38444ff9c25347a",
  "code": "200",
  "message": "SUCCESS",
  "detailMessage": "",
  "result": {
    "resourceId": "2108807117839118338",
    "uploadUrl": "https://novo-one-tst-self-operated-business.s3.ap-east-1.amazonaws.com/commctl-contact/min/company_contact_import/company_contact_import.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20261010T062931Z&X-Amz-SignedHeaders=content-type%3Bhost&X-Amz-Credential=AKIA6ODU5BKBMSDIXP4N%2F20261010%2Fap-east-1%2Fs3%2Faws4_request&X-Amz-Expires=900&X-Amz-Signature=40dfbaf1ee97f8d2b1884899cccf269e8a42650c8caf40e07830183c149cb375",
    "httpMethod": "PUT",
    "headers": {
      "content-type": "text/csv"
    },
    "expiresIn": 900
  }
}