younifyd
Menu

Create Document

Create a document

POST/api/{pluralApiId}

Use it in a workflow

  1. Add a step and choose the Strapi connector.
  2. Pick the Create Document action (under Documents).
  3. Fill in the fields below, then reference the result from later steps as {{createDocument.response.data}}.

Request

Path parameters

pluralApiIdstringrequired

Plural API ID of the content type, for example articles. Single types are reached by the same operations using their singular API ID (via the Base URL path field), where the document ID is not needed.

Query parameters

statusstring

Draft or published version of the document. Defaults to published when Draft and Publish is enabled.

One ofdraftpublished

localestring

Locale code of the document version, for example en or fr.

Request body

Enter the body as JSON in the step's Body field.

dataobjectrequired

Field values of the document.

json
{
  "data": {}
}

Response

Returns 200 with an object. Read it in later steps with {{createDocument.response.data.<field>}}.

dataobject

A document with its content type attributes flattened at the top level.

idinteger
documentIdstring
metaobject
json
{
  "data": {
    "id": 0,
    "documentId": "string"
  },
  "meta": {}
}

Need more? See the Strapi guide for connection setup and behaviour shared by every action.

Was this page helpful?