Skip to main content
POST
/
content
cURL
curl --request POST \
  --url https://api.patterns.company/v1/content \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prospect": "<string>",
  "template": "<string>",
  "language": "<string>",
  "callback": "<string>"
}
'
{
  "id": "<string>",
  "pattern": "<string>",
  "user": "<string>",
  "prospect": "<string>",
  "template": "<string>",
  "status": "waiting",
  "language": "<string>",
  "analytics": [
    {
      "id": "<string>",
      "selector": "<string>",
      "type": "view"
    }
  ],
  "content": [
    {
      "selector": "<string>",
      "type": "text",
      "payload": "<string>"
    }
  ],
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Content to add to the organization

prospect
string
required

Prospect for whom the content is created

template
string
required

Template used for the content

language
string
required

Language of the content

callback
string

Callback URL for receiving a notification when content is ready

Response

content response

id
string<ObjectId>

ID of the content

pattern
string

Pattern you neet to pass into the page with a snippet

user
string

User who created the content

prospect
string

Prospect for whom the content is created

template
string

Template used for the content

status
enum<string>

Status of the content

Available options:
waiting,
generating,
completed
language
string

Language of the content

analytics
object[]

Analytics of the content

content
object[]

Content of the content

createdAt
string<date-time>

Date and time when the content was created

updatedAt
string<date-time>

Date and time when the content was last updated