inapp

Embed
Preview of the card
<a href="https://hermeticor.com/docs/ref-inapp"><img src="https://hermeticor.com/docs/_api/public/orgs/5fcd8b3c-a27c-4688-972f-de710125592f/spaces/caf5dc05-15f7-4e0c-bdb8-ab29ede6211e/pages/13f172cc-45a0-4cc5-8cb7-3f7955ce3df0/social-card.svg?v=3e7ae33eec8b" alt="inapp" width="600" height="315"></a>
GEThttps://hermeticor.com/v1/in-app-messages

In-app messages

Parameters

limitintegerquery
Page size; omitted returns the whole list
cursorstringquery
Opaque: the nextCursor of the previous page

Code samples

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

Responses

200 Default Response
Example
{
  "items": [
    {
      "id": "string",
      "status": "draft",
      "name": "string",
      "layout": "modal",
      "content": {
        "blocks": [],
        "html": "string"
      },
      "style": {
        "background": "#ffffff",
        "textColor": "#111111",
        "accentColor": "#2563eb",
        "radius": 12,
        "dismissible": true
      },
      "audience": {
        "kind": "everyone"
      },
      "trigger": {
        "type": "app_open"
      },
      "platforms": [
        "ios"
      ],
      "frequency": {
        "mode": "once",
        "max": 0,
        "perDays": 0
      },
      "priority": 0,
      "startAt": "string",
      "endAt": "string",
      "variants": [
        {
          "key": "string",
          "weight": 0,
          "content": {
            "blocks": [],
            "html": "string"
          }
        }
      ],
      "createdAt": "string",
      "updatedAt": "string"
    }
  ],
  "nextCursor": "string"
}
Schema
itemsItemsItem207[]required
Show child parameters
idstringrequired
statusstringrequired
draft | live | paused | archived
namestringrequired
layoutstringrequired
modal | banner_top | banner_bottom | fullscreen | bottom_sheet
contentobjectrequired
Show child parameters
blocksBlocksItem[]required
= []
htmlstring
styleobjectrequired
Show child parameters
backgroundstringrequired
= #ffffff
textColorstringrequired
= #111111
accentColorstringrequired
= #2563eb
radiusintegerrequired
= 12
dismissiblebooleanrequired
= true
audienceobject | AudienceVariant | AudienceVariant2required
triggerobject | TriggerVariant | TriggerVariant2 | TriggerVariant3required
platformsstring[]required
frequencyobjectrequired
Show child parameters
modestringrequired
once | once_per_session | every_time | max
maxinteger
perDaysinteger
priorityintegerrequired
startAtstringrequired
endAtstringrequired
variantsVariantsItem6[]required
Show child parameters
keystringrequired
weightintegerrequired
contentobjectrequired
createdAtstringrequired
updatedAtstringrequired
nextCursorstringrequired
4XX Default Response
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
detailsobject
5XX Default Response

Same as 4XX · GET /v1/in-app-messages

POSThttps://hermeticor.com/v1/in-app-messages

Create an in-app message (draft)

Request body

application/json
namestringrequired
layoutstring
modal | banner_top | banner_bottom | fullscreen | bottom_sheet = modal
contentobject
= {"blocks":[]}
Show child parameters
blocksBlocksItem2[]
= []
htmlstring
styleobject
= {"background":"#ffffff","textColor":"#111111","accentColor":"#2563eb","radius":12,"dismissible":true}
Show child parameters
backgroundstring
= #ffffff
textColorstring
= #111111
accentColorstring
= #2563eb
radiusinteger
= 12
dismissibleboolean
= true
audienceobject | AudienceVariant3 | AudienceVariant4
= {"kind":"everyone"}
triggerobject | TriggerVariant4 | TriggerVariant5
= {"type":"app_open"}
platformsstring[]
= ["ios","android","web"]
frequencyobject
= {"mode":"once"}
Show child parameters
modestringrequired
once | once_per_session | every_time | max
maxinteger
perDaysinteger
priorityinteger
= 100
startAtstring
endAtstring
variantsVariantsItem7[]
= []
Show child parameters
keystringrequired
weightintegerrequired
contentobjectrequired
Show child parameters
blocksBlocksItem2[]
= []
htmlstring
{
  "name": "string",
  "layout": "modal",
  "content": {
    "blocks": []
  },
  "style": {
    "background": "#ffffff",
    "textColor": "#111111",
    "accentColor": "#2563eb",
    "radius": 12,
    "dismissible": true
  },
  "audience": {
    "kind": "everyone"
  },
  "trigger": {
    "type": "app_open"
  },
  "platforms": [
    "ios",
    "android",
    "web"
  ],
  "frequency": {
    "mode": "once"
  },
  "priority": 100,
  "startAt": "2024-01-01T00:00:00Z",
  "endAt": "2024-01-01T00:00:00Z",
  "variants": []
}

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/in-app-messages" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","layout":"modal","content":{"blocks":[]},"style":{"background":"#ffffff","textColor":"#111111","accentColor":"#2563eb","radius":12,"dismissible":true},"audience":{"kind":"everyone"},"trigger":{"type":"app_open"},"platforms":["ios","android","web"],"frequency":{"mode":"once"},"priority":100,"startAt":"2024-01-01T00:00:00Z","endAt":"2024-01-01T00:00:00Z","variants":[]}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201 Default Response
Example
{
  "id": "string",
  "status": "draft",
  "name": "string",
  "layout": "modal",
  "content": {
    "blocks": [],
    "html": "string"
  },
  "style": {
    "background": "#ffffff",
    "textColor": "#111111",
    "accentColor": "#2563eb",
    "radius": 12,
    "dismissible": true
  },
  "audience": {
    "kind": "everyone"
  },
  "trigger": {
    "type": "app_open"
  },
  "platforms": [
    "ios"
  ],
  "frequency": {
    "mode": "once",
    "max": 0,
    "perDays": 0
  },
  "priority": 0,
  "startAt": "string",
  "endAt": "string",
  "variants": [
    {
      "key": "string",
      "weight": 0,
      "content": {
        "blocks": [],
        "html": "string"
      }
    }
  ],
  "createdAt": "string",
  "updatedAt": "string"
}
Schema
idstringrequired
statusstringrequired
draft | live | paused | archived
namestringrequired
layoutstringrequired
modal | banner_top | banner_bottom | fullscreen | bottom_sheet
contentobjectrequired
Show child parameters
blocksBlocksItem[]required
= []
htmlstring
styleobjectrequired
Show child parameters
backgroundstringrequired
= #ffffff
textColorstringrequired
= #111111
accentColorstringrequired
= #2563eb
radiusintegerrequired
= 12
dismissiblebooleanrequired
= true
audienceobject | AudienceVariant | AudienceVariant2required
triggerobject | TriggerVariant | TriggerVariant2 | TriggerVariant3required
platformsstring[]required
frequencyobjectrequired
Show child parameters
modestringrequired
once | once_per_session | every_time | max
maxinteger
perDaysinteger
priorityintegerrequired
startAtstringrequired
endAtstringrequired
variantsVariantsItem6[]required
Show child parameters
keystringrequired
weightintegerrequired
contentobjectrequired
Show child parameters
blocksBlocksItem[]required
= []
htmlstring
createdAtstringrequired
updatedAtstringrequired
4XX Default Response

Same as 4XX · GET /v1/in-app-messages

5XX Default Response

Same as 4XX · GET /v1/in-app-messages

GEThttps://hermeticor.com/v1/in-app-messages/{id}

One in-app message

Parameters

idstringpathrequired

Code samples

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

Responses

200 Default Response

Same as 201 · POST /v1/in-app-messages

4XX Default Response

Same as 4XX · GET /v1/in-app-messages

5XX Default Response

Same as 4XX · GET /v1/in-app-messages

DELETEhttps://hermeticor.com/v1/in-app-messages/{id}

Delete an in-app message and its events

Parameters

idstringpathrequired

Code samples

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

Responses

200 Default Response
Example
{
  "ok": true
}
Schema
okbooleanrequired
true
4XX Default Response

Same as 4XX · GET /v1/in-app-messages

5XX Default Response

Same as 4XX · GET /v1/in-app-messages

PATCHhttps://hermeticor.com/v1/in-app-messages/{id}

Edit an in-app message or change its status (draft, live, paused, archived)

Parameters

idstringpathrequired

Request body

application/json
namestring
layoutstring
modal | banner_top | banner_bottom | fullscreen | bottom_sheet
contentobject
Show child parameters
blocksBlocksItem2[]
= []
htmlstring
styleobject
Show child parameters
backgroundstring
= #ffffff
textColorstring
= #111111
accentColorstring
= #2563eb
radiusinteger
= 12
dismissibleboolean
= true
audienceobject | AudienceVariant3 | AudienceVariant4
triggerobject | TriggerVariant4 | TriggerVariant5
platformsstring[]
frequencyobject
Show child parameters
modestringrequired
once | once_per_session | every_time | max
maxinteger
perDaysinteger
priorityinteger
startAtstring
endAtstring
variantsVariantsItem7[]
Show child parameters
keystringrequired
weightintegerrequired
contentobjectrequired
Show child parameters
blocksBlocksItem2[]
= []
htmlstring
statusstring
draft | live | paused | archived
{
  "name": "string",
  "layout": "modal",
  "content": {
    "blocks": [],
    "html": "string"
  },
  "style": {
    "background": "#ffffff",
    "textColor": "#111111",
    "accentColor": "#2563eb",
    "radius": 12,
    "dismissible": true
  },
  "audience": {
    "kind": "everyone"
  },
  "trigger": {
    "type": "app_open"
  },
  "platforms": [
    "ios"
  ],
  "frequency": {
    "mode": "once",
    "max": 0,
    "perDays": 0
  },
  "priority": 0,
  "startAt": "2024-01-01T00:00:00Z",
  "endAt": "2024-01-01T00:00:00Z",
  "variants": [
    {
      "key": "string",
      "weight": 0,
      "content": {
        "blocks": [],
        "html": "string"
      }
    }
  ],
  "status": "draft"
}

Code samples

cURL
curl -X PATCH "https://hermeticor.com/v1/in-app-messages/{id}" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","layout":"modal","content":{"blocks":[],"html":"string"},"style":{"background":"#ffffff","textColor":"#111111","accentColor":"#2563eb","radius":12,"dismissible":true},"audience":{"kind":"everyone"},"trigger":{"type":"app_open"},"platforms":["ios"],"frequency":{"mode":"once","max":0,"perDays":0},"priority":0,"startAt":"2024-01-01T00:00:00Z","endAt":"2024-01-01T00:00:00Z","variants":[{"key":"string","weight":0,"content":{"blocks":[],"html":"string"}}],"status":"draft"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response

Same as 201 · POST /v1/in-app-messages

4XX Default Response

Same as 4XX · GET /v1/in-app-messages

5XX Default Response

Same as 4XX · GET /v1/in-app-messages

Updated