REST API Reference
Fieldify's REST API has six operations: three read the files of a File Field and three add files to it. Before the first call, an admin turns the API on and allows the calling account, as described in Set Up the REST API.
Send a request
- Paths are relative to your site's base URL.
- Authenticate each request with the OAuth 2.0 access token as a bearer token, as the examples on this page do.
- Request and response bodies are JSON. Send a body with
Content-Type: application/json. - Timestamps are ISO 8601 in UTC.
- A work item is identified by its key or its numeric ID, a field by its ID (
customfield_and digits) from List File Fields.
Handle errors
Every error from Fieldify has this body. Act on code; message is for people. details appears when there is more
than one reason.
{
"error": {
"code": "field-full",
"message": "This field already holds 5 files, the most its settings allow. Remove a file first."
}
}
Each operation below lists the status codes it returns. The OpenAPI definition also lists the codes duplicate and
older-version; uploads and imports answer 200 unchanged or add a new file instead, so you should not see them.
Every operation can also return these:
| Status | Description |
|---|---|
401 | Returned if the access token is missing or expired. Atlassian's own body. |
403 | Returned if the account that granted consent is not allowed on the Fieldify REST API page (not-allowed). While the list is empty, every call returns this. Also returned, with Atlassian's own body, if the token lacks a scope: the message names it. |
424 | Returned if the call ran too long and was stopped. Atlassian's own body. Send the request again: a write that was already made answers unchanged. |
500 | Returned if Fieldify hit an unexpected error (unexpected). Retry; if it keeps happening, contact support. |
503 | Returned if Fieldify could not reach Jira or its storage just now, or could not read its list of allowed accounts (unavailable). Retry. A message that starts with "App permission not approved" means a site admin must first approve a pending permission of Fieldify. |
List File Fields
GET /v1/fields
Returns the File Fields of Fieldify on the site, so you can find the field ID the other operations take.
Scopes: read:file-field:custom, read:forge-app:jira
Request
This operation takes no parameters.
Example request
curl --request GET \
--url '<base URL>/v1/fields' \
--header 'Authorization: Bearer <access token>' \
--header 'Accept: application/json'
Responses
| Status | Description |
|---|---|
200 | Returned if the request is successful. |
Example response (200)
{
"fields": [
{
"id": "customfield_10124",
"name": "Supporting Documents"
},
{
"id": "customfield_10123",
"name": "Signed Contract"
}
]
}
| Name | Type | Description |
|---|---|---|
fields | array of objects | Each File Field on the site, with id and name. |
List files in a field
GET /v1/files
Returns the current files of one File Field on one work item.
Scopes: read:file-field:custom, read:forge-app:jira
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
issue | string | Yes | The work item's key or numeric ID. |
field | string | Yes | The File Field's ID, from List File Fields. |
Example request
curl --request GET \
--url '<base URL>/v1/files?issue=CNT-42&field=customfield_10123' \
--header 'Authorization: Bearer <access token>' \
--header 'Accept: application/json'
Responses
| Status | Description |
|---|---|
200 | Returned if the request is successful. |
400 | Returned if issue or field is missing or has the wrong form (bad-request). |
404 | Returned if there is no File Field with this ID (field-not-found) or no work item with this key or ID (issue-not-found). |
409 | Returned if the field's context does not cover this work item (field-not-on-issue), or the field holds a value Fieldify cannot read (foreign-value). |
Example response (200)
{
"issue": {
"id": "10045",
"key": "CNT-42"
},
"field": {
"id": "customfield_10123"
},
"files": [
{
"fileId": "fg/1795471403486-0-+ky8Sy+EIuQA5mcslzvZWklTkoWPQ/ewvOg71YBcOmk=",
"filename": "contract-scan.pdf",
"mimeType": "application/pdf",
"size": 300009,
"uploadedAt": "2026-11-23T22:03:23.486Z",
"uploadedBy": "712020:3b9e6c2a-8f41-4d7e-b5a0-9c2e1f7d4a68",
"category": null,
"versions": 1
}
]
}
| Name | Type | Description |
|---|---|---|
issue | object | The work item's id and key. |
field | object | The field's id. |
files | array of objects | The field's current files, each a file object. |
Get download links
POST /v1/files/links
Returns a download link for each file ID in the request. Only current files of that field on that work item get a link. Each link works for one hour, for anyone who holds it.
Scopes: read:file-field:custom, read:forge-app:jira
Request body
| Name | Type | Required | Description |
|---|---|---|---|
issue | string | Yes | The work item's key or numeric ID. |
field | string | Yes | The File Field's ID. |
fileIds | array of strings | Yes | 1 to 50 fileId values from List files in a field, each up to 255 characters. Repeated IDs are answered once. |
Example request
curl --request POST \
--url '<base URL>/v1/files/links' \
--header 'Authorization: Bearer <access token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"issue": "CNT-42",
"field": "customfield_10123",
"fileIds": ["fg/1795471403486-0-+ky8Sy+EIuQA5mcslzvZWklTkoWPQ/ewvOg71YBcOmk="]
}'
Responses
| Status | Description |
|---|---|
200 | Returned if the request is successful. A file that got no link is listed in errors or notProcessed. |
400 | Returned if the body does not have the shape above, for example fileIds is not 1 to 50 strings (bad-request). |
404 | Returned if there is no File Field with this ID (field-not-found) or no work item with this key or ID (issue-not-found). |
409 | Returned if the field's context does not cover this work item (field-not-on-issue), or the field holds a value Fieldify cannot read (foreign-value). |
Example response (200)
{
"links": [
{
"fileId": "fg/1795471403486-0-+ky8Sy+EIuQA5mcslzvZWklTkoWPQ/ewvOg71YBcOmk=",
"filename": "contract-scan.pdf",
"mimeType": "application/pdf",
"size": 300009,
"uploadedAt": "2026-11-23T22:03:23.486Z",
"uploadedBy": "712020:3b9e6c2a-8f41-4d7e-b5a0-9c2e1f7d4a68",
"category": null,
"versions": 1,
"url": "<download link>",
"expiresAt": "2026-11-23T23:06:36.339Z"
}
],
"errors": [],
"notProcessed": []
}
Each ID you sent appears once, in one of the three arrays, in the order you sent it.
| Name | Type | Description |
|---|---|---|
links | array of objects | A link object for each file that got a link. |
errors | array of objects | A link error for each file that did not. |
notProcessed | array of strings | IDs the call did not reach within its time limit. Send them again in a later call. |
Upload a file
POST /v1/files/upload
Adds a file of up to 3,500,000 bytes, sent in the request body as base64. For a larger file, use Import an attachment.
Scopes: write:file-field:custom, read:forge-app:jira
How the file is written
Uploads and imports follow the field's configuration for that work item:
- When the field takes one file, the new file replaces the current one, with its older versions.
modeisreplacedandreplacedFileIdslists the file that left the field. - When the field takes more than one file, the new file is added after the others and
modeisappended. A field that already holds its maximum number of files refuses it with409field-full. - A file with the same name and content as a current file of the field is not added again. The answer is
200withmodeunchangedand the file already there, so repeating a request after a lost answer is safe. - The field's allowed file types and maximum file size apply.
Write into one field one file after another. While another REST API write into the same field on the same work item is
in progress, an upload answers 409 busy with a Retry-After header: wait that many seconds and send it again. Writes
into different fields or work items do not wait for each other.
Request body
| Name | Type | Required | Description |
|---|---|---|---|
issue | string | Yes | The work item's key or numeric ID. |
field | string | Yes | The File Field's ID. |
filename | string | Yes | The file name with its extension. |
contentBase64 | string | Yes | The file's content in standard base64, without a data: prefix or line breaks. At most 3,500,000 bytes once decoded. |
mimeType | string | No | The file's media type, for example application/pdf. Printable ASCII, up to 255 characters. |
category | string | No | The name of a category set on the field. |
Example request
curl --request POST \
--url '<base URL>/v1/files/upload' \
--header 'Authorization: Bearer <access token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"issue": "CNT-42",
"field": "customfield_10123",
"filename": "contract-signed.pdf",
"mimeType": "application/pdf",
"contentBase64": "<file content, base64>"
}'
Responses
| Status | Description |
|---|---|
201 | Returned if the file was written. |
200 | Returned if a file with the same name and content was already a current file of the field. mode is unchanged and nothing changed. |
400 | Returned if the body does not have the shape above (bad-request), filename has no visible character (bad-filename), or category is not set on the field (unknown-category). |
403 | Returned if Fieldify has no active license on the site (license-required). |
404 | Returned if there is no File Field with this ID (field-not-found) or no work item with this key or ID (issue-not-found). |
409 | Returned if the field's context does not cover this work item (field-not-on-issue), the field holds a value Fieldify cannot read (foreign-value), the field already holds its maximum number of files (field-full), the field's file names, notes and older versions are near their size limit (value-full), or another REST API write into this field is in progress (busy, with Retry-After). |
413 | Returned if the file is larger than the field's maximum file size (file-too-large), or contentBase64 decodes to more than 3,500,000 bytes (payload-too-large). |
422 | Returned if the field does not allow this file type (type-not-allowed), or the file has no content (empty-file). |
Example response (201)
The field takes one file, so the upload replaced its current file:
{
"issue": {
"id": "10045",
"key": "CNT-42"
},
"field": {
"id": "customfield_10123"
},
"mode": "replaced",
"file": {
"fileId": "fg/1795471599084-0-CB5Aay/O2vr5Di4D1f5ISjk/3aKSc0SjXAGbVDAMA84=",
"filename": "contract-signed.pdf",
"mimeType": "application/pdf",
"size": 2009,
"uploadedAt": "2026-11-23T22:06:39.084Z",
"uploadedBy": "712020:3b9e6c2a-8f41-4d7e-b5a0-9c2e1f7d4a68",
"category": null,
"versions": 1
},
"replacedFileIds": [
"fg/1795471403486-0-+ky8Sy+EIuQA5mcslzvZWklTkoWPQ/ewvOg71YBcOmk="
],
"files": [
{
"fileId": "fg/1795471599084-0-CB5Aay/O2vr5Di4D1f5ISjk/3aKSc0SjXAGbVDAMA84=",
"filename": "contract-signed.pdf",
"mimeType": "application/pdf",
"size": 2009,
"uploadedAt": "2026-11-23T22:06:39.084Z",
"uploadedBy": "712020:3b9e6c2a-8f41-4d7e-b5a0-9c2e1f7d4a68",
"category": null,
"versions": 1
}
]
}
Sending the same request again answers 200 with the same body, except "mode": "unchanged" and an empty
replacedFileIds.
| Name | Type | Description |
|---|---|---|
issue | object | The work item's id and key. |
field | object | The field's id. |
mode | string | replaced, appended or unchanged. |
file | object | The file added, or for unchanged the file already there. |
replacedFileIds | array of strings | The IDs of the files the write took out of the field. Empty unless mode is replaced. |
files | array of objects | Every current file of the field after the write. |
Import an attachment
POST /v1/files/import
Copies a Jira attachment of the same work item into the field, for files larger than an upload takes: up to 100 MB, and
never more than the field's own size limit. Fieldify checks the request, answers 202 at once and copies the file in
the background. Follow the copy with Get import status.
The file is written as an upload writes it (see How the file is written). An import into a field that another REST API write holds waits and retries on its own. Fieldify never deletes the attachment: delete it with Jira's REST API once the import has finished.
Scopes: write:file-field:custom, read:forge-app:jira
Request body
| Name | Type | Required | Description |
|---|---|---|---|
issue | string | Yes | The work item's key or numeric ID. |
field | string | Yes | The File Field's ID. |
attachmentId | string | Yes | The ID of a Jira attachment on that work item. |
category | string | No | The name of a category set on the field. |
Example request
curl --request POST \
--url '<base URL>/v1/files/import' \
--header 'Authorization: Bearer <access token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"issue": "CNT-42",
"field": "customfield_10123",
"attachmentId": "10342"
}'
Responses
| Status | Description |
|---|---|
202 | Returned if the import is queued. The Retry-After header holds the seconds to wait before asking for its status. |
400 | Returned if the body does not have the shape above (bad-request), or category is not set on the field (unknown-category). |
403 | Returned if Fieldify has no active license on the site (license-required). |
404 | Returned if there is no File Field with this ID (field-not-found), no work item with this key or ID (issue-not-found), or no attachment with this ID on the work item (attachment-not-found). |
409 | Returned if the field's context does not cover this work item (field-not-on-issue), the field holds a value Fieldify cannot read (foreign-value), the field already holds its maximum number of files (field-full), or the field's file names, notes and older versions are near their size limit (value-full). |
413 | Returned if the attachment is larger than the field's maximum file size or larger than 100 MB (file-too-large). |
422 | Returned if the field does not allow this file type (type-not-allowed), or the attachment is empty (empty-file). |
The same checks run again during the copy, because the field can change in the meantime. A copy that fails reports its
code in the import's error.
Example response (202)
{
"jobId": "8436d9cf-9e18-4c7a-8ec3-36f68d6a023f",
"status": "queued",
"issue": {
"id": "10045",
"key": "CNT-42"
},
"field": {
"id": "customfield_10123"
},
"attachmentId": "10342",
"createdAt": "2026-11-23T22:06:47.406Z",
"updatedAt": "2026-11-23T22:06:47.406Z",
"statusPath": "/v1/files/import?jobId=8436d9cf-9e18-4c7a-8ec3-36f68d6a023f",
"retryAfterSeconds": 5
}
The body is an import job object. To ask for the status, send GET to the base URL followed by
statusPath. The answer has no Location header.
Get import status
GET /v1/files/import
Returns how an import is going. Only the account that started the import can read it. Fieldify keeps the record for 7 days.
Scopes: write:file-field:custom, read:forge-app:jira
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
jobId | string | Yes | The jobId that Import an attachment returned. |
Example request
curl --request GET \
--url '<base URL>/v1/files/import?jobId=8436d9cf-9e18-4c7a-8ec3-36f68d6a023f' \
--header 'Authorization: Bearer <access token>' \
--header 'Accept: application/json'
Responses
| Status | Description |
|---|---|
200 | Returned if the import has finished: status is succeeded or failed. A failed import is still a 200; its error says why. |
202 | Returned if the import is queued or running. Wait the seconds in the Retry-After header and ask again. |
400 | Returned if jobId is missing or has the wrong form (bad-request). |
403 | Returned if Fieldify has no active license on the site (license-required). |
404 | Returned if this account has no import with this job ID (job-not-found), for example because it is older than 7 days. |
Example response (200)
{
"jobId": "8436d9cf-9e18-4c7a-8ec3-36f68d6a023f",
"status": "succeeded",
"issue": {
"id": "10045",
"key": "CNT-42"
},
"field": {
"id": "customfield_10123"
},
"attachmentId": "10342",
"createdAt": "2026-11-23T22:06:47.406Z",
"updatedAt": "2026-11-23T22:06:50.274Z",
"result": {
"file": {
"category": null,
"fileId": "fg/1795471609766-0-+ky8Sy+EIuQA5mcslzvZWklTkoWPQ/ewvOg71YBcOmk=",
"filename": "contract-scan.pdf",
"mimeType": "application/pdf",
"size": 300009,
"uploadedAt": "2026-11-23T22:06:49.766Z",
"uploadedBy": "712020:3b9e6c2a-8f41-4d7e-b5a0-9c2e1f7d4a68",
"versions": 1
},
"mode": "replaced",
"replacedFileIds": [
"fg/1795471599084-0-CB5Aay/O2vr5Di4D1f5ISjk/3aKSc0SjXAGbVDAMA84="
]
}
}
The body is an import job object.
Read the response objects
File object
| Field | Type | Description |
|---|---|---|
fileId | string | The file's ID. Pass it to Get download links. |
filename | string or null | The file name. |
mimeType | string or null | The file's media type. |
size | integer or null | Size in bytes. |
uploadedAt | string or null | When the file was added. |
uploadedBy | string or null | The Atlassian account ID of whoever added the file. For a file added through the API, the allowed account. |
category | string or null | The file's category, or null. |
versions | integer | The number of versions the file has: 1 for a file never replaced by a new version. Older versions are not part of the API. |
fileId can contain /, + and =. Send it back as returned, and encode it before you use it in a URL or a file
path.
Link object
The fields of the file object, plus:
| Field | Type | Description |
|---|---|---|
url | string | The download link. Fetch it with a plain GET, without the access token. Anyone who has it can download the file until expiresAt, so never log it. |
expiresAt | string | When the link expires. |
Link error object
| Field | Type | Description |
|---|---|---|
fileId | string | The ID that got no link. |
code | string | not-in-field: the file is not a current file of this field on this work item. mint-failed: the link could not be created. |
message | string | The reason, for people. |
retryable | boolean | Only for mint-failed: true when asking again may succeed. |
Import job object
| Field | Type | Description |
|---|---|---|
jobId | string | The import's ID. |
status | string | queued, running, succeeded or failed. |
issue | object | The work item's id and key. |
field | object | The field's id. |
attachmentId | string | The attachment being copied. |
createdAt | string | When the import was started. |
updatedAt | string | When the record last changed. |
result | object | Once succeeded: mode, file and replacedFileIds, as an upload returns them. |
error | object | Once failed: code, message and sometimes details. The code is one of the codes on this page, or stalled when the import made no progress for 20 minutes. |
statusPath | string | Only in the 202 of Import an attachment: the path to ask for the status, relative to the base URL. |
retryAfterSeconds | integer | Only in 202 answers: seconds to wait before you ask again. The Retry-After header holds the same number. |
Check the scopes each operation needs
| Method | Path | Scopes |
|---|---|---|
GET | /v1/fields | read:file-field:custom, read:forge-app:jira |
GET | /v1/files | read:file-field:custom, read:forge-app:jira |
POST | /v1/files/links | read:file-field:custom, read:forge-app:jira |
POST | /v1/files/upload | write:file-field:custom, read:forge-app:jira |
POST | /v1/files/import | write:file-field:custom, read:forge-app:jira |
GET | /v1/files/import | write:file-field:custom, read:forge-app:jira |
read:file-field:custom ("Read File Field files") and write:file-field:custom ("Add files to File Fields") are
Fieldify's own scopes. read:forge-app:jira is Jira's scope for calling a Forge app's REST API.
Use the OpenAPI definition
Download the OpenAPI definition (Swagger 2.0) to import the six operations into a tool instead of typing them in.
- Its host is
your-site.atlassian.net: change it to your site. This address and the base URL on the Fieldify REST API page reach the same API. - It sends the token in the
Authorizationheader as an API key: enter the value asBearer <access token>. - It does not describe the authorization flow, because the authorization URL must come from the Developer Console's generator. Get the token as described in Create an OAuth 2.0 integration.