campaigns

Embed
Preview of the card
<a href="https://hermeticor.com/docs/ref-campaigns"><img src="https://hermeticor.com/docs/_api/public/orgs/5fcd8b3c-a27c-4688-972f-de710125592f/spaces/caf5dc05-15f7-4e0c-bdb8-ab29ede6211e/pages/7b5e5778-2701-4b75-820c-3417186ab185/social-card.svg?v=3e7ae33eec8b" alt="campaigns" width="600" height="315"></a>
GEThttps://hermeticor.com/v1/campaigns/{id}/revisions/{revisionId}

Parameters

idstringpathrequired
revisionIdstringpathrequired

Code samples

cURL
curl -X GET "https://hermeticor.com/v1/campaigns/{id}/revisions/{revisionId}" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "id": "string",
  "campaignId": "string",
  "reason": "string",
  "createdBy": "string",
  "createdAt": "2024-01-01T00:00:00Z",
  "messages": 0,
  "templateId": "string"
}
Schema
idstringrequired
campaignIdstringrequired
reasonstringrequired
createdBystringrequired
createdAtstringrequired
messagesintegerrequired
templateIdstringrequired
4XX Default Response
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
detailsobject
POSThttps://hermeticor.com/v1/campaigns/{id}/draft/reset

Discard the latest edit: restore the newest kept revision (draft only; the current content is kept as a revision, so this can be undone)

Parameters

idstringpathrequired

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/campaigns/{id}/draft/reset" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "ok": true
}
Schema
okbooleanrequired
true
POSThttps://hermeticor.com/v1/campaign-folders/batch

create | read | update | archive up to 50 campaign folders in one transaction (archive keeps the campaigns, ungrouped)

Request body

application/json
Example
{
  "op": "create",
  "items": [
    {
      "name": "string"
    }
  ]
}
Option 1
opstringrequired
create
itemsobject[]required
Show child parameters
namestringrequired
{
  "op": "create",
  "items": [
    {
      "name": "string"
    }
  ]
}
PostV1CampaignFoldersBatchBodyVariant
opstringrequired
read
idsstring[]required
{
  "op": "read",
  "ids": [
    "string"
  ]
}
Option 3
opstringrequired
update
itemsobject[]required
Show child parameters
idstringrequired
namestringrequired
{
  "op": "update",
  "items": [
    {
      "id": "string",
      "name": "string"
    }
  ]
}
PostV1CampaignFoldersBatchBodyVariant2
opstringrequired
archive
idsstring[]required
{
  "op": "archive",
  "ids": [
    "string"
  ]
}

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/campaign-folders/batch" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"op":"create","items":[{"name":"string"}]}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "items": [
    {
      "id": "string",
      "name": "string",
      "campaigns": 0,
      "createdAt": "2024-01-01T00:00:00Z",
      "owner": "string",
      "notes": "string",
      "utmCampaign": "string",
      "startsOn": "string",
      "endsOn": "string"
    }
  ],
  "archived": 0
}
Schema
itemsItemsItem57[]required
Show child parameters
idstringrequired
namestringrequired
campaignsintegerrequired
createdAtstringrequired
ownerstringrequired
notesstringrequired
utmCampaignstringrequired
startsOnstringrequired
endsOnstringrequired
archivedintegerrequired
GEThttps://hermeticor.com/v1/campaign-folders

Parameters

limitintegerquery
= 50
cursorstringquery

Code samples

cURL
curl -X GET "https://hermeticor.com/v1/campaign-folders" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "items": [
    {
      "id": "string",
      "name": "string",
      "campaigns": 0,
      "createdAt": "2024-01-01T00:00:00Z",
      "owner": "string",
      "notes": "string",
      "utmCampaign": "string",
      "startsOn": "string",
      "endsOn": "string"
    }
  ],
  "nextCursor": "string"
}
Schema
itemsItemsItem57[]required
Show child parameters
idstringrequired
namestringrequired
campaignsintegerrequired
createdAtstringrequired
ownerstringrequired
notesstringrequired
utmCampaignstringrequired
startsOnstringrequired
endsOnstringrequired
nextCursorstringrequired
POSThttps://hermeticor.com/v1/campaign-folders

Request body

application/json
namestringrequired
ownerstring
notesstring
utmCampaignstring
startsOnstring
endsOnstring
{
  "name": "string",
  "owner": "string",
  "notes": "string",
  "utmCampaign": "string",
  "startsOn": "string",
  "endsOn": "string"
}

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/campaign-folders" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","owner":"string","notes":"string","utmCampaign":"string","startsOn":"string","endsOn":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201 Default Response
Example
{
  "id": "string",
  "name": "string",
  "campaigns": 0,
  "createdAt": "2024-01-01T00:00:00Z",
  "owner": "string",
  "notes": "string",
  "utmCampaign": "string",
  "startsOn": "string",
  "endsOn": "string"
}
Schema
idstringrequired
namestringrequired
campaignsintegerrequired
createdAtstringrequired
ownerstringrequired
notesstringrequired
utmCampaignstringrequired
startsOnstringrequired
endsOnstringrequired
GEThttps://hermeticor.com/v1/campaign-folders/{id}

Parameters

idstringpathrequired

Code samples

cURL
curl -X GET "https://hermeticor.com/v1/campaign-folders/{id}" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response

Same as 201 · POST /v1/campaign-folders

DELETEhttps://hermeticor.com/v1/campaign-folders/{id}

Parameters

idstringpathrequired

Code samples

cURL
curl -X DELETE "https://hermeticor.com/v1/campaign-folders/{id}" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response

Same as 200 · POST /v1/campaigns/{id}/draft/reset

PATCHhttps://hermeticor.com/v1/campaign-folders/{id}

Parameters

idstringpathrequired

Request body

application/json
namestring
ownerstring
notesstring
utmCampaignstring
startsOnstring
endsOnstring
{
  "name": "string",
  "owner": "string",
  "notes": "string",
  "utmCampaign": "string",
  "startsOn": "string",
  "endsOn": "string"
}

Code samples

cURL
curl -X PATCH "https://hermeticor.com/v1/campaign-folders/{id}" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","owner":"string","notes":"string","utmCampaign":"string","startsOn":"string","endsOn":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response

Same as 201 · POST /v1/campaign-folders

PUThttps://hermeticor.com/v1/campaigns/{id}/folder

Parameters

idstringpathrequired

Request body

application/json
folderIdstringrequired
{
  "folderId": "string"
}

Code samples

cURL
curl -X PUT "https://hermeticor.com/v1/campaigns/{id}/folder" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"folderId":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "id": "string",
  "folderId": "string"
}
Schema
idstringrequired
folderIdstringrequired

Updated