curl --request PUT \
--url https://api.us.cr4ce.com/attachment/{token}/update-field/{field_slug} \
--header 'Accept: <accept>' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"value": "Site inspection photos from the March visit"
}
'import requests
url = "https://api.us.cr4ce.com/attachment/{token}/update-field/{field_slug}"
payload = { "value": "Site inspection photos from the March visit" }
headers = {
"Accept": "<accept>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
Accept: '<accept>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({value: 'Site inspection photos from the March visit'})
};
fetch('https://api.us.cr4ce.com/attachment/{token}/update-field/{field_slug}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.us.cr4ce.com/attachment/{token}/update-field/{field_slug}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'value' => 'Site inspection photos from the March visit'
]),
CURLOPT_HTTPHEADER => [
"Accept: <accept>",
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.us.cr4ce.com/attachment/{token}/update-field/{field_slug}"
payload := strings.NewReader("{\n \"value\": \"Site inspection photos from the March visit\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Accept", "<accept>")
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.us.cr4ce.com/attachment/{token}/update-field/{field_slug}")
.header("Accept", "<accept>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"value\": \"Site inspection photos from the March visit\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.us.cr4ce.com/attachment/{token}/update-field/{field_slug}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Accept"] = '<accept>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"value\": \"Site inspection photos from the March visit\"\n}"
response = http.request(request)
puts response.read_body{
"application": {
"slug": "AbCdEfGh",
"link": "https://api.au.cr4ce.com/application/AbCdEfGh",
"title": "Project title"
},
"attachment_fields": [
{
"slug": "IjKlMnOp",
"link": "https://api.au.cr4ce.com/field/IjKlMnOp",
"label": {
"en_GB": "Type of attachment"
},
"title": {
"en_GB": "Type of attachment"
},
"value": "Photo",
"translated": {
"en_GB": "Photo"
}
},
{
"slug": "QrStUvWx",
"link": "https://api.au.cr4ce.com/field/QrStUvWx",
"label": {
"en_GB": "<p>URL</p>"
},
"title": {
"en_GB": "URL"
},
"value": "https://example.com/image.svg",
"translated": {
"en_GB": "https://example.com/image.svg"
}
}
],
"created": "2025-04-27T01:00:00Z",
"file": {
"token": "AbCdEfGhIjKlMnOp",
"link": "https://api.au.cr4ce.com/file/AbCdEfGhIjKlMnOp",
"download": "https://files.au.cr4ce.com/file/AbCdEfGhIjKlMnOp/example.pdf?Expires=1781485359&Signature=REDACTED&Key-Pair-Id=REDACTED",
"filename": "example.pdf"
},
"order": 1,
"tab": {
"slug": "YzAbCdEf",
"link": "https://api.au.cr4ce.com/tab/YzAbCdEf",
"name": {
"en_GB": "Attachments"
}
},
"token": "AbCdEfGhIjKlMnOp",
"updated": "2025-04-27T01:05:00Z"
}{
"message": "<string>",
"status_code": 400
}{
"message": "<string>",
"status_code": 401
}{
"message": "<string>",
"status_code": 403
}{
"message": "<string>",
"status_code": 404
}{
"message": "<string>",
"status_code": 422,
"errors": {}
}{
"message": "<string>",
"status_code": 429
}{
"status": "Maintenance in progress"
}Update attachment field
Update an attachment field for the attachment identified by the specified token.
curl --request PUT \
--url https://api.us.cr4ce.com/attachment/{token}/update-field/{field_slug} \
--header 'Accept: <accept>' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"value": "Site inspection photos from the March visit"
}
'import requests
url = "https://api.us.cr4ce.com/attachment/{token}/update-field/{field_slug}"
payload = { "value": "Site inspection photos from the March visit" }
headers = {
"Accept": "<accept>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
Accept: '<accept>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({value: 'Site inspection photos from the March visit'})
};
fetch('https://api.us.cr4ce.com/attachment/{token}/update-field/{field_slug}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.us.cr4ce.com/attachment/{token}/update-field/{field_slug}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'value' => 'Site inspection photos from the March visit'
]),
CURLOPT_HTTPHEADER => [
"Accept: <accept>",
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.us.cr4ce.com/attachment/{token}/update-field/{field_slug}"
payload := strings.NewReader("{\n \"value\": \"Site inspection photos from the March visit\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Accept", "<accept>")
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.us.cr4ce.com/attachment/{token}/update-field/{field_slug}")
.header("Accept", "<accept>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"value\": \"Site inspection photos from the March visit\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.us.cr4ce.com/attachment/{token}/update-field/{field_slug}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Accept"] = '<accept>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"value\": \"Site inspection photos from the March visit\"\n}"
response = http.request(request)
puts response.read_body{
"application": {
"slug": "AbCdEfGh",
"link": "https://api.au.cr4ce.com/application/AbCdEfGh",
"title": "Project title"
},
"attachment_fields": [
{
"slug": "IjKlMnOp",
"link": "https://api.au.cr4ce.com/field/IjKlMnOp",
"label": {
"en_GB": "Type of attachment"
},
"title": {
"en_GB": "Type of attachment"
},
"value": "Photo",
"translated": {
"en_GB": "Photo"
}
},
{
"slug": "QrStUvWx",
"link": "https://api.au.cr4ce.com/field/QrStUvWx",
"label": {
"en_GB": "<p>URL</p>"
},
"title": {
"en_GB": "URL"
},
"value": "https://example.com/image.svg",
"translated": {
"en_GB": "https://example.com/image.svg"
}
}
],
"created": "2025-04-27T01:00:00Z",
"file": {
"token": "AbCdEfGhIjKlMnOp",
"link": "https://api.au.cr4ce.com/file/AbCdEfGhIjKlMnOp",
"download": "https://files.au.cr4ce.com/file/AbCdEfGhIjKlMnOp/example.pdf?Expires=1781485359&Signature=REDACTED&Key-Pair-Id=REDACTED",
"filename": "example.pdf"
},
"order": 1,
"tab": {
"slug": "YzAbCdEf",
"link": "https://api.au.cr4ce.com/tab/YzAbCdEf",
"name": {
"en_GB": "Attachments"
}
},
"token": "AbCdEfGhIjKlMnOp",
"updated": "2025-04-27T01:05:00Z"
}{
"message": "<string>",
"status_code": 400
}{
"message": "<string>",
"status_code": 401
}{
"message": "<string>",
"status_code": 403
}{
"message": "<string>",
"status_code": 404
}{
"message": "<string>",
"status_code": 422,
"errors": {}
}{
"message": "<string>",
"status_code": 429
}{
"status": "Maintenance in progress"
}Authorizations
API key used to authenticate and authorise every request.
Include it in the x-api-key header.
Headers
Defines the response type.
application/vnd.Creative Force.v2.3+json, application/vnd.Creative Force.v2.3+xml Path Parameters
Token string.
^[A-Za-z0-9]{16}$|^[A-Za-z0-9]{32}$Slug of the field.
^[A-Za-z]{8}$Body
Attachment field update payload.
New value for the attachment field identified by field_slug. The accepted value depends on the type and configuration of the field.
Use a string for text fields, a number for numeric fields, an ISO 8601 date for date fields, and an option slug for choice fields. A value outside the option set of a choice field returns a 422 response. For file-type fields, use an object containing the base64-encoded file data and a filename.
Response
Attachment field updated.
File attached to an application through an attachments-typed form tab.
Application the attachment belongs to.
Show child attributes
Show child attributes
Form fields captured against this attachment, one item per field, in form order.
Show child attributes
Show child attributes
Date and time when the attachment was created.
File backing the attachment.
Show child attributes
Show child attributes
Position of the attachment within its tab.
Attachments tab the attachment belongs to.
Show child attributes
Show child attributes
Token identifying the attachment file, same value as file.token.
Date and time when the attachment was last updated.