GET /api/v1/group-email-messages
List group email messages

Examples

GET /foundry-api/v1/group-email-messages
401
{
  "errors": [
    {
      "title": "You are not authorized to access this request"
    }
  ]
}

GET /api/v1/group-email-messages/:id
Show a group email message

Examples

GET /foundry-api/v1/group-email-messages/6
401
{
  "errors": [
    {
      "title": "You are not authorized to access this request"
    }
  ]
}

Params

Param name Description
id
required

Group Email Message ID

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hyphen(-) with no leading or trailing space.


POST /api/v1/group-email-messages
Create a group email message

Examples

POST /foundry-api/v1/group-email-messages
{
  "data": {
    "type": "group-email-messages",
    "attributes": {
      "name": "Shall not Perish 29",
      "subject": "Waiting for the Barbarians 29",
      "intro-message": "Est impedit amet. Architecto debitis est. Ab corrupti sit nam dignissimos neque. Nihil saepe tempora cumque. Qui aut ullam nam modi.",
      "content": "<p>Dolorum eaque earum ut rerum. Ut alias delectus illo fugit expedita veritatis et. Optio ut dolorem fugiat sint.</p>\n<p>Non doloribus vero quibusdam officia accusamus reprehenderit in. Sint esse numquam nam adipisci excepturi. Consequatur et velit.</p>\n<p>Placeat sed velit occaecati. Ut numquam quisquam est aut qui. Vitae id quia quia delectus et. Sed cumque delectus.</p>",
      "status": "draft",
      "scheduled-at": null,
      "account-group-filter": null,
      "visitor-group-filter": null,
      "created-at": null,
      "sender": "Sender <sender@smartkarma.com>"
    },
    "relationships": {}
  }
}
401
{
  "errors": [
    {
      "title": "You are not authorized to access this request"
    }
  ]
}

PATCH /api/v1/group-email-messages/:id
Update a group email message

Examples

PATCH /foundry-api/v1/group-email-messages/10
{
  "data": {
    "id": "10",
    "type": "group-email-messages",
    "attributes": {
      "name": "skx",
      "subject": "Jacob Have I Loved 10",
      "intro-message": "Autem ut asperiores cupiditate et nihil laborum. Alias est provident et libero aliquam. Facilis qui earum ea corrupti et. Hic omnis aut vel occaecati. Omnis nesciunt optio.",
      "content": "<p>Voluptate sit et recusandae. Facere dolores eaque aut. Inventore cupiditate ad. Quidem qui repellendus ex voluptates a sunt voluptate. Consectetur id sed corporis mollitia quam.</p>\n<p>Sit et nihil sit similique asperiores. Possimus suscipit a unde aut consectetur. Voluptatibus iure sunt veritatis quam.</p>\n<p>Magni quia in ipsum. Quia animi sequi. Qui dignissimos culpa modi necessitatibus ea facilis ea. Et hic itaque velit voluptate.</p>",
      "status": "draft",
      "scheduled-at": null,
      "account-group-filter": null,
      "visitor-group-filter": null,
      "created-at": "2017-08-29 10:43:01 +0800",
      "sender": "Sender <sender@smartkarma.com>"
    },
    "relationships": {}
  }
}
200
{
  "data": {
    "id": "10",
    "type": "group-email-messages",
    "links": {
      "self": "http://test.host/foundry-api/v1/group-email-messages/10"
    },
    "attributes": {
      "name": "skx",
      "subject": "Jacob Have I Loved 10",
      "intro-message": "Autem ut asperiores cupiditate et nihil laborum. Alias est provident et libero aliquam. Facilis qui earum ea corrupti et. Hic omnis aut vel occaecati. Omnis nesciunt optio.",
      "content": "<p>Voluptate sit et recusandae. Facere dolores eaque aut. Inventore cupiditate ad. Quidem qui repellendus ex voluptates a sunt voluptate. Consectetur id sed corporis mollitia quam.</p>\n<p>Sit et nihil sit similique asperiores. Possimus suscipit a unde aut consectetur. Voluptatibus iure sunt veritatis quam.</p>\n<p>Magni quia in ipsum. Quia animi sequi. Qui dignissimos culpa modi necessitatibus ea facilis ea. Et hic itaque velit voluptate.</p>",
      "status": "draft",
      "scheduled-at": null,
      "account-group-filter": null,
      "visitor-group-filter": null,
      "created-at": "2017-08-29T10:43:01.000+08:00",
      "sender": "Sender <sender@smartkarma.com>"
    },
    "relationships": {
      "scheduler": {
        "links": {
          "self": "http://test.host/foundry-api/v1/group-email-messages/10/relationships/scheduler",
          "related": "http://test.host/foundry-api/v1/group-email-messages/10/scheduler"
        }
      },
      "email-receipts": {
        "links": {
          "self": "http://test.host/foundry-api/v1/group-email-messages/10/relationships/email-receipts",
          "related": "http://test.host/foundry-api/v1/group-email-messages/10/email-receipts"
        }
      },
      "images": {
        "links": {
          "self": "http://test.host/foundry-api/v1/group-email-messages/10/relationships/images",
          "related": "http://test.host/foundry-api/v1/group-email-messages/10/images"
        }
      }
    }
  }
}

Params

Param name Description
id
required

Group Email Message ID

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hyphen(-) with no leading or trailing space.


DELETE /api/v1/group-email-messages/:id
Delete a group email message

Examples

DELETE /foundry-api/v1/group-email-messages/1
401
{
  "errors": [
    {
      "title": "You are not authorized to access this request"
    }
  ]
}

Params

Param name Description
id
required

Group Email Message ID

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hyphen(-) with no leading or trailing space.