Create CRM file metadata
POST
/v1/crm/object-types/{objectKind}/records/{objectID}/filesAuthorization
bearerAuthbearerAuthrequiredor
apiKeyAuthapiKeyAuthrequiredPath parameters
objectKindstringrequiredobjectIDstringrequiredRequest body
requiredapplication/jsoncontent_typestringfilenamestringrequiredmetadataanysize_bytesinteger<int64>storage_keystringurlstringResponses
200OK
content_typestringrequiredcreated_atstringrequiredfilenamestringrequiredidstringrequiredmetadataanyrequiredobject_idstringrequiredobject_kindstringrequiredsize_bytesinteger<int64>requiredstorage_keystringupdated_atstringrequireduploaded_bystringurlstring400Bad Request
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring401Unauthorized
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring403Forbidden
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring404Not Found
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring422Unprocessable Entity
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring500Internal Server Error
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstringRequest
curl -X POST "/v1/crm/object-types/string/records/string/files" \
-H "Content-Type: application/json" \
-d '{
"content_type": "string",
"filename": "string",
"metadata": "string",
"size_bytes": 0,
"storage_key": "string",
"url": "string"
}'const response = await fetch("/v1/crm/object-types/string/records/string/files", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"content_type": "string",
"filename": "string",
"metadata": "string",
"size_bytes": 0,
"storage_key": "string",
"url": "string"
})
});import requests
response = requests.post(
"/v1/crm/object-types/string/records/string/files",
headers={
"Content-Type": "application/json"
},
json={
"content_type": "string",
"filename": "string",
"metadata": "string",
"size_bytes": 0,
"storage_key": "string",
"url": "string"
},
)Response
{
"content_type": "string",
"created_at": "string",
"filename": "string",
"id": "string",
"metadata": "string",
"object_id": "string",
"object_kind": "string",
"size_bytes": 0,
"storage_key": "string",
"updated_at": "string",
"uploaded_by": "string",
"url": "string"
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}