Skip to main content

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:

StatusDescription
401Returned if the access token is missing or expired. Atlassian's own body.
403Returned 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.
424Returned 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.
500Returned if Fieldify hit an unexpected error (unexpected). Retry; if it keeps happening, contact support.
503Returned 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​

StatusDescription
200Returned if the request is successful.

Example response (200)​

{
"fields": [
{
"id": "customfield_10124",
"name": "Supporting Documents"
},
{
"id": "customfield_10123",
"name": "Signed Contract"
}
]
}
NameTypeDescription
fieldsarray of objectsEach 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​

NameTypeRequiredDescription
issuestringYesThe work item's key or numeric ID.
fieldstringYesThe 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​

StatusDescription
200Returned if the request is successful.
400Returned if issue or field is missing or has the wrong form (bad-request).
404Returned if there is no File Field with this ID (field-not-found) or no work item with this key or ID (issue-not-found).
409Returned 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
}
]
}
NameTypeDescription
issueobjectThe work item's id and key.
fieldobjectThe field's id.
filesarray of objectsThe field's current files, each a file object.

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​

NameTypeRequiredDescription
issuestringYesThe work item's key or numeric ID.
fieldstringYesThe File Field's ID.
fileIdsarray of stringsYes1 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​

StatusDescription
200Returned if the request is successful. A file that got no link is listed in errors or notProcessed.
400Returned if the body does not have the shape above, for example fileIds is not 1 to 50 strings (bad-request).
404Returned if there is no File Field with this ID (field-not-found) or no work item with this key or ID (issue-not-found).
409Returned 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.

NameTypeDescription
linksarray of objectsA link object for each file that got a link.
errorsarray of objectsA link error for each file that did not.
notProcessedarray of stringsIDs 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. mode is replaced and replacedFileIds lists the file that left the field.
  • When the field takes more than one file, the new file is added after the others and mode is appended. A field that already holds its maximum number of files refuses it with 409 field-full.
  • A file with the same name and content as a current file of the field is not added again. The answer is 200 with mode unchanged and 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​

NameTypeRequiredDescription
issuestringYesThe work item's key or numeric ID.
fieldstringYesThe File Field's ID.
filenamestringYesThe file name with its extension.
contentBase64stringYesThe file's content in standard base64, without a data: prefix or line breaks. At most 3,500,000 bytes once decoded.
mimeTypestringNoThe file's media type, for example application/pdf. Printable ASCII, up to 255 characters.
categorystringNoThe 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​

StatusDescription
201Returned if the file was written.
200Returned if a file with the same name and content was already a current file of the field. mode is unchanged and nothing changed.
400Returned 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).
403Returned if Fieldify has no active license on the site (license-required).
404Returned if there is no File Field with this ID (field-not-found) or no work item with this key or ID (issue-not-found).
409Returned 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).
413Returned 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).
422Returned 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.

NameTypeDescription
issueobjectThe work item's id and key.
fieldobjectThe field's id.
modestringreplaced, appended or unchanged.
fileobjectThe file added, or for unchanged the file already there.
replacedFileIdsarray of stringsThe IDs of the files the write took out of the field. Empty unless mode is replaced.
filesarray of objectsEvery 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​

NameTypeRequiredDescription
issuestringYesThe work item's key or numeric ID.
fieldstringYesThe File Field's ID.
attachmentIdstringYesThe ID of a Jira attachment on that work item.
categorystringNoThe 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​

StatusDescription
202Returned if the import is queued. The Retry-After header holds the seconds to wait before asking for its status.
400Returned if the body does not have the shape above (bad-request), or category is not set on the field (unknown-category).
403Returned if Fieldify has no active license on the site (license-required).
404Returned 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).
409Returned 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).
413Returned if the attachment is larger than the field's maximum file size or larger than 100 MB (file-too-large).
422Returned 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​

NameTypeRequiredDescription
jobIdstringYesThe 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​

StatusDescription
200Returned if the import has finished: status is succeeded or failed. A failed import is still a 200; its error says why.
202Returned if the import is queued or running. Wait the seconds in the Retry-After header and ask again.
400Returned if jobId is missing or has the wrong form (bad-request).
403Returned if Fieldify has no active license on the site (license-required).
404Returned 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​

FieldTypeDescription
fileIdstringThe file's ID. Pass it to Get download links.
filenamestring or nullThe file name.
mimeTypestring or nullThe file's media type.
sizeinteger or nullSize in bytes.
uploadedAtstring or nullWhen the file was added.
uploadedBystring or nullThe Atlassian account ID of whoever added the file. For a file added through the API, the allowed account.
categorystring or nullThe file's category, or null.
versionsintegerThe 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.

The fields of the file object, plus:

FieldTypeDescription
urlstringThe 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.
expiresAtstringWhen the link expires.
FieldTypeDescription
fileIdstringThe ID that got no link.
codestringnot-in-field: the file is not a current file of this field on this work item. mint-failed: the link could not be created.
messagestringThe reason, for people.
retryablebooleanOnly for mint-failed: true when asking again may succeed.

Import job object​

FieldTypeDescription
jobIdstringThe import's ID.
statusstringqueued, running, succeeded or failed.
issueobjectThe work item's id and key.
fieldobjectThe field's id.
attachmentIdstringThe attachment being copied.
createdAtstringWhen the import was started.
updatedAtstringWhen the record last changed.
resultobjectOnce succeeded: mode, file and replacedFileIds, as an upload returns them.
errorobjectOnce 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.
statusPathstringOnly in the 202 of Import an attachment: the path to ask for the status, relative to the base URL.
retryAfterSecondsintegerOnly in 202 answers: seconds to wait before you ask again. The Retry-After header holds the same number.

Check the scopes each operation needs​

MethodPathScopes
GET/v1/fieldsread:file-field:custom, read:forge-app:jira
GET/v1/filesread:file-field:custom, read:forge-app:jira
POST/v1/files/linksread:file-field:custom, read:forge-app:jira
POST/v1/files/uploadwrite:file-field:custom, read:forge-app:jira
POST/v1/files/importwrite:file-field:custom, read:forge-app:jira
GET/v1/files/importwrite: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 Authorization header as an API key: enter the value as Bearer <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.