Cognito Forms

App · 11 actions

Work with your Cognito Forms: list forms and read their fields, create, read, update and delete entries, list a saved view's entries, upload and read files, generate entry documents, open or close a form on a schedule, and start a workflow for each new entry.

Actions

ActionWhat it does
Create entryAdd an entry to a form from field values.
Delete entryPermanently delete an entry.
Get entryGet one entry of a form, with all its fields.
Get entry documentGenerate a document (such as a PDF) from an entry with one of the form's document templates, and return its details and a short-lived link to it.
Get fileGet a file stored in Cognito Forms by its id, such as one an entry's file field holds or 'Upload file' returned: its name, type, size and a short-lived link.
Get form schemaGet a form's schema (Swagger JSON): every field's JSON name and type.
List entries in a viewList the entries of a saved view from a form's Entries page, with the fields the view shows (repeating sections and tables are not included).
List formsList the forms the API key can access, with their ids and names.
Set form availabilitySet when a form accepts entries, and what visitors see outside that time.
Update entryChange fields of an entry.
Upload fileUpload a file (up to 10 MB) to Cognito Forms so an entry's file field can use it.

Create entry

Add an entry to a form from field values. The form's own notifications and rules apply as if someone had submitted it.

Inputs

FormformtextRequired
The form. Pick one, or give its id or internal name from an earlier step.
Field valuesentryobject
The entry's fields, keyed by the form's JSON field names (see 'Get form schema'), such as {"Email": "jo@example.com"}. Leave empty for a form with no required fields.

Outputs

entryobject
The entry, with the form's own fields named by their JSON names
entry_idtext
The entry's id, to pass to the other entry steps
formtext
The form the entry is in
Example output
{
  "entry": {
    "Email": "jo@example.com",
    "Entry": {
      "Action": "Submit",
      "Number": 12,
      "Status": "Submitted"
    },
    "Id": "12",
    "Name": {
      "First": "Jo",
      "Last": "Bloggs"
    }
  },
  "entry_id": "12",
  "form": "1"
}

Delete entry

Permanently delete an entry. Needs a key with the Read/Write/Delete entry scope.

Inputs

FormformtextRequired
The form. Pick one, or give its id or internal name from an earlier step.
Entryentry_idtextRequired
The entry's number (such as 12) or entry id, from 'Create entry' or an earlier step.

Outputs

deletedtrue/false
Always true once deleted
entry_idtext
The entry deleted
formtext
The form
Example output
{
  "deleted": true,
  "entry_id": "12",
  "form": "1"
}

Get entry

Get one entry of a form, with all its fields.

Inputs

FormformtextRequired
The form. Pick one, or give its id or internal name from an earlier step.
Entryentry_idtextRequired
The entry's number (such as 12) or entry id, from 'Create entry' or an earlier step.

Outputs

entryobject
The entry, with the form's own fields named by their JSON names
entry_idtext
The entry's id, to pass to the other entry steps
formtext
The form the entry is in
Example output
{
  "entry": {
    "Email": "jo@example.com",
    "Entry": {
      "Action": "Submit",
      "Number": 12,
      "Status": "Submitted"
    },
    "Id": "12",
    "Name": {
      "First": "Jo",
      "Last": "Bloggs"
    }
  },
  "entry_id": "12",
  "form": "1"
}

Get entry document

Generate a document (such as a PDF) from an entry with one of the form's document templates, and return its details and a short-lived link to it.

Inputs

FormformtextRequired
The form. Pick one, or give its id or internal name from an earlier step.
Entryentry_idtextRequired
The entry's number (such as 12) or entry id, from 'Create entry' or an earlier step.
Template numbertemplate_numbernumberRequired
The template's ID, shown at the top right of its entry in the form's Manage Document Templates dialog (1 for the first).From 1 to 1000.
Include the file's contentinclude_contenttrue/false
Also return the file itself as base64 text. Off by default, because files can be large; the short-lived link is always returned.Default: false.

Outputs

documentobject
The generated document
entry_idtext
The entry
formtext
The form
template_numbernumber
The template used
Example output
{
  "document": {
    "content_base64": "JVBERi0=",
    "content_type": "application/pdf",
    "id": "f_01HXAMPLE",
    "name": "agreement.pdf",
    "size": 20480,
    "url": "https://www.cognitoforms.com/d/EXAMPLE"
  },
  "entry_id": "12",
  "form": "1",
  "template_number": 1
}

Get file

Get a file stored in Cognito Forms by its id, such as one an entry's file field holds or 'Upload file' returned: its name, type, size and a short-lived link.

Inputs

File IDfile_idtextRequired
The file's id, from an entry or an 'Upload file' step.
Include the file's contentinclude_contenttrue/false
Also return the file itself as base64 text. Off by default, because files can be large; the short-lived link is always returned.Default: false.

Outputs

fileobject
The file
file_idtext
The file's id
Example output
{
  "file": {
    "content_base64": "JVBERi0=",
    "content_type": "application/pdf",
    "id": "f_01HXAMPLE",
    "name": "agreement.pdf",
    "size": 20480,
    "url": "https://www.cognitoforms.com/d/EXAMPLE"
  },
  "file_id": "f_01HXAMPLE"
}

Get form schema

Get a form's schema (Swagger JSON): every field's JSON name and type. Use it to see which fields 'Create entry' and 'Update entry' take.

Inputs

FormformtextRequired
The form. Pick one, or give its id or internal name from an earlier step.
Only fields you can setinput_onlytrue/false
Leave out read-only fields such as the entry number.Default: false.
Include file and document linksinclude_linkstrue/false
Include the link fields for uploaded files, signatures and entry documents.Default: true.

Outputs

formtext
The form asked about
schemaobject
The form's Swagger schema, with its fields
Example output
{
  "form": "1",
  "schema": {
    "definitions": {
      "ContactUs": {}
    },
    "swagger": "2.0"
  }
}

List entries in a view

List the entries of a saved view from a form's Entries page, with the fields the view shows (repeating sections and tables are not included). Cognito Forms has no other way to list entries.

Inputs

FormformtextRequired
The form. Pick one, or give its id or internal name from an earlier step.
View numberview_idtextRequired
The number in the view's OData link, after 'Views(': on the form's Entries page open the view's menu, choose Sync View To > OData Consumer and Generate URL. Only grid views work.
How many entrieslimitnumber
The most entries to return, 1 to 1000. Defaults to 100.From 1 to 1000.
Only entry idsids_onlytrue/false
Return just each entry's id.Default: false.

Outputs

countnumber
How many are returned
entrieslist
The entries, as the view shows them
formtext
The form
has_moretrue/false
True if the view holds more than were returned
totalnumber
How many entries the view holds, if reported
view_idtext
The view
Example output
{
  "count": 1,
  "entries": [
    {
      "Email": "jo@example.com",
      "Id": "12"
    }
  ],
  "form": "1",
  "has_more": false,
  "total": 1,
  "view_id": "5"
}

List forms

List the forms the API key can access, with their ids and names. Archived forms are not included.

Inputs

None.

Outputs

countnumber
How many forms
formslist
The forms
Example output
{
  "count": 1,
  "forms": [
    {
      "id": "1",
      "name": "Contact Us"
    }
  ]
}

Set form availability

Set when a form accepts entries, and what visitors see outside that time. What you give replaces the form's current limit: leave Start, End and Message all empty to make the form available all of the time.

Inputs

FormformtextRequired
The form. Pick one, or give its id or internal name from an earlier step.
Available fromstartdate and time
When the form opens. Empty for no start limit.
Available untilenddate and time
When the form closes. Empty for no end limit.
Message when unavailablemessagetext
What visitors see outside the available time.

Outputs

availability_endtext
When the form closes, empty if no limit
availability_starttext
When the form opens, empty if no limit
formtext
The form changed
not_available_messagetext
What visitors see outside that time
Example output
{
  "availability_end": "2026-11-30T17:00:00Z",
  "availability_start": "2026-11-01T09:00:00Z",
  "form": "1",
  "not_available_message": "This form is closed."
}

Update entry

Change fields of an entry. Fields you leave out keep their values. Cognito Forms refuses it for an entry that includes a paid order.

Inputs

FormformtextRequired
The form. Pick one, or give its id or internal name from an earlier step.
Entryentry_idtextRequired
The entry's number (such as 12) or entry id, from 'Create entry' or an earlier step.
Field valuesentryobjectRequired
The fields to change, keyed by the form's JSON field names (see 'Get form schema').

Outputs

entryobject
The entry, with the form's own fields named by their JSON names
entry_idtext
The entry's id, to pass to the other entry steps
formtext
The form the entry is in
Example output
{
  "entry": {
    "Email": "jo@example.com",
    "Entry": {
      "Action": "Submit",
      "Number": 12,
      "Status": "Submitted"
    },
    "Id": "12",
    "Name": {
      "First": "Jo",
      "Last": "Bloggs"
    }
  },
  "entry_id": "12",
  "form": "1"
}

Upload file

Upload a file (up to 10 MB) to Cognito Forms so an entry's file field can use it. Cognito Forms has no way to delete it afterwards.

Inputs

File namefile_nametextRequired
The name to give the file, with its extension.
File content (base64)content_base64textRequired
The file's bytes, encoded as base64 text.
File typecontent_typetext
The file's media type, such as application/pdf.

Outputs

fileobject
The uploaded file
file_idtext
The uploaded file's id
Example output
{
  "file": {
    "content_type": "application/pdf",
    "id": "f_01HXAMPLE",
    "name": "agreement.pdf",
    "size": 20480
  },
  "file_id": "f_01HXAMPLE"
}

On this page